{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-amplify/json-schema/amazon-amplify-create-domain-association-request-schema.json",
  "title": "CreateDomainAssociationRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-amplify-domains-api-openapi.yml#/components/schemas/CreateDomainAssociationRequest",
  "type": "object",
  "properties": {
    "appId": {
      "type": "string",
      "description": "The unique ID for an Amplify app."
    },
    "domainName": {
      "type": "string",
      "description": "The domain name for the domain association."
    },
    "enableAutoSubDomain": {
      "type": "boolean",
      "description": "Enables the automated creation of subdomains for branches."
    },
    "subDomainSettings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SubDomainSetting"
      },
      "description": "The setting for the subdomain."
    },
    "autoSubDomainCreationPatterns": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Sets the branch patterns for automatic subdomain creation."
    },
    "autoSubDomainIAMRole": {
      "type": "string",
      "description": "The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for automatically creating subdomains."
    },
    "certificateSettings": {
      "$ref": "#/$defs/CertificateSettings"
    }
  },
  "required": [
    "appId",
    "domainName",
    "subDomainSettings"
  ],
  "$defs": {
    "CertificateSettings": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "AMPLIFY_MANAGED",
            "CUSTOM"
          ],
          "description": "The certificate type. Specify AMPLIFY_MANAGED to use the default certificate that Amplify provisions for you. Specify CUSTOM to use your own certificate that you have already added to Certificate Manager in your Amazon Web Services account. Make sure you request (or import) the certificate in the US East (N. Virginia) Region (us-east-1). For more information about using ACM, see Importing certificates into Certificate Manager in the ACM User guide."
        },
        "customCertificateArn": {
          "type": "string",
          "description": "The Amazon resource name (ARN) for the custom certificate that you have already added to Certificate Manager in your Amazon Web Services account. This field is required only when the certificate type is CUSTOM."
        }
      },
      "required": [
        "type"
      ]
    },
    "SubDomainSetting": {
      "type": "object",
      "properties": {
        "prefix": {
          "type": "string",
          "description": "The prefix setting for the subdomain."
        },
        "branchName": {
          "type": "string",
          "description": "The branch name setting for the subdomain."
        }
      },
      "required": [
        "prefix",
        "branchName"
      ]
    }
  }
}