Amazon Cognito · Schema

SchemaAttributeType

A list of the user attributes and their properties in your user pool. The attribute schema contains standard attributes, custom attributes with a custom: prefix, and developer attributes with a dev: prefix. For more information, see User pool attributes.

Developer-only attributes are a legacy feature of user pools, are read-only to all app clients. You can create and update developer-only attributes only with IAM-authenticated API operations. Use app client read/write permissions instead.

AuthenticationIdentityOAuthOIDCSAMLUser ManagementFederated Identity

Properties

Name Type Description
Name object
AttributeDataType object
DeveloperOnlyAttribute object
Mutable object
Required object
NumberAttributeConstraints object
StringAttributeConstraints object
View JSON Schema on GitHub

JSON Schema

user-pools-schema-attribute-type-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amazon-cognito/refs/heads/main/json-schema/user-pools-schema-attribute-type-schema.json",
  "title": "SchemaAttributeType",
  "description": "<p>A list of the user attributes and their properties in your user pool. The attribute schema contains standard attributes, custom attributes with a <code>custom:</code> prefix, and developer attributes with a <code>dev:</code> prefix. For more information, see <a href=\"https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html\">User pool attributes</a>.</p> <p>Developer-only attributes are a legacy feature of user pools, are read-only to all app clients. You can create and update developer-only attributes only with IAM-authenticated API operations. Use app client read/write permissions instead.</p>",
  "type": "object",
  "properties": {
    "Name": {
      "allOf": [
        {
          "$ref": "#/components/schemas/CustomAttributeNameType"
        },
        {
          "description": "The name of your user pool attribute, for example <code>username</code> or <code>custom:costcenter</code>."
        }
      ]
    },
    "AttributeDataType": {
      "allOf": [
        {
          "$ref": "#/components/schemas/AttributeDataType"
        },
        {
          "description": "The data format of the values for your attribute."
        }
      ]
    },
    "DeveloperOnlyAttribute": {
      "allOf": [
        {
          "$ref": "#/components/schemas/BooleanType"
        },
        {
          "description": "<note> <p>You should use <a href=\"https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes\">WriteAttributes</a> in the user pool client to control how attributes can be mutated for new use cases instead of using <code>DeveloperOnlyAttribute</code>.</p> </note> <p>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, <code>DeveloperOnlyAttribute</code> can be modified using AdminUpdateUserAttributes but can't be updated using UpdateUserAttributes.</p>"
        }
      ]
    },
    "Mutable": {
      "allOf": [
        {
          "$ref": "#/components/schemas/BooleanType"
        },
        {
          "description": "<p>Specifies whether the value of the attribute can be changed.</p> <p>Any user pool attribute whose value you map from an IdP attribute must be mutable, with a parameter value of <code>true</code>. 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 <a href=\"https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html\">Specifying Identity Provider Attribute Mappings for Your User Pool</a>.</p>"
        }
      ]
    },
    "Required": {
      "allOf": [
        {
          "$ref": "#/components/schemas/BooleanType"
        },
        {
          "description": "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."
        }
      ]
    },
    "NumberAttributeConstraints": {
      "allOf": [
        {
          "$ref": "#/components/schemas/NumberAttributeConstraintsType"
        },
        {
          "description": "Specifies the constraints for an attribute of the number type."
        }
      ]
    },
    "StringAttributeConstraints": {
      "allOf": [
        {
          "$ref": "#/components/schemas/StringAttributeConstraintsType"
        },
        {
          "description": "Specifies the constraints for an attribute of the string type."
        }
      ]
    }
  }
}