Amazon API Gateway
API Reference

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

DomainNames

Represents a collection of domain names. See Set up Custom Domain Name for an API in API Gateway.

URI

/v2/domainnames

HTTP Methods

GET

Operation ID: GetDomainNames

Gets the domain names for an AWS account.

Query Parameters

Name Type Required Description
nextToken String False

The next page of elements from this collection. Not valid for the last element of the collection.

maxResults String False

The maximum number of elements to be returned for this resource.

Responses

Status Code Response Model Description
200 DomainNames

Success

400 BadRequestException

One of the parameters in the request is invalid.

404 NotFoundException

The resource specified in the request was not found.

429 LimitExceededException

The client is sending more than the allowed number of requests per unit of time.

POST

Operation ID: CreateDomainName

Creates a domain name.

Responses

Status Code Response Model Description
201 DomainName

The request has succeeded and has resulted in the creation of a resource.

400 BadRequestException

One of the parameters in the request is invalid.

404 NotFoundException

The resource specified in the request was not found.

409 ConflictException

The resource already exists.

429 LimitExceededException

The client is sending more than the allowed number of requests per unit of time.

Schemas

Request Bodies

Example POST

{ "domainName": "string", "domainNameConfigurations": [ { "endpointType": enum, "certificateName": "string", "certificateArn": "string", "apiGatewayDomainName": "string", "hostedZoneId": "string", "certificateUploadDate": "string", "securityPolicy": enum, "domainNameStatus": enum, "domainNameStatusMessage": "string" } ], "tags": { } }

Response Bodies

Example DomainNames

{ "items": [ { "domainName": "string", "domainNameConfigurations": [ { "endpointType": enum, "certificateName": "string", "certificateArn": "string", "apiGatewayDomainName": "string", "hostedZoneId": "string", "certificateUploadDate": "string", "securityPolicy": enum, "domainNameStatus": enum, "domainNameStatusMessage": "string" } ], "apiMappingSelectionExpression": "string", "tags": { } } ], "nextToken": "string" }

Example DomainName

{ "domainName": "string", "domainNameConfigurations": [ { "endpointType": enum, "certificateName": "string", "certificateArn": "string", "apiGatewayDomainName": "string", "hostedZoneId": "string", "certificateUploadDate": "string", "securityPolicy": enum, "domainNameStatus": enum, "domainNameStatusMessage": "string" } ], "apiMappingSelectionExpression": "string", "tags": { } }

Example BadRequestException

{ "message": "string" }

Example NotFoundException

{ "message": "string", "resourceType": "string" }

Example ConflictException

{ "message": "string" }

Example LimitExceededException

{ "message": "string", "limitType": "string" }

Properties

BadRequestException

The request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.

Property Type Required Description
message

string

False

Describes the error encountered.

ConflictException

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. See the accompanying error message for details.

Property Type Required Description
message

string

False

Describes the error encountered.

CreateDomainNameInput

Represents the input parameters for a CreateDomainName request.

Property Type Required Description
domainName

string

True

The domain name.

domainNameConfigurations

Array of type DomainNameConfiguration

False

The domain name configurations.

tags

Tags

False

The collection of tags associated with a domain name.

DomainName

Represents a domain name.

Property Type Required Description
domainName

string

True

The name of the DomainName resource.

domainNameConfigurations

Array of type DomainNameConfiguration

False

The domain name configurations.

apiMappingSelectionExpression

string

False

The API mapping selection expression.

tags

Tags

False

The collection of tags associated with a domain name.

DomainNameConfiguration

The domain name configuration.

Property Type Required Description
endpointType

EndpointType

False

The endpoint type.

certificateName

string

False

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

certificateArn

string

False

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.

apiGatewayDomainName

string

False

A domain name for the WebSocket API.

hostedZoneId

string

False

The Amazon Route 53 Hosted Zone ID of the endpoint.

certificateUploadDate

string

Format: date-time

False

The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.

securityPolicy

SecurityPolicy

False

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.

domainNameStatus

DomainNameStatus

False

The status of the domain name migration. The valid values are AVAILABLE and UPDATING. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

domainNameStatusMessage

string

False

An optional text message containing detailed information about status of the domain name migration.

DomainNameStatus

The status of the domain name migration. The valid values are AVAILABLE and UPDATING. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

  • AVAILABLE

  • UPDATING

DomainNames

Represents a collection of domain names.

Property Type Required Description
items

Array of type DomainName

False

The elements from this collection.

nextToken

string

False

The next page of elements from this collection. Not valid for the last element of the collection.

EndpointType

Represents an endpoint type.

  • REGIONAL

  • EDGE

LimitExceededException

A limit has been exceeded. See the accompanying error message for details.

Property Type Required Description
message

string

False

Describes the error encountered.

limitType

string

False

The limit type.

NotFoundException

The resource specified in the request was not found. See the message field for more information.

Property Type Required Description
message

string

False

Describes the error encountered.

resourceType

string

False

The resource type.

SecurityPolicy

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.

  • TLS_1_0

  • TLS_1_2

Tags

Represents a collection of tags associated with the resource.

Property Type Required Description

*

string

False

See Also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

GetDomainNames

CreateDomainName