@pulumi/yandex
Version:
A Pulumi package for creating and managing yandex cloud resources.
123 lines (122 loc) • 5.39 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Allows creation and management of a single binding within IAM policy for
* an existing Yandex Resource Manager folder.
*
* > **Note:** This resource _must not_ be used in conjunction with
* `yandex.ResourcemanagerFolderIamPolicy` or they will conflict over what your policy
* should be.
*
* > **Note:** When you delete `yandex.ResourcemanagerFolderIamBinding` resource,
* the roles can be deleted from other users within the folder as well. Be careful!
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as yandex from "@pulumi/yandex";
*
* const project1 = pulumi.output(yandex.getResourcemanagerFolder({
* folderId: "some_folder_id",
* }));
* const admin = new yandex.ResourcemanagerFolderIamBinding("admin", {
* folderId: project1.id,
* members: ["userAccount:some_user_id"],
* role: "editor",
* });
* ```
*
* ## Import
*
* IAM binding imports use space-delimited identifiers; first the resource in question and then the role. These bindings can be imported using the `folder_id` and role, e.g.
*
* ```sh
* $ pulumi import yandex:index/resourcemanagerFolderIamBinding:ResourcemanagerFolderIamBinding viewer "folder_id viewer"
* ```
*/
export declare class ResourcemanagerFolderIamBinding extends pulumi.CustomResource {
/**
* Get an existing ResourcemanagerFolderIamBinding 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?: ResourcemanagerFolderIamBindingState, opts?: pulumi.CustomResourceOptions): ResourcemanagerFolderIamBinding;
/**
* Returns true if the given object is an instance of ResourcemanagerFolderIamBinding. 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 ResourcemanagerFolderIamBinding;
/**
* ID of the folder to attach a policy to.
*/
readonly folderId: pulumi.Output<string>;
/**
* An array of identities that will be granted the privilege that is specified in the `role` field.
* Each entry can have one of the following values:
* * **userAccount:{user_id}**: An email address that represents a specific Yandex account. For example, ivan@yandex.ru or joe@example.com.
* * **serviceAccount:{service_account_id}**: A unique service account ID.
*/
readonly members: pulumi.Output<string[]>;
/**
* The role that should be assigned. Only one
* `yandex.ResourcemanagerFolderIamBinding` can be used per role.
*/
readonly role: pulumi.Output<string>;
readonly sleepAfter: pulumi.Output<number | undefined>;
/**
* Create a ResourcemanagerFolderIamBinding 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: ResourcemanagerFolderIamBindingArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ResourcemanagerFolderIamBinding resources.
*/
export interface ResourcemanagerFolderIamBindingState {
/**
* ID of the folder to attach a policy to.
*/
folderId?: pulumi.Input<string>;
/**
* An array of identities that will be granted the privilege that is specified in the `role` field.
* Each entry can have one of the following values:
* * **userAccount:{user_id}**: An email address that represents a specific Yandex account. For example, ivan@yandex.ru or joe@example.com.
* * **serviceAccount:{service_account_id}**: A unique service account ID.
*/
members?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The role that should be assigned. Only one
* `yandex.ResourcemanagerFolderIamBinding` can be used per role.
*/
role?: pulumi.Input<string>;
sleepAfter?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a ResourcemanagerFolderIamBinding resource.
*/
export interface ResourcemanagerFolderIamBindingArgs {
/**
* ID of the folder to attach a policy to.
*/
folderId: pulumi.Input<string>;
/**
* An array of identities that will be granted the privilege that is specified in the `role` field.
* Each entry can have one of the following values:
* * **userAccount:{user_id}**: An email address that represents a specific Yandex account. For example, ivan@yandex.ru or joe@example.com.
* * **serviceAccount:{service_account_id}**: A unique service account ID.
*/
members: pulumi.Input<pulumi.Input<string>[]>;
/**
* The role that should be assigned. Only one
* `yandex.ResourcemanagerFolderIamBinding` can be used per role.
*/
role: pulumi.Input<string>;
sleepAfter?: pulumi.Input<number>;
}