public class CreateGroupRequest
extends com.amazonaws.AmazonWebServiceRequest
implements java.io.Serializable
Creates a new group in the specified user pool.
Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.
Learn more
| Constructor and Description |
|---|
CreateGroupRequest() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDescription()
A string containing the description of the group.
|
java.lang.String |
getGroupName()
The name of the group.
|
java.lang.Integer |
getPrecedence()
A non-negative integer value that specifies the precedence of this group
relative to the other groups that a user can belong to in the user pool.
|
java.lang.String |
getRoleArn()
The role Amazon Resource Name (ARN) for the group.
|
java.lang.String |
getUserPoolId()
The user pool ID for the user pool.
|
int |
hashCode() |
void |
setDescription(java.lang.String description)
A string containing the description of the group.
|
void |
setGroupName(java.lang.String groupName)
The name of the group.
|
void |
setPrecedence(java.lang.Integer precedence)
A non-negative integer value that specifies the precedence of this group
relative to the other groups that a user can belong to in the user pool.
|
void |
setRoleArn(java.lang.String roleArn)
The role Amazon Resource Name (ARN) for the group.
|
void |
setUserPoolId(java.lang.String userPoolId)
The user pool ID for the user pool.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateGroupRequest |
withDescription(java.lang.String description)
A string containing the description of the group.
|
CreateGroupRequest |
withGroupName(java.lang.String groupName)
The name of the group.
|
CreateGroupRequest |
withPrecedence(java.lang.Integer precedence)
A non-negative integer value that specifies the precedence of this group
relative to the other groups that a user can belong to in the user pool.
|
CreateGroupRequest |
withRoleArn(java.lang.String roleArn)
The role Amazon Resource Name (ARN) for the group.
|
CreateGroupRequest |
withUserPoolId(java.lang.String userPoolId)
The user pool ID for the user pool.
|
clone, copyBaseTo, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic java.lang.String getGroupName()
The name of the group. Must be unique.
Constraints:
Length: 1 - 128
Pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+
The name of the group. Must be unique.
public void setGroupName(java.lang.String groupName)
The name of the group. Must be unique.
Constraints:
Length: 1 - 128
Pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+
groupName - The name of the group. Must be unique.
public CreateGroupRequest withGroupName(java.lang.String groupName)
The name of the group. Must be unique.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 128
Pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+
groupName - The name of the group. Must be unique.
public java.lang.String getUserPoolId()
The user pool ID for the user pool.
Constraints:
Length: 1 - 55
Pattern: [\w-]+_[0-9a-zA-Z]+
The user pool ID for the user pool.
public void setUserPoolId(java.lang.String userPoolId)
The user pool ID for the user pool.
Constraints:
Length: 1 - 55
Pattern: [\w-]+_[0-9a-zA-Z]+
userPoolId - The user pool ID for the user pool.
public CreateGroupRequest withUserPoolId(java.lang.String userPoolId)
The user pool ID for the user pool.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 55
Pattern: [\w-]+_[0-9a-zA-Z]+
userPoolId - The user pool ID for the user pool.
public java.lang.String getDescription()
A string containing the description of the group.
Constraints:
Length: - 2048
A string containing the description of the group.
public void setDescription(java.lang.String description)
A string containing the description of the group.
Constraints:
Length: - 2048
description - A string containing the description of the group.
public CreateGroupRequest withDescription(java.lang.String description)
A string containing the description of the group.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: - 2048
description - A string containing the description of the group.
public java.lang.String getRoleArn()
The role Amazon Resource Name (ARN) for the group.
Constraints:
Length: 20 - 2048
Pattern:
arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=
/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?
The role Amazon Resource Name (ARN) for the group.
public void setRoleArn(java.lang.String roleArn)
The role Amazon Resource Name (ARN) for the group.
Constraints:
Length: 20 - 2048
Pattern:
arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=
/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?
roleArn - The role Amazon Resource Name (ARN) for the group.
public CreateGroupRequest withRoleArn(java.lang.String roleArn)
The role Amazon Resource Name (ARN) for the group.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 20 - 2048
Pattern:
arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=
/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?
roleArn - The role Amazon Resource Name (ARN) for the group.
public java.lang.Integer getPrecedence()
A non-negative integer value that specifies the precedence of this group
relative to the other groups that a user can belong to in the user pool.
Zero is the highest precedence value. Groups with lower
Precedence values take precedence over groups with higher or
null Precedence values. If a user belongs to two or more
groups, it is the group with the lowest precedence value whose role ARN
is given in the user's tokens for the cognito:roles and
cognito:preferred_role claims.
Two groups can have the same Precedence value. If this
happens, neither group takes precedence over the other. If two groups
with the same Precedence have the same role ARN, that role
is used in the cognito:preferred_role claim in tokens for
users in each group. If the two groups have different role ARNs, the
cognito:preferred_role claim isn't set in users' tokens.
The default Precedence value is null. The maximum
Precedence value is 2^31-1.
Constraints:
Range: 0 -
A non-negative integer value that specifies the precedence of
this group relative to the other groups that a user can belong to
in the user pool. Zero is the highest precedence value. Groups
with lower Precedence values take precedence over
groups with higher or null Precedence values. If a
user belongs to two or more groups, it is the group with the
lowest precedence value whose role ARN is given in the user's
tokens for the cognito:roles and
cognito:preferred_role claims.
Two groups can have the same Precedence value. If
this happens, neither group takes precedence over the other. If
two groups with the same Precedence have the same
role ARN, that role is used in the
cognito:preferred_role claim in tokens for users in
each group. If the two groups have different role ARNs, the
cognito:preferred_role claim isn't set in users'
tokens.
The default Precedence value is null. The maximum
Precedence value is 2^31-1.
public void setPrecedence(java.lang.Integer precedence)
A non-negative integer value that specifies the precedence of this group
relative to the other groups that a user can belong to in the user pool.
Zero is the highest precedence value. Groups with lower
Precedence values take precedence over groups with higher or
null Precedence values. If a user belongs to two or more
groups, it is the group with the lowest precedence value whose role ARN
is given in the user's tokens for the cognito:roles and
cognito:preferred_role claims.
Two groups can have the same Precedence value. If this
happens, neither group takes precedence over the other. If two groups
with the same Precedence have the same role ARN, that role
is used in the cognito:preferred_role claim in tokens for
users in each group. If the two groups have different role ARNs, the
cognito:preferred_role claim isn't set in users' tokens.
The default Precedence value is null. The maximum
Precedence value is 2^31-1.
Constraints:
Range: 0 -
precedence -
A non-negative integer value that specifies the precedence of
this group relative to the other groups that a user can belong
to in the user pool. Zero is the highest precedence value.
Groups with lower Precedence values take
precedence over groups with higher or null
Precedence values. If a user belongs to two or
more groups, it is the group with the lowest precedence value
whose role ARN is given in the user's tokens for the
cognito:roles and
cognito:preferred_role claims.
Two groups can have the same Precedence value. If
this happens, neither group takes precedence over the other.
If two groups with the same Precedence have the
same role ARN, that role is used in the
cognito:preferred_role claim in tokens for users
in each group. If the two groups have different role ARNs, the
cognito:preferred_role claim isn't set in users'
tokens.
The default Precedence value is null. The maximum
Precedence value is 2^31-1.
public CreateGroupRequest withPrecedence(java.lang.Integer precedence)
A non-negative integer value that specifies the precedence of this group
relative to the other groups that a user can belong to in the user pool.
Zero is the highest precedence value. Groups with lower
Precedence values take precedence over groups with higher or
null Precedence values. If a user belongs to two or more
groups, it is the group with the lowest precedence value whose role ARN
is given in the user's tokens for the cognito:roles and
cognito:preferred_role claims.
Two groups can have the same Precedence value. If this
happens, neither group takes precedence over the other. If two groups
with the same Precedence have the same role ARN, that role
is used in the cognito:preferred_role claim in tokens for
users in each group. If the two groups have different role ARNs, the
cognito:preferred_role claim isn't set in users' tokens.
The default Precedence value is null. The maximum
Precedence value is 2^31-1.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 0 -
precedence -
A non-negative integer value that specifies the precedence of
this group relative to the other groups that a user can belong
to in the user pool. Zero is the highest precedence value.
Groups with lower Precedence values take
precedence over groups with higher or null
Precedence values. If a user belongs to two or
more groups, it is the group with the lowest precedence value
whose role ARN is given in the user's tokens for the
cognito:roles and
cognito:preferred_role claims.
Two groups can have the same Precedence value. If
this happens, neither group takes precedence over the other.
If two groups with the same Precedence have the
same role ARN, that role is used in the
cognito:preferred_role claim in tokens for users
in each group. If the two groups have different role ARNs, the
cognito:preferred_role claim isn't set in users'
tokens.
The default Precedence value is null. The maximum
Precedence value is 2^31-1.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object