# 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__ = [
    'GetPermissionSetAssignmentResult',
    'AwaitableGetPermissionSetAssignmentResult',
    'get_permission_set_assignment',
    'get_permission_set_assignment_output',
]

@pulumi.output_type
class GetPermissionSetAssignmentResult:
    """
    A collection of values returned by getPermissionSetAssignment.
    """
    def __init__(__self__, created_time=None, id=None, permission_set_id=None, permission_set_name=None, principal_id=None, principal_name=None, principal_type=None, target_id=None, target_name=None):
        if created_time and not isinstance(created_time, str):
            raise TypeError("Expected argument 'created_time' to be a str")
        pulumi.set(__self__, "created_time", created_time)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if permission_set_id and not isinstance(permission_set_id, str):
            raise TypeError("Expected argument 'permission_set_id' to be a str")
        pulumi.set(__self__, "permission_set_id", permission_set_id)
        if permission_set_name and not isinstance(permission_set_name, str):
            raise TypeError("Expected argument 'permission_set_name' to be a str")
        pulumi.set(__self__, "permission_set_name", permission_set_name)
        if principal_id and not isinstance(principal_id, str):
            raise TypeError("Expected argument 'principal_id' to be a str")
        pulumi.set(__self__, "principal_id", principal_id)
        if principal_name and not isinstance(principal_name, str):
            raise TypeError("Expected argument 'principal_name' to be a str")
        pulumi.set(__self__, "principal_name", principal_name)
        if principal_type and not isinstance(principal_type, str):
            raise TypeError("Expected argument 'principal_type' to be a str")
        pulumi.set(__self__, "principal_type", principal_type)
        if target_id and not isinstance(target_id, str):
            raise TypeError("Expected argument 'target_id' to be a str")
        pulumi.set(__self__, "target_id", target_id)
        if target_name and not isinstance(target_name, str):
            raise TypeError("Expected argument 'target_name' to be a str")
        pulumi.set(__self__, "target_name", target_name)

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

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

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

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

    @property
    @pulumi.getter(name="principalId")
    def principal_id(self) -> builtins.str:
        """
        云身份中心对象 ID
        """
        return pulumi.get(self, "principal_id")

    @property
    @pulumi.getter(name="principalName")
    def principal_name(self) -> builtins.str:
        """
        云身份中心对象名。
        """
        return pulumi.get(self, "principal_name")

    @property
    @pulumi.getter(name="principalType")
    def principal_type(self) -> builtins.str:
        """
        云身份中心对象类型，User 或者 Group。
        """
        return pulumi.get(self, "principal_type")

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

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


class AwaitableGetPermissionSetAssignmentResult(GetPermissionSetAssignmentResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetPermissionSetAssignmentResult(
            created_time=self.created_time,
            id=self.id,
            permission_set_id=self.permission_set_id,
            permission_set_name=self.permission_set_name,
            principal_id=self.principal_id,
            principal_name=self.principal_name,
            principal_type=self.principal_type,
            target_id=self.target_id,
            target_name=self.target_name)


def get_permission_set_assignment(id: Optional[builtins.str] = None,
                                  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPermissionSetAssignmentResult:
    """
    Data Source schema for Byteplus::CloudIdentity::PermissionSetAssignment


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:cloudidentity/getPermissionSetAssignment:getPermissionSetAssignment', __args__, opts=opts, typ=GetPermissionSetAssignmentResult).value

    return AwaitableGetPermissionSetAssignmentResult(
        created_time=pulumi.get(__ret__, 'created_time'),
        id=pulumi.get(__ret__, 'id'),
        permission_set_id=pulumi.get(__ret__, 'permission_set_id'),
        permission_set_name=pulumi.get(__ret__, 'permission_set_name'),
        principal_id=pulumi.get(__ret__, 'principal_id'),
        principal_name=pulumi.get(__ret__, 'principal_name'),
        principal_type=pulumi.get(__ret__, 'principal_type'),
        target_id=pulumi.get(__ret__, 'target_id'),
        target_name=pulumi.get(__ret__, 'target_name'))
def get_permission_set_assignment_output(id: Optional[pulumi.Input[builtins.str]] = None,
                                         opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPermissionSetAssignmentResult]:
    """
    Data Source schema for Byteplus::CloudIdentity::PermissionSetAssignment


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:cloudidentity/getPermissionSetAssignment:getPermissionSetAssignment', __args__, opts=opts, typ=GetPermissionSetAssignmentResult)
    return __ret__.apply(lambda __response__: GetPermissionSetAssignmentResult(
        created_time=pulumi.get(__response__, 'created_time'),
        id=pulumi.get(__response__, 'id'),
        permission_set_id=pulumi.get(__response__, 'permission_set_id'),
        permission_set_name=pulumi.get(__response__, 'permission_set_name'),
        principal_id=pulumi.get(__response__, 'principal_id'),
        principal_name=pulumi.get(__response__, 'principal_name'),
        principal_type=pulumi.get(__response__, 'principal_type'),
        target_id=pulumi.get(__response__, 'target_id'),
        target_name=pulumi.get(__response__, 'target_name')))
