# 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 builtins
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

__all__ = ['PermissionSetProvisioningArgs', 'PermissionSetProvisioning']

@pulumi.input_type
class PermissionSetProvisioningArgs:
    def __init__(__self__, *,
                 permission_set_id: pulumi.Input[builtins.str],
                 target_id: pulumi.Input[builtins.str]):
        """
        The set of arguments for constructing a PermissionSetProvisioning resource.
        :param pulumi.Input[builtins.str] permission_set_id: 权限集 ID。
        :param pulumi.Input[builtins.str] target_id: 授权的账号 ID。
        """
        pulumi.set(__self__, "permission_set_id", permission_set_id)
        pulumi.set(__self__, "target_id", target_id)

    @property
    @pulumi.getter(name="permissionSetId")
    def permission_set_id(self) -> pulumi.Input[builtins.str]:
        """
        权限集 ID。
        """
        return pulumi.get(self, "permission_set_id")

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

    @property
    @pulumi.getter(name="targetId")
    def target_id(self) -> pulumi.Input[builtins.str]:
        """
        授权的账号 ID。
        """
        return pulumi.get(self, "target_id")

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


@pulumi.input_type
class _PermissionSetProvisioningState:
    def __init__(__self__, *,
                 created_time: Optional[pulumi.Input[builtins.str]] = None,
                 permission_set_id: Optional[pulumi.Input[builtins.str]] = None,
                 permission_set_name: Optional[pulumi.Input[builtins.str]] = None,
                 provisioning_status: Optional[pulumi.Input[builtins.str]] = None,
                 target_id: Optional[pulumi.Input[builtins.str]] = None,
                 target_name: Optional[pulumi.Input[builtins.str]] = None,
                 updated_time: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering PermissionSetProvisioning resources.
        :param pulumi.Input[builtins.str] created_time: 创建时间。
        :param pulumi.Input[builtins.str] permission_set_id: 权限集 ID。
        :param pulumi.Input[builtins.str] permission_set_name: 权限集名。
        :param pulumi.Input[builtins.str] provisioning_status: 权限集状态 Running：运行中,Reprovision Required：需要重新部署,Provision Failed：部署失败,Provisioned：已部署
        :param pulumi.Input[builtins.str] target_id: 授权的账号 ID。
        :param pulumi.Input[builtins.str] target_name: 账号名。
        :param pulumi.Input[builtins.str] updated_time: 更新时间。
        """
        if created_time is not None:
            pulumi.set(__self__, "created_time", created_time)
        if permission_set_id is not None:
            pulumi.set(__self__, "permission_set_id", permission_set_id)
        if permission_set_name is not None:
            pulumi.set(__self__, "permission_set_name", permission_set_name)
        if provisioning_status is not None:
            pulumi.set(__self__, "provisioning_status", provisioning_status)
        if target_id is not None:
            pulumi.set(__self__, "target_id", target_id)
        if target_name is not None:
            pulumi.set(__self__, "target_name", target_name)
        if updated_time is not None:
            pulumi.set(__self__, "updated_time", updated_time)

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        创建时间。
        """
        return pulumi.get(self, "created_time")

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

    @property
    @pulumi.getter(name="permissionSetId")
    def permission_set_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        权限集 ID。
        """
        return pulumi.get(self, "permission_set_id")

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

    @property
    @pulumi.getter(name="permissionSetName")
    def permission_set_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        权限集名。
        """
        return pulumi.get(self, "permission_set_name")

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

    @property
    @pulumi.getter(name="provisioningStatus")
    def provisioning_status(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        权限集状态 Running：运行中,Reprovision Required：需要重新部署,Provision Failed：部署失败,Provisioned：已部署
        """
        return pulumi.get(self, "provisioning_status")

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

    @property
    @pulumi.getter(name="targetId")
    def target_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        授权的账号 ID。
        """
        return pulumi.get(self, "target_id")

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

    @property
    @pulumi.getter(name="targetName")
    def target_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        账号名。
        """
        return pulumi.get(self, "target_name")

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

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        更新时间。
        """
        return pulumi.get(self, "updated_time")

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


@pulumi.type_token("bytepluscc:cloudidentity/permissionSetProvisioning:PermissionSetProvisioning")
class PermissionSetProvisioning(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 permission_set_id: Optional[pulumi.Input[builtins.str]] = None,
                 target_id: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        """
        给指定的账号部署权限集。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        cloud_identity_permission_set_provisioning_demo = bytepluscc.cloudidentity.PermissionSetProvisioning("CloudIdentityPermissionSetProvisioningDemo",
            permission_set_id="897569*****",
            target_id="21036*****")
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:cloudidentity/permissionSetProvisioning:PermissionSetProvisioning example "permission_set_id|target_id"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] permission_set_id: 权限集 ID。
        :param pulumi.Input[builtins.str] target_id: 授权的账号 ID。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: PermissionSetProvisioningArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        给指定的账号部署权限集。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        cloud_identity_permission_set_provisioning_demo = bytepluscc.cloudidentity.PermissionSetProvisioning("CloudIdentityPermissionSetProvisioningDemo",
            permission_set_id="897569*****",
            target_id="21036*****")
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:cloudidentity/permissionSetProvisioning:PermissionSetProvisioning example "permission_set_id|target_id"
        ```

        :param str resource_name: The name of the resource.
        :param PermissionSetProvisioningArgs 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(PermissionSetProvisioningArgs, 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,
                 permission_set_id: Optional[pulumi.Input[builtins.str]] = None,
                 target_id: Optional[pulumi.Input[builtins.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__ = PermissionSetProvisioningArgs.__new__(PermissionSetProvisioningArgs)

            if permission_set_id is None and not opts.urn:
                raise TypeError("Missing required property 'permission_set_id'")
            __props__.__dict__["permission_set_id"] = permission_set_id
            if target_id is None and not opts.urn:
                raise TypeError("Missing required property 'target_id'")
            __props__.__dict__["target_id"] = target_id
            __props__.__dict__["created_time"] = None
            __props__.__dict__["permission_set_name"] = None
            __props__.__dict__["provisioning_status"] = None
            __props__.__dict__["target_name"] = None
            __props__.__dict__["updated_time"] = None
        super(PermissionSetProvisioning, __self__).__init__(
            'bytepluscc:cloudidentity/permissionSetProvisioning:PermissionSetProvisioning',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            created_time: Optional[pulumi.Input[builtins.str]] = None,
            permission_set_id: Optional[pulumi.Input[builtins.str]] = None,
            permission_set_name: Optional[pulumi.Input[builtins.str]] = None,
            provisioning_status: Optional[pulumi.Input[builtins.str]] = None,
            target_id: Optional[pulumi.Input[builtins.str]] = None,
            target_name: Optional[pulumi.Input[builtins.str]] = None,
            updated_time: Optional[pulumi.Input[builtins.str]] = None) -> 'PermissionSetProvisioning':
        """
        Get an existing PermissionSetProvisioning 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[builtins.str] created_time: 创建时间。
        :param pulumi.Input[builtins.str] permission_set_id: 权限集 ID。
        :param pulumi.Input[builtins.str] permission_set_name: 权限集名。
        :param pulumi.Input[builtins.str] provisioning_status: 权限集状态 Running：运行中,Reprovision Required：需要重新部署,Provision Failed：部署失败,Provisioned：已部署
        :param pulumi.Input[builtins.str] target_id: 授权的账号 ID。
        :param pulumi.Input[builtins.str] target_name: 账号名。
        :param pulumi.Input[builtins.str] updated_time: 更新时间。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _PermissionSetProvisioningState.__new__(_PermissionSetProvisioningState)

        __props__.__dict__["created_time"] = created_time
        __props__.__dict__["permission_set_id"] = permission_set_id
        __props__.__dict__["permission_set_name"] = permission_set_name
        __props__.__dict__["provisioning_status"] = provisioning_status
        __props__.__dict__["target_id"] = target_id
        __props__.__dict__["target_name"] = target_name
        __props__.__dict__["updated_time"] = updated_time
        return PermissionSetProvisioning(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> pulumi.Output[builtins.str]:
        """
        创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter(name="permissionSetId")
    def permission_set_id(self) -> pulumi.Output[builtins.str]:
        """
        权限集 ID。
        """
        return pulumi.get(self, "permission_set_id")

    @property
    @pulumi.getter(name="permissionSetName")
    def permission_set_name(self) -> pulumi.Output[builtins.str]:
        """
        权限集名。
        """
        return pulumi.get(self, "permission_set_name")

    @property
    @pulumi.getter(name="provisioningStatus")
    def provisioning_status(self) -> pulumi.Output[builtins.str]:
        """
        权限集状态 Running：运行中,Reprovision Required：需要重新部署,Provision Failed：部署失败,Provisioned：已部署
        """
        return pulumi.get(self, "provisioning_status")

    @property
    @pulumi.getter(name="targetId")
    def target_id(self) -> pulumi.Output[builtins.str]:
        """
        授权的账号 ID。
        """
        return pulumi.get(self, "target_id")

    @property
    @pulumi.getter(name="targetName")
    def target_name(self) -> pulumi.Output[builtins.str]:
        """
        账号名。
        """
        return pulumi.get(self, "target_name")

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> pulumi.Output[builtins.str]:
        """
        更新时间。
        """
        return pulumi.get(self, "updated_time")

