# 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
from . import outputs

__all__ = [
    'PolicyStatement',
    'GetGroupsGroupResult',
    'GetPoliciesPolicyResult',
    'GetPolicyDocumentStatementResult',
    'GetPolicyDocumentStatementConditionResult',
    'GetPolicyDocumentStatementPrincipalResult',
    'GetRolePolicyAttachmentsAttachmentResult',
    'GetRolesRoleResult',
    'GetSamlProvidersProviderResult',
    'GetSystemPolicysPolicyResult',
    'GetUsersUserResult',
]

@pulumi.output_type
class PolicyStatement(dict):
    def __init__(__self__, *,
                 actions: Sequence[builtins.str],
                 effect: builtins.str,
                 resources: Sequence[builtins.str]):
        """
        :param Sequence[builtins.str] actions: (It has been deprecated since version 1.49.0, and use field `document` to replace.) List of operations for the `resource`. The format of each item in this list is `${service}:${action_name}`, such as `oss:ListBuckets` and `ecs:Describe*`. The `${service}` can be `ecs`, `oss`, `ots` and so on, the `${action_name}` refers to the name of an api interface which related to the `${service}`.
        :param builtins.str effect: (It has been deprecated since version 1.49.0, and use field `document` to replace.) This parameter indicates whether or not the `action` is allowed. Valid values are `Allow` and `Deny`.
        :param Sequence[builtins.str] resources: (It has been deprecated since version 1.49.0, and use field `document` to replace.) List of specific objects which will be authorized. The format of each item in this list is `acs:${service}:${region}:${account_id}:${relative_id}`, such as `acs:ecs:*:*:instance/inst-002` and `acs:oss:*:1234567890000:mybucket`. The `${service}` can be `ecs`, `oss`, `ots` and so on, the `${region}` is the region info which can use `*` replace when it is not supplied, the `${account_id}` refers to someone`s Alicloud account id or you can use `*` to replace, the `${relative_id}` is the resource description section which related to the `${service}`.
        """
        pulumi.set(__self__, "actions", actions)
        pulumi.set(__self__, "effect", effect)
        pulumi.set(__self__, "resources", resources)

    @property
    @pulumi.getter
    def actions(self) -> Sequence[builtins.str]:
        """
        (It has been deprecated since version 1.49.0, and use field `document` to replace.) List of operations for the `resource`. The format of each item in this list is `${service}:${action_name}`, such as `oss:ListBuckets` and `ecs:Describe*`. The `${service}` can be `ecs`, `oss`, `ots` and so on, the `${action_name}` refers to the name of an api interface which related to the `${service}`.
        """
        return pulumi.get(self, "actions")

    @property
    @pulumi.getter
    def effect(self) -> builtins.str:
        """
        (It has been deprecated since version 1.49.0, and use field `document` to replace.) This parameter indicates whether or not the `action` is allowed. Valid values are `Allow` and `Deny`.
        """
        return pulumi.get(self, "effect")

    @property
    @pulumi.getter
    def resources(self) -> Sequence[builtins.str]:
        """
        (It has been deprecated since version 1.49.0, and use field `document` to replace.) List of specific objects which will be authorized. The format of each item in this list is `acs:${service}:${region}:${account_id}:${relative_id}`, such as `acs:ecs:*:*:instance/inst-002` and `acs:oss:*:1234567890000:mybucket`. The `${service}` can be `ecs`, `oss`, `ots` and so on, the `${region}` is the region info which can use `*` replace when it is not supplied, the `${account_id}` refers to someone`s Alicloud account id or you can use `*` to replace, the `${relative_id}` is the resource description section which related to the `${service}`.
        """
        return pulumi.get(self, "resources")


@pulumi.output_type
class GetGroupsGroupResult(dict):
    def __init__(__self__, *,
                 comments: builtins.str,
                 name: builtins.str):
        """
        :param builtins.str comments: Comments of the group.
        :param builtins.str name: Name of the group.
        """
        pulumi.set(__self__, "comments", comments)
        pulumi.set(__self__, "name", name)

    @property
    @pulumi.getter
    def comments(self) -> builtins.str:
        """
        Comments of the group.
        """
        return pulumi.get(self, "comments")

    @property
    @pulumi.getter
    def name(self) -> builtins.str:
        """
        Name of the group.
        """
        return pulumi.get(self, "name")


