Interface StandardAttribute
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
StandardAttribute.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:44.055Z")
@Stability(Stable)
public interface StandardAttribute
extends software.amazon.jsii.JsiiSerializable
Standard attribute that can be marked as required or mutable.
Example:
UserPool.Builder.create(this, "myuserpool") // ... .standardAttributes(StandardAttributes.builder() .fullname(StandardAttribute.builder() .required(true) .mutable(false) .build()) .address(StandardAttribute.builder() .required(false) .mutable(true) .build()) .build()) .customAttributes(Map.of( "myappid", StringAttribute.Builder.create().minLen(5).maxLen(15).mutable(false).build(), "callingcode", NumberAttribute.Builder.create().min(1).max(3).mutable(true).build(), "isEmployee", BooleanAttribute.Builder.create().mutable(true).build(), "joinedOn", new DateTimeAttribute())) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forStandardAttribute
static final class
An implementation forStandardAttribute
-
Method Summary
Modifier and TypeMethodDescriptionstatic StandardAttribute.Builder
builder()
default Boolean
Specifies whether the value of the attribute can be changed.default Boolean
Specifies whether the attribute is required upon user registration.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getMutable
Specifies whether the value of the attribute can be changed.For any user pool attribute that's mapped to an identity provider attribute, this must be set to
true
. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute.Default: true
-
getRequired
Specifies whether the attribute is required upon user registration.If the attribute is required and the user does not provide a value, registration or sign-in will fail.
Default: false
-
builder
- Returns:
- a
StandardAttribute.Builder
ofStandardAttribute
-