Show / Hide Table of Contents

Class GroupMembership

WARNING: Multiple aws.iam.GroupMembership resources with the same group name will produce inconsistent behavior!

Provides a top level resource to manage IAM Group membership for IAM Users. For more information on managing IAM Groups or IAM Users, see IAM Groups or IAM Users

Note: aws.iam.GroupMembership will conflict with itself if used more than once with the same group. To non-exclusively manage the users in a group, see the [aws.iam.UserGroupMembership resource][3].

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var @group = new Aws.Iam.Group("group", new Aws.Iam.GroupArgs
    {
    });
    var userOne = new Aws.Iam.User("userOne", new Aws.Iam.UserArgs
    {
    });
    var userTwo = new Aws.Iam.User("userTwo", new Aws.Iam.UserArgs
    {
    });
    var team = new Aws.Iam.GroupMembership("team", new Aws.Iam.GroupMembershipArgs
    {
        Group = @group.Name,
        Users = 
        {
            userOne.Name,
            userTwo.Name,
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
GroupMembership
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.Aws.Iam
Assembly: Pulumi.Aws.dll
Syntax
public class GroupMembership : CustomResource

Constructors

View Source

GroupMembership(String, GroupMembershipArgs, CustomResourceOptions)

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

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

The unique name of the resource

GroupMembershipArgs 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

Group

The IAM Group name to attach the list of users to

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

Name

The name to identify the Group Membership

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

Users

A list of IAM User names to associate with the Group

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

Methods

View Source

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

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

Declaration
public static GroupMembership Get(string name, Input<string> id, GroupMembershipState 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.

GroupMembershipState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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