# 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 pulumi
import pulumi.runtime
from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload
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.
        """
        IAMOrgPolicyArgs._configure(
            lambda key, value: pulumi.set(__self__, key, value),
            default_service_strategy=default_service_strategy,
            services=services,
            timeouts=timeouts,
        )
    @staticmethod
    def _configure(
             _setter: Callable[[Any, Any], None],
             default_service_strategy: pulumi.Input[str],
             services: pulumi.Input[Mapping[str, pulumi.Input['IAMOrgPolicyServicesArgs']]],
             timeouts: Optional[pulumi.Input['IAMOrgPolicyTimeoutsArgs']] = None,
             opts: Optional[pulumi.ResourceOptions]=None):
        _setter("default_service_strategy", default_service_strategy)
        _setter("services", services)
        if timeouts is not None:
            _setter("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.
        """
        _IAMOrgPolicyState._configure(
            lambda key, value: pulumi.set(__self__, key, value),
            default_service_strategy=default_service_strategy,
            services=services,
            timeouts=timeouts,
        )
    @staticmethod
    def _configure(
             _setter: Callable[[Any, Any], None],
             default_service_strategy: Optional[pulumi.Input[str]] = None,
             services: Optional[pulumi.Input[Mapping[str, pulumi.Input['IAMOrgPolicyServicesArgs']]]] = None,
             timeouts: Optional[pulumi.Input['IAMOrgPolicyTimeoutsArgs']] = None,
             opts: Optional[pulumi.ResourceOptions]=None):
        if default_service_strategy is not None:
            _setter("default_service_strategy", default_service_strategy)
        if services is not None:
            _setter("services", services)
        if timeouts is not None:
            _setter("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[pulumi.InputType['IAMOrgPolicyServicesArgs']]]]] = None,
                 timeouts: Optional[pulumi.Input[pulumi.InputType['IAMOrgPolicyTimeoutsArgs']]] = None,
                 __props__=None):
        """
        Create a IAMOrgPolicy resource with the given unique name, props, and options.
        :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[pulumi.InputType['IAMOrgPolicyServicesArgs']]]] services: IAM policy services.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: IAMOrgPolicyArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Create a IAMOrgPolicy resource with the given unique name, props, and options.
        :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:
            kwargs = kwargs or {}
            def _setter(key, value):
                kwargs[key] = value
            IAMOrgPolicyArgs._configure(_setter, **kwargs)
            __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[pulumi.InputType['IAMOrgPolicyServicesArgs']]]]] = None,
                 timeouts: Optional[pulumi.Input[pulumi.InputType['IAMOrgPolicyTimeoutsArgs']]] = 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
            if timeouts is not None and not isinstance(timeouts, IAMOrgPolicyTimeoutsArgs):
                timeouts = timeouts or {}
                def _setter(key, value):
                    timeouts[key] = value
                IAMOrgPolicyTimeoutsArgs._configure(_setter, **timeouts)
            __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[pulumi.InputType['IAMOrgPolicyServicesArgs']]]]] = None,
            timeouts: Optional[pulumi.Input[pulumi.InputType['IAMOrgPolicyTimeoutsArgs']]] = 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[pulumi.InputType['IAMOrgPolicyServicesArgs']]]] 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")

