Amazon Cognito · JSON Structure

Identity Pools Mapping Rule Structure

A rule that maps a claim name, a claim value, and a match type to a role ARN.

Type: object Properties: 4 Required: 4
AuthenticationIdentityOAuthOIDCSAMLUser ManagementFederated Identity

MappingRule is a JSON Structure definition published by Amazon Cognito, describing 4 properties, of which 4 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

Claim MatchType Value RoleARN

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amazon-cognito/refs/heads/main/json-structure/identity-pools-mapping-rule-structure.json",
  "name": "MappingRule",
  "description": "A rule that maps a claim name, a claim value, and a match type to a role ARN.",
  "type": "object",
  "properties": {
    "Claim": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ClaimName"
        },
        {
          "description": "The claim name that must be present in the token, for example, \"isAdmin\" or \"paid\"."
        }
      ]
    },
    "MatchType": {
      "allOf": [
        {
          "$ref": "#/components/schemas/MappingRuleMatchType"
        },
        {
          "description": "The match condition that specifies how closely the claim value in the IdP token must match <code>Value</code>."
        }
      ]
    },
    "Value": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ClaimValue"
        },
        {
          "description": "A brief string that the claim must match, for example, \"paid\" or \"yes\"."
        }
      ]
    },
    "RoleARN": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ARNString"
        },
        {
          "description": "The role ARN."
        }
      ]
    }
  },
  "required": [
    "Claim",
    "MatchType",
    "Value",
    "RoleARN"
  ]
}