ApiMapping - Amazon API Gateway

ApiMapping

Represent an API mapping. An API mapping relates a path of your custom domain name to a stage of your API. A custom domain name can have multiple API mappings, but the paths can't overlap. To learn more, see Set Up a Custom Domain Name for an API in API Gateway.

URI

/v2/domainnames/domainName/apimappings/apiMappingId

HTTP methods

GET

Operation ID: GetApiMapping

Gets an API mapping.

Path parameters
NameTypeRequiredDescription
apiMappingIdStringTrue

The API mapping identifier.

domainNameStringTrue

The domain name.

Responses
Status codeResponse modelDescription
200ApiMapping

Success

400BadRequestException

One of the parameters in the request is invalid.

404NotFoundException

The resource specified in the request was not found.

429LimitExceededException

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

DELETE

Operation ID: DeleteApiMapping

Deletes an API mapping.

Path parameters
NameTypeRequiredDescription
apiMappingIdStringTrue

The API mapping identifier.

domainNameStringTrue

The domain name.

Responses
Status codeResponse modelDescription
204None

The request has succeeded, and there is no additional content to send in the response payload body.

400BadRequestException

One of the parameters in the request is invalid.

404NotFoundException

The resource specified in the request was not found.

429LimitExceededException

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

PATCH

Operation ID: UpdateApiMapping

The API mapping.

Path parameters
NameTypeRequiredDescription
apiMappingIdStringTrue

The API mapping identifier.

domainNameStringTrue

The domain name.

Query parameters
NameTypeRequiredDescription
apiIdStringTrue

The identifier of the API.

Responses
Status codeResponse modelDescription
200ApiMapping

Success

400BadRequestException

One of the parameters in the request is invalid.

404NotFoundException

The resource specified in the request was not found.

409ConflictException

The resource already exists.

429LimitExceededException

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

Schemas

Request bodies

{ "apiMappingKey": "string", "apiId": "string", "stage": "string" }

Response bodies

{ "apiMappingId": "string", "apiMappingKey": "string", "apiId": "string", "stage": "string" }
{ "message": "string" }
{ "message": "string", "resourceType": "string" }
{ "message": "string" }
{ "message": "string", "limitType": "string" }

Properties

ApiMapping

Represents an API mapping.

PropertyTypeRequiredDescription
apiId

string

True

The API identifier.

apiMappingId

string

False

The API mapping identifier.

apiMappingKey

string

False

The API mapping key.

stage

string

True

The API stage.

BadRequestException

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

PropertyTypeRequiredDescription
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.

PropertyTypeRequiredDescription
message

string

False

Describes the error encountered.

LimitExceededException

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

PropertyTypeRequiredDescription
limitType

string

False

The limit type.

message

string

False

Describes the error encountered.

NotFoundException

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

PropertyTypeRequiredDescription
message

string

False

Describes the error encountered.

resourceType

string

False

The resource type.

UpdateApiMappingInput

Represents the input parameters for an UpdateApiMapping request.

PropertyTypeRequiredDescription
apiId

string

False

The API identifier.

apiMappingKey

string

False

The API mapping key.

stage

string

False

The API stage.

See also

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

GetApiMapping

DeleteApiMapping

UpdateApiMapping