@pulumi.output_type
class GetPoliciesPolicyResult(dict):
    def __init__(__self__, *,
                 attachment_count: builtins.int,
                 create_date: builtins.str,
                 default_version: builtins.str,
                 description: builtins.str,
                 document: builtins.str,
                 id: builtins.str,
                 name: builtins.str,
                 policy_document: builtins.str,
                 policy_name: builtins.str,
                 type: builtins.str,
                 update_date: builtins.str,
                 user_name: builtins.str,
                 version_id: builtins.str):
        """
        :param builtins.int attachment_count: Attachment count of the policy.
        :param builtins.str create_date: Creation date of the policy.
        :param builtins.str default_version: Default version of the policy.
        :param builtins.str description: Description of the policy.
        :param builtins.str document: Policy document of the policy.
        :param builtins.str id: ID of the policy.
        :param builtins.str name: Name of the policy.
        :param builtins.str policy_document: Policy document of the policy.
        :param builtins.str policy_name: Name of the policy.
        :param builtins.str type: Filter results by a specific policy type. Valid values are `Custom` and `System`.
        :param builtins.str update_date: Update date of the policy.
        :param builtins.str user_name: Filter results by a specific user name. Returned policies are attached to the specified user.
        :param builtins.str version_id: The ID of default policy.
        """
        pulumi.set(__self__, "attachment_count", attachment_count)
        pulumi.set(__self__, "create_date", create_date)
        pulumi.set(__self__, "default_version", default_version)
        pulumi.set(__self__, "description", description)
        pulumi.set(__self__, "document", document)
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "name", name)
        pulumi.set(__self__, "policy_document", policy_document)
        pulumi.set(__self__, "policy_name", policy_name)
        pulumi.set(__self__, "type", type)
        pulumi.set(__self__, "update_date", update_date)
        pulumi.set(__self__, "user_name", user_name)
        pulumi.set(__self__, "version_id", version_id)

    @property
    @pulumi.getter(name="attachmentCount")
    def attachment_count(self) -> builtins.int:
        """
        Attachment count of the policy.
        """
        return pulumi.get(self, "attachment_count")

    @property
    @pulumi.getter(name="createDate")
    def create_date(self) -> builtins.str:
        """
        Creation date of the policy.
        """
        return pulumi.get(self, "create_date")

    @property
    @pulumi.getter(name="defaultVersion")
    def default_version(self) -> builtins.str:
        """
        Default version of the policy.
        """
        return pulumi.get(self, "default_version")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        Description of the policy.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def document(self) -> builtins.str:
        """
        Policy document of the policy.
        """
        return pulumi.get(self, "document")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        ID of the policy.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def name(self) -> builtins.str:
        """
        Name of the policy.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="policyDocument")
    def policy_document(self) -> builtins.str:
        """
        Policy document of the policy.
        """
        return pulumi.get(self, "policy_document")

    @property
    @pulumi.getter(name="policyName")
    def policy_name(self) -> builtins.str:
        """
        Name of the policy.
        """
        return pulumi.get(self, "policy_name")

    @property
    @pulumi.getter
    def type(self) -> builtins.str:
        """
        Filter results by a specific policy type. Valid values are `Custom` and `System`.
        """
        return pulumi.get(self, "type")

    @property
    @pulumi.getter(name="updateDate")
    def update_date(self) -> builtins.str:
        """
        Update date of the policy.
        """
        return pulumi.get(self, "update_date")

    @property
    @pulumi.getter(name="userName")
    def user_name(self) -> builtins.str:
        """
        Filter results by a specific user name. Returned policies are attached to the specified user.
        """
        return pulumi.get(self, "user_name")

    @property
    @pulumi.getter(name="versionId")
    def version_id(self) -> builtins.str:
        """
        The ID of default policy.
        """
        return pulumi.get(self, "version_id")


@pulumi.output_type
class GetPolicyDocumentStatementResult(dict):
    def __init__(__self__, *,
                 actions: Sequence[builtins.str],
                 conditions: Optional[Sequence['outputs.GetPolicyDocumentStatementConditionResult']] = None,
                 effect: Optional[builtins.str] = None,
                 principals: Optional[Sequence['outputs.GetPolicyDocumentStatementPrincipalResult']] = None,
                 resources: Optional[Sequence[builtins.str]] = None):
        """
        :param Sequence[builtins.str] actions: Action of the RAM policy document. If you want to create a RAM role policy document, it must be `["sts:AssumeRole"]`.
        :param Sequence['GetPolicyDocumentStatementConditionArgs'] conditions: Specifies the condition that are required for a policy to take effect. See `condition` below.
        :param builtins.str effect: This parameter indicates whether or not the `action` is allowed. Valid values are `Allow` and `Deny`. Default value is `Allow`. If you want to create a RAM role policy document, it must be `Allow`.
        :param Sequence['GetPolicyDocumentStatementPrincipalArgs'] principals: Principal of the RAM policy document. If you want to create a RAM role policy document, it must be set. See `principal` below.
        :param Sequence[builtins.str] resources: List of specific objects which will be authorized. If you want to create a RAM policy document, it must be set.
        """
        pulumi.set(__self__, "actions", actions)
        if conditions is not None:
            pulumi.set(__self__, "conditions", conditions)
        if effect is not None:
            pulumi.set(__self__, "effect", effect)
        if principals is not None:
            pulumi.set(__self__, "principals", principals)
        if resources is not None:
            pulumi.set(__self__, "resources", resources)

    @property
    @pulumi.getter
    def actions(self) -> Sequence[builtins.str]:
        """
        Action of the RAM policy document. If you want to create a RAM role policy document, it must be `["sts:AssumeRole"]`.
        """
        return pulumi.get(self, "actions")

    @property
    @pulumi.getter
    def conditions(self) -> Optional[Sequence['outputs.GetPolicyDocumentStatementConditionResult']]:
        """
        Specifies the condition that are required for a policy to take effect. See `condition` below.
        """
        return pulumi.get(self, "conditions")

    @property
    @pulumi.getter
    def effect(self) -> Optional[builtins.str]:
        """
        This parameter indicates whether or not the `action` is allowed. Valid values are `Allow` and `Deny`. Default value is `Allow`. If you want to create a RAM role policy document, it must be `Allow`.
        """
        return pulumi.get(self, "effect")

    @property
    @pulumi.getter
    def principals(self) -> Optional[Sequence['outputs.GetPolicyDocumentStatementPrincipalResult']]:
        """
        Principal of the RAM policy document. If you want to create a RAM role policy document, it must be set. See `principal` below.
        """
        return pulumi.get(self, "principals")

    @property
    @pulumi.getter
    def resources(self) -> Optional[Sequence[builtins.str]]:
        """
        List of specific objects which will be authorized. If you want to create a RAM policy document, it must be set.
        """
        return pulumi.get(self, "resources")


@pulumi.output_type
class GetPolicyDocumentStatementConditionResult(dict):
    def __init__(__self__, *,
                 operator: builtins.str,
                 values: Sequence[builtins.str],
                 variable: builtins.str):
        """
        :param builtins.str operator: The operator of the condition.
        :param Sequence[builtins.str] values: The values of the condition.
        :param builtins.str variable: The variable of the condition.
        """
        pulumi.set(__self__, "operator", operator)
        pulumi.set(__self__, "values", values)
        pulumi.set(__self__, "variable", variable)

    @property
    @pulumi.getter
    def operator(self) -> builtins.str:
        """
        The operator of the condition.
        """
        return pulumi.get(self, "operator")

    @property
    @pulumi.getter
    def values(self) -> Sequence[builtins.str]:
        """
        The values of the condition.
        """
        return pulumi.get(self, "values")

    @property
    @pulumi.getter
    def variable(self) -> builtins.str:
        """
        The variable of the condition.
        """
        return pulumi.get(self, "variable")


@pulumi.output_type
class GetPolicyDocumentStatementPrincipalResult(dict):
    def __init__(__self__, *,
                 entity: builtins.str,
                 identifiers: Sequence[builtins.str]):
        """
        :param builtins.str entity: The trusted entity. Valid values: `RAM`, `Service` and `Federated`.
        :param Sequence[builtins.str] identifiers: The identifiers of the principal.
        """
        pulumi.set(__self__, "entity", entity)
        pulumi.set(__self__, "identifiers", identifiers)

    @property
    @pulumi.getter
    def entity(self) -> builtins.str:
        """
        The trusted entity. Valid values: `RAM`, `Service` and `Federated`.
        """
        return pulumi.get(self, "entity")

    @property
    @pulumi.getter
    def identifiers(self) -> Sequence[builtins.str]:
        """
        The identifiers of the principal.
        """
        return pulumi.get(self, "identifiers")


@pulumi.output_type
class GetRolePolicyAttachmentsAttachmentResult(dict):
    def __init__(__self__, *,
                 attach_date: builtins.str,
                 description: builtins.str,
                 id: builtins.str,
                 policy_name: builtins.str,
                 policy_type: builtins.str):
        """
        :param builtins.str attach_date: The time when the role was attached to the policy.
        :param builtins.str description: The policy description.
        :param builtins.str id: The ID of the resource supplied above. The value is formulated as `role:<policy_name>:<policy_type>:<role_name>`.
        :param builtins.str policy_name: The name of the policy.
        :param builtins.str policy_type: Policy type.- Custom: Custom policy.- System: System policy.
        """
        pulumi.set(__self__, "attach_date", attach_date)
        pulumi.set(__self__, "description", description)
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "policy_name", policy_name)
        pulumi.set(__self__, "policy_type", policy_type)

    @property
    @pulumi.getter(name="attachDate")
    def attach_date(self) -> builtins.str:
        """
        The time when the role was attached to the policy.
        """
        return pulumi.get(self, "attach_date")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        The policy description.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        The ID of the resource supplied above. The value is formulated as `role:<policy_name>:<policy_type>:<role_name>`.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="policyName")
    def policy_name(self) -> builtins.str:
        """
        The name of the policy.
        """
        return pulumi.get(self, "policy_name")

    @property
    @pulumi.getter(name="policyType")
    def policy_type(self) -> builtins.str:
        """
        Policy type.- Custom: Custom policy.- System: System policy.
        """
        return pulumi.get(self, "policy_type")


@pulumi.output_type
class GetRolesRoleResult(dict):
    def __init__(__self__, *,
                 arn: builtins.str,
                 assume_role_policy_document: builtins.str,
                 create_date: builtins.str,
                 description: builtins.str,
                 document: builtins.str,
                 id: builtins.str,
                 name: builtins.str,
                 update_date: builtins.str):
        """
        :param builtins.str arn: Resource descriptor of the role.
        :param builtins.str assume_role_policy_document: Authorization strategy of the role. This parameter is deprecated and replaced by `document`.
        :param builtins.str create_date: Creation date of the role.
        :param builtins.str description: Description of the role.
        :param builtins.str document: Authorization strategy of the role.
        :param builtins.str id: ID of the role.
        :param builtins.str name: Name of the role.
        :param builtins.str update_date: Update date of the role.
        """
        pulumi.set(__self__, "arn", arn)
        pulumi.set(__self__, "assume_role_policy_document", assume_role_policy_document)
        pulumi.set(__self__, "create_date", create_date)
        pulumi.set(__self__, "description", description)
        pulumi.set(__self__, "document", document)
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "name", name)
        pulumi.set(__self__, "update_date", update_date)

    @property
    @pulumi.getter
    def arn(self) -> builtins.str:
        """
        Resource descriptor of the role.
        """
        return pulumi.get(self, "arn")

    @property
    @pulumi.getter(name="assumeRolePolicyDocument")
    def assume_role_policy_document(self) -> builtins.str:
        """
        Authorization strategy of the role. This parameter is deprecated and replaced by `document`.
        """
        return pulumi.get(self, "assume_role_policy_document")

    @property
    @pulumi.getter(name="createDate")
    def create_date(self) -> builtins.str:
        """
        Creation date of the role.
        """
        return pulumi.get(self, "create_date")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        Description of the role.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def document(self) -> builtins.str:
        """
        Authorization strategy of the role.
        """
        return pulumi.get(self, "document")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        ID of the role.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def name(self) -> builtins.str:
        """
        Name of the role.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="updateDate")
    def update_date(self) -> builtins.str:
        """
        Update date of the role.
        """
        return pulumi.get(self, "update_date")


