@pulumi/yandex
Version:
A Pulumi package for creating and managing yandex cloud resources.
119 lines (118 loc) • 4.92 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Allows creation and management of a single member for a single binding within
* the IAM policy for an existing Yandex Resource Manager cloud.
*
* > **Note:** Roles controlled by `yandex.ResourcemanagerCloudIamBinding`
* should not be assigned using `yandex.ResourcemanagerCloudIamMember`.
*
* > **Note:** When you delete `yandex.ResourcemanagerCloudIamBinding` resource,
* the roles can be deleted from other users within the cloud as well. Be careful!
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as yandex from "@pulumi/yandex";
*
* const department1 = pulumi.output(yandex.getResourcemanagerCloud({
* name: "Department 1",
* }));
* const admin = new yandex.ResourcemanagerCloudIamMember("admin", {
* cloudId: department1.id,
* member: "userAccount:user_id",
* role: "editor",
* });
* ```
*
* ## Import
*
* IAM member imports use space-delimited identifiers; the resource in question, the role, and the account. This member resource can be imported using the `cloud id`, role, and account, e.g.
*
* ```sh
* $ pulumi import yandex:index/resourcemanagerCloudIamMember:ResourcemanagerCloudIamMember my_project "cloud_id viewer foo@example.com"
* ```
*/
export declare class ResourcemanagerCloudIamMember extends pulumi.CustomResource {
/**
* Get an existing ResourcemanagerCloudIamMember 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?: ResourcemanagerCloudIamMemberState, opts?: pulumi.CustomResourceOptions): ResourcemanagerCloudIamMember;
/**
* Returns true if the given object is an instance of ResourcemanagerCloudIamMember. 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 ResourcemanagerCloudIamMember;
/**
* ID of the cloud to attach a policy to.
*/
readonly cloudId: pulumi.Output<string>;
/**
* The identity that will be granted the privilege that is specified in the `role` field.
* This field can have one of the following values:
* * **userAccount:{user_id}**: A unique user ID that represents a specific Yandex account.
* * **serviceAccount:{service_account_id}**: A unique service account ID.
*/
readonly member: pulumi.Output<string>;
/**
* The role that should be assigned.
*/
readonly role: pulumi.Output<string>;
readonly sleepAfter: pulumi.Output<number | undefined>;
/**
* Create a ResourcemanagerCloudIamMember 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: ResourcemanagerCloudIamMemberArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ResourcemanagerCloudIamMember resources.
*/
export interface ResourcemanagerCloudIamMemberState {
/**
* ID of the cloud to attach a policy to.
*/
cloudId?: pulumi.Input<string>;
/**
* The identity that will be granted the privilege that is specified in the `role` field.
* This field can have one of the following values:
* * **userAccount:{user_id}**: A unique user ID that represents a specific Yandex account.
* * **serviceAccount:{service_account_id}**: A unique service account ID.
*/
member?: pulumi.Input<string>;
/**
* The role that should be assigned.
*/
role?: pulumi.Input<string>;
sleepAfter?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a ResourcemanagerCloudIamMember resource.
*/
export interface ResourcemanagerCloudIamMemberArgs {
/**
* ID of the cloud to attach a policy to.
*/
cloudId: pulumi.Input<string>;
/**
* The identity that will be granted the privilege that is specified in the `role` field.
* This field can have one of the following values:
* * **userAccount:{user_id}**: A unique user ID that represents a specific Yandex account.
* * **serviceAccount:{service_account_id}**: A unique service account ID.
*/
member: pulumi.Input<string>;
/**
* The role that should be assigned.
*/
role: pulumi.Input<string>;
sleepAfter?: pulumi.Input<number>;
}