import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A policy describes permissions. IAM users, user groups, or roles must be granted permissions by associating policies. If system preset policies do not meet your requirements, you can create custom policies for fine-grained permission definition. * * ## Import * * ```sh * $ pulumi import volcenginecc:iam/policy:Policy example "policy_name|policy_type" * ``` */ export declare class Policy extends pulumi.CustomResource { /** * Get an existing Policy resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: PolicyState, opts?: pulumi.CustomResourceOptions): Policy; /** * Returns true if the given object is an instance of Policy. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Policy; /** * Number of identities bound to the policy. */ readonly attachmentCount: pulumi.Output; /** * Category of the system preset policy, usually the service code. This field is not returned for custom policies. */ readonly category: pulumi.Output; /** * Policy creation time. */ readonly createdTime: pulumi.Output; /** * Policy description, no more than 128 characters. */ readonly description: pulumi.Output; /** * Indicates whether the policy is for a service-linked role. 0 means no; 1 means yes. */ readonly isServiceRolePolicy: pulumi.Output; /** * Policy syntax content, for example: {"Statement":[{"Effect":"Allow","Action":["iam:","tag:"],"Resource":["*"]}]} */ readonly policyDocument: pulumi.Output; /** * Policy name, 1–64 characters. Supports English letters, numbers, and +=,.@-_ symbols. */ readonly policyName: pulumi.Output; readonly policyRoles: pulumi.Output; /** * Policy TRN. */ readonly policyTrn: pulumi.Output; /** * Policy type. System indicates a system preset policy; Custom indicates a custom policy. */ readonly policyType: pulumi.Output; readonly policyUserGroups: pulumi.Output; readonly policyUsers: pulumi.Output; /** * Policy update time. */ readonly updatedTime: pulumi.Output; /** * Create a Policy resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: PolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Policy resources. */ export interface PolicyState { /** * Number of identities bound to the policy. */ attachmentCount?: pulumi.Input; /** * Category of the system preset policy, usually the service code. This field is not returned for custom policies. */ category?: pulumi.Input; /** * Policy creation time. */ createdTime?: pulumi.Input; /** * Policy description, no more than 128 characters. */ description?: pulumi.Input; /** * Indicates whether the policy is for a service-linked role. 0 means no; 1 means yes. */ isServiceRolePolicy?: pulumi.Input; /** * Policy syntax content, for example: {"Statement":[{"Effect":"Allow","Action":["iam:","tag:"],"Resource":["*"]}]} */ policyDocument?: pulumi.Input; /** * Policy name, 1–64 characters. Supports English letters, numbers, and +=,.@-_ symbols. */ policyName?: pulumi.Input; policyRoles?: pulumi.Input[]>; /** * Policy TRN. */ policyTrn?: pulumi.Input; /** * Policy type. System indicates a system preset policy; Custom indicates a custom policy. */ policyType?: pulumi.Input; policyUserGroups?: pulumi.Input[]>; policyUsers?: pulumi.Input[]>; /** * Policy update time. */ updatedTime?: pulumi.Input; } /** * The set of arguments for constructing a Policy resource. */ export interface PolicyArgs { /** * Policy description, no more than 128 characters. */ description?: pulumi.Input; /** * Policy syntax content, for example: {"Statement":[{"Effect":"Allow","Action":["iam:","tag:"],"Resource":["*"]}]} */ policyDocument: pulumi.Input; /** * Policy name, 1–64 characters. Supports English letters, numbers, and +=,.@-_ symbols. */ policyName: pulumi.Input; policyRoles?: pulumi.Input[]>; /** * Policy type. System indicates a system preset policy; Custom indicates a custom policy. */ policyType: pulumi.Input; policyUserGroups?: pulumi.Input[]>; policyUsers?: pulumi.Input[]>; }