@pulumi.output_type
class GetSamlProvidersProviderResult(dict):
    def __init__(__self__, *,
                 arn: builtins.str,
                 description: builtins.str,
                 encodedsaml_metadata_document: builtins.str,
                 id: builtins.str,
                 saml_provider_name: builtins.str,
                 update_date: builtins.str):
        """
        :param builtins.str arn: The Alibaba Cloud Resource Name (ARN) of the IdP.
        :param builtins.str description: The description of SAML Provider.
        :param builtins.str encodedsaml_metadata_document: The encodedsaml metadata document.
        :param builtins.str id: The ID of the SAML Provider.
        :param builtins.str saml_provider_name: The saml provider name.
        :param builtins.str update_date: The update time.
        """
        pulumi.set(__self__, "arn", arn)
        pulumi.set(__self__, "description", description)
        pulumi.set(__self__, "encodedsaml_metadata_document", encodedsaml_metadata_document)
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "saml_provider_name", saml_provider_name)
        pulumi.set(__self__, "update_date", update_date)

    @property
    @pulumi.getter
    def arn(self) -> builtins.str:
        """
        The Alibaba Cloud Resource Name (ARN) of the IdP.
        """
        return pulumi.get(self, "arn")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        The description of SAML Provider.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="encodedsamlMetadataDocument")
    def encodedsaml_metadata_document(self) -> builtins.str:
        """
        The encodedsaml metadata document.
        """
        return pulumi.get(self, "encodedsaml_metadata_document")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        The ID of the SAML Provider.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="samlProviderName")
    def saml_provider_name(self) -> builtins.str:
        """
        The saml provider name.
        """
        return pulumi.get(self, "saml_provider_name")

    @property
    @pulumi.getter(name="updateDate")
    def update_date(self) -> builtins.str:
        """
        The update time.
        """
        return pulumi.get(self, "update_date")


