Class UserGroup
Provides a Cognito User Group resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var mainUserPool = new Aws.Cognito.UserPool("mainUserPool", new Aws.Cognito.UserPoolArgs
{
});
var groupRole = new Aws.Iam.Role("groupRole", new Aws.Iam.RoleArgs
{
AssumeRolePolicy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
""Sid"": """",
""Effect"": ""Allow"",
""Principal"": {
""Federated"": ""cognito-identity.amazonaws.com""
},
""Action"": ""sts:AssumeRoleWithWebIdentity"",
""Condition"": {
""StringEquals"": {
""cognito-identity.amazonaws.com:aud"": ""us-east-1:12345678-dead-beef-cafe-123456790ab""
},
""ForAnyValue:StringLike"": {
""cognito-identity.amazonaws.com:amr"": ""authenticated""
}
}
}
]
}
",
});
var mainUserGroup = new Aws.Cognito.UserGroup("mainUserGroup", new Aws.Cognito.UserGroupArgs
{
Description = "Managed by Pulumi",
Precedence = 42,
RoleArn = groupRole.Arn,
UserPoolId = mainUserPool.Id,
});
}
}
Inherited Members
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.Cognito
Assembly: Pulumi.Aws.dll
Syntax
public class UserGroup : CustomResource
Constructors
View SourceUserGroup(String, UserGroupArgs, CustomResourceOptions)
Create a UserGroup resource with the given unique name, arguments, and options.
Declaration
public UserGroup(string name, UserGroupArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| UserGroupArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDescription
The description of the user group.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the user group.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Precedence
The precedence of the user group.
Declaration
public Output<int?> Precedence { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
RoleArn
The ARN of the IAM role to be associated with the user group.
Declaration
public Output<string> RoleArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UserPoolId
The user pool ID.
Declaration
public Output<string> UserPoolId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, UserGroupState, CustomResourceOptions)
Get an existing UserGroup resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static UserGroup Get(string name, Input<string> id, UserGroupState 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. |
| UserGroupState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| UserGroup |