{
  "typeName" : "AWS::ApiGatewayV2::DomainName",
  "description" : "The ``AWS::ApiGatewayV2::DomainName`` resource specifies a custom domain name for your API in Amazon API Gateway (API Gateway). \n You can use a custom domain name to provide a URL that's more intuitive and easier to recall. For more information about using custom domain names, see [Set up Custom Domain Name for an API in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) in the *API Gateway Developer Guide*.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-apigatewayv2.git",
  "additionalProperties" : false,
  "properties" : {
    "MutualTlsAuthentication" : {
      "description" : "The mutual TLS authentication configuration for a custom domain name.",
      "$ref" : "#/definitions/MutualTlsAuthentication"
    },
    "RegionalHostedZoneId" : {
      "description" : "",
      "type" : "string"
    },
    "RegionalDomainName" : {
      "description" : "",
      "type" : "string"
    },
    "DomainNameArn" : {
      "description" : "",
      "type" : "string"
    },
    "DomainName" : {
      "description" : "The custom domain name for your API in Amazon API Gateway. Uppercase letters and the underscore (``_``) character are not supported.",
      "type" : "string"
    },
    "DomainNameConfigurations" : {
      "description" : "The domain name configurations.",
      "type" : "array",
      "uniqueItems" : false,
      "items" : {
        "$ref" : "#/definitions/DomainNameConfiguration"
      }
    },
    "RoutingMode" : {
      "type" : "string",
      "description" : "The routing mode API Gateway uses to route traffic to your APIs.",
      "default" : "API_MAPPING_ONLY",
      "enum" : [ "API_MAPPING_ONLY", "ROUTING_RULE_THEN_API_MAPPING", "ROUTING_RULE_ONLY" ]
    },
    "Tags" : {
      "type" : "object",
      "description" : "The collection of tags associated with a domain name.",
      "additionalProperties" : false,
      "patternProperties" : {
        ".*" : {
          "type" : "string"
        }
      }
    }
  },
  "definitions" : {
    "MutualTlsAuthentication" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "TruststoreVersion" : {
          "type" : "string",
          "description" : "The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket."
        },
        "TruststoreUri" : {
          "type" : "string",
          "description" : "An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example, ``s3://bucket-name/key-name``. The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object."
        }
      },
      "description" : "If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API."
    },
    "DomainNameConfiguration" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "OwnershipVerificationCertificateArn" : {
          "type" : "string",
          "description" : "The Amazon resource name (ARN) for the public certificate issued by ACMlong. This ARN is used to validate custom domain ownership. It's required only if you configure mutual TLS and use either an ACM-imported or a private CA certificate ARN as the regionalCertificateArn."
        },
        "EndpointType" : {
          "type" : "string",
          "description" : "The endpoint type."
        },
        "CertificateName" : {
          "type" : "string",
          "description" : "The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name."
        },
        "SecurityPolicy" : {
          "type" : "string",
          "description" : "The Transport Layer Security (TLS) version of the security policy for this domain name. The valid values are ``TLS_1_0`` and ``TLS_1_2``."
        },
        "CertificateArn" : {
          "type" : "string",
          "description" : "An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source."
        },
        "IpAddressType" : {
          "type" : "string",
          "description" : "The IP address types that can invoke the domain name. Use ``ipv4`` to allow only IPv4 addresses to invoke your domain name, or use ``dualstack`` to allow both IPv4 and IPv6 addresses to invoke your domain name."
        }
      },
      "description" : "The ``DomainNameConfiguration`` property type specifies the configuration for an API's domain name.\n ``DomainNameConfiguration`` is a property of the [AWS::ApiGatewayV2::DomainName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html) resource."
    }
  },
  "required" : [ "DomainName" ],
  "createOnlyProperties" : [ "/properties/DomainName" ],
  "primaryIdentifier" : [ "/properties/DomainName" ],
  "readOnlyProperties" : [ "/properties/RegionalDomainName", "/properties/RegionalHostedZoneId", "/properties/DomainNameArn" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "apigateway:PUT", "apigateway:PATCH", "apigateway:GET", "apigateway:DELETE" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "apigateway:POST", "apigateway:GET", "apigateway:PUT" ]
    },
    "update" : {
      "permissions" : [ "apigateway:PATCH", "apigateway:GET", "apigateway:PUT", "apigateway:POST", "apigateway:DELETE" ]
    },
    "read" : {
      "permissions" : [ "apigateway:GET" ]
    },
    "delete" : {
      "permissions" : [ "apigateway:GET", "apigateway:DELETE" ]
    },
    "list" : {
      "permissions" : [ "apigateway:GET" ]
    }
  }
}