Interface CustomAttributeProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
NumberAttributeProps, StringAttributeProps
All Known Implementing Classes:
CustomAttributeProps.Jsii$Proxy, NumberAttributeProps.Jsii$Proxy, StringAttributeProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:44.011Z") @Stability(Stable) public interface CustomAttributeProps extends software.amazon.jsii.JsiiSerializable
Constraints that can be applied to a custom attribute of any type.

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();
 
  • Method Details

    • getMutable

      @Stability(Stable) @Nullable default Boolean getMutable()
      Specifies whether the value of the attribute can be changed.

      For any user pool attribute that's mapped to an identity provider attribute, you must set this parameter 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: false

    • builder

      @Stability(Stable) static CustomAttributeProps.Builder builder()
      Returns:
      a CustomAttributeProps.Builder of CustomAttributeProps