@pulumi.output_type
class GetSystemPolicysPolicyResult(dict):
    def __init__(__self__, *,
                 attachment_count: builtins.int,
                 create_time: builtins.str,
                 description: builtins.str,
                 id: builtins.str,
                 policy_name: builtins.str,
                 policy_type: builtins.str,
                 update_date: builtins.str):
        """
        :param builtins.int attachment_count: Number of references.
        :param builtins.str create_time: Creation time.
        :param builtins.str description: The permission policy description.
        :param builtins.str id: The ID of the resource supplied above.
        :param builtins.str policy_name: The permission policy name.
        :param builtins.str policy_type: Permission policy type.
        :param builtins.str update_date: Modification time.
        """
        pulumi.set(__self__, "attachment_count", attachment_count)
        pulumi.set(__self__, "create_time", create_time)
        pulumi.set(__self__, "description", description)
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "policy_name", policy_name)
        pulumi.set(__self__, "policy_type", policy_type)
        pulumi.set(__self__, "update_date", update_date)

    @property
    @pulumi.getter(name="attachmentCount")
    def attachment_count(self) -> builtins.int:
        """
        Number of references.
        """
        return pulumi.get(self, "attachment_count")

    @property
    @pulumi.getter(name="createTime")
    def create_time(self) -> builtins.str:
        """
        Creation time.
        """
        return pulumi.get(self, "create_time")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        The permission policy description.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        The ID of the resource supplied above.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="policyName")
    def policy_name(self) -> builtins.str:
        """
        The permission policy name.
        """
        return pulumi.get(self, "policy_name")

    @property
    @pulumi.getter(name="policyType")
    def policy_type(self) -> builtins.str:
        """
        Permission policy type.
        """
        return pulumi.get(self, "policy_type")

    @property
    @pulumi.getter(name="updateDate")
    def update_date(self) -> builtins.str:
        """
        Modification time.
        """
        return pulumi.get(self, "update_date")


@pulumi.output_type
class GetUsersUserResult(dict):
    def __init__(__self__, *,
                 create_date: builtins.str,
                 id: builtins.str,
                 last_login_date: builtins.str,
                 name: builtins.str):
        """
        :param builtins.str create_date: Creation date of the user.
        :param builtins.str id: The original id is user's name, but it is user id in 1.37.0+.
        :param builtins.str last_login_date: (Removed) Last login date of the user. Removed from version 1.79.0.
        :param builtins.str name: Name of the user.
        """
        pulumi.set(__self__, "create_date", create_date)
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "last_login_date", last_login_date)
        pulumi.set(__self__, "name", name)

    @property
    @pulumi.getter(name="createDate")
    def create_date(self) -> builtins.str:
        """
        Creation date of the user.
        """
        return pulumi.get(self, "create_date")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        The original id is user's name, but it is user id in 1.37.0+.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="lastLoginDate")
    def last_login_date(self) -> builtins.str:
        """
        (Removed) Last login date of the user. Removed from version 1.79.0.
        """
        return pulumi.get(self, "last_login_date")

    @property
    @pulumi.getter
    def name(self) -> builtins.str:
        """
        Name of the user.
        """
        return pulumi.get(self, "name")


