1. Packages
  2. Yandex
  3. API Docs
  4. ResourcemanagerCloudIamBinding
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

yandex.ResourcemanagerCloudIamBinding

Explore with Pulumi AI

yandex logo
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

    Allows creation and management of a single binding within IAM policy for an existing Yandex Resource Manager cloud.

    Example Usage

    using Pulumi;
    using Yandex = Pulumi.Yandex;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var project1 = Output.Create(Yandex.GetResourcemanagerCloud.InvokeAsync(new Yandex.GetResourcemanagerCloudArgs
            {
                Name = "Project 1",
            }));
            var admin = new Yandex.ResourcemanagerCloudIamBinding("admin", new Yandex.ResourcemanagerCloudIamBindingArgs
            {
                CloudId = project1.Apply(project1 => project1.Id),
                Members = 
                {
                    "userAccount:some_user_id",
                },
                Role = "editor",
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		opt0 := "Project 1"
    		project1, err := yandex.GetResourcemanagerCloud(ctx, &GetResourcemanagerCloudArgs{
    			Name: &opt0,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = yandex.NewResourcemanagerCloudIamBinding(ctx, "admin", &yandex.ResourcemanagerCloudIamBindingArgs{
    			CloudId: pulumi.String(project1.Id),
    			Members: pulumi.StringArray{
    				pulumi.String("userAccount:some_user_id"),
    			},
    			Role: pulumi.String("editor"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_yandex as yandex
    
    project1 = yandex.get_resourcemanager_cloud(name="Project 1")
    admin = yandex.ResourcemanagerCloudIamBinding("admin",
        cloud_id=project1.id,
        members=["userAccount:some_user_id"],
        role="editor")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as yandex from "@pulumi/yandex";
    
    const project1 = pulumi.output(yandex.getResourcemanagerCloud({
        name: "Project 1",
    }));
    const admin = new yandex.ResourcemanagerCloudIamBinding("admin", {
        cloudId: project1.id,
        members: ["userAccount:some_user_id"],
        role: "editor",
    });
    

    Coming soon!

    Create ResourcemanagerCloudIamBinding Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ResourcemanagerCloudIamBinding(name: string, args: ResourcemanagerCloudIamBindingArgs, opts?: CustomResourceOptions);
    @overload
    def ResourcemanagerCloudIamBinding(resource_name: str,
                                       args: ResourcemanagerCloudIamBindingArgs,
                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ResourcemanagerCloudIamBinding(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       cloud_id: Optional[str] = None,
                                       members: Optional[Sequence[str]] = None,
                                       role: Optional[str] = None,
                                       sleep_after: Optional[int] = None)
    func NewResourcemanagerCloudIamBinding(ctx *Context, name string, args ResourcemanagerCloudIamBindingArgs, opts ...ResourceOption) (*ResourcemanagerCloudIamBinding, error)
    public ResourcemanagerCloudIamBinding(string name, ResourcemanagerCloudIamBindingArgs args, CustomResourceOptions? opts = null)
    public ResourcemanagerCloudIamBinding(String name, ResourcemanagerCloudIamBindingArgs args)
    public ResourcemanagerCloudIamBinding(String name, ResourcemanagerCloudIamBindingArgs args, CustomResourceOptions options)
    
    type: yandex:ResourcemanagerCloudIamBinding
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ResourcemanagerCloudIamBindingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ResourcemanagerCloudIamBindingArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ResourcemanagerCloudIamBindingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ResourcemanagerCloudIamBindingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ResourcemanagerCloudIamBindingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var resourcemanagerCloudIamBindingResource = new Yandex.ResourcemanagerCloudIamBinding("resourcemanagerCloudIamBindingResource", new()
    {
        CloudId = "string",
        Members = new[]
        {
            "string",
        },
        Role = "string",
        SleepAfter = 0,
    });
    
    example, err := yandex.NewResourcemanagerCloudIamBinding(ctx, "resourcemanagerCloudIamBindingResource", &yandex.ResourcemanagerCloudIamBindingArgs{
    	CloudId: pulumi.String("string"),
    	Members: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Role:       pulumi.String("string"),
    	SleepAfter: pulumi.Int(0),
    })
    
    var resourcemanagerCloudIamBindingResource = new ResourcemanagerCloudIamBinding("resourcemanagerCloudIamBindingResource", ResourcemanagerCloudIamBindingArgs.builder()
        .cloudId("string")
        .members("string")
        .role("string")
        .sleepAfter(0)
        .build());
    
    resourcemanager_cloud_iam_binding_resource = yandex.ResourcemanagerCloudIamBinding("resourcemanagerCloudIamBindingResource",
        cloud_id="string",
        members=["string"],
        role="string",
        sleep_after=0)
    
    const resourcemanagerCloudIamBindingResource = new yandex.ResourcemanagerCloudIamBinding("resourcemanagerCloudIamBindingResource", {
        cloudId: "string",
        members: ["string"],
        role: "string",
        sleepAfter: 0,
    });
    
    type: yandex:ResourcemanagerCloudIamBinding
    properties:
        cloudId: string
        members:
            - string
        role: string
        sleepAfter: 0
    

    ResourcemanagerCloudIamBinding Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ResourcemanagerCloudIamBinding resource accepts the following input properties:

    CloudId string
    ID of the cloud to attach the policy to.
    Members List<string>
    An array of identities that will be granted the privilege in the role. Each entry 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.
    • federatedUser:{federated_user_id}: A unique federated user ID.
    Role string
    The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
    SleepAfter int
    CloudId string
    ID of the cloud to attach the policy to.
    Members []string
    An array of identities that will be granted the privilege in the role. Each entry 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.
    • federatedUser:{federated_user_id}: A unique federated user ID.
    Role string
    The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
    SleepAfter int
    cloudId String
    ID of the cloud to attach the policy to.
    members List<String>
    An array of identities that will be granted the privilege in the role. Each entry 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.
    • federatedUser:{federated_user_id}: A unique federated user ID.
    role String
    The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
    sleepAfter Integer
    cloudId string
    ID of the cloud to attach the policy to.
    members string[]
    An array of identities that will be granted the privilege in the role. Each entry 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.
    • federatedUser:{federated_user_id}: A unique federated user ID.
    role string
    The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
    sleepAfter number
    cloud_id str
    ID of the cloud to attach the policy to.
    members Sequence[str]
    An array of identities that will be granted the privilege in the role. Each entry 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.
    • federatedUser:{federated_user_id}: A unique federated user ID.
    role str
    The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
    sleep_after int
    cloudId String
    ID of the cloud to attach the policy to.
    members List<String>
    An array of identities that will be granted the privilege in the role. Each entry 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.
    • federatedUser:{federated_user_id}: A unique federated user ID.
    role String
    The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
    sleepAfter Number

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ResourcemanagerCloudIamBinding resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ResourcemanagerCloudIamBinding Resource

    Get an existing ResourcemanagerCloudIamBinding resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ResourcemanagerCloudIamBindingState, opts?: CustomResourceOptions): ResourcemanagerCloudIamBinding
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cloud_id: Optional[str] = None,
            members: Optional[Sequence[str]] = None,
            role: Optional[str] = None,
            sleep_after: Optional[int] = None) -> ResourcemanagerCloudIamBinding
    func GetResourcemanagerCloudIamBinding(ctx *Context, name string, id IDInput, state *ResourcemanagerCloudIamBindingState, opts ...ResourceOption) (*ResourcemanagerCloudIamBinding, error)
    public static ResourcemanagerCloudIamBinding Get(string name, Input<string> id, ResourcemanagerCloudIamBindingState? state, CustomResourceOptions? opts = null)
    public static ResourcemanagerCloudIamBinding get(String name, Output<String> id, ResourcemanagerCloudIamBindingState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CloudId string
    ID of the cloud to attach the policy to.
    Members List<string>
    An array of identities that will be granted the privilege in the role. Each entry 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.
    • federatedUser:{federated_user_id}: A unique federated user ID.
    Role string
    The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
    SleepAfter int
    CloudId string
    ID of the cloud to attach the policy to.
    Members []string
    An array of identities that will be granted the privilege in the role. Each entry 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.
    • federatedUser:{federated_user_id}: A unique federated user ID.
    Role string
    The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
    SleepAfter int
    cloudId String
    ID of the cloud to attach the policy to.
    members List<String>
    An array of identities that will be granted the privilege in the role. Each entry 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.
    • federatedUser:{federated_user_id}: A unique federated user ID.
    role String
    The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
    sleepAfter Integer
    cloudId string
    ID of the cloud to attach the policy to.
    members string[]
    An array of identities that will be granted the privilege in the role. Each entry 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.
    • federatedUser:{federated_user_id}: A unique federated user ID.
    role string
    The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
    sleepAfter number
    cloud_id str
    ID of the cloud to attach the policy to.
    members Sequence[str]
    An array of identities that will be granted the privilege in the role. Each entry 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.
    • federatedUser:{federated_user_id}: A unique federated user ID.
    role str
    The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
    sleep_after int
    cloudId String
    ID of the cloud to attach the policy to.
    members List<String>
    An array of identities that will be granted the privilege in the role. Each entry 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.
    • federatedUser:{federated_user_id}: A unique federated user ID.
    role String
    The role that should be assigned. Only one yandex.ResourcemanagerCloudIamBinding can be used per role.
    sleepAfter Number

    Import

    IAM binding imports use space-delimited identifiers; first the resource in question and then the role. These bindings can be imported using the cloud_id and role, e.g.

     $ pulumi import yandex:index/resourcemanagerCloudIamBinding:ResourcemanagerCloudIamBinding viewer "cloud_id viewer"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Yandex pulumi/pulumi-yandex
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the yandex Terraform Provider.
    yandex logo
    Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi