Skip to content

Create Domain Name

apigateway_create_domain_name R Documentation

Creates a new domain name

Description

Creates a new domain name.

Usage

apigateway_create_domain_name(domainName, certificateName,
  certificateBody, certificatePrivateKey, certificateChain,
  certificateArn, regionalCertificateName, regionalCertificateArn,
  endpointConfiguration, tags, securityPolicy, endpointAccessMode,
  mutualTlsAuthentication, ownershipVerificationCertificateArn, policy,
  routingMode)

Arguments

domainName

[required] The name of the DomainName resource.

certificateName

The user-friendly name of the certificate that will be used by edge-optimized endpoint or private endpoint for this domain name.

certificateBody

[Deprecated] The body of the server certificate that will be used by edge-optimized endpoint or private endpoint for this domain name provided by your certificate authority.

certificatePrivateKey

[Deprecated] Your edge-optimized endpoint's domain name certificate's private key.

certificateChain

[Deprecated] The intermediate certificates and optionally the root certificate, one after the other without any blank lines, used by an edge-optimized endpoint for this domain name. If you include the root certificate, your certificate chain must start with intermediate certificates and end with the root certificate. Use the intermediate certificates that were provided by your certificate authority. Do not include any intermediaries that are not in the chain of trust path.

certificateArn

The reference to an Amazon Web Services-managed certificate that will be used by edge-optimized endpoint or private endpoint for this domain name. Certificate Manager is the only supported source.

regionalCertificateName

The user-friendly name of the certificate that will be used by regional endpoint for this domain name.

regionalCertificateArn

The reference to an Amazon Web Services-managed certificate that will be used by regional endpoint for this domain name. Certificate Manager is the only supported source.

endpointConfiguration

The endpoint configuration of this DomainName showing the endpoint types and IP address types of the domain name.

tags

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with ⁠aws:⁠. The tag value can be up to 256 characters.

securityPolicy

The Transport Layer Security (TLS) version + cipher suite for this DomainName.

endpointAccessMode

The endpoint access mode of the DomainName. Only available for DomainNames that use security policies that start with SecurityPolicy_.

mutualTlsAuthentication

The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.

ownershipVerificationCertificateArn

The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the regionalCertificateArn.

policy

A stringified JSON policy document that applies to the execute-api service for this DomainName regardless of the caller and Method configuration. Supported only for private custom domain names.

routingMode

The routing mode for this domain name. The routing mode determines how API Gateway sends traffic from your custom domain name to your private APIs.

Value

A list with the following syntax:

list(
  domainName = "string",
  domainNameId = "string",
  domainNameArn = "string",
  certificateName = "string",
  certificateArn = "string",
  certificateUploadDate = as.POSIXct(
    "2015-01-01"
  ),
  regionalDomainName = "string",
  regionalHostedZoneId = "string",
  regionalCertificateName = "string",
  regionalCertificateArn = "string",
  distributionDomainName = "string",
  distributionHostedZoneId = "string",
  endpointConfiguration = list(
    types = list(
      "REGIONAL"|"EDGE"|"PRIVATE"
    ),
    ipAddressType = "ipv4"|"dualstack",
    vpcEndpointIds = list(
      "string"
    )
  ),
  domainNameStatus = "AVAILABLE"|"UPDATING"|"PENDING"|"PENDING_CERTIFICATE_REIMPORT"|"PENDING_OWNERSHIP_VERIFICATION"|"FAILED",
  domainNameStatusMessage = "string",
  securityPolicy = "TLS_1_0"|"TLS_1_2"|"SecurityPolicy_TLS13_1_3_2025_09"|"SecurityPolicy_TLS13_1_3_FIPS_2025_09"|"SecurityPolicy_TLS13_1_2_PFS_PQ_2025_09"|"SecurityPolicy_TLS13_1_2_FIPS_PQ_2025_09"|"SecurityPolicy_TLS13_1_2_FIPS_PFS_PQ_2025_09"|"SecurityPolicy_TLS13_1_2_PQ_2025_09"|"SecurityPolicy_TLS13_1_2_2021_06"|"SecurityPolicy_TLS13_2025_EDGE"|"SecurityPolicy_TLS12_PFS_2025_EDGE"|"SecurityPolicy_TLS12_2018_EDGE",
  endpointAccessMode = "BASIC"|"STRICT",
  tags = list(
    "string"
  ),
  mutualTlsAuthentication = list(
    truststoreUri = "string",
    truststoreVersion = "string",
    truststoreWarnings = list(
      "string"
    )
  ),
  ownershipVerificationCertificateArn = "string",
  managementPolicy = "string",
  policy = "string",
  routingMode = "BASE_PATH_MAPPING_ONLY"|"ROUTING_RULE_ONLY"|"ROUTING_RULE_THEN_BASE_PATH_MAPPING"
)

Request syntax

svc$create_domain_name(
  domainName = "string",
  certificateName = "string",
  certificateBody = "string",
  certificatePrivateKey = "string",
  certificateChain = "string",
  certificateArn = "string",
  regionalCertificateName = "string",
  regionalCertificateArn = "string",
  endpointConfiguration = list(
    types = list(
      "REGIONAL"|"EDGE"|"PRIVATE"
    ),
    ipAddressType = "ipv4"|"dualstack",
    vpcEndpointIds = list(
      "string"
    )
  ),
  tags = list(
    "string"
  ),
  securityPolicy = "TLS_1_0"|"TLS_1_2"|"SecurityPolicy_TLS13_1_3_2025_09"|"SecurityPolicy_TLS13_1_3_FIPS_2025_09"|"SecurityPolicy_TLS13_1_2_PFS_PQ_2025_09"|"SecurityPolicy_TLS13_1_2_FIPS_PQ_2025_09"|"SecurityPolicy_TLS13_1_2_FIPS_PFS_PQ_2025_09"|"SecurityPolicy_TLS13_1_2_PQ_2025_09"|"SecurityPolicy_TLS13_1_2_2021_06"|"SecurityPolicy_TLS13_2025_EDGE"|"SecurityPolicy_TLS12_PFS_2025_EDGE"|"SecurityPolicy_TLS12_2018_EDGE",
  endpointAccessMode = "BASIC"|"STRICT",
  mutualTlsAuthentication = list(
    truststoreUri = "string",
    truststoreVersion = "string"
  ),
  ownershipVerificationCertificateArn = "string",
  policy = "string",
  routingMode = "BASE_PATH_MAPPING_ONLY"|"ROUTING_RULE_ONLY"|"ROUTING_RULE_THEN_BASE_PATH_MAPPING"
)