{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-verified-permissions/json-schema/amazon-verified-permissions-create-identity-source-input-schema.json",
  "title": "CreateIdentitySourceInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-verified-permissions-createidentitysource-api-openapi.yml#/components/schemas/CreateIdentitySourceInput",
  "type": "object",
  "properties": {
    "clientToken": {
      "type": "string",
      "description": "Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value.. If you don't provide this value, then Amazon Web Services generates a random one for you. If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an ConflictException error. V"
    },
    "policyStoreId": {
      "type": "string",
      "description": "Specifies the ID of the policy store in which you want to store this identity source. Only policies and requests made using this policy store can reference identities from the identity provider configured in the new identity source. To specify a policy store, use its ID or alias name. When using an alias name, prefix it with policy-store-alias/. For example: ID: PSEXAMPLEabcdefg111111 Alias name: policy-store-alias/example-policy-store To view aliases, use ListPolicyStoreAliases."
    },
    "configuration": {
      "$ref": "#/$defs/Configuration"
    },
    "principalEntityType": {
      "type": "string",
      "description": "Specifies the namespace and data type of the principals generated for identities authenticated by the new identity source."
    }
  },
  "required": [
    "policyStoreId",
    "configuration"
  ],
  "$defs": {
    "CognitoGroupConfiguration": {
      "type": "object",
      "properties": {
        "groupEntityType": {
          "type": "string",
          "description": "The name of the schema entity type that's mapped to the user pool group. Defaults to AWS::CognitoGroup."
        }
      },
      "required": [
        "groupEntityType"
      ]
    },
    "CognitoUserPoolConfiguration": {
      "type": "object",
      "properties": {
        "userPoolArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Amazon Cognito user pool that contains the identities to be authorized. Example: \"UserPoolArn\": \"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5\""
        },
        "clientIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The unique application client IDs that are associated with the specified Amazon Cognito user pool. Example: \"ClientIds\": [\"&amp;ExampleCogClientId;\"]"
        },
        "groupConfiguration": {
          "$ref": "#/$defs/CognitoGroupConfiguration"
        }
      },
      "required": [
        "userPoolArn"
      ]
    },
    "Configuration": {
      "type": "object",
      "properties": {
        "cognitoUserPoolConfiguration": {
          "$ref": "#/$defs/CognitoUserPoolConfiguration"
        },
        "openIdConnectConfiguration": {
          "$ref": "#/$defs/OpenIdConnectConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "OpenIdConnectAccessTokenConfiguration": {
      "type": "object",
      "properties": {
        "principalIdClaim": {
          "type": "string",
          "description": "The claim that determines the principal in OIDC access tokens. For example, sub."
        },
        "audiences": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The access token aud claim values that you want to accept in your policy store. For example, https://myapp.example.com, https://myapp2.example.com."
        }
      }
    },
    "OpenIdConnectConfiguration": {
      "type": "object",
      "properties": {
        "issuer": {
          "type": "string",
          "description": "The issuer URL of an OIDC identity provider. This URL must have an OIDC discovery endpoint at the path .well-known/openid-configuration."
        },
        "entityIdPrefix": {
          "type": "string",
          "description": "A descriptive string that you want to prefix to user entities from your OIDC identity provider. For example, if you set an entityIdPrefix of MyOIDCProvider, you can reference principals in your policies in the format MyCorp::User::MyOIDCProvider|Carlos."
        },
        "groupConfiguration": {
          "$ref": "#/$defs/OpenIdConnectGroupConfiguration"
        },
        "tokenSelection": {
          "$ref": "#/$defs/OpenIdConnectTokenSelection"
        }
      },
      "required": [
        "issuer",
        "tokenSelection"
      ]
    },
    "OpenIdConnectGroupConfiguration": {
      "type": "object",
      "properties": {
        "groupClaim": {
          "type": "string",
          "description": "The token claim that you want Verified Permissions to interpret as group membership. For example, groups."
        },
        "groupEntityType": {
          "type": "string",
          "description": "The policy store entity type that you want to map your users' group claim to. For example, MyCorp::UserGroup. A group entity type is an entity that can have a user entity type as a member."
        }
      },
      "required": [
        "groupClaim",
        "groupEntityType"
      ]
    },
    "OpenIdConnectIdentityTokenConfiguration": {
      "type": "object",
      "properties": {
        "principalIdClaim": {
          "type": "string",
          "description": "The claim that determines the principal in OIDC access tokens. For example, sub."
        },
        "clientIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The ID token audience, or client ID, claim values that you want to accept in your policy store from an OIDC identity provider. For example, 1example23456789, 2example10111213."
        }
      }
    },
    "OpenIdConnectTokenSelection": {
      "type": "object",
      "properties": {
        "accessTokenOnly": {
          "$ref": "#/$defs/OpenIdConnectAccessTokenConfiguration"
        },
        "identityTokenOnly": {
          "$ref": "#/$defs/OpenIdConnectIdentityTokenConfiguration"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}