Show / Hide Table of Contents

Class UserGroupMembership

Provides a resource for adding an IAM User to IAM Groups. This resource can be used multiple times with the same user for non-overlapping groups.

To exclusively manage the users in a group, see the [aws.iam.GroupMembership resource][3].

Example usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var user1 = new Aws.Iam.User("user1", new Aws.Iam.UserArgs
    {
    });
    var group1 = new Aws.Iam.Group("group1", new Aws.Iam.GroupArgs
    {
    });
    var group2 = new Aws.Iam.Group("group2", new Aws.Iam.GroupArgs
    {
    });
    var example1 = new Aws.Iam.UserGroupMembership("example1", new Aws.Iam.UserGroupMembershipArgs
    {
        Groups = 
        {
            group1.Name,
            group2.Name,
        },
        User = user1.Name,
    });
    var group3 = new Aws.Iam.Group("group3", new Aws.Iam.GroupArgs
    {
    });
    var example2 = new Aws.Iam.UserGroupMembership("example2", new Aws.Iam.UserGroupMembershipArgs
    {
        Groups = 
        {
            group3.Name,
        },
        User = user1.Name,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
UserGroupMembership
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 UserGroupMembership : CustomResource

Constructors

View Source

UserGroupMembership(String, UserGroupMembershipArgs, CustomResourceOptions)

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

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

The unique name of the resource

UserGroupMembershipArgs 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

Groups

A list of IAM Groups to add the user to

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

User

The name of the IAM User to add to groups

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

Methods

View Source

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

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

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

UserGroupMembershipState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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