# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = ['IamOrgPolicyArgs', 'IamOrgPolicy']

@pulumi.input_type
class IamOrgPolicyArgs:
    def __init__(__self__, *,
                 default_service_strategy: pulumi.Input[str],
                 services: pulumi.Input[Mapping[str, pulumi.Input['IamOrgPolicyServicesArgs']]],
                 timeouts: Optional[pulumi.Input['IamOrgPolicyTimeoutsArgs']] = None):
        """
        The set of arguments for constructing a IamOrgPolicy resource.
        :param pulumi.Input[str] default_service_strategy: Default service strategy (`allow` or `deny`).
        :param pulumi.Input[Mapping[str, pulumi.Input['IamOrgPolicyServicesArgs']]] services: IAM policy services.
        """
        pulumi.set(__self__, "default_service_strategy", default_service_strategy)
        pulumi.set(__self__, "services", services)
        if timeouts is not None:
            pulumi.set(__self__, "timeouts", timeouts)

    @property
    @pulumi.getter(name="defaultServiceStrategy")
    def default_service_strategy(self) -> pulumi.Input[str]:
        """
        Default service strategy (`allow` or `deny`).
        """
        return pulumi.get(self, "default_service_strategy")

    @default_service_strategy.setter
    def default_service_strategy(self, value: pulumi.Input[str]):
        pulumi.set(self, "default_service_strategy", value)

    @property
    @pulumi.getter
    def services(self) -> pulumi.Input[Mapping[str, pulumi.Input['IamOrgPolicyServicesArgs']]]:
        """
        IAM policy services.
        """
        return pulumi.get(self, "services")

    @services.setter
    def services(self, value: pulumi.Input[Mapping[str, pulumi.Input['IamOrgPolicyServicesArgs']]]):
        pulumi.set(self, "services", value)

    @property
    @pulumi.getter
    def timeouts(self) -> Optional[pulumi.Input['IamOrgPolicyTimeoutsArgs']]:
        return pulumi.get(self, "timeouts")

    @timeouts.setter
    def timeouts(self, value: Optional[pulumi.Input['IamOrgPolicyTimeoutsArgs']]):
        pulumi.set(self, "timeouts", value)


@pulumi.input_type
class _IamOrgPolicyState:
    def __init__(__self__, *,
                 default_service_strategy: Optional[pulumi.Input[str]] = None,
                 services: Optional[pulumi.Input[Mapping[str, pulumi.Input['IamOrgPolicyServicesArgs']]]] = None,
                 timeouts: Optional[pulumi.Input['IamOrgPolicyTimeoutsArgs']] = None):
        """
        Input properties used for looking up and filtering IamOrgPolicy resources.
        :param pulumi.Input[str] default_service_strategy: Default service strategy (`allow` or `deny`).
        :param pulumi.Input[Mapping[str, pulumi.Input['IamOrgPolicyServicesArgs']]] services: IAM policy services.
        """
        if default_service_strategy is not None:
            pulumi.set(__self__, "default_service_strategy", default_service_strategy)
        if services is not None:
            pulumi.set(__self__, "services", services)
        if timeouts is not None:
            pulumi.set(__self__, "timeouts", timeouts)

    @property
    @pulumi.getter(name="defaultServiceStrategy")
    def default_service_strategy(self) -> Optional[pulumi.Input[str]]:
        """
        Default service strategy (`allow` or `deny`).
        """
        return pulumi.get(self, "default_service_strategy")

    @default_service_strategy.setter
    def default_service_strategy(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "default_service_strategy", value)

    @property
    @pulumi.getter
    def services(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input['IamOrgPolicyServicesArgs']]]]:
        """
        IAM policy services.
        """
        return pulumi.get(self, "services")

    @services.setter
    def services(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input['IamOrgPolicyServicesArgs']]]]):
        pulumi.set(self, "services", value)

    @property
    @pulumi.getter
    def timeouts(self) -> Optional[pulumi.Input['IamOrgPolicyTimeoutsArgs']]:
        return pulumi.get(self, "timeouts")

    @timeouts.setter
    def timeouts(self, value: Optional[pulumi.Input['IamOrgPolicyTimeoutsArgs']]):
        pulumi.set(self, "timeouts", value)


