Class CfnUserPool.SchemaAttributeProperty.Builder
java.lang.Object
software.amazon.awscdk.services.cognito.CfnUserPool.SchemaAttributeProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnUserPool.SchemaAttributeProperty>
- Enclosing interface:
CfnUserPool.SchemaAttributeProperty
@Stability(Stable)
public static final class CfnUserPool.SchemaAttributeProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnUserPool.SchemaAttributeProperty>
A builder for
CfnUserPool.SchemaAttributeProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionattributeDataType
(String attributeDataType) Sets the value ofCfnUserPool.SchemaAttributeProperty.getAttributeDataType()
build()
Builds the configured instance.developerOnlyAttribute
(Boolean developerOnlyAttribute) Sets the value ofCfnUserPool.SchemaAttributeProperty.getDeveloperOnlyAttribute()
developerOnlyAttribute
(IResolvable developerOnlyAttribute) Sets the value ofCfnUserPool.SchemaAttributeProperty.getDeveloperOnlyAttribute()
Sets the value ofCfnUserPool.SchemaAttributeProperty.getMutable()
mutable
(IResolvable mutable) Sets the value ofCfnUserPool.SchemaAttributeProperty.getMutable()
Sets the value ofCfnUserPool.SchemaAttributeProperty.getName()
numberAttributeConstraints
(IResolvable numberAttributeConstraints) Sets the value ofCfnUserPool.SchemaAttributeProperty.getNumberAttributeConstraints()
numberAttributeConstraints
(CfnUserPool.NumberAttributeConstraintsProperty numberAttributeConstraints) Sets the value ofCfnUserPool.SchemaAttributeProperty.getNumberAttributeConstraints()
Sets the value ofCfnUserPool.SchemaAttributeProperty.getRequired()
required
(IResolvable required) Sets the value ofCfnUserPool.SchemaAttributeProperty.getRequired()
stringAttributeConstraints
(IResolvable stringAttributeConstraints) Sets the value ofCfnUserPool.SchemaAttributeProperty.getStringAttributeConstraints()
stringAttributeConstraints
(CfnUserPool.StringAttributeConstraintsProperty stringAttributeConstraints) Sets the value ofCfnUserPool.SchemaAttributeProperty.getStringAttributeConstraints()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
attributeDataType
@Stability(Stable) public CfnUserPool.SchemaAttributeProperty.Builder attributeDataType(String attributeDataType) Sets the value ofCfnUserPool.SchemaAttributeProperty.getAttributeDataType()
- Parameters:
attributeDataType
- The data format of the values for your attribute. When you choose anAttributeDataType
, Amazon Cognito validates the input against the data type. A custom attribute value in your user's ID token is always a string, for example"custom:isMember" : "true"
or"custom:YearsAsMember" : "12"
.- Returns:
this
-
developerOnlyAttribute
@Stability(Stable) public CfnUserPool.SchemaAttributeProperty.Builder developerOnlyAttribute(Boolean developerOnlyAttribute) Sets the value ofCfnUserPool.SchemaAttributeProperty.getDeveloperOnlyAttribute()
- Parameters:
developerOnlyAttribute
-
Specifies whether the attribute type is developer only. This attribute can only be modified by an administrator. Users won't be able to modify this attribute using their access token. For example,You should use WriteAttributes in the user pool client to control how attributes can be mutated for new use cases instead of using
DeveloperOnlyAttribute
.DeveloperOnlyAttribute
can be modified using AdminUpdateUserAttributes but can't be updated using UpdateUserAttributes.- Returns:
this
-
developerOnlyAttribute
@Stability(Stable) public CfnUserPool.SchemaAttributeProperty.Builder developerOnlyAttribute(IResolvable developerOnlyAttribute) Sets the value ofCfnUserPool.SchemaAttributeProperty.getDeveloperOnlyAttribute()
- Parameters:
developerOnlyAttribute
-
Specifies whether the attribute type is developer only. This attribute can only be modified by an administrator. Users won't be able to modify this attribute using their access token. For example,You should use WriteAttributes in the user pool client to control how attributes can be mutated for new use cases instead of using
DeveloperOnlyAttribute
.DeveloperOnlyAttribute
can be modified using AdminUpdateUserAttributes but can't be updated using UpdateUserAttributes.- Returns:
this
-
mutable
Sets the value ofCfnUserPool.SchemaAttributeProperty.getMutable()
- Parameters:
mutable
- Specifies whether the value of the attribute can be changed. Any user pool attribute whose value you map from an IdP attribute must be mutable, with a parameter value oftrue
. Amazon Cognito updates mapped attributes when users sign in to your application through an IdP. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool .- Returns:
this
-
mutable
Sets the value ofCfnUserPool.SchemaAttributeProperty.getMutable()
- Parameters:
mutable
- Specifies whether the value of the attribute can be changed. Any user pool attribute whose value you map from an IdP attribute must be mutable, with a parameter value oftrue
. Amazon Cognito updates mapped attributes when users sign in to your application through an IdP. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool .- Returns:
this
-
name
Sets the value ofCfnUserPool.SchemaAttributeProperty.getName()
- Parameters:
name
- The name of your user pool attribute. When you create or update a user pool, adding a schema attribute creates a custom or developer-only attribute. When you add an attribute with aName
value ofMyAttribute
, Amazon Cognito creates the custom attributecustom:MyAttribute
. WhenDeveloperOnlyAttribute
istrue
, Amazon Cognito creates your attribute asdev:MyAttribute
. In an operation that describes a user pool, Amazon Cognito returns this value asvalue
for standard attributes,custom:value
for custom attributes, anddev:value
for developer-only attributes..- Returns:
this
-
numberAttributeConstraints
@Stability(Stable) public CfnUserPool.SchemaAttributeProperty.Builder numberAttributeConstraints(IResolvable numberAttributeConstraints) Sets the value ofCfnUserPool.SchemaAttributeProperty.getNumberAttributeConstraints()
- Parameters:
numberAttributeConstraints
- Specifies the constraints for an attribute of the number type.- Returns:
this
-
numberAttributeConstraints
@Stability(Stable) public CfnUserPool.SchemaAttributeProperty.Builder numberAttributeConstraints(CfnUserPool.NumberAttributeConstraintsProperty numberAttributeConstraints) Sets the value ofCfnUserPool.SchemaAttributeProperty.getNumberAttributeConstraints()
- Parameters:
numberAttributeConstraints
- Specifies the constraints for an attribute of the number type.- Returns:
this
-
required
Sets the value ofCfnUserPool.SchemaAttributeProperty.getRequired()
- Parameters:
required
- Specifies whether a user pool attribute is required. If the attribute is required and the user doesn't provide a value, registration or sign-in will fail.- Returns:
this
-
required
@Stability(Stable) public CfnUserPool.SchemaAttributeProperty.Builder required(IResolvable required) Sets the value ofCfnUserPool.SchemaAttributeProperty.getRequired()
- Parameters:
required
- Specifies whether a user pool attribute is required. If the attribute is required and the user doesn't provide a value, registration or sign-in will fail.- Returns:
this
-
stringAttributeConstraints
@Stability(Stable) public CfnUserPool.SchemaAttributeProperty.Builder stringAttributeConstraints(IResolvable stringAttributeConstraints) Sets the value ofCfnUserPool.SchemaAttributeProperty.getStringAttributeConstraints()
- Parameters:
stringAttributeConstraints
- Specifies the constraints for an attribute of the string type.- Returns:
this
-
stringAttributeConstraints
@Stability(Stable) public CfnUserPool.SchemaAttributeProperty.Builder stringAttributeConstraints(CfnUserPool.StringAttributeConstraintsProperty stringAttributeConstraints) Sets the value ofCfnUserPool.SchemaAttributeProperty.getStringAttributeConstraints()
- Parameters:
stringAttributeConstraints
- Specifies the constraints for an attribute of the string type.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnUserPool.SchemaAttributeProperty>
- Returns:
- a new instance of
CfnUserPool.SchemaAttributeProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-