Show / Hide Table of Contents

Class IAMBinding

Allows creation and management of a single binding within IAM policy for an existing Google Cloud Platform Organization.

Note: This resource must not be used in conjunction with gcp.organizations.IAMMember for the same role or they will fight over what your policy should be.

Note: On create, this resource will overwrite members of any existing roles. Use pulumi import and inspect the `output to ensure your existing members are preserved.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var binding = new Gcp.Organizations.IAMBinding("binding", new Gcp.Organizations.IAMBindingArgs
    {
        Members = 
        {
            "user:alice@gmail.com",
        },
        OrgId = "123456789",
        Role = "roles/browser",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
IAMBinding
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Organizations
Assembly: Pulumi.Gcp.dll
Syntax
public class IAMBinding : CustomResource

Constructors

View Source

IAMBinding(String, IAMBindingArgs, CustomResourceOptions)

Create a IAMBinding resource with the given unique name, arguments, and options.

Declaration
public IAMBinding(string name, IAMBindingArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

IAMBindingArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Condition

Declaration
public Output<IAMBindingCondition> Condition { get; }
Property Value
Type Description
Output<IAMBindingCondition>
View Source

Etag

(Computed) The etag of the organization's IAM policy.

Declaration
public Output<string> Etag { get; }
Property Value
Type Description
Output<System.String>
View Source

Members

A list of users that the role should apply to. For more details on format and restrictions see https://cloud.google.com/billing/reference/rest/v1/Policy#Binding

Declaration
public Output<ImmutableArray<string>> Members { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

OrgId

The numeric ID of the organization in which you want to create a custom role.

Declaration
public Output<string> OrgId { get; }
Property Value
Type Description
Output<System.String>
View Source

Role

The role that should be applied. Only one gcp.organizations.IAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

Declaration
public Output<string> Role { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, IAMBindingState, CustomResourceOptions)

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

Declaration
public static IAMBinding Get(string name, Input<string> id, IAMBindingState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

IAMBindingState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
IAMBinding
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.