UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

139 lines (138 loc) 3.91 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Use this data source to query detailed information of iam policies * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooPolicy = new volcengine.iam.Policy("fooPolicy", { * policyName: "acc-test-policy", * description: "acc-test", * policyDocument: "{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}", * }); * const fooPolicies = fooPolicy.description.apply(description => volcengine.iam.getPoliciesOutput({ * query: description, * })); * ``` */ export declare function getPolicies(args?: GetPoliciesArgs, opts?: pulumi.InvokeOptions): Promise<GetPoliciesResult>; /** * A collection of arguments for invoking getPolicies. */ export interface GetPoliciesArgs { /** * A Name Regex of Policy. */ nameRegex?: string; /** * File name where to save data source results. */ outputFile?: string; /** * Query policies, support policy name or description. */ query?: string; /** * The name of the IAM role. */ roleName?: string; /** * The scope of the Policy. */ scope?: string; /** * The status of policy. */ status?: string; /** * The name of the IAM user. */ userName?: string; } /** * A collection of values returned by getPolicies. */ export interface GetPoliciesResult { /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly nameRegex?: string; readonly outputFile?: string; /** * The collection of Policy query. */ readonly policies: outputs.iam.GetPoliciesPolicy[]; readonly query?: string; /** * The name of the IAM role.The data show only query with role_name. */ readonly roleName?: string; readonly scope?: string; readonly status?: string; /** * The total count of Policy query. */ readonly totalCount: number; /** * The name of the IAM user.The data show only query with user_name. */ readonly userName?: string; } /** * Use this data source to query detailed information of iam policies * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooPolicy = new volcengine.iam.Policy("fooPolicy", { * policyName: "acc-test-policy", * description: "acc-test", * policyDocument: "{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}", * }); * const fooPolicies = fooPolicy.description.apply(description => volcengine.iam.getPoliciesOutput({ * query: description, * })); * ``` */ export declare function getPoliciesOutput(args?: GetPoliciesOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetPoliciesResult>; /** * A collection of arguments for invoking getPolicies. */ export interface GetPoliciesOutputArgs { /** * A Name Regex of Policy. */ nameRegex?: pulumi.Input<string>; /** * File name where to save data source results. */ outputFile?: pulumi.Input<string>; /** * Query policies, support policy name or description. */ query?: pulumi.Input<string>; /** * The name of the IAM role. */ roleName?: pulumi.Input<string>; /** * The scope of the Policy. */ scope?: pulumi.Input<string>; /** * The status of policy. */ status?: pulumi.Input<string>; /** * The name of the IAM user. */ userName?: pulumi.Input<string>; }