Crate rusoto_apigateway
source · [−]Expand description
Amazon API Gateway helps developers deliver robust, secure, and scalable mobile and web application back ends. API Gateway allows developers to securely connect mobile and web applications to APIs that run on AWS Lambda, Amazon EC2, or other publicly addressable web services that are hosted outside of AWS.
If you’re using the service, you’re probably looking for ApiGatewayClient and ApiGateway.
Structs
Access log settings, including the access log format and access log destination ARN.
Represents an AWS account that is associated with API Gateway.
To view the account info, call GET
on this resource.
Error Codes
The following exception may be thrown when the request fails.
- UnauthorizedException
- NotFoundException
- TooManyRequestsException
For detailed error code information, including the corresponding HTTP Status Codes, see API Gateway Error Codes
Example: Get the information about an account.
Request
GET /account HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160531T184618Z Authorization: AWS4-HMAC-SHA256 Credential={accesskeyID}/us-east-1/apigateway/aws4request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4hash}
Response
The successful response returns a 200 OK
status code and a payload similar to the following:
{ "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/account-apigateway-{rel}.html", "name": "account", "templated": true }, "self": { "href": "/account" }, "account:update": { "href": "/account" } }, "cloudwatchRoleArn": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "throttleSettings": { "rateLimit": 500, "burstLimit": 1000 } }
In addition to making the REST API call directly, you can use the AWS CLI and an AWS SDK to access this resource.
A client for the Amazon API Gateway API.
Represents a collection of API keys as represented by an ApiKeys resource.
API stage name of the associated API stage in a usage plan.
Represents an authorization layer for methods. If enabled on a method, API Gateway will activate the authorizer when a client calls the method.
Represents a collection of Authorizer resources.
Represents a collection of BasePathMapping resources.
Configuration settings of a canary deployment.
Represents a client certificate used to configure client-side SSL authentication while sending requests to the integration endpoint.
Represents a collection of ClientCertificate resources.
Request to create an ApiKey resource.
Request to add a new Authorizer to an existing RestApi resource.
Requests API Gateway to create a new BasePathMapping resource.
Requests API Gateway to create a Deployment resource.
Creates a new documentation part of a given API.
Creates a new documentation version of a given API.
A request to create a new domain name.
Creates a RequestValidator of a given RestApi.
Requests API Gateway to create a Resource resource.
The POST Request to add a new RestApi resource to your collection.
Requests API Gateway to create a Stage resource.
The POST request to create a usage plan key for adding an existing API key to a usage plan.
The POST request to create a usage plan with the name, description, throttle limits and quota limits, as well as the associated API stages, specified in the payload.
Creates a VPC link, under the caller's account in a selected region, in an asynchronous operation that typically takes 2-4 minutes to complete and become operational. The caller must have permissions to create and update VPC Endpoint services.
A request to delete the ApiKey resource.
Request to delete an existing Authorizer resource.
A request to delete the BasePathMapping resource.
A request to delete the ClientCertificate resource.
Requests API Gateway to delete a Deployment resource.
Deletes an existing documentation part of an API.
Deletes an existing documentation version of an API.
A request to delete the DomainName resource.
Clears any customization of a GatewayResponse of a specified response type on the given RestApi and resets it with the default settings.
Represents a delete integration request.
Represents a delete integration response request.
Request to delete an existing Method resource.
A request to delete an existing MethodResponse resource.
Request to delete an existing model in an existing RestApi resource.
Deletes a specified RequestValidator of a given RestApi.
Request to delete a Resource.
Request to delete the specified API from your collection.
Requests API Gateway to delete a Stage resource.
The DELETE request to delete a usage plan key and remove the underlying API key from the associated usage plan.
The DELETE request to delete a usage plan of a given plan Id.
Deletes an existing VpcLink of a specified identifier.
An immutable representation of a RestApi resource that can be called by users using Stages. A deployment must be associated with a Stage for it to be callable over the Internet.
POST
on the Deployments resource of a RestApi. To view, update, or delete a deployment, call GET
, PATCH
, or DELETE
on the specified deployment resource (/restapis/{restapiid}/deployments/{deploymentid}
).The input configuration for a canary deployment.
Represents a collection resource that contains zero or more references to your existing deployments, and links that guide you on how to interact with your collection. The collection offers a paginated view of the contained deployments.
POST
request against this resource. To view, update, or delete an existing deployment, make a GET
, PATCH
, or DELETE
request, respectively, on a specified Deployment resource.A documentation part for a targeted API entity.
A documentation part consists of a content map (properties
) and a target (location
). The target specifies an API entity to which the documentation content applies. The supported API entity types are API
, AUTHORIZER
, MODEL
, RESOURCE
, METHOD
, PATHPARAMETER
, QUERYPARAMETER
, REQUESTHEADER
, REQUESTBODY
, RESPONSE
, RESPONSEHEADER
, and RESPONSEBODY
. Valid location
fields depend on the API entity type. All valid fields are not required.
The content map is a JSON string of API-specific key-value pairs. Although an API can use any shape for the content map, only the OpenAPI-compliant documentation fields will be injected into the associated API entity definition in the exported OpenAPI definition file.
A collection of the imported DocumentationPart identifiers.
Specifies the target API entity to which the documentation applies.
The collection of documentation parts of an API.
A snapshot of the documentation of an API.
Publishing API documentation involves creating a documentation version associated with an API stage and exporting the versioned documentation to an external (e.g., OpenAPI) file.
The collection of documentation snapshots of an API.
Use the DocumentationVersions to manage documentation snapshots associated with various API stages.
Represents a custom domain name as a user-friendly host name of an API (RestApi).
When you deploy an API, API Gateway creates a default host name for the API. This default API host name is of the {restapi-id}.execute-api.{region}.amazonaws.com
format. With the default host name, you can access the API's root resource with the URL of https://{restapi-id}.execute-api.{region}.amazonaws.com/{stage}/
. When you set up a custom domain name of apis.example.com
for this API, you can then access the same resource using the URL of the https://apis.examples.com/myApi
, where myApi
is the base path mapping (BasePathMapping) of your API under the custom domain name.
Represents a collection of DomainName resources.
The endpoint configuration to indicate the types of endpoints an API (RestApi) or its custom domain name (DomainName) has.
The binary blob response to GetExport, which contains the generated SDK.
Request to flush authorizer cache entries on a specified stage.
Requests API Gateway to flush a stage's cache.
A gateway response of a given response type and status code, with optional response parameters and mapping templates.
Example: Get a Gateway Response of a given response type
Request
This example shows how to get a gateway response of the MISSINGAUTHENTICATIONTOKEN
type.
GET /restapis/o81lxisefl/gatewayresponses/MISSINGAUTHENTICATIONTOKEN HTTP/1.1 Host: beta-apigateway.us-east-1.amazonaws.com Content-Type: application/json X-Amz-Date: 20170503T202516Z Authorization: AWS4-HMAC-SHA256 Credential={access-key-id}/20170503/us-east-1/apigateway/aws4request, SignedHeaders=content-type;host;x-amz-date, Signature=1b52460e3159c1a26cff29093855d50ea141c1c5b937528fecaf60f51129697a Cache-Control: no-cache Postman-Token: 3b2a1ce9-c848-2e26-2e2f-9c2caefbed45
The response type is specified as a URL path.
Response
The successful operation returns the 200 OK
status code and a payload similar to the following:
{ "links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-gatewayresponse-{rel}.html", "name": "gatewayresponse", "templated": true }, "self": { "href": "/restapis/o81lxisefl/gatewayresponses/MISSINGAUTHENTICATIONTOKEN" }, "gatewayresponse:delete": { "href": "/restapis/o81lxisefl/gatewayresponses/MISSINGAUTHENTICATIONTOKEN" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/MISSINGAUTHENTICATIONTOKEN" } }, "defaultResponse": false, "responseParameters": { "gatewayresponse.header.x-request-path": "method.request.path.petId", "gatewayresponse.header.Access-Control-Allow-Origin": "'a.b.c'", "gatewayresponse.header.x-request-query": "method.request.querystring.q", "gatewayresponse.header.x-request-header": "method.request.header.Accept" }, "responseTemplates": { "application/json": "{\n "message": $context.error.messageString,\n "type": "$context.error.responseType",\n "stage": "$context.stage",\n "resourcePath": "$context.resourcePath",\n "stageVariables.a": "$stageVariables.a",\n "statusCode": "'404'"\n}" }, "responseType": "MISSINGAUTHENTICATION_TOKEN", "statusCode": "404" }
The collection of the GatewayResponse instances of a RestApi as a responseType
-to-GatewayResponse object map of key-value pairs. As such, pagination is not supported for querying this collection.
Example: Get the collection of gateway responses of an API
Request
This example request shows how to retrieve the GatewayResponses collection from an API.
GET /restapis/o81lxisefl/gatewayresponses HTTP/1.1 Host: beta-apigateway.us-east-1.amazonaws.com Content-Type: application/json X-Amz-Date: 20170503T220604Z Authorization: AWS4-HMAC-SHA256 Credential={access-key-id}/20170503/us-east-1/apigateway/aws4request, SignedHeaders=content-type;host;x-amz-date, Signature=59b42fe54a76a5de8adf2c67baa6d39206f8e9ad49a1d77ccc6a5da3103a398a Cache-Control: no-cache Postman-Token: 5637af27-dc29-fc5c-9dfe-0645d52cb515
Response
The successful operation returns the 200 OK
status code and a payload similar to the following:
{ "links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-gatewayresponse-{rel}.html", "name": "gatewayresponse", "templated": true }, "self": { "href": "/restapis/o81lxisefl/gatewayresponses" }, "first": { "href": "/restapis/o81lxisefl/gatewayresponses" }, "gatewayresponse:by-type": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "item": [ { "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATIONFAILURE" }, { "href": "/restapis/o81lxisefl/gatewayresponses/RESOURCENOTFOUND" }, { "href": "/restapis/o81lxisefl/gatewayresponses/REQUESTTOOLARGE" }, { "href": "/restapis/o81lxisefl/gatewayresponses/THROTTLED" }, { "href": "/restapis/o81lxisefl/gatewayresponses/UNSUPPORTEDMEDIATYPE" }, { "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZERCONFIGURATIONERROR" }, { "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT5XX" }, { "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT4XX" }, { "href": "/restapis/o81lxisefl/gatewayresponses/BADREQUESTPARAMETERS" }, { "href": "/restapis/o81lxisefl/gatewayresponses/BADREQUESTBODY" }, { "href": "/restapis/o81lxisefl/gatewayresponses/EXPIREDTOKEN" }, { "href": "/restapis/o81lxisefl/gatewayresponses/ACCESSDENIED" }, { "href": "/restapis/o81lxisefl/gatewayresponses/INVALIDAPIKEY" }, { "href": "/restapis/o81lxisefl/gatewayresponses/UNAUTHORIZED" }, { "href": "/restapis/o81lxisefl/gatewayresponses/APICONFIGURATIONERROR" }, { "href": "/restapis/o81lxisefl/gatewayresponses/QUOTAEXCEEDED" }, { "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATIONTIMEOUT" }, { "href": "/restapis/o81lxisefl/gatewayresponses/MISSINGAUTHENTICATIONTOKEN" }, { "href": "/restapis/o81lxisefl/gatewayresponses/INVALIDSIGNATURE" }, { "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZERFAILURE" } ] }, "embedded": { "item": [ { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATIONFAILURE" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATIONFAILURE" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "INTEGRATIONFAILURE", "statusCode": "504" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/RESOURCENOTFOUND" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/RESOURCENOTFOUND" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "RESOURCENOTFOUND", "statusCode": "404" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/REQUESTTOOLARGE" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/REQUESTTOOLARGE" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "REQUESTTOOLARGE", "statusCode": "413" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/THROTTLED" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/THROTTLED" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "THROTTLED", "statusCode": "429" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/UNSUPPORTEDMEDIATYPE" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/UNSUPPORTEDMEDIATYPE" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "UNSUPPORTEDMEDIATYPE", "statusCode": "415" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZERCONFIGURATIONERROR" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZERCONFIGURATIONERROR" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "AUTHORIZERCONFIGURATIONERROR", "statusCode": "500" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT5XX" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT5XX" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "DEFAULT5XX" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT4XX" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/DEFAULT4XX" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "DEFAULT4XX" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/BADREQUESTPARAMETERS" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/BADREQUESTPARAMETERS" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "BADREQUESTPARAMETERS", "statusCode": "400" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/BADREQUESTBODY" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/BADREQUESTBODY" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "BADREQUESTBODY", "statusCode": "400" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/EXPIREDTOKEN" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/EXPIREDTOKEN" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "EXPIREDTOKEN", "statusCode": "403" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/ACCESSDENIED" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/ACCESSDENIED" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "ACCESSDENIED", "statusCode": "403" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/INVALIDAPIKEY" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/INVALIDAPIKEY" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "INVALIDAPIKEY", "statusCode": "403" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/UNAUTHORIZED" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/UNAUTHORIZED" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "UNAUTHORIZED", "statusCode": "401" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/APICONFIGURATIONERROR" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/APICONFIGURATIONERROR" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "APICONFIGURATIONERROR", "statusCode": "500" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/QUOTAEXCEEDED" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/QUOTAEXCEEDED" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "QUOTAEXCEEDED", "statusCode": "429" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATIONTIMEOUT" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/INTEGRATIONTIMEOUT" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "INTEGRATIONTIMEOUT", "statusCode": "504" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/MISSINGAUTHENTICATIONTOKEN" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/MISSINGAUTHENTICATIONTOKEN" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "MISSINGAUTHENTICATIONTOKEN", "statusCode": "403" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/INVALIDSIGNATURE" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/INVALIDSIGNATURE" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "INVALIDSIGNATURE", "statusCode": "403" }, { "links": { "self": { "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZERFAILURE" }, "gatewayresponse:put": { "href": "/restapis/o81lxisefl/gatewayresponses/{responsetype}", "templated": true }, "gatewayresponse:update": { "href": "/restapis/o81lxisefl/gatewayresponses/AUTHORIZERFAILURE" } }, "defaultResponse": true, "responseParameters": {}, "responseTemplates": { "application/json": "{"message":$context.error.messageString}" }, "responseType": "AUTHORIZERFAILURE", "statusCode": "500" } ] } }
A request to generate a ClientCertificate resource.
Requests API Gateway to get information about the current Account resource.
A request to get information about the current ApiKey resource.
A request to get information about the current ApiKeys resource.
Request to describe an existing Authorizer resource.
Request to describe an existing Authorizers resource.
Request to describe a BasePathMapping resource.
A request to get information about a collection of BasePathMapping resources.
A request to get information about the current ClientCertificate resource.
A request to get information about a collection of ClientCertificate resources.
Requests API Gateway to get information about a Deployment resource.
Requests API Gateway to get information about a Deployments collection.
Gets a specified documentation part of a given API.
Gets the documentation parts of an API. The result may be filtered by the type, name, or path of API entities (targets).
Gets a documentation snapshot of an API.
Gets the documentation versions of an API.
Request to get the name of a DomainName resource.
Request to describe a collection of DomainName resources.
Gets a GatewayResponse of a specified response type on the given RestApi.
Gets the GatewayResponses collection on the given RestApi. If an API developer has not added any definitions for gateway responses, the result will be the API Gateway-generated default GatewayResponses collection for the supported response types.
Represents a request to get the integration configuration.
Represents a get integration response request.
Request to describe an existing Method resource.
Request to describe a MethodResponse resource.
Request to list information about a model in an existing RestApi resource.
Request to generate a sample mapping template used to transform the payload.
Gets a RequestValidator of a given RestApi.
Gets the RequestValidators collection of a given RestApi.
Request to list information about a resource.
Request to list information about a collection of resources.
The GET request to list an existing RestApi defined for your collection.
The GET request to list existing RestApis defined for your collection.
Get an SdkType instance.
Get the SdkTypes collection.
Requests API Gateway to get information about a Stage resource.
Requests API Gateway to get information about one or more Stage resources.
Gets the Tags collection for a given resource.
The GET request to get a usage plan key of a given key identifier.
The GET request to get all the usage plan keys representing the API keys added to a specified usage plan.
The GET request to get a usage plan of a given plan identifier.
The GET request to get all the usage plans of the caller's account.
The GET request to get the usage data of a usage plan in a specified time interval.
Gets a specified VPC link under the caller's account in a region.
Gets the VpcLinks collection under the caller's account in a selected region.
The POST request to import API keys from an external source, such as a CSV-formatted file.
Import documentation parts from an external (e.g., OpenAPI) definition file.
A POST request to import an API to API Gateway using an input of an API definition file.
Represents an HTTP, HTTPPROXY, AWS, AWSPROXY, or Mock integration.
Represents an integration response. The status code must map to an existing MethodResponse, and parameters and templates can be used to transform the back-end response.
Represents a client-facing interface by which the client calls the API to access back-end resources. A Method resource is integrated with an Integration resource. Both consist of a request and one or more responses. The method request takes the client input that is passed to the back end through the integration request. A method response returns the output from the back end to the client through an integration response. A method request is embodied in a Method resource, whereas an integration request is embodied in an Integration resource. On the other hand, a method response is represented by a MethodResponse resource, whereas an integration response is represented by an IntegrationResponse resource.
Example: Retrive the GET method on a specified resource
Request
The following example request retrieves the information about the GET method on an API resource (3kzxbg5sa2
) of an API (fugvjdxtri
).
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160603T210259Z Authorization: AWS4-HMAC-SHA256 Credential={accesskeyID}/20160603/us-east-1/apigateway/aws4request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4hash}
Response
The successful response returns a 200 OK
status code and a payload similar to the following:
{ "links": { "curies": [ { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", "name": "method", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET", "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" }, "method:integration": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "method:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", "name": "200", "title": "200" }, "method:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" }, "methodresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/{statuscode}", "templated": true } }, "apiKeyRequired": true, "authorizationType": "NONE", "httpMethod": "GET", "embedded": { "method:integration": { "links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integration:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integration:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/{statuscode}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHENNOMATCH", "requestParameters": { "integration.request.header.Content-Type": "'application/x-amz-json-1.1'" }, "requestTemplates": { "application/json": "{\n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-east-1:kinesis:action/ListStreams", "embedded": { "integration:responses": { "links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode("%3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E")" }, "statusCode": "200" } } }, "method:responses": { "links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", "name": "200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.Content-Type": false }, "statusCode": "200" } } }
In the example above, the response template for the 200 OK
response maps the JSON output from the ListStreams
action in the back end to an XML output. The mapping template is URL-encoded as %3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E
and the output is decoded using the $util.urlDecode() helper function.
Represents a method response of a given HTTP status code returned to the client. The method response is passed from the back end through the associated integration response that can be transformed using a mapping template.
Example: A MethodResponse instance of an API
Request
The example request retrieves a MethodResponse of the 200 status code.
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160603T222952Z Authorization: AWS4-HMAC-SHA256 Credential={accesskeyID}/20160603/us-east-1/apigateway/aws4request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4hash}
Response
The successful response returns 200 OK
status and a payload as follows:
{ "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.Content-Type": false }, "statusCode": "200" }
Specifies the method setting properties.
Represents a summary of a Method resource, given a particular date and time.
Represents the data structure of a method's request or response payload.
A request model defines the data structure of the client-supplied request payload. A response model defines the data structure of the response payload returned by the back end. Although not required, models are useful for mapping payloads between the front end and back end.
A model is used for generating an API's SDK, validating the input request body, and creating a skeletal mapping template.
Represents a collection of Model resources.
If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your 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 custom domain name.
A single patch operation to apply to the specified resource. Please refer to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how each operation is used.
Creates a customization of a GatewayResponse of a specified response type and status code on the given RestApi.
Sets up a method's integration.
Represents a put integration response request.
Request to add a method to an existing Resource resource.
Request to add a MethodResponse to an existing Method resource.
A PUT request to update an existing API, with external API definitions specified as the request body.
Quotas configured for a usage plan.
A set of validation rules for incoming Method requests.
In OpenAPI, a RequestValidator of an API is defined by the x-amazon-apigateway-request-validators.requestValidator object. It the referenced using the x-amazon-apigateway-request-validator property.
A collection of RequestValidator resources of a given RestApi.
In OpenAPI, the RequestValidators of an API is defined by the x-amazon-apigateway-request-validators extension.
Represents an API resource.
Represents a collection of Resource resources.
Represents a REST API.
Contains references to your APIs and links that guide you in how to interact with your collection. A collection offers a paginated view of your APIs.
A configuration property of an SDK type.
The binary blob response to GetSdk, which contains the generated SDK.
A type of SDK that API Gateway can generate.
Represents a unique identifier for a version of a deployed RestApi that is callable by users.
A reference to a unique stage identified in the format {restApiId}/{stage}
.
Adds or updates a tag on a given resource.
The collection of tags. Each tag element is associated with a given resource.
Represents a mapping template used to transform a payload.
Make a request to simulate the execution of an Authorizer.
Represents the response of the test invoke request for a custom Authorizer
Make a request to simulate the execution of a Method.
Represents the response of the test invoke request in the HTTP method.
The API request rate limits.
Removes a tag from a given resource.
Requests API Gateway to change information about the current Account resource.
A request to change information about an ApiKey resource.
Request to update an existing Authorizer resource.
A request to change information about the BasePathMapping resource.
A request to change information about an ClientCertificate resource.
Requests API Gateway to change information about a Deployment resource.
Updates an existing documentation part of a given API.
Updates an existing documentation version of an API.
A request to change information about the DomainName resource.
Updates a GatewayResponse of a specified response type on the given RestApi.
Represents an update integration request.
Represents an update integration response request.
Request to update an existing Method resource.
A request to update an existing MethodResponse resource.
Request to update an existing model in an existing RestApi resource.
Updates a RequestValidator of a given RestApi.
Request to change information about a Resource resource.
Request to update an existing RestApi resource in your collection.
Requests API Gateway to change information about a Stage resource.
The PATCH request to update a usage plan of a given plan Id.
The PATCH request to grant a temporary extension to the remaining quota of a usage plan associated with a specified API key.
Updates an existing VpcLink of a specified identifier.
Represents the usage data of a usage plan.
Represents a usage plan than can specify who can assess associated API stages with specified request limits and quotas.
In a usage plan, you associate an API by specifying the API's Id and a stage name of the specified API. You add plan customers by adding API keys to the plan.
Represents a usage plan key to identify a plan customer.
To associate an API stage with a selected API key in a usage plan, you must create a UsagePlanKey resource to represent the selected ApiKey.
Represents the collection of usage plan keys added to usage plans for the associated API keys and, possibly, other types of keys.
Represents a collection of usage plans for an AWS account.
An API Gateway VPC link for a RestApi to access resources in an Amazon Virtual Private Cloud (VPC).
To enable access to a resource in an Amazon Virtual Private Cloud through Amazon API Gateway, you, as an API developer, create a VpcLink resource targeted for one or more network load balancers of the VPC and then integrate an API method with a private integration that uses the VpcLink. The private integration has an integration type of HTTP
or HTTPPROXY
and has a connection type of VPCLINK
. The integration uses the connectionId
property to identify the VpcLink used.
The collection of VPC links under the caller's account in a region.
Enums
Errors returned by CreateApiKey
Errors returned by CreateAuthorizer
Errors returned by CreateBasePathMapping
Errors returned by CreateDeployment
Errors returned by CreateDocumentationPart
Errors returned by CreateDocumentationVersion
Errors returned by CreateDomainName
Errors returned by CreateModel
Errors returned by CreateRequestValidator
Errors returned by CreateResource
Errors returned by CreateRestApi
Errors returned by CreateStage
Errors returned by CreateUsagePlan
Errors returned by CreateUsagePlanKey
Errors returned by CreateVpcLink
Errors returned by DeleteApiKey
Errors returned by DeleteAuthorizer
Errors returned by DeleteBasePathMapping
Errors returned by DeleteClientCertificate
Errors returned by DeleteDeployment
Errors returned by DeleteDocumentationPart
Errors returned by DeleteDocumentationVersion
Errors returned by DeleteDomainName
Errors returned by DeleteGatewayResponse
Errors returned by DeleteIntegration
Errors returned by DeleteIntegrationResponse
Errors returned by DeleteMethod
Errors returned by DeleteMethodResponse
Errors returned by DeleteModel
Errors returned by DeleteRequestValidator
Errors returned by DeleteResource
Errors returned by DeleteRestApi
Errors returned by DeleteStage
Errors returned by DeleteUsagePlan
Errors returned by DeleteUsagePlanKey
Errors returned by DeleteVpcLink
Errors returned by FlushStageAuthorizersCache
Errors returned by FlushStageCache
Errors returned by GenerateClientCertificate
Errors returned by GetAccount
Errors returned by GetApiKey
Errors returned by GetApiKeys
Errors returned by GetAuthorizer
Errors returned by GetAuthorizers
Errors returned by GetBasePathMapping
Errors returned by GetBasePathMappings
Errors returned by GetClientCertificate
Errors returned by GetClientCertificates
Errors returned by GetDeployment
Errors returned by GetDeployments
Errors returned by GetDocumentationPart
Errors returned by GetDocumentationParts
Errors returned by GetDocumentationVersion
Errors returned by GetDocumentationVersions
Errors returned by GetDomainName
Errors returned by GetDomainNames
Errors returned by GetExport
Errors returned by GetGatewayResponse
Errors returned by GetGatewayResponses
Errors returned by GetIntegration
Errors returned by GetIntegrationResponse
Errors returned by GetMethod
Errors returned by GetMethodResponse
Errors returned by GetModel
Errors returned by GetModelTemplate
Errors returned by GetModels
Errors returned by GetRequestValidator
Errors returned by GetRequestValidators
Errors returned by GetResource
Errors returned by GetResources
Errors returned by GetRestApi
Errors returned by GetRestApis
Errors returned by GetSdk
Errors returned by GetSdkType
Errors returned by GetSdkTypes
Errors returned by GetStage
Errors returned by GetStages
Errors returned by GetTags
Errors returned by GetUsage
Errors returned by GetUsagePlan
Errors returned by GetUsagePlanKey
Errors returned by GetUsagePlanKeys
Errors returned by GetUsagePlans
Errors returned by GetVpcLink
Errors returned by GetVpcLinks
Errors returned by ImportApiKeys
Errors returned by ImportDocumentationParts
Errors returned by ImportRestApi
Errors returned by PutGatewayResponse
Errors returned by PutIntegration
Errors returned by PutIntegrationResponse
Errors returned by PutMethod
Errors returned by PutMethodResponse
Errors returned by PutRestApi
Errors returned by TagResource
Errors returned by TestInvokeAuthorizer
Errors returned by TestInvokeMethod
Errors returned by UntagResource
Errors returned by UpdateAccount
Errors returned by UpdateApiKey
Errors returned by UpdateAuthorizer
Errors returned by UpdateBasePathMapping
Errors returned by UpdateClientCertificate
Errors returned by UpdateDeployment
Errors returned by UpdateDocumentationPart
Errors returned by UpdateDocumentationVersion
Errors returned by UpdateDomainName
Errors returned by UpdateGatewayResponse
Errors returned by UpdateIntegration
Errors returned by UpdateIntegrationResponse
Errors returned by UpdateMethod
Errors returned by UpdateMethodResponse
Errors returned by UpdateModel
Errors returned by UpdateRequestValidator
Errors returned by UpdateResource
Errors returned by UpdateRestApi
Errors returned by UpdateStage
Errors returned by UpdateUsage
Errors returned by UpdateUsagePlan
Errors returned by UpdateVpcLink
Traits
Trait representing the capabilities of the Amazon API Gateway API. Amazon API Gateway clients implement this trait.