# 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, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = ['AdminRoleCustomArgs', 'AdminRoleCustom']

@pulumi.input_type
class AdminRoleCustomArgs:
    def __init__(__self__, *,
                 description: pulumi.Input[str],
                 label: pulumi.Input[str],
                 permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        The set of arguments for constructing a AdminRoleCustom resource.
        :param pulumi.Input[str] description: A human-readable description of the new Role.
        :param pulumi.Input[str] label: The name given to the new Role.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] permissions: The permissions that the new Role grants. At least one
               permission must be specified when creating custom role. Valid values: `"okta.authzServers.manage"`,
               `"okta.authzServers.read"`,
               `"okta.apps.assignment.manage"`,
               `"okta.apps.manage"`,
               `"okta.apps.read"`,
               `"okta.customizations.manage"`,
               `"okta.customizations.read"`,
               `"okta.groups.appAssignment.manage"`,
               `"okta.groups.create"`,
               `"okta.groups.manage"`,
               `"okta.groups.members.manage"`,
               `"okta.groups.read"`,
               `"okta.profilesources.import.run"`,
               `"okta.users.appAssignment.manage"`,
               `"okta.users.create"`,
               `"okta.users.credentials.expirePassword"`,
               `"okta.users.credentials.manage"`,
               `"okta.users.credentials.resetFactors"`,
               `"okta.users.credentials.resetPassword"`,
               `"okta.users.groupMembership.manage"`,
               `"okta.users.lifecycle.activate"`,
               `"okta.users.lifecycle.clearSessions"`,
               `"okta.users.lifecycle.deactivate"`,
               `"okta.users.lifecycle.delete"`,
               `"okta.users.lifecycle.manage"`,
               `"okta.users.lifecycle.suspend"`,
               `"okta.users.lifecycle.unlock"`,
               `"okta.users.lifecycle.unsuspend"`,
               `"okta.users.manage"`,
               `"okta.users.read"`,
               `"okta.users.userprofile.manage"`,
               `"okta.workflows.invoke"`.,
        """
        pulumi.set(__self__, "description", description)
        pulumi.set(__self__, "label", label)
        if permissions is not None:
            pulumi.set(__self__, "permissions", permissions)

    @property
    @pulumi.getter
    def description(self) -> pulumi.Input[str]:
        """
        A human-readable description of the new Role.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter
    def label(self) -> pulumi.Input[str]:
        """
        The name given to the new Role.
        """
        return pulumi.get(self, "label")

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

    @property
    @pulumi.getter
    def permissions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        The permissions that the new Role grants. At least one
        permission must be specified when creating custom role. Valid values: `"okta.authzServers.manage"`,
        `"okta.authzServers.read"`,
        `"okta.apps.assignment.manage"`,
        `"okta.apps.manage"`,
        `"okta.apps.read"`,
        `"okta.customizations.manage"`,
        `"okta.customizations.read"`,
        `"okta.groups.appAssignment.manage"`,
        `"okta.groups.create"`,
        `"okta.groups.manage"`,
        `"okta.groups.members.manage"`,
        `"okta.groups.read"`,
        `"okta.profilesources.import.run"`,
        `"okta.users.appAssignment.manage"`,
        `"okta.users.create"`,
        `"okta.users.credentials.expirePassword"`,
        `"okta.users.credentials.manage"`,
        `"okta.users.credentials.resetFactors"`,
        `"okta.users.credentials.resetPassword"`,
        `"okta.users.groupMembership.manage"`,
        `"okta.users.lifecycle.activate"`,
        `"okta.users.lifecycle.clearSessions"`,
        `"okta.users.lifecycle.deactivate"`,
        `"okta.users.lifecycle.delete"`,
        `"okta.users.lifecycle.manage"`,
        `"okta.users.lifecycle.suspend"`,
        `"okta.users.lifecycle.unlock"`,
        `"okta.users.lifecycle.unsuspend"`,
        `"okta.users.manage"`,
        `"okta.users.read"`,
        `"okta.users.userprofile.manage"`,
        `"okta.workflows.invoke"`.,
        """
        return pulumi.get(self, "permissions")

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


@pulumi.input_type
class _AdminRoleCustomState:
    def __init__(__self__, *,
                 description: Optional[pulumi.Input[str]] = None,
                 label: Optional[pulumi.Input[str]] = None,
                 permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        Input properties used for looking up and filtering AdminRoleCustom resources.
        :param pulumi.Input[str] description: A human-readable description of the new Role.
        :param pulumi.Input[str] label: The name given to the new Role.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] permissions: The permissions that the new Role grants. At least one
               permission must be specified when creating custom role. Valid values: `"okta.authzServers.manage"`,
               `"okta.authzServers.read"`,
               `"okta.apps.assignment.manage"`,
               `"okta.apps.manage"`,
               `"okta.apps.read"`,
               `"okta.customizations.manage"`,
               `"okta.customizations.read"`,
               `"okta.groups.appAssignment.manage"`,
               `"okta.groups.create"`,
               `"okta.groups.manage"`,
               `"okta.groups.members.manage"`,
               `"okta.groups.read"`,
               `"okta.profilesources.import.run"`,
               `"okta.users.appAssignment.manage"`,
               `"okta.users.create"`,
               `"okta.users.credentials.expirePassword"`,
               `"okta.users.credentials.manage"`,
               `"okta.users.credentials.resetFactors"`,
               `"okta.users.credentials.resetPassword"`,
               `"okta.users.groupMembership.manage"`,
               `"okta.users.lifecycle.activate"`,
               `"okta.users.lifecycle.clearSessions"`,
               `"okta.users.lifecycle.deactivate"`,
               `"okta.users.lifecycle.delete"`,
               `"okta.users.lifecycle.manage"`,
               `"okta.users.lifecycle.suspend"`,
               `"okta.users.lifecycle.unlock"`,
               `"okta.users.lifecycle.unsuspend"`,
               `"okta.users.manage"`,
               `"okta.users.read"`,
               `"okta.users.userprofile.manage"`,
               `"okta.workflows.invoke"`.,
        """
        if description is not None:
            pulumi.set(__self__, "description", description)
        if label is not None:
            pulumi.set(__self__, "label", label)
        if permissions is not None:
            pulumi.set(__self__, "permissions", permissions)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        A human-readable description of the new Role.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter
    def label(self) -> Optional[pulumi.Input[str]]:
        """
        The name given to the new Role.
        """
        return pulumi.get(self, "label")

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

    @property
    @pulumi.getter
    def permissions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        The permissions that the new Role grants. At least one
        permission must be specified when creating custom role. Valid values: `"okta.authzServers.manage"`,
        `"okta.authzServers.read"`,
        `"okta.apps.assignment.manage"`,
        `"okta.apps.manage"`,
        `"okta.apps.read"`,
        `"okta.customizations.manage"`,
        `"okta.customizations.read"`,
        `"okta.groups.appAssignment.manage"`,
        `"okta.groups.create"`,
        `"okta.groups.manage"`,
        `"okta.groups.members.manage"`,
        `"okta.groups.read"`,
        `"okta.profilesources.import.run"`,
        `"okta.users.appAssignment.manage"`,
        `"okta.users.create"`,
        `"okta.users.credentials.expirePassword"`,
        `"okta.users.credentials.manage"`,
        `"okta.users.credentials.resetFactors"`,
        `"okta.users.credentials.resetPassword"`,
        `"okta.users.groupMembership.manage"`,
        `"okta.users.lifecycle.activate"`,
        `"okta.users.lifecycle.clearSessions"`,
        `"okta.users.lifecycle.deactivate"`,
        `"okta.users.lifecycle.delete"`,
        `"okta.users.lifecycle.manage"`,
        `"okta.users.lifecycle.suspend"`,
        `"okta.users.lifecycle.unlock"`,
        `"okta.users.lifecycle.unsuspend"`,
        `"okta.users.manage"`,
        `"okta.users.read"`,
        `"okta.users.userprofile.manage"`,
        `"okta.workflows.invoke"`.,
        """
        return pulumi.get(self, "permissions")

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


class AdminRoleCustom(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 label: Optional[pulumi.Input[str]] = None,
                 permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 __props__=None):
        """
        These operations allow the creation and manipulation of custom roles as custom collections of permissions.

        > **NOTE:** This an `Early Access` feature.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_okta as okta

        example = okta.AdminRoleCustom("example",
            label="AppAssignmentManager",
            description="This role allows app assignment management",
            permissions=["okta.apps.assignment.manage"])
        ```

        ## Import

        Okta Custom Admin Role can be imported via the Okta ID.

        ```sh
        $ pulumi import okta:index/adminRoleCustom:AdminRoleCustom example &#60;custom role id&#62;
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] description: A human-readable description of the new Role.
        :param pulumi.Input[str] label: The name given to the new Role.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] permissions: The permissions that the new Role grants. At least one
               permission must be specified when creating custom role. Valid values: `"okta.authzServers.manage"`,
               `"okta.authzServers.read"`,
               `"okta.apps.assignment.manage"`,
               `"okta.apps.manage"`,
               `"okta.apps.read"`,
               `"okta.customizations.manage"`,
               `"okta.customizations.read"`,
               `"okta.groups.appAssignment.manage"`,
               `"okta.groups.create"`,
               `"okta.groups.manage"`,
               `"okta.groups.members.manage"`,
               `"okta.groups.read"`,
               `"okta.profilesources.import.run"`,
               `"okta.users.appAssignment.manage"`,
               `"okta.users.create"`,
               `"okta.users.credentials.expirePassword"`,
               `"okta.users.credentials.manage"`,
               `"okta.users.credentials.resetFactors"`,
               `"okta.users.credentials.resetPassword"`,
               `"okta.users.groupMembership.manage"`,
               `"okta.users.lifecycle.activate"`,
               `"okta.users.lifecycle.clearSessions"`,
               `"okta.users.lifecycle.deactivate"`,
               `"okta.users.lifecycle.delete"`,
               `"okta.users.lifecycle.manage"`,
               `"okta.users.lifecycle.suspend"`,
               `"okta.users.lifecycle.unlock"`,
               `"okta.users.lifecycle.unsuspend"`,
               `"okta.users.manage"`,
               `"okta.users.read"`,
               `"okta.users.userprofile.manage"`,
               `"okta.workflows.invoke"`.,
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: AdminRoleCustomArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        These operations allow the creation and manipulation of custom roles as custom collections of permissions.

        > **NOTE:** This an `Early Access` feature.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_okta as okta

        example = okta.AdminRoleCustom("example",
            label="AppAssignmentManager",
            description="This role allows app assignment management",
            permissions=["okta.apps.assignment.manage"])
        ```

        ## Import

        Okta Custom Admin Role can be imported via the Okta ID.

        ```sh
        $ pulumi import okta:index/adminRoleCustom:AdminRoleCustom example &#60;custom role id&#62;
        ```

        :param str resource_name: The name of the resource.
        :param AdminRoleCustomArgs 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(AdminRoleCustomArgs, 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,
                 description: Optional[pulumi.Input[str]] = None,
                 label: Optional[pulumi.Input[str]] = None,
                 permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = 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__ = AdminRoleCustomArgs.__new__(AdminRoleCustomArgs)

            if description is None and not opts.urn:
                raise TypeError("Missing required property 'description'")
            __props__.__dict__["description"] = description
            if label is None and not opts.urn:
                raise TypeError("Missing required property 'label'")
            __props__.__dict__["label"] = label
            __props__.__dict__["permissions"] = permissions
        super(AdminRoleCustom, __self__).__init__(
            'okta:index/adminRoleCustom:AdminRoleCustom',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            description: Optional[pulumi.Input[str]] = None,
            label: Optional[pulumi.Input[str]] = None,
            permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'AdminRoleCustom':
        """
        Get an existing AdminRoleCustom 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] description: A human-readable description of the new Role.
        :param pulumi.Input[str] label: The name given to the new Role.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] permissions: The permissions that the new Role grants. At least one
               permission must be specified when creating custom role. Valid values: `"okta.authzServers.manage"`,
               `"okta.authzServers.read"`,
               `"okta.apps.assignment.manage"`,
               `"okta.apps.manage"`,
               `"okta.apps.read"`,
               `"okta.customizations.manage"`,
               `"okta.customizations.read"`,
               `"okta.groups.appAssignment.manage"`,
               `"okta.groups.create"`,
               `"okta.groups.manage"`,
               `"okta.groups.members.manage"`,
               `"okta.groups.read"`,
               `"okta.profilesources.import.run"`,
               `"okta.users.appAssignment.manage"`,
               `"okta.users.create"`,
               `"okta.users.credentials.expirePassword"`,
               `"okta.users.credentials.manage"`,
               `"okta.users.credentials.resetFactors"`,
               `"okta.users.credentials.resetPassword"`,
               `"okta.users.groupMembership.manage"`,
               `"okta.users.lifecycle.activate"`,
               `"okta.users.lifecycle.clearSessions"`,
               `"okta.users.lifecycle.deactivate"`,
               `"okta.users.lifecycle.delete"`,
               `"okta.users.lifecycle.manage"`,
               `"okta.users.lifecycle.suspend"`,
               `"okta.users.lifecycle.unlock"`,
               `"okta.users.lifecycle.unsuspend"`,
               `"okta.users.manage"`,
               `"okta.users.read"`,
               `"okta.users.userprofile.manage"`,
               `"okta.workflows.invoke"`.,
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _AdminRoleCustomState.__new__(_AdminRoleCustomState)

        __props__.__dict__["description"] = description
        __props__.__dict__["label"] = label
        __props__.__dict__["permissions"] = permissions
        return AdminRoleCustom(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[str]:
        """
        A human-readable description of the new Role.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def label(self) -> pulumi.Output[str]:
        """
        The name given to the new Role.
        """
        return pulumi.get(self, "label")

    @property
    @pulumi.getter
    def permissions(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        The permissions that the new Role grants. At least one
        permission must be specified when creating custom role. Valid values: `"okta.authzServers.manage"`,
        `"okta.authzServers.read"`,
        `"okta.apps.assignment.manage"`,
        `"okta.apps.manage"`,
        `"okta.apps.read"`,
        `"okta.customizations.manage"`,
        `"okta.customizations.read"`,
        `"okta.groups.appAssignment.manage"`,
        `"okta.groups.create"`,
        `"okta.groups.manage"`,
        `"okta.groups.members.manage"`,
        `"okta.groups.read"`,
        `"okta.profilesources.import.run"`,
        `"okta.users.appAssignment.manage"`,
        `"okta.users.create"`,
        `"okta.users.credentials.expirePassword"`,
        `"okta.users.credentials.manage"`,
        `"okta.users.credentials.resetFactors"`,
        `"okta.users.credentials.resetPassword"`,
        `"okta.users.groupMembership.manage"`,
        `"okta.users.lifecycle.activate"`,
        `"okta.users.lifecycle.clearSessions"`,
        `"okta.users.lifecycle.deactivate"`,
        `"okta.users.lifecycle.delete"`,
        `"okta.users.lifecycle.manage"`,
        `"okta.users.lifecycle.suspend"`,
        `"okta.users.lifecycle.unlock"`,
        `"okta.users.lifecycle.unsuspend"`,
        `"okta.users.manage"`,
        `"okta.users.read"`,
        `"okta.users.userprofile.manage"`,
        `"okta.workflows.invoke"`.,
        """
        return pulumi.get(self, "permissions")

