@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
108 lines (107 loc) • 3.75 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a resource to manage iam role policy attachment
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const role = new volcengine.iam.Role("role", {
* roleName: "TerraformTestRole",
* displayName: "terraform role",
* trustPolicyDocument: "{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"sts:AssumeRole\"],\"Principal\":{\"Service\":[\"auto_scaling\"]}}]}",
* description: "created by terraform",
* maxSessionDuration: 43200,
* });
* const policy = new volcengine.iam.Policy("policy", {
* policyName: "TerraformResourceTest1",
* description: "created by terraform 1",
* policyDocument: "{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}",
* });
* const foo = new volcengine.iam.RolePolicyAttachment("foo", {
* roleName: role.id,
* policyName: policy.id,
* policyType: policy.policyType,
* });
* ```
*
* ## Import
*
* Iam role policy attachment can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:iam/rolePolicyAttachment:RolePolicyAttachment default TerraformTestRole:TerraformTestPolicy:Custom
* ```
*/
export declare class RolePolicyAttachment extends pulumi.CustomResource {
/**
* Get an existing RolePolicyAttachment 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<pulumi.ID>, state?: RolePolicyAttachmentState, opts?: pulumi.CustomResourceOptions): RolePolicyAttachment;
/**
* Returns true if the given object is an instance of RolePolicyAttachment. 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 RolePolicyAttachment;
/**
* The name of the Policy.
*/
readonly policyName: pulumi.Output<string>;
/**
* The type of the Policy.
*/
readonly policyType: pulumi.Output<string>;
/**
* The name of the Role.
*/
readonly roleName: pulumi.Output<string>;
/**
* Create a RolePolicyAttachment 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: RolePolicyAttachmentArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering RolePolicyAttachment resources.
*/
export interface RolePolicyAttachmentState {
/**
* The name of the Policy.
*/
policyName?: pulumi.Input<string>;
/**
* The type of the Policy.
*/
policyType?: pulumi.Input<string>;
/**
* The name of the Role.
*/
roleName?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a RolePolicyAttachment resource.
*/
export interface RolePolicyAttachmentArgs {
/**
* The name of the Policy.
*/
policyName: pulumi.Input<string>;
/**
* The type of the Policy.
*/
policyType: pulumi.Input<string>;
/**
* The name of the Role.
*/
roleName: pulumi.Input<string>;
}