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.GroupMembershipwill 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.UserGroupMembershipresource][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,
},
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Iam
Assembly: Pulumi.Aws.dll
Syntax
public class GroupMembership : CustomResource
Constructors
View SourceGroupMembership(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 SourceGroup
The IAM Group name to attach the list of users to
Declaration
public Output<string> Group { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name to identify the Group Membership
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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 SourceGet(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 |