UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

151 lines (150 loc) 7.1 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a resource to manage cloud identity permission set assignment * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const fooPermissionSet = new volcengine.cloud_identity.PermissionSet("fooPermissionSet", { * description: "tf", * sessionDuration: 5000, * permissionPolicies: [ * { * permissionPolicyType: "System", * permissionPolicyName: "AdministratorAccess", * inlinePolicyDocument: "", * }, * { * permissionPolicyType: "System", * permissionPolicyName: "ReadOnlyAccess", * inlinePolicyDocument: "", * }, * { * permissionPolicyType: "Inline", * inlinePolicyDocument: "{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}", * }, * ], * }); * const fooUser = new volcengine.cloud_identity.User("fooUser", { * userName: "acc-test-user", * displayName: "tf-test-user", * description: "tf", * email: "88@qq.com", * phone: "181", * }); * const fooPermissionSetAssignment = new volcengine.cloud_identity.PermissionSetAssignment("fooPermissionSetAssignment", { * permissionSetId: fooPermissionSet.id, * targetId: "210026****", * principalType: "User", * principalId: fooUser.id, * }); * ``` * * ## Import * * CloudIdentityPermissionSetAssignment can be imported using the permission_set_id:target_id:principal_type:principal_id, e.g. * * ```sh * $ pulumi import volcengine:cloud_identity/permissionSetAssignment:PermissionSetAssignment default resource_id * ``` */ export declare class PermissionSetAssignment extends pulumi.CustomResource { /** * Get an existing PermissionSetAssignment 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?: PermissionSetAssignmentState, opts?: pulumi.CustomResourceOptions): PermissionSetAssignment; /** * Returns true if the given object is an instance of PermissionSetAssignment. 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 PermissionSetAssignment; /** * The deprovision strategy when deleting the cloud identity permission set assignment. Valid values: `DeprovisionForLastPermissionSetOnAccount`, `None`. Default is `DeprovisionForLastPermissionSetOnAccount`. * When the `deprovisionStrategy` is `DeprovisionForLastPermissionSetOnAccount`, and the permission set assignment to be deleted is the last assignment for the same account, this option is used for the DeprovisionPermissionSet operation. */ readonly deprovisionStrategy: pulumi.Output<string | undefined>; /** * The id of the cloud identity permission set. */ readonly permissionSetId: pulumi.Output<string>; /** * The principal id of the cloud identity permission set. When the `principalType` is `User`, this field is specified to `UserId`. When the `principalType` is `Group`, this field is specified to `GroupId`. */ readonly principalId: pulumi.Output<string>; /** * The principal type of the cloud identity permission set. Valid values: `User`, `Group`. */ readonly principalType: pulumi.Output<string>; /** * The target account id of the cloud identity permission set assignment. */ readonly targetId: pulumi.Output<string>; /** * Create a PermissionSetAssignment 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: PermissionSetAssignmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PermissionSetAssignment resources. */ export interface PermissionSetAssignmentState { /** * The deprovision strategy when deleting the cloud identity permission set assignment. Valid values: `DeprovisionForLastPermissionSetOnAccount`, `None`. Default is `DeprovisionForLastPermissionSetOnAccount`. * When the `deprovisionStrategy` is `DeprovisionForLastPermissionSetOnAccount`, and the permission set assignment to be deleted is the last assignment for the same account, this option is used for the DeprovisionPermissionSet operation. */ deprovisionStrategy?: pulumi.Input<string>; /** * The id of the cloud identity permission set. */ permissionSetId?: pulumi.Input<string>; /** * The principal id of the cloud identity permission set. When the `principalType` is `User`, this field is specified to `UserId`. When the `principalType` is `Group`, this field is specified to `GroupId`. */ principalId?: pulumi.Input<string>; /** * The principal type of the cloud identity permission set. Valid values: `User`, `Group`. */ principalType?: pulumi.Input<string>; /** * The target account id of the cloud identity permission set assignment. */ targetId?: pulumi.Input<string>; } /** * The set of arguments for constructing a PermissionSetAssignment resource. */ export interface PermissionSetAssignmentArgs { /** * The deprovision strategy when deleting the cloud identity permission set assignment. Valid values: `DeprovisionForLastPermissionSetOnAccount`, `None`. Default is `DeprovisionForLastPermissionSetOnAccount`. * When the `deprovisionStrategy` is `DeprovisionForLastPermissionSetOnAccount`, and the permission set assignment to be deleted is the last assignment for the same account, this option is used for the DeprovisionPermissionSet operation. */ deprovisionStrategy?: pulumi.Input<string>; /** * The id of the cloud identity permission set. */ permissionSetId: pulumi.Input<string>; /** * The principal id of the cloud identity permission set. When the `principalType` is `User`, this field is specified to `UserId`. When the `principalType` is `Group`, this field is specified to `GroupId`. */ principalId: pulumi.Input<string>; /** * The principal type of the cloud identity permission set. Valid values: `User`, `Group`. */ principalType: pulumi.Input<string>; /** * The target account id of the cloud identity permission set assignment. */ targetId: pulumi.Input<string>; }