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

yandex.ResourcemanagerCloudIamMember

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 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

    using Pulumi;
    using Yandex = Pulumi.Yandex;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var department1 = Output.Create(Yandex.GetResourcemanagerCloud.InvokeAsync(new Yandex.GetResourcemanagerCloudArgs
            {
                Name = "Department 1",
            }));
            var admin = new Yandex.ResourcemanagerCloudIamMember("admin", new Yandex.ResourcemanagerCloudIamMemberArgs
            {
                CloudId = department1.Apply(department1 => department1.Id),
                Member = "userAccount: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 := "Department 1"
    		department1, err := yandex.GetResourcemanagerCloud(ctx, &GetResourcemanagerCloudArgs{
    			Name: &opt0,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = yandex.NewResourcemanagerCloudIamMember(ctx, "admin", &yandex.ResourcemanagerCloudIamMemberArgs{
    			CloudId: pulumi.String(department1.Id),
    			Member:  pulumi.String("userAccount:user_id"),
    			Role:    pulumi.String("editor"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_yandex as yandex
    
    department1 = yandex.get_resourcemanager_cloud(name="Department 1")
    admin = yandex.ResourcemanagerCloudIamMember("admin",
        cloud_id=department1.id,
        member="userAccount:user_id",
        role="editor")
    
    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",
    });
    

    Coming soon!

    Create ResourcemanagerCloudIamMember Resource

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

    Constructor syntax

    new ResourcemanagerCloudIamMember(name: string, args: ResourcemanagerCloudIamMemberArgs, opts?: CustomResourceOptions);
    @overload
    def ResourcemanagerCloudIamMember(resource_name: str,
                                      args: ResourcemanagerCloudIamMemberArgs,
                                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ResourcemanagerCloudIamMember(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      cloud_id: Optional[str] = None,
                                      member: Optional[str] = None,
                                      role: Optional[str] = None,
                                      sleep_after: Optional[int] = None)
    func NewResourcemanagerCloudIamMember(ctx *Context, name string, args ResourcemanagerCloudIamMemberArgs, opts ...ResourceOption) (*ResourcemanagerCloudIamMember, error)
    public ResourcemanagerCloudIamMember(string name, ResourcemanagerCloudIamMemberArgs args, CustomResourceOptions? opts = null)
    public ResourcemanagerCloudIamMember(String name, ResourcemanagerCloudIamMemberArgs args)
    public ResourcemanagerCloudIamMember(String name, ResourcemanagerCloudIamMemberArgs args, CustomResourceOptions options)
    
    type: yandex:ResourcemanagerCloudIamMember
    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 ResourcemanagerCloudIamMemberArgs
    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 ResourcemanagerCloudIamMemberArgs
    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 ResourcemanagerCloudIamMemberArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ResourcemanagerCloudIamMemberArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ResourcemanagerCloudIamMemberArgs
    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 resourcemanagerCloudIamMemberResource = new Yandex.ResourcemanagerCloudIamMember("resourcemanagerCloudIamMemberResource", new()
    {
        CloudId = "string",
        Member = "string",
        Role = "string",
        SleepAfter = 0,
    });
    
    example, err := yandex.NewResourcemanagerCloudIamMember(ctx, "resourcemanagerCloudIamMemberResource", &yandex.ResourcemanagerCloudIamMemberArgs{
    	CloudId:    pulumi.String("string"),
    	Member:     pulumi.String("string"),
    	Role:       pulumi.String("string"),
    	SleepAfter: pulumi.Int(0),
    })
    
    var resourcemanagerCloudIamMemberResource = new ResourcemanagerCloudIamMember("resourcemanagerCloudIamMemberResource", ResourcemanagerCloudIamMemberArgs.builder()
        .cloudId("string")
        .member("string")
        .role("string")
        .sleepAfter(0)
        .build());
    
    resourcemanager_cloud_iam_member_resource = yandex.ResourcemanagerCloudIamMember("resourcemanagerCloudIamMemberResource",
        cloud_id="string",
        member="string",
        role="string",
        sleep_after=0)
    
    const resourcemanagerCloudIamMemberResource = new yandex.ResourcemanagerCloudIamMember("resourcemanagerCloudIamMemberResource", {
        cloudId: "string",
        member: "string",
        role: "string",
        sleepAfter: 0,
    });
    
    type: yandex:ResourcemanagerCloudIamMember
    properties:
        cloudId: string
        member: string
        role: string
        sleepAfter: 0
    

    ResourcemanagerCloudIamMember Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ResourcemanagerCloudIamMember resource accepts the following input properties:

    CloudId string
    ID of the cloud to attach a policy to.
    Member 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.
    Role string
    The role that should be assigned.
    SleepAfter int
    CloudId string
    ID of the cloud to attach a policy to.
    Member 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.
    Role string
    The role that should be assigned.
    SleepAfter int
    cloudId String
    ID of the cloud to attach a policy to.
    member 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.
    role String
    The role that should be assigned.
    sleepAfter Integer
    cloudId string
    ID of the cloud to attach a policy to.
    member 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.
    role string
    The role that should be assigned.
    sleepAfter number
    cloud_id str
    ID of the cloud to attach a policy to.
    member str
    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.
    role str
    The role that should be assigned.
    sleep_after int
    cloudId String
    ID of the cloud to attach a policy to.
    member 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.
    role String
    The role that should be assigned.
    sleepAfter Number

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ResourcemanagerCloudIamMember 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 ResourcemanagerCloudIamMember Resource

    Get an existing ResourcemanagerCloudIamMember 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?: ResourcemanagerCloudIamMemberState, opts?: CustomResourceOptions): ResourcemanagerCloudIamMember
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cloud_id: Optional[str] = None,
            member: Optional[str] = None,
            role: Optional[str] = None,
            sleep_after: Optional[int] = None) -> ResourcemanagerCloudIamMember
    func GetResourcemanagerCloudIamMember(ctx *Context, name string, id IDInput, state *ResourcemanagerCloudIamMemberState, opts ...ResourceOption) (*ResourcemanagerCloudIamMember, error)
    public static ResourcemanagerCloudIamMember Get(string name, Input<string> id, ResourcemanagerCloudIamMemberState? state, CustomResourceOptions? opts = null)
    public static ResourcemanagerCloudIamMember get(String name, Output<String> id, ResourcemanagerCloudIamMemberState 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 a policy to.
    Member 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.
    Role string
    The role that should be assigned.
    SleepAfter int
    CloudId string
    ID of the cloud to attach a policy to.
    Member 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.
    Role string
    The role that should be assigned.
    SleepAfter int
    cloudId String
    ID of the cloud to attach a policy to.
    member 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.
    role String
    The role that should be assigned.
    sleepAfter Integer
    cloudId string
    ID of the cloud to attach a policy to.
    member 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.
    role string
    The role that should be assigned.
    sleepAfter number
    cloud_id str
    ID of the cloud to attach a policy to.
    member str
    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.
    role str
    The role that should be assigned.
    sleep_after int
    cloudId String
    ID of the cloud to attach a policy to.
    member 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.
    role String
    The role that should be assigned.
    sleepAfter Number

    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.

     $ pulumi import yandex:index/resourcemanagerCloudIamMember:ResourcemanagerCloudIamMember my_project "cloud_id viewer foo@example.com"
    

    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