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

__all__ = ['PolicyArgs', 'Policy']

@pulumi.input_type
class PolicyArgs:
    def __init__(__self__, *,
                 policy_document: pulumi.Input[builtins.str],
                 policy_name: pulumi.Input[builtins.str],
                 policy_type: pulumi.Input[builtins.str],
                 category: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 policy_roles: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyRoleArgs']]]] = None,
                 policy_user_groups: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyUserGroupArgs']]]] = None,
                 policy_users: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyUserArgs']]]] = None):
        """
        The set of arguments for constructing a Policy resource.
        :param pulumi.Input[builtins.str] policy_document: 策略语法内容，例如：{"Statement":[{"Effect":"Allow","Action":["iam:","tag:"],"Resource":["*"]}]}
        :param pulumi.Input[builtins.str] policy_name: 策略名，长度1~64，支持英文、数字和+=,.@-_符号。
        :param pulumi.Input[builtins.str] policy_type: 策略类型。System代表系统预设策略，Custom代表自定义策略。
        :param pulumi.Input[builtins.str] category: 系统预设策略所属的分类，通常为服务代码，对于自定义策略该字段不会返回值。
        :param pulumi.Input[builtins.str] description: 策略描述，长度不超过128。
        """
        pulumi.set(__self__, "policy_document", policy_document)
        pulumi.set(__self__, "policy_name", policy_name)
        pulumi.set(__self__, "policy_type", policy_type)
        if category is not None:
            pulumi.set(__self__, "category", category)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if policy_roles is not None:
            pulumi.set(__self__, "policy_roles", policy_roles)
        if policy_user_groups is not None:
            pulumi.set(__self__, "policy_user_groups", policy_user_groups)
        if policy_users is not None:
            pulumi.set(__self__, "policy_users", policy_users)

    @property
    @pulumi.getter(name="policyDocument")
    def policy_document(self) -> pulumi.Input[builtins.str]:
        """
        策略语法内容，例如：{"Statement":[{"Effect":"Allow","Action":["iam:","tag:"],"Resource":["*"]}]}
        """
        return pulumi.get(self, "policy_document")

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

    @property
    @pulumi.getter(name="policyName")
    def policy_name(self) -> pulumi.Input[builtins.str]:
        """
        策略名，长度1~64，支持英文、数字和+=,.@-_符号。
        """
        return pulumi.get(self, "policy_name")

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

    @property
    @pulumi.getter(name="policyType")
    def policy_type(self) -> pulumi.Input[builtins.str]:
        """
        策略类型。System代表系统预设策略，Custom代表自定义策略。
        """
        return pulumi.get(self, "policy_type")

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

    @property
    @pulumi.getter
    def category(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        系统预设策略所属的分类，通常为服务代码，对于自定义策略该字段不会返回值。
        """
        return pulumi.get(self, "category")

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

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        策略描述，长度不超过128。
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter(name="policyRoles")
    def policy_roles(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyRoleArgs']]]]:
        return pulumi.get(self, "policy_roles")

    @policy_roles.setter
    def policy_roles(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyRoleArgs']]]]):
        pulumi.set(self, "policy_roles", value)

    @property
    @pulumi.getter(name="policyUserGroups")
    def policy_user_groups(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyUserGroupArgs']]]]:
        return pulumi.get(self, "policy_user_groups")

    @policy_user_groups.setter
    def policy_user_groups(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyUserGroupArgs']]]]):
        pulumi.set(self, "policy_user_groups", value)

    @property
    @pulumi.getter(name="policyUsers")
    def policy_users(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyUserArgs']]]]:
        return pulumi.get(self, "policy_users")

    @policy_users.setter
    def policy_users(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyUserArgs']]]]):
        pulumi.set(self, "policy_users", value)


@pulumi.input_type
class _PolicyState:
    def __init__(__self__, *,
                 attachment_count: Optional[pulumi.Input[builtins.int]] = None,
                 category: Optional[pulumi.Input[builtins.str]] = None,
                 created_time: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 is_service_role_policy: Optional[pulumi.Input[builtins.int]] = None,
                 policy_document: Optional[pulumi.Input[builtins.str]] = None,
                 policy_name: Optional[pulumi.Input[builtins.str]] = None,
                 policy_roles: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyRoleArgs']]]] = None,
                 policy_trn: Optional[pulumi.Input[builtins.str]] = None,
                 policy_type: Optional[pulumi.Input[builtins.str]] = None,
                 policy_user_groups: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyUserGroupArgs']]]] = None,
                 policy_users: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyUserArgs']]]] = None,
                 updated_time: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering Policy resources.
        :param pulumi.Input[builtins.int] attachment_count: 策略绑定的身份数量。
        :param pulumi.Input[builtins.str] category: 系统预设策略所属的分类，通常为服务代码，对于自定义策略该字段不会返回值。
        :param pulumi.Input[builtins.str] created_time: 策略创建时间。
        :param pulumi.Input[builtins.str] description: 策略描述，长度不超过128。
        :param pulumi.Input[builtins.int] is_service_role_policy: 是否是服务关联角色的策略，0代表否，1代表是。
        :param pulumi.Input[builtins.str] policy_document: 策略语法内容，例如：{"Statement":[{"Effect":"Allow","Action":["iam:","tag:"],"Resource":["*"]}]}
        :param pulumi.Input[builtins.str] policy_name: 策略名，长度1~64，支持英文、数字和+=,.@-_符号。
        :param pulumi.Input[builtins.str] policy_trn: 策略的TRN。
        :param pulumi.Input[builtins.str] policy_type: 策略类型。System代表系统预设策略，Custom代表自定义策略。
        :param pulumi.Input[builtins.str] updated_time: 策略更新时间。
        """
        if attachment_count is not None:
            pulumi.set(__self__, "attachment_count", attachment_count)
        if category is not None:
            pulumi.set(__self__, "category", category)
        if created_time is not None:
            pulumi.set(__self__, "created_time", created_time)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if is_service_role_policy is not None:
            pulumi.set(__self__, "is_service_role_policy", is_service_role_policy)
        if policy_document is not None:
            pulumi.set(__self__, "policy_document", policy_document)
        if policy_name is not None:
            pulumi.set(__self__, "policy_name", policy_name)
        if policy_roles is not None:
            pulumi.set(__self__, "policy_roles", policy_roles)
        if policy_trn is not None:
            pulumi.set(__self__, "policy_trn", policy_trn)
        if policy_type is not None:
            pulumi.set(__self__, "policy_type", policy_type)
        if policy_user_groups is not None:
            pulumi.set(__self__, "policy_user_groups", policy_user_groups)
        if policy_users is not None:
            pulumi.set(__self__, "policy_users", policy_users)
        if updated_time is not None:
            pulumi.set(__self__, "updated_time", updated_time)

    @property
    @pulumi.getter(name="attachmentCount")
    def attachment_count(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        策略绑定的身份数量。
        """
        return pulumi.get(self, "attachment_count")

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

    @property
    @pulumi.getter
    def category(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        系统预设策略所属的分类，通常为服务代码，对于自定义策略该字段不会返回值。
        """
        return pulumi.get(self, "category")

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

    @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
    def description(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        策略描述，长度不超过128。
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter(name="isServiceRolePolicy")
    def is_service_role_policy(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        是否是服务关联角色的策略，0代表否，1代表是。
        """
        return pulumi.get(self, "is_service_role_policy")

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

    @property
    @pulumi.getter(name="policyDocument")
    def policy_document(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        策略语法内容，例如：{"Statement":[{"Effect":"Allow","Action":["iam:","tag:"],"Resource":["*"]}]}
        """
        return pulumi.get(self, "policy_document")

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

    @property
    @pulumi.getter(name="policyName")
    def policy_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        策略名，长度1~64，支持英文、数字和+=,.@-_符号。
        """
        return pulumi.get(self, "policy_name")

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

    @property
    @pulumi.getter(name="policyRoles")
    def policy_roles(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyRoleArgs']]]]:
        return pulumi.get(self, "policy_roles")

    @policy_roles.setter
    def policy_roles(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyRoleArgs']]]]):
        pulumi.set(self, "policy_roles", value)

    @property
    @pulumi.getter(name="policyTrn")
    def policy_trn(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        策略的TRN。
        """
        return pulumi.get(self, "policy_trn")

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

    @property
    @pulumi.getter(name="policyType")
    def policy_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        策略类型。System代表系统预设策略，Custom代表自定义策略。
        """
        return pulumi.get(self, "policy_type")

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

    @property
    @pulumi.getter(name="policyUserGroups")
    def policy_user_groups(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyUserGroupArgs']]]]:
        return pulumi.get(self, "policy_user_groups")

    @policy_user_groups.setter
    def policy_user_groups(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyUserGroupArgs']]]]):
        pulumi.set(self, "policy_user_groups", value)

    @property
    @pulumi.getter(name="policyUsers")
    def policy_users(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyUserArgs']]]]:
        return pulumi.get(self, "policy_users")

    @policy_users.setter
    def policy_users(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicyUserArgs']]]]):
        pulumi.set(self, "policy_users", 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:iam/policy:Policy")
class Policy(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 category: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 policy_document: Optional[pulumi.Input[builtins.str]] = None,
                 policy_name: Optional[pulumi.Input[builtins.str]] = None,
                 policy_roles: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PolicyPolicyRoleArgs', 'PolicyPolicyRoleArgsDict']]]]] = None,
                 policy_type: Optional[pulumi.Input[builtins.str]] = None,
                 policy_user_groups: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PolicyPolicyUserGroupArgs', 'PolicyPolicyUserGroupArgsDict']]]]] = None,
                 policy_users: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PolicyPolicyUserArgs', 'PolicyPolicyUserArgsDict']]]]] = None,
                 __props__=None):
        """
        策略是对权限的一种描述，IAM用户、用户组或角色均需通过关联策略来赋予权限。当系统预设策略不能满足要求时，您可以创建自定义策略，对权限进行细粒度的定义。

        ## Import

        ```sh
        $ pulumi import bytepluscc:iam/policy:Policy example "policy_name|policy_type"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] category: 系统预设策略所属的分类，通常为服务代码，对于自定义策略该字段不会返回值。
        :param pulumi.Input[builtins.str] description: 策略描述，长度不超过128。
        :param pulumi.Input[builtins.str] policy_document: 策略语法内容，例如：{"Statement":[{"Effect":"Allow","Action":["iam:","tag:"],"Resource":["*"]}]}
        :param pulumi.Input[builtins.str] policy_name: 策略名，长度1~64，支持英文、数字和+=,.@-_符号。
        :param pulumi.Input[builtins.str] policy_type: 策略类型。System代表系统预设策略，Custom代表自定义策略。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: PolicyArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        策略是对权限的一种描述，IAM用户、用户组或角色均需通过关联策略来赋予权限。当系统预设策略不能满足要求时，您可以创建自定义策略，对权限进行细粒度的定义。

        ## Import

        ```sh
        $ pulumi import bytepluscc:iam/policy:Policy example "policy_name|policy_type"
        ```

        :param str resource_name: The name of the resource.
        :param PolicyArgs 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(PolicyArgs, 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,
                 category: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 policy_document: Optional[pulumi.Input[builtins.str]] = None,
                 policy_name: Optional[pulumi.Input[builtins.str]] = None,
                 policy_roles: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PolicyPolicyRoleArgs', 'PolicyPolicyRoleArgsDict']]]]] = None,
                 policy_type: Optional[pulumi.Input[builtins.str]] = None,
                 policy_user_groups: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PolicyPolicyUserGroupArgs', 'PolicyPolicyUserGroupArgsDict']]]]] = None,
                 policy_users: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PolicyPolicyUserArgs', 'PolicyPolicyUserArgsDict']]]]] = 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__ = PolicyArgs.__new__(PolicyArgs)

            __props__.__dict__["category"] = category
            __props__.__dict__["description"] = description
            if policy_document is None and not opts.urn:
                raise TypeError("Missing required property 'policy_document'")
            __props__.__dict__["policy_document"] = policy_document
            if policy_name is None and not opts.urn:
                raise TypeError("Missing required property 'policy_name'")
            __props__.__dict__["policy_name"] = policy_name
            __props__.__dict__["policy_roles"] = policy_roles
            if policy_type is None and not opts.urn:
                raise TypeError("Missing required property 'policy_type'")
            __props__.__dict__["policy_type"] = policy_type
            __props__.__dict__["policy_user_groups"] = policy_user_groups
            __props__.__dict__["policy_users"] = policy_users
            __props__.__dict__["attachment_count"] = None
            __props__.__dict__["created_time"] = None
            __props__.__dict__["is_service_role_policy"] = None
            __props__.__dict__["policy_trn"] = None
            __props__.__dict__["updated_time"] = None
        super(Policy, __self__).__init__(
            'bytepluscc:iam/policy:Policy',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            attachment_count: Optional[pulumi.Input[builtins.int]] = None,
            category: Optional[pulumi.Input[builtins.str]] = None,
            created_time: Optional[pulumi.Input[builtins.str]] = None,
            description: Optional[pulumi.Input[builtins.str]] = None,
            is_service_role_policy: Optional[pulumi.Input[builtins.int]] = None,
            policy_document: Optional[pulumi.Input[builtins.str]] = None,
            policy_name: Optional[pulumi.Input[builtins.str]] = None,
            policy_roles: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PolicyPolicyRoleArgs', 'PolicyPolicyRoleArgsDict']]]]] = None,
            policy_trn: Optional[pulumi.Input[builtins.str]] = None,
            policy_type: Optional[pulumi.Input[builtins.str]] = None,
            policy_user_groups: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PolicyPolicyUserGroupArgs', 'PolicyPolicyUserGroupArgsDict']]]]] = None,
            policy_users: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PolicyPolicyUserArgs', 'PolicyPolicyUserArgsDict']]]]] = None,
            updated_time: Optional[pulumi.Input[builtins.str]] = None) -> 'Policy':
        """
        Get an existing Policy 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.int] attachment_count: 策略绑定的身份数量。
        :param pulumi.Input[builtins.str] category: 系统预设策略所属的分类，通常为服务代码，对于自定义策略该字段不会返回值。
        :param pulumi.Input[builtins.str] created_time: 策略创建时间。
        :param pulumi.Input[builtins.str] description: 策略描述，长度不超过128。
        :param pulumi.Input[builtins.int] is_service_role_policy: 是否是服务关联角色的策略，0代表否，1代表是。
        :param pulumi.Input[builtins.str] policy_document: 策略语法内容，例如：{"Statement":[{"Effect":"Allow","Action":["iam:","tag:"],"Resource":["*"]}]}
        :param pulumi.Input[builtins.str] policy_name: 策略名，长度1~64，支持英文、数字和+=,.@-_符号。
        :param pulumi.Input[builtins.str] policy_trn: 策略的TRN。
        :param pulumi.Input[builtins.str] policy_type: 策略类型。System代表系统预设策略，Custom代表自定义策略。
        :param pulumi.Input[builtins.str] updated_time: 策略更新时间。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _PolicyState.__new__(_PolicyState)

        __props__.__dict__["attachment_count"] = attachment_count
        __props__.__dict__["category"] = category
        __props__.__dict__["created_time"] = created_time
        __props__.__dict__["description"] = description
        __props__.__dict__["is_service_role_policy"] = is_service_role_policy
        __props__.__dict__["policy_document"] = policy_document
        __props__.__dict__["policy_name"] = policy_name
        __props__.__dict__["policy_roles"] = policy_roles
        __props__.__dict__["policy_trn"] = policy_trn
        __props__.__dict__["policy_type"] = policy_type
        __props__.__dict__["policy_user_groups"] = policy_user_groups
        __props__.__dict__["policy_users"] = policy_users
        __props__.__dict__["updated_time"] = updated_time
        return Policy(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="attachmentCount")
    def attachment_count(self) -> pulumi.Output[builtins.int]:
        """
        策略绑定的身份数量。
        """
        return pulumi.get(self, "attachment_count")

    @property
    @pulumi.getter
    def category(self) -> pulumi.Output[builtins.str]:
        """
        系统预设策略所属的分类，通常为服务代码，对于自定义策略该字段不会返回值。
        """
        return pulumi.get(self, "category")

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

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[builtins.str]:
        """
        策略描述，长度不超过128。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="isServiceRolePolicy")
    def is_service_role_policy(self) -> pulumi.Output[builtins.int]:
        """
        是否是服务关联角色的策略，0代表否，1代表是。
        """
        return pulumi.get(self, "is_service_role_policy")

    @property
    @pulumi.getter(name="policyDocument")
    def policy_document(self) -> pulumi.Output[builtins.str]:
        """
        策略语法内容，例如：{"Statement":[{"Effect":"Allow","Action":["iam:","tag:"],"Resource":["*"]}]}
        """
        return pulumi.get(self, "policy_document")

    @property
    @pulumi.getter(name="policyName")
    def policy_name(self) -> pulumi.Output[builtins.str]:
        """
        策略名，长度1~64，支持英文、数字和+=,.@-_符号。
        """
        return pulumi.get(self, "policy_name")

    @property
    @pulumi.getter(name="policyRoles")
    def policy_roles(self) -> pulumi.Output[Sequence['outputs.PolicyPolicyRole']]:
        return pulumi.get(self, "policy_roles")

    @property
    @pulumi.getter(name="policyTrn")
    def policy_trn(self) -> pulumi.Output[builtins.str]:
        """
        策略的TRN。
        """
        return pulumi.get(self, "policy_trn")

    @property
    @pulumi.getter(name="policyType")
    def policy_type(self) -> pulumi.Output[builtins.str]:
        """
        策略类型。System代表系统预设策略，Custom代表自定义策略。
        """
        return pulumi.get(self, "policy_type")

    @property
    @pulumi.getter(name="policyUserGroups")
    def policy_user_groups(self) -> pulumi.Output[Sequence['outputs.PolicyPolicyUserGroup']]:
        return pulumi.get(self, "policy_user_groups")

    @property
    @pulumi.getter(name="policyUsers")
    def policy_users(self) -> pulumi.Output[Sequence['outputs.PolicyPolicyUser']]:
        return pulumi.get(self, "policy_users")

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

