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.104.0 (build e79254c)", date="2024-11-06T23:25:06.395Z") @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