class IamOrgPolicy(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 default_service_strategy: Optional[pulumi.Input[str]] = None,
                 services: Optional[pulumi.Input[Mapping[str, pulumi.Input[Union['IamOrgPolicyServicesArgs', 'IamOrgPolicyServicesArgsDict']]]]] = None,
                 timeouts: Optional[pulumi.Input[Union['IamOrgPolicyTimeoutsArgs', 'IamOrgPolicyTimeoutsArgsDict']]] = None,
                 __props__=None):
        """
        ## Example Usage

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] default_service_strategy: Default service strategy (`allow` or `deny`).
        :param pulumi.Input[Mapping[str, pulumi.Input[Union['IamOrgPolicyServicesArgs', 'IamOrgPolicyServicesArgsDict']]]] services: IAM policy services.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: IamOrgPolicyArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        ## Example Usage

        :param str resource_name: The name of the resource.
        :param IamOrgPolicyArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(IamOrgPolicyArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 default_service_strategy: Optional[pulumi.Input[str]] = None,
                 services: Optional[pulumi.Input[Mapping[str, pulumi.Input[Union['IamOrgPolicyServicesArgs', 'IamOrgPolicyServicesArgsDict']]]]] = None,
                 timeouts: Optional[pulumi.Input[Union['IamOrgPolicyTimeoutsArgs', 'IamOrgPolicyTimeoutsArgsDict']]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = IamOrgPolicyArgs.__new__(IamOrgPolicyArgs)

            if default_service_strategy is None and not opts.urn:
                raise TypeError("Missing required property 'default_service_strategy'")
            __props__.__dict__["default_service_strategy"] = default_service_strategy
            if services is None and not opts.urn:
                raise TypeError("Missing required property 'services'")
            __props__.__dict__["services"] = services
            __props__.__dict__["timeouts"] = timeouts
        super(IamOrgPolicy, __self__).__init__(
            'exoscale:index/iamOrgPolicy:IamOrgPolicy',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            default_service_strategy: Optional[pulumi.Input[str]] = None,
            services: Optional[pulumi.Input[Mapping[str, pulumi.Input[Union['IamOrgPolicyServicesArgs', 'IamOrgPolicyServicesArgsDict']]]]] = None,
            timeouts: Optional[pulumi.Input[Union['IamOrgPolicyTimeoutsArgs', 'IamOrgPolicyTimeoutsArgsDict']]] = None) -> 'IamOrgPolicy':
        """
        Get an existing IamOrgPolicy resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] default_service_strategy: Default service strategy (`allow` or `deny`).
        :param pulumi.Input[Mapping[str, pulumi.Input[Union['IamOrgPolicyServicesArgs', 'IamOrgPolicyServicesArgsDict']]]] services: IAM policy services.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _IamOrgPolicyState.__new__(_IamOrgPolicyState)

        __props__.__dict__["default_service_strategy"] = default_service_strategy
        __props__.__dict__["services"] = services
        __props__.__dict__["timeouts"] = timeouts
        return IamOrgPolicy(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="defaultServiceStrategy")
    def default_service_strategy(self) -> pulumi.Output[str]:
        """
        Default service strategy (`allow` or `deny`).
        """
        return pulumi.get(self, "default_service_strategy")

    @property
    @pulumi.getter
    def services(self) -> pulumi.Output[Mapping[str, 'outputs.IamOrgPolicyServices']]:
        """
        IAM policy services.
        """
        return pulumi.get(self, "services")

    @property
    @pulumi.getter
    def timeouts(self) -> pulumi.Output[Optional['outputs.IamOrgPolicyTimeouts']]:
        return pulumi.get(self, "timeouts")

