String id
The identifier of the API Key.
String value
The value of the API Key.
String name
The name of the API Key.
String description
The description of the API Key.
Boolean enabled
Specifies whether the API Key can be used by callers.
Date createdDate
The date when the API Key was created, in ISO 8601 format.
Date lastUpdatedDate
When the API Key was last updated, in ISO 8601 format.
List<E> stageKeys
String id
The identifier for the authorizer resource.
String name
[Required] The name of the authorizer.
String type
[Required] The type of the authorizer. Currently, the only valid type is TOKEN.
List<E> providerARNs
A list of the provider ARNs of the authorizer.
String authType
Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.
String authorizerUri
[Required] Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN authorizers, this must be a
well-formed Lambda function URI. The URI should be of the form
arn:aws:apigateway:{region}:lambda:path/{service_api}
. Region
is used to determine the
right endpoint. In this case, path
is used to indicate that the remaining substring in the URI
should be treated as the path to the resource, including the initial /
. For Lambda functions, this
is usually of the form /2015-03-31/functions/[FunctionARN]/invocations
String authorizerCredentials
Specifies the credentials required for the authorizer, if any. Two options are available. To specify an IAM role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
String identitySource
[Required] The source of the identity in an incoming request. For TOKEN authorizers, this value is a mapping expression with the same syntax as integration parameter mappings. The only valid source for tokens is 'header', so the expression should match 'method.request.header.[headerName]'. The value of the header '[headerName]' will be interpreted as the incoming token.
String identityValidationExpression
A validation expression for the incoming identity. For TOKEN authorizers, this value should be a regular expression. The incoming token from the client is matched against this expression, and will proceed if the token matches. If the token doesn't match, the client receives a 401 Unauthorized response.
Integer authorizerResultTtlInSeconds
The TTL in seconds of cached authorizer results. If greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.
String clientCertificateId
The identifier of the client certificate.
String description
The description of the client certificate.
String pemEncodedCertificate
The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication in the integration endpoint .
Date createdDate
The date when the client certificate was created, in ISO 8601 format.
Date expirationDate
The date when the client certificate will expire, in ISO 8601 format.
String name
The name of the ApiKey.
String description
The description of the ApiKey.
Boolean enabled
Specifies whether the ApiKey can be used by callers.
Boolean generateDistinctId
Specifies whether (true
) or not (false
) the key identifier is distinct from the created
API key value.
String value
Specifies a value of the API key.
List<E> stageKeys
DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
String id
The identifier of the API Key.
String value
The value of the API Key.
String name
The name of the API Key.
String description
The description of the API Key.
Boolean enabled
Specifies whether the API Key can be used by callers.
Date createdDate
The date when the API Key was created, in ISO 8601 format.
Date lastUpdatedDate
When the API Key was last updated, in ISO 8601 format.
List<E> stageKeys
String restApiId
The RestApi identifier under which the Authorizer will be created.
String name
[Required] The name of the authorizer.
String type
[Required] The type of the authorizer.
List<E> providerARNs
A list of the Cognito Your User Pool authorizer's provider ARNs.
String authType
Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.
String authorizerUri
[Required] Specifies the authorizer's Uniform Resource Identifier (URI).
String authorizerCredentials
Specifies the credentials required for the authorizer, if any.
String identitySource
[Required] The source of the identity in an incoming request.
String identityValidationExpression
A validation expression for the incoming identity.
Integer authorizerResultTtlInSeconds
The TTL of cached authorizer results.
String id
The identifier for the authorizer resource.
String name
[Required] The name of the authorizer.
String type
[Required] The type of the authorizer. Currently, the only valid type is TOKEN.
List<E> providerARNs
A list of the provider ARNs of the authorizer.
String authType
Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.
String authorizerUri
[Required] Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN authorizers, this must be a
well-formed Lambda function URI. The URI should be of the form
arn:aws:apigateway:{region}:lambda:path/{service_api}
. Region
is used to determine the
right endpoint. In this case, path
is used to indicate that the remaining substring in the URI
should be treated as the path to the resource, including the initial /
. For Lambda functions, this
is usually of the form /2015-03-31/functions/[FunctionARN]/invocations
String authorizerCredentials
Specifies the credentials required for the authorizer, if any. Two options are available. To specify an IAM role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
String identitySource
[Required] The source of the identity in an incoming request. For TOKEN authorizers, this value is a mapping expression with the same syntax as integration parameter mappings. The only valid source for tokens is 'header', so the expression should match 'method.request.header.[headerName]'. The value of the header '[headerName]' will be interpreted as the incoming token.
String identityValidationExpression
A validation expression for the incoming identity. For TOKEN authorizers, this value should be a regular expression. The incoming token from the client is matched against this expression, and will proceed if the token matches. If the token doesn't match, the client receives a 401 Unauthorized response.
Integer authorizerResultTtlInSeconds
The TTL in seconds of cached authorizer results. If greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.
String domainName
The domain name of the BasePathMapping resource to create.
String basePath
The base path name that callers of the API must provide as part of the URL after the domain name. This value must be unique for all of the mappings across a single API. Leave this blank if you do not want callers to specify a base path name after the domain name.
String restApiId
The name of the API that you want to apply this mapping to.
String stage
The name of the API's stage that you want to use for this mapping. Leave this blank if you do not want callers to explicitly specify the stage name after any base path name.
String restApiId
The RestApi resource identifier for the Deployment resource to create.
String stageName
The name of the Stage resource for the Deployment resource to create.
String stageDescription
The description of the Stage resource for the Deployment resource to create.
String description
The description for the Deployment resource to create.
Boolean cacheClusterEnabled
Enables a cache cluster for the Stage resource specified in the input.
String cacheClusterSize
Specifies the cache cluster size for the Stage resource specified in the input, if a cache cluster is enabled.
Map<K,V> variables
A map that defines the stage variables for the Stage resource that is associated with the new deployment.
Variable names can have alphanumeric and underscore characters, and the values must match
[A-Za-z0-9-._~:/?#&=,]+
.
String id
The identifier for the deployment resource.
String description
The description for the deployment resource.
Date createdDate
The date and time that the deployment resource was created.
Map<K,V> apiSummary
A summary of the RestApi at the date and time that the deployment resource was created.
String domainName
The name of the DomainName resource.
String certificateName
The name of the certificate.
String certificateBody
The body of the server certificate provided by your certificate authority.
String certificatePrivateKey
Your certificate's private key.
String certificateChain
The intermediate certificates and optionally the root certificate, one after the other without any blank lines. 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.
String domainName
The name of the DomainName resource.
String certificateName
The name of the certificate.
Date certificateUploadDate
The date when the certificate was uploaded, in ISO 8601 format.
String distributionDomainName
The domain name of the Amazon CloudFront distribution. For more information, see the Amazon CloudFront documentation.
String restApiId
String name
The name of the model.
String description
The description of the model.
String schema
The schema for the model. For application/json
models, this should be JSON-schema draft v4 model.
String contentType
The content-type for the model.
String id
The identifier for the model resource.
String name
The name of the model.
String description
The description of the model.
String schema
The schema for the model. For application/json
models, this should be JSON-schema draft v4 model. Do not include
"\*/" characters in the description of any properties because such "\*/" characters may be interpreted as
the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your
API's SDK generated by API Gateway to fail.
String contentType
The content-type for the model.
String id
The resource's identifier.
String parentId
The parent resource's identifier.
String pathPart
The last path segment for this resource.
String path
The full path for this resource.
Map<K,V> resourceMethods
Gets an API resource's method of a given HTTP verb.
The resource methods are a map of methods indexed by methods' HTTP verbs enabled on the resource. This method map
is included in the 200 OK
response of the
GET /restapis/{restapi_id}/resources/{resource_id}
or
GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods
request.
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160608T031827Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160608/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
{ "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", "name": "method", "templated": true }, { "href": "http://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/{status_code}", "templated": true } }, "apiKeyRequired": false, "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/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "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#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "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" } } }
If the OPTIONS
is enabled on the resource, you can follow the example here to get that method. Just
replace the GET
of the last path segment in the request URL with OPTIONS
.
String id
The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.
String name
The API's name.
String description
The API's description.
Date createdDate
The date when the API was created, in ISO 8601 format.
List<E> warnings
The warning messages reported when failonwarnings
is turned on during API import.
String restApiId
String stageName
The name for the Stage resource.
String deploymentId
The identifier of the Deployment resource for the Stage resource.
String description
The description of the Stage resource.
Boolean cacheClusterEnabled
Whether cache clustering is enabled for the stage.
String cacheClusterSize
The stage's cache cluster size.
Map<K,V> variables
A map that defines the stage variables for the new Stage resource. Variable names can have alphanumeric
and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+
.
String deploymentId
The identifier of the Deployment that the stage points to.
String clientCertificateId
The identifier of a client certificate for an API stage.
String stageName
The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.
String description
The stage's description.
Boolean cacheClusterEnabled
Specifies whether a cache cluster is enabled for the stage.
String cacheClusterSize
The size of the cache cluster for the stage, if enabled.
String cacheClusterStatus
The status of the cache cluster for the stage, if enabled.
Map<K,V> methodSettings
A map that defines the method settings for a Stage resource. Keys (designated as
/{method_setting_key
below) are method paths defined as {resource_path}/{http_method}
for an individual method override, or /\*/\*
for overriding all methods in the stage.
Map<K,V> variables
A map that defines the stage variables for a Stage resource. Variable names can have alphanumeric and
underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+
.
Date createdDate
The date and time that the stage was created, in ISO 8601 format.
Date lastUpdatedDate
The date and time that information about the stage was last updated, in ISO 8601 format.
String usagePlanId
The Id of the UsagePlan resource representing the usage plan containing the to-be-created UsagePlanKey resource representing a plan customer.
String keyId
The identifier of a UsagePlanKey resource for a plan customer.
String keyType
The type of a UsagePlanKey resource for a plan customer.
String name
The name of the usage plan.
String description
The description of the usage plan.
List<E> apiStages
The associated API stages of the usage plan.
ThrottleSettings throttle
The throttling limits of the usage plan.
QuotaSettings quota
The quota of the usage plan.
String id
The identifier of a UsagePlan resource.
String name
The name of a usage plan.
String description
The description of a usage plan.
List<E> apiStages
The associated API stages of a usage plan.
ThrottleSettings throttle
The request throttle limits of a usage plan.
QuotaSettings quota
The maximum number of permitted requests per a given unit time interval.
String restApiId
The RestApi identifier for the Authorizer resource.
String authorizerId
The identifier of the Authorizer resource.
String domainName
The domain name of the BasePathMapping resource to delete.
String basePath
The base path name of the BasePathMapping resource to delete.
String clientCertificateId
The identifier of the ClientCertificate resource to be deleted.
String restApiId
The identifier of the RestApi resource for the Deployment resource to delete.
String deploymentId
The identifier of the Deployment resource to delete.
String domainName
The name of the DomainName resource to be deleted.
String restApiId
Specifies a delete integration response request's API identifier.
String resourceId
Specifies a delete integration response request's resource identifier.
String httpMethod
Specifies a delete integration response request's HTTP method.
String statusCode
Specifies a delete integration response request's status code.
String restApiId
The RestApi identifier for the MethodResponse resource.
String resourceId
The Resource identifier for the MethodResponse resource.
String httpMethod
The HTTP verb of the Method resource.
String statusCode
The status code identifier for the MethodResponse resource.
String usagePlanId
The Id of the UsagePlan resource representing the usage plan containing the to-be-deleted UsagePlanKey resource representing a plan customer.
String keyId
The Id of the UsagePlanKey resource to be deleted.
String usagePlanId
The Id of the to-be-deleted usage plan.
String id
The identifier for the deployment resource.
String description
The description for the deployment resource.
Date createdDate
The date and time that the deployment resource was created.
Map<K,V> apiSummary
A summary of the RestApi at the date and time that the deployment resource was created.
String domainName
The name of the DomainName resource.
String certificateName
The name of the certificate.
Date certificateUploadDate
The date when the certificate was uploaded, in ISO 8601 format.
String distributionDomainName
The domain name of the Amazon CloudFront distribution. For more information, see the Amazon CloudFront documentation.
String description
The description of the ClientCertificate.
String clientCertificateId
The identifier of the client certificate.
String description
The description of the client certificate.
String pemEncodedCertificate
The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication in the integration endpoint .
Date createdDate
The date when the client certificate was created, in ISO 8601 format.
Date expirationDate
The date when the client certificate will expire, in ISO 8601 format.
String cloudwatchRoleArn
The ARN of an Amazon CloudWatch role for the current Account.
ThrottleSettings throttleSettings
Specifies the API request limits configured for the current Account.
List<E> features
A list of features supported for the account. When usage plans are enabled, the features list will include an
entry of "UsagePlans"
.
String apiKeyVersion
The version of the API keys used for the account.
String id
The identifier of the API Key.
String value
The value of the API Key.
String name
The name of the API Key.
String description
The description of the API Key.
Boolean enabled
Specifies whether the API Key can be used by callers.
Date createdDate
The date when the API Key was created, in ISO 8601 format.
Date lastUpdatedDate
When the API Key was last updated, in ISO 8601 format.
List<E> stageKeys
String position
The position of the current ApiKeys resource to get information about.
Integer limit
The maximum number of ApiKeys to get information about.
String nameQuery
The name of queried API keys.
Boolean includeValues
A boolean flag to specify whether (true
) or not (false
) the result contains key values.
String restApiId
The RestApi identifier for the Authorizer resource.
String authorizerId
The identifier of the Authorizer resource.
String id
The identifier for the authorizer resource.
String name
[Required] The name of the authorizer.
String type
[Required] The type of the authorizer. Currently, the only valid type is TOKEN.
List<E> providerARNs
A list of the provider ARNs of the authorizer.
String authType
Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.
String authorizerUri
[Required] Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN authorizers, this must be a
well-formed Lambda function URI. The URI should be of the form
arn:aws:apigateway:{region}:lambda:path/{service_api}
. Region
is used to determine the
right endpoint. In this case, path
is used to indicate that the remaining substring in the URI
should be treated as the path to the resource, including the initial /
. For Lambda functions, this
is usually of the form /2015-03-31/functions/[FunctionARN]/invocations
String authorizerCredentials
Specifies the credentials required for the authorizer, if any. Two options are available. To specify an IAM role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
String identitySource
[Required] The source of the identity in an incoming request. For TOKEN authorizers, this value is a mapping expression with the same syntax as integration parameter mappings. The only valid source for tokens is 'header', so the expression should match 'method.request.header.[headerName]'. The value of the header '[headerName]' will be interpreted as the incoming token.
String identityValidationExpression
A validation expression for the incoming identity. For TOKEN authorizers, this value should be a regular expression. The incoming token from the client is matched against this expression, and will proceed if the token matches. If the token doesn't match, the client receives a 401 Unauthorized response.
Integer authorizerResultTtlInSeconds
The TTL in seconds of cached authorizer results. If greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.
String restApiId
The RestApi identifier for the Authorizers resource.
String position
If not all Authorizer resources in the response were present, the position will specify where to start the next page of results.
Integer limit
Limit the number of Authorizer resources in the response.
String position
List<E> items
Gets the current list of Authorizer resources in the collection.
String domainName
The domain name of the BasePathMapping resource to be described.
String basePath
The base path name that callers of the API must provide as part of the URL after the domain name. This value must be unique for all of the mappings across a single API. Leave this blank if you do not want callers to specify any base path name after the domain name.
String domainName
The domain name of a BasePathMapping resource.
String position
The position of the current BasePathMapping resource in the collection to get information about.
Integer limit
The maximum number of BasePathMapping resources in the collection to get information about. The default limit is 25. It should be an integer between 1 - 500.
String position
List<E> items
The current page of any BasePathMapping resources in the collection of base path mapping resources.
String clientCertificateId
The identifier of the ClientCertificate resource to be described.
String clientCertificateId
The identifier of the client certificate.
String description
The description of the client certificate.
String pemEncodedCertificate
The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication in the integration endpoint .
Date createdDate
The date when the client certificate was created, in ISO 8601 format.
Date expirationDate
The date when the client certificate will expire, in ISO 8601 format.
String position
The position of the current ClientCertificate resource in the collection to get information about.
Integer limit
The maximum number of ClientCertificate resources in the collection to get information about. The default limit is 25. It should be an integer between 1 - 500.
String position
List<E> items
The current page of any ClientCertificate resources in the collection of ClientCertificate resources.
String restApiId
The identifier of the RestApi resource for the Deployment resource to get information about.
String deploymentId
The identifier of the Deployment resource to get information about.
String id
The identifier for the deployment resource.
String description
The description for the deployment resource.
Date createdDate
The date and time that the deployment resource was created.
Map<K,V> apiSummary
A summary of the RestApi at the date and time that the deployment resource was created.
String restApiId
The identifier of the RestApi resource for the collection of Deployment resources to get information about.
String position
The position of the current Deployment resource in the collection to get information about.
Integer limit
The maximum number of Deployment resources in the collection to get information about. The default limit is 25. It should be an integer between 1 - 500.
String position
List<E> items
The current page of any Deployment resources in the collection of deployment resources.
String domainName
The name of the DomainName resource.
String domainName
The name of the DomainName resource.
String certificateName
The name of the certificate.
Date certificateUploadDate
The date when the certificate was uploaded, in ISO 8601 format.
String distributionDomainName
The domain name of the Amazon CloudFront distribution. For more information, see the Amazon CloudFront documentation.
String position
The position of the current domain names to get information about.
Integer limit
The maximum number of DomainName resources in the collection to get information about. The default limit is 25. It should be an integer between 1 - 500.
String position
List<E> items
The current page of any DomainName resources in the collection of DomainName resources.
String restApiId
The identifier of the RestApi to be exported.
String stageName
The name of the Stage that will be exported.
String exportType
The type of export. Currently only 'swagger' is supported.
Map<K,V> parameters
A key-value map of query string parameters that specify properties of the export, depending on the requested
exportType
. For exportType
swagger
, any combination of the following
parameters are supported: integrations
will export the API with x-amazon-apigateway-integration
extensions. authorizers
will export the API with x-amazon-apigateway-authorizer extensions.
postman
will export the API with Postman extensions, allowing for import to the Postman tool
String accepts
The content-type of the export, for example application/json
. Currently
application/json
and application/yaml
are supported for exportType
of
swagger
. This should be specified in the Accept
header for direct API requests.
String contentType
The content-type header value in the HTTP response. This will correspond to a valid 'accept' type in the request.
String contentDisposition
The content-disposition header value in the HTTP response.
ByteBuffer body
The binary blob response to GetExport, which contains the export.
String restApiId
Specifies a get integration response request's API identifier.
String resourceId
Specifies a get integration response request's resource identifier.
String httpMethod
Specifies a get integration response request's HTTP method.
String statusCode
Specifies a get integration response request's status code.
String statusCode
Specifies the status code that is used to map the integration response to an existing MethodResponse.
String selectionPattern
Specifies the regular expression (regex) pattern used to choose an integration response based on the response
from the back end. For example, if the success response returns nothing and the error response returns some
string, you could use the .+
regex to match error response. However, make sure that the error
response does not contain any newline (\n
) character in such cases. If the back end is an AWS Lambda
function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status
code is matched.
Map<K,V> responseParameters
A key-value map specifying response parameters that are passed to the method response from the back end. The key
is a method response header parameter name and the mapped value is an integration response header value, a static
value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The
mapping key must match the pattern of method.response.header.{name}
, where name
is a
valid and unique header name. The mapped non-static value must match the pattern of
integration.response.header.{name}
or integration.response.body.{JSON-expression}
,
where name
is a valid and unique response header name and JSON-expression
is a valid
JSON expression without the $
prefix.
Map<K,V> responseTemplates
Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
String type
Specifies the integration's type. The valid value is HTTP
for integrating with an HTTP back end,
AWS
for any AWS service endpoints, MOCK
for testing without actually invoking the back
end, HTTP_PROXY
for integrating with the HTTP proxy integration, or AWS_PROXY
for
integrating with the Lambda proxy integration type.
String httpMethod
Specifies the integration's HTTP method type.
String uri
Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully
formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form
arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}
.
Region
, subdomain
and service
are used to determine the right endpoint.
For AWS services that use the Action=
query string parameter, service_api
should be a
valid action for the desired service. For RESTful AWS service APIs, path
is used to indicate that
the remaining substring in the URI should be treated as the path to the resource, including the initial
/
.
String credentials
Specifies the credentials required for the integration, if any. For AWS integrations, three options are
available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To
require that the caller's identity be passed through from the request, specify the string
arn:aws:iam::\*:user/\*
. To use resource-based permissions on supported AWS services, specify null.
Map<K,V> requestParameters
A key-value map specifying request parameters that are passed from the method request to the back end. The key is
an integration request parameter name and the associated value is a method request parameter value or static
value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request
parameter value must match the pattern of method.request.{location}.{name}
, where
location
is querystring
, path
, or header
and
name
must be a valid and unique method request parameter name.
Map<K,V> requestTemplates
Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.
String passthroughBehavior
Specifies how the method request body of an unmapped content type will be passed through the integration request
to the back end without transformation. A content type is unmapped if no mapping template is defined in the
integration or the content type does not match any of the mapped content types, as specified in
requestTemplates
. There are three valid values: WHEN_NO_MATCH
,
WHEN_NO_TEMPLATES
, and NEVER
.
WHEN_NO_MATCH
passes the method request body through the integration request to the back end
without transformation when the method request content type does not match any content type associated with the
mapping templates defined in the integration request.WHEN_NO_TEMPLATES
passes the method request body through the integration request to the back end
without transformation when no mapping template is defined in the integration request. If a template is defined
when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP
415 Unsupported Media Type
response.NEVER
rejects the method request with an HTTP 415 Unsupported Media Type
response
when either the method request content type does not match any content type associated with the mapping templates
defined in the integration request or no mapping template is defined in the integration request.String cacheNamespace
Specifies the integration's cache namespace.
List<E> cacheKeyParameters
Specifies the integration's cache key parameters.
Map<K,V> integrationResponses
Specifies the integration's responses.
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
The successful response returns 200 OK
status and a payload as follows:
{ "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/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#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }
String restApiId
The RestApi identifier for the MethodResponse resource.
String resourceId
The Resource identifier for the MethodResponse resource.
String httpMethod
The HTTP verb of the Method resource.
String statusCode
The status code for the MethodResponse resource.
String statusCode
The method response's status code.
Map<K,V> responseParameters
A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the
caller. A key defines a method response header and the value specifies whether the associated method response
header is required or not. The expression of the key must match the pattern
method.response.header.{name}
, where name
is a valid and unique header name. Amazon API
Gateway passes certain integration response data to the method response headers specified here according to the
mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped
include an integration response header expressed in integration.response.header.{name}
, a static
value enclosed within a pair of single quotes (e.g., 'application/json'
), or a JSON expression from
the back-end response payload in the form of integration.response.body.{JSON-expression}
, where
JSON-expression
is a valid JSON expression without the $
prefix.)
Map<K,V> responseModels
String httpMethod
The method's HTTP verb.
String authorizationType
The method's authorization type.
String authorizerId
The identifier of an Authorizer to use on this method. The authorizationType
must be
CUSTOM
.
Boolean apiKeyRequired
A boolean flag specifying whether a valid ApiKey is required to invoke this method.
Map<K,V> requestParameters
A key-value map defining required or optional method request parameters that can be accepted by Amazon API
Gateway. A key is a method request parameter name matching the pattern of
method.request.{location}.{name}
, where location
is querystring
,
path
, or header
and name
is a valid and unique parameter name. The value
associated with the key is a Boolean flag indicating whether the parameter is required (true
) or
optional (false
). The method request parameter names defined here are available in
Integration to be mapped to integration request parameters or templates.
Map<K,V> requestModels
A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).
Map<K,V> methodResponses
Gets a method response associated with a given HTTP status code.
The collection of method responses are encapsulated in a key-value map, where the key is a response's HTTP status code and the value is a MethodResponse resource that specifies the response returned to the caller from the back end through the integration response.
GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T215008Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
The successful response returns a 200 OK
status code and a payload similar to the following:
{ "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.operator": false, "method.response.header.operand_2": false, "method.response.header.operand_1": false }, "statusCode": "200" }
Integration methodIntegration
Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.
GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T213210Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
The successful response returns a 200 OK
status code and a payload similar to the following:
{ "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "0cjtch", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestTemplates": { "application/json": "{\n \"a\": \"$input.params('operand1')\",\n \"b\": \"$input.params('operand2')\", \n \"op\": \"$input.params('operator')\" \n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.operator": "integration.response.body.op", "method.response.header.operand_2": "integration.response.body.b", "method.response.header.operand_1": "integration.response.body.a" }, "responseTemplates": { "application/json": "#set($res = $input.path('$'))\n{\n \"result\": \"$res.a, $res.b, $res.op => $res.c\",\n \"a\" : \"$res.a\",\n \"b\" : \"$res.b\",\n \"op\" : \"$res.op\",\n \"c\" : \"$res.c\"\n}" }, "selectionPattern": "", "statusCode": "200" } } }
String id
The identifier for the model resource.
String name
The name of the model.
String description
The description of the model.
String schema
The schema for the model. For application/json
models, this should be JSON-schema draft v4 model. Do not include
"\*/" characters in the description of any properties because such "\*/" characters may be interpreted as
the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your
API's SDK generated by API Gateway to fail.
String contentType
The content-type for the model.
String restApiId
The RestApi identifier.
String position
The position of the next set of results in the Models resource to get information about.
Integer limit
The maximum number of models in the collection to get information about. The default limit is 25. It should be an integer between 1 - 500.
String value
The Apache Velocity Template Language (VTL) template content used for the template resource.
String id
The resource's identifier.
String parentId
The parent resource's identifier.
String pathPart
The last path segment for this resource.
String path
The full path for this resource.
Map<K,V> resourceMethods
Gets an API resource's method of a given HTTP verb.
The resource methods are a map of methods indexed by methods' HTTP verbs enabled on the resource. This method map
is included in the 200 OK
response of the
GET /restapis/{restapi_id}/resources/{resource_id}
or
GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods
request.
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160608T031827Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160608/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
{ "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", "name": "method", "templated": true }, { "href": "http://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/{status_code}", "templated": true } }, "apiKeyRequired": false, "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/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "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#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "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" } } }
If the OPTIONS
is enabled on the resource, you can follow the example here to get that method. Just
replace the GET
of the last path segment in the request URL with OPTIONS
.
String restApiId
The RestApi identifier for the Resource.
String position
The position of the next set of results in the current Resources resource to get information about.
Integer limit
The maximum number of Resource resources in the collection to get information about. The default limit is 25. It should be an integer between 1 - 500.
String id
The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.
String name
The API's name.
String description
The API's description.
Date createdDate
The date when the API was created, in ISO 8601 format.
List<E> warnings
The warning messages reported when failonwarnings
is turned on during API import.
String restApiId
The identifier of the RestApi that the SDK will use.
String stageName
The name of the Stage that the SDK will use.
String sdkType
The language for the generated SDK. Currently javascript
, android
, and
objectivec
(for iOS) are supported.
Map<K,V> parameters
A key-value map of query string parameters that specify properties of the SDK, depending on the requested
sdkType
. For sdkType
of objectivec
, a parameter named
classPrefix
is required. For sdkType
of android
, parameters named
groupId
, artifactId
, artifactVersion
, and invokerPackage
are
required.
String contentType
The content-type header value in the HTTP response.
String contentDisposition
The content-disposition header value in the HTTP response.
ByteBuffer body
The binary blob response to GetSdk, which contains the generated SDK.
String deploymentId
The identifier of the Deployment that the stage points to.
String clientCertificateId
The identifier of a client certificate for an API stage.
String stageName
The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.
String description
The stage's description.
Boolean cacheClusterEnabled
Specifies whether a cache cluster is enabled for the stage.
String cacheClusterSize
The size of the cache cluster for the stage, if enabled.
String cacheClusterStatus
The status of the cache cluster for the stage, if enabled.
Map<K,V> methodSettings
A map that defines the method settings for a Stage resource. Keys (designated as
/{method_setting_key
below) are method paths defined as {resource_path}/{http_method}
for an individual method override, or /\*/\*
for overriding all methods in the stage.
Map<K,V> variables
A map that defines the stage variables for a Stage resource. Variable names can have alphanumeric and
underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+
.
Date createdDate
The date and time that the stage was created, in ISO 8601 format.
Date lastUpdatedDate
The date and time that information about the stage was last updated, in ISO 8601 format.
String usagePlanId
The Id of the UsagePlan resource representing the usage plan containing the to-be-retrieved UsagePlanKey resource representing a plan customer.
String keyId
The key Id of the to-be-retrieved UsagePlanKey resource representing a plan customer.
String usagePlanId
The Id of the UsagePlan resource representing the usage plan containing the to-be-retrieved UsagePlanKey resource representing a plan customer.
String position
A query parameter specifying the zero-based index specifying the position of a usage plan key.
Integer limit
A query parameter specifying the maximum number usage plan keys returned by the GET request.
String nameQuery
A query parameter specifying the name of the to-be-returned usage plan keys.
String id
The identifier of a UsagePlan resource.
String name
The name of a usage plan.
String description
The description of a usage plan.
List<E> apiStages
The associated API stages of a usage plan.
ThrottleSettings throttle
The request throttle limits of a usage plan.
QuotaSettings quota
The maximum number of permitted requests per a given unit time interval.
String usagePlanId
The Id of the usage plan associated with the usage data.
String keyId
The Id of the API key associated with the resultant usage data.
String startDate
The starting date (e.g., 2016-01-01) of the usage data.
String endDate
The ending date (e.g., 2016-12-31) of the usage data.
String position
Position
Integer limit
The maximum number of results to be returned.
String usagePlanId
The plan Id associated with this usage data.
String startDate
The starting date of the usage data.
String endDate
The ending date of the usage data.
String position
Map<K,V> items
The usage data, as daily logs of used and remaining quotas, over the specified time interval indexed over the API
keys in a usage plan. For example,
{..., "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]}
, where {api_key}
stands for an API key value and the daily log entry is of the format [used quota, remaining quota]
.
ByteBuffer body
The payload of the POST request to import API keys. For the payload format, see API Key File Format.
String format
A query parameter to specify the input format to imported API keys. Currently, only the csv
format
is supported.
Boolean failOnWarnings
A query parameter to indicate whether to rollback ApiKey importation (true
) or not (
false
) when error is encountered.
Boolean failOnWarnings
A query parameter to indicate whether to rollback the API creation (true
) or not (false
) when a warning is encountered. The default value is false
.
Map<K,V> parameters
Custom header parameters as part of the request.
ByteBuffer body
The POST request body containing external API definitions. Currently, only Swagger definition JSON files are supported.
String id
The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.
String name
The API's name.
String description
The API's description.
Date createdDate
The date when the API was created, in ISO 8601 format.
List<E> warnings
The warning messages reported when failonwarnings
is turned on during API import.
String type
Specifies the integration's type. The valid value is HTTP
for integrating with an HTTP back end,
AWS
for any AWS service endpoints, MOCK
for testing without actually invoking the back
end, HTTP_PROXY
for integrating with the HTTP proxy integration, or AWS_PROXY
for
integrating with the Lambda proxy integration type.
String httpMethod
Specifies the integration's HTTP method type.
String uri
Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully
formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form
arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}
.
Region
, subdomain
and service
are used to determine the right endpoint.
For AWS services that use the Action=
query string parameter, service_api
should be a
valid action for the desired service. For RESTful AWS service APIs, path
is used to indicate that
the remaining substring in the URI should be treated as the path to the resource, including the initial
/
.
String credentials
Specifies the credentials required for the integration, if any. For AWS integrations, three options are
available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To
require that the caller's identity be passed through from the request, specify the string
arn:aws:iam::\*:user/\*
. To use resource-based permissions on supported AWS services, specify null.
Map<K,V> requestParameters
A key-value map specifying request parameters that are passed from the method request to the back end. The key is
an integration request parameter name and the associated value is a method request parameter value or static
value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request
parameter value must match the pattern of method.request.{location}.{name}
, where
location
is querystring
, path
, or header
and
name
must be a valid and unique method request parameter name.
Map<K,V> requestTemplates
Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.
String passthroughBehavior
Specifies how the method request body of an unmapped content type will be passed through the integration request
to the back end without transformation. A content type is unmapped if no mapping template is defined in the
integration or the content type does not match any of the mapped content types, as specified in
requestTemplates
. There are three valid values: WHEN_NO_MATCH
,
WHEN_NO_TEMPLATES
, and NEVER
.
WHEN_NO_MATCH
passes the method request body through the integration request to the back end
without transformation when the method request content type does not match any content type associated with the
mapping templates defined in the integration request.WHEN_NO_TEMPLATES
passes the method request body through the integration request to the back end
without transformation when no mapping template is defined in the integration request. If a template is defined
when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP
415 Unsupported Media Type
response.NEVER
rejects the method request with an HTTP 415 Unsupported Media Type
response
when either the method request content type does not match any content type associated with the mapping templates
defined in the integration request or no mapping template is defined in the integration request.String cacheNamespace
Specifies the integration's cache namespace.
List<E> cacheKeyParameters
Specifies the integration's cache key parameters.
Map<K,V> integrationResponses
Specifies the integration's responses.
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
The successful response returns 200 OK
status and a payload as follows:
{ "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/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#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }
String statusCode
Specifies the status code that is used to map the integration response to an existing MethodResponse.
String selectionPattern
Specifies the regular expression (regex) pattern used to choose an integration response based on the response
from the back end. For example, if the success response returns nothing and the error response returns some
string, you could use the .+
regex to match error response. However, make sure that the error
response does not contain any newline (\n
) character in such cases. If the back end is an AWS Lambda
function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status
code is matched.
Map<K,V> responseParameters
A key-value map specifying response parameters that are passed to the method response from the back end. The key
is a method response header parameter name and the mapped value is an integration response header value, a static
value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The
mapping key must match the pattern of method.response.header.{name}
, where name
is a
valid and unique header name. The mapped non-static value must match the pattern of
integration.response.header.{name}
or integration.response.body.{JSON-expression}
,
where name
is a valid and unique response header name and JSON-expression
is a valid
JSON expression without the $
prefix.
Map<K,V> responseTemplates
Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
String retryAfterSeconds
String httpMethod
The method's HTTP verb.
String authorizationType
The method's authorization type.
String authorizerId
The identifier of an Authorizer to use on this method. The authorizationType
must be
CUSTOM
.
Boolean apiKeyRequired
A boolean flag specifying whether a valid ApiKey is required to invoke this method.
Map<K,V> requestParameters
A key-value map defining required or optional method request parameters that can be accepted by Amazon API
Gateway. A key is a method request parameter name matching the pattern of
method.request.{location}.{name}
, where location
is querystring
,
path
, or header
and name
is a valid and unique parameter name. The value
associated with the key is a Boolean flag indicating whether the parameter is required (true
) or
optional (false
). The method request parameter names defined here are available in
Integration to be mapped to integration request parameters or templates.
Map<K,V> requestModels
A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).
Map<K,V> methodResponses
Gets a method response associated with a given HTTP status code.
The collection of method responses are encapsulated in a key-value map, where the key is a response's HTTP status code and the value is a MethodResponse resource that specifies the response returned to the caller from the back end through the integration response.
GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T215008Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
The successful response returns a 200 OK
status code and a payload similar to the following:
{ "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.operator": false, "method.response.header.operand_2": false, "method.response.header.operand_1": false }, "statusCode": "200" }
Integration methodIntegration
Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.
GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T213210Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
The successful response returns a 200 OK
status code and a payload similar to the following:
{ "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "0cjtch", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestTemplates": { "application/json": "{\n \"a\": \"$input.params('operand1')\",\n \"b\": \"$input.params('operand2')\", \n \"op\": \"$input.params('operator')\" \n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.operator": "integration.response.body.op", "method.response.header.operand_2": "integration.response.body.b", "method.response.header.operand_1": "integration.response.body.a" }, "responseTemplates": { "application/json": "#set($res = $input.path('$'))\n{\n \"result\": \"$res.a, $res.b, $res.op => $res.c\",\n \"a\" : \"$res.a\",\n \"b\" : \"$res.b\",\n \"op\" : \"$res.op\",\n \"c\" : \"$res.c\"\n}" }, "selectionPattern": "", "statusCode": "200" } } }
String statusCode
The method response's status code.
Map<K,V> responseParameters
A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the
caller. A key defines a method response header and the value specifies whether the associated method response
header is required or not. The expression of the key must match the pattern
method.response.header.{name}
, where name
is a valid and unique header name. Amazon API
Gateway passes certain integration response data to the method response headers specified here according to the
mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped
include an integration response header expressed in integration.response.header.{name}
, a static
value enclosed within a pair of single quotes (e.g., 'application/json'
), or a JSON expression from
the back-end response payload in the form of integration.response.body.{JSON-expression}
, where
JSON-expression
is a valid JSON expression without the $
prefix.)
Map<K,V> responseModels
Boolean metricsEnabled
Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is
/{method_setting_key}/metrics/enabled
, and the value is a Boolean.
String loggingLevel
Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The
PATCH path for this setting is /{method_setting_key}/logging/loglevel
, and the available levels are
OFF
, ERROR
, and INFO
.
Boolean dataTraceEnabled
Specifies whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon
CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace
, and the
value is a Boolean.
Integer throttlingBurstLimit
Specifies the throttling burst limit. The PATCH path for this setting is
/{method_setting_key}/throttling/burstLimit
, and the value is an integer.
Double throttlingRateLimit
Specifies the throttling rate limit. The PATCH path for this setting is
/{method_setting_key}/throttling/rateLimit
, and the value is a double.
Boolean cachingEnabled
Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the
stage for responses to be cached. The PATCH path for this setting is
/{method_setting_key}/caching/enabled
, and the value is a Boolean.
Integer cacheTtlInSeconds
Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response
will be cached. The PATCH path for this setting is /{method_setting_key}/caching/ttlInSeconds
, and
the value is an integer.
Boolean cacheDataEncrypted
Specifies whether the cached responses are encrypted. The PATCH path for this setting is
/{method_setting_key}/caching/dataEncrypted
, and the value is a Boolean.
Boolean requireAuthorizationForCacheControl
Specifies whether authorization is required for a cache invalidation request. The PATCH path for this setting is
/{method_setting_key}/caching/requireAuthorizationForCacheControl
, and the value is a Boolean.
String unauthorizedCacheControlHeaderStrategy
Specifies how to handle unauthorized requests for cache invalidation. The PATCH path for this setting is
/{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy
, and the available values are
FAIL_WITH_403
, SUCCEED_WITH_RESPONSE_HEADER
,
SUCCEED_WITHOUT_RESPONSE_HEADER
.
String id
The identifier for the model resource.
String name
The name of the model.
String description
The description of the model.
String schema
The schema for the model. For application/json
models, this should be JSON-schema draft v4 model. Do not include
"\*/" characters in the description of any properties because such "\*/" characters may be interpreted as
the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your
API's SDK generated by API Gateway to fail.
String contentType
The content-type for the model.
String op
An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.
String path
The op
operation's target, as identified by a JSON Pointer value that references a
location within the targeted resource. For example, if the target resource has an updateable property of
{"name":"value"}
, the path for this property is /name
. If the name
property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}
), the path for the
child/name
property will be /name/child~1name
. Any slash ("/") character appearing in
path names must be escaped with "~1", as shown in the example above. Each op
operation can have only
one path
associated with it.
String value
The new target value of the update operation.
String from
Not supported.
String restApiId
Specifies a put integration request's API identifier.
String resourceId
Specifies a put integration request's resource ID.
String httpMethod
Specifies a put integration request's HTTP method.
String type
Specifies a put integration input's type.
String integrationHttpMethod
Specifies a put integration HTTP method. When the integration type is HTTP or AWS, this field is required.
String uri
Specifies a put integration input's Uniform Resource Identifier (URI). When the integration type is HTTP or AWS, this field is required. For integration with Lambda as an AWS service proxy, this value is of the 'arn:aws:apigateway:<region>:lambda:path/2015-03-31/functions/<functionArn>/invocations' format.
String credentials
Specifies whether credentials are required for a put integration.
Map<K,V> requestParameters
A key-value map specifying request parameters that are passed from the method request to the back end. The key is
an integration request parameter name and the associated value is a method request parameter value or static
value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request
parameter value must match the pattern of method.request.{location}.{name}
, where
location
is querystring
, path
, or header
and
name
must be a valid and unique method request parameter name.
Map<K,V> requestTemplates
Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.
String passthroughBehavior
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and
the available mapping templates specified as the requestTemplates
property on the Integration
resource. There are three valid values: WHEN_NO_MATCH
, WHEN_NO_TEMPLATES
, and
NEVER
.
WHEN_NO_MATCH
passes the request body for unmapped content types through to the integration back end
without transformation.
NEVER
rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.
WHEN_NO_TEMPLATES
allows pass-through when the integration has NO content types mapped to templates.
However if there is at least one content type defined, unmapped content types will be rejected with the same 415
response.
String cacheNamespace
Specifies a put integration input's cache namespace.
List<E> cacheKeyParameters
Specifies a put integration input's cache key parameters.
String restApiId
Specifies a put integration response request's API identifier.
String resourceId
Specifies a put integration response request's resource identifier.
String httpMethod
Specifies a put integration response request's HTTP method.
String statusCode
Specifies the status code that is used to map the integration response to an existing MethodResponse.
String selectionPattern
Specifies the selection pattern of a put integration response.
Map<K,V> responseParameters
A key-value map specifying response parameters that are passed to the method response from the back end. The key
is a method response header parameter name and the mapped value is an integration response header value, a static
value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The
mapping key must match the pattern of method.response.header.{name}
, where name
is a
valid and unique header name. The mapped non-static value must match the pattern of
integration.response.header.{name}
or integration.response.body.{JSON-expression}
,
where name
must be a valid and unique response header name and JSON-expression
a valid
JSON expression without the $
prefix.
Map<K,V> responseTemplates
Specifies a put integration response's templates.
String statusCode
Specifies the status code that is used to map the integration response to an existing MethodResponse.
String selectionPattern
Specifies the regular expression (regex) pattern used to choose an integration response based on the response
from the back end. For example, if the success response returns nothing and the error response returns some
string, you could use the .+
regex to match error response. However, make sure that the error
response does not contain any newline (\n
) character in such cases. If the back end is an AWS Lambda
function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status
code is matched.
Map<K,V> responseParameters
A key-value map specifying response parameters that are passed to the method response from the back end. The key
is a method response header parameter name and the mapped value is an integration response header value, a static
value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The
mapping key must match the pattern of method.response.header.{name}
, where name
is a
valid and unique header name. The mapped non-static value must match the pattern of
integration.response.header.{name}
or integration.response.body.{JSON-expression}
,
where name
is a valid and unique response header name and JSON-expression
is a valid
JSON expression without the $
prefix.
Map<K,V> responseTemplates
Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
String type
Specifies the integration's type. The valid value is HTTP
for integrating with an HTTP back end,
AWS
for any AWS service endpoints, MOCK
for testing without actually invoking the back
end, HTTP_PROXY
for integrating with the HTTP proxy integration, or AWS_PROXY
for
integrating with the Lambda proxy integration type.
String httpMethod
Specifies the integration's HTTP method type.
String uri
Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully
formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form
arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}
.
Region
, subdomain
and service
are used to determine the right endpoint.
For AWS services that use the Action=
query string parameter, service_api
should be a
valid action for the desired service. For RESTful AWS service APIs, path
is used to indicate that
the remaining substring in the URI should be treated as the path to the resource, including the initial
/
.
String credentials
Specifies the credentials required for the integration, if any. For AWS integrations, three options are
available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To
require that the caller's identity be passed through from the request, specify the string
arn:aws:iam::\*:user/\*
. To use resource-based permissions on supported AWS services, specify null.
Map<K,V> requestParameters
A key-value map specifying request parameters that are passed from the method request to the back end. The key is
an integration request parameter name and the associated value is a method request parameter value or static
value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request
parameter value must match the pattern of method.request.{location}.{name}
, where
location
is querystring
, path
, or header
and
name
must be a valid and unique method request parameter name.
Map<K,V> requestTemplates
Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.
String passthroughBehavior
Specifies how the method request body of an unmapped content type will be passed through the integration request
to the back end without transformation. A content type is unmapped if no mapping template is defined in the
integration or the content type does not match any of the mapped content types, as specified in
requestTemplates
. There are three valid values: WHEN_NO_MATCH
,
WHEN_NO_TEMPLATES
, and NEVER
.
WHEN_NO_MATCH
passes the method request body through the integration request to the back end
without transformation when the method request content type does not match any content type associated with the
mapping templates defined in the integration request.WHEN_NO_TEMPLATES
passes the method request body through the integration request to the back end
without transformation when no mapping template is defined in the integration request. If a template is defined
when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP
415 Unsupported Media Type
response.NEVER
rejects the method request with an HTTP 415 Unsupported Media Type
response
when either the method request content type does not match any content type associated with the mapping templates
defined in the integration request or no mapping template is defined in the integration request.String cacheNamespace
Specifies the integration's cache namespace.
List<E> cacheKeyParameters
Specifies the integration's cache key parameters.
Map<K,V> integrationResponses
Specifies the integration's responses.
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
The successful response returns 200 OK
status and a payload as follows:
{ "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/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#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }
String restApiId
String resourceId
String httpMethod
Specifies the method request's HTTP method type.
String authorizationType
Specifies the type of authorization used for the method.
String authorizerId
Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM.
Boolean apiKeyRequired
Specifies whether the method required a valid ApiKey.
Map<K,V> requestParameters
A key-value map defining required or optional method request parameters that can be accepted by Amazon API
Gateway. A key defines a method request parameter name matching the pattern of
method.request.{location}.{name}
, where location
is querystring
,
path
, or header
and name
is a valid and unique parameter name. The value
associated with the key is a Boolean flag indicating whether the parameter is required (true
) or
optional (false
). The method request parameter names defined here are available in
Integration to be mapped to integration request parameters or body-mapping templates.
Map<K,V> requestModels
String restApiId
String resourceId
String httpMethod
The HTTP verb of the Method resource.
String statusCode
The method response's status code.
Map<K,V> responseParameters
A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the
caller. A key defines a method response header name and the associated value is a Boolean flag indicating whether
the method response parameter is required or not. The method response header names must match the pattern of
method.response.header.{name}
, where name
is a valid and unique header name. The
response parameter names defined here are available in the integration response to be mapped from an integration
response header expressed in integration.response.header.{name}
, a static value enclosed within a
pair of single quotes (e.g., 'application/json'
), or a JSON expression from the back-end response
payload in the form of integration.response.body.{JSON-expression}
, where
JSON-expression
is a valid JSON expression without the $
prefix.)
Map<K,V> responseModels
String statusCode
The method response's status code.
Map<K,V> responseParameters
A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the
caller. A key defines a method response header and the value specifies whether the associated method response
header is required or not. The expression of the key must match the pattern
method.response.header.{name}
, where name
is a valid and unique header name. Amazon API
Gateway passes certain integration response data to the method response headers specified here according to the
mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped
include an integration response header expressed in integration.response.header.{name}
, a static
value enclosed within a pair of single quotes (e.g., 'application/json'
), or a JSON expression from
the back-end response payload in the form of integration.response.body.{JSON-expression}
, where
JSON-expression
is a valid JSON expression without the $
prefix.)
Map<K,V> responseModels
String httpMethod
The method's HTTP verb.
String authorizationType
The method's authorization type.
String authorizerId
The identifier of an Authorizer to use on this method. The authorizationType
must be
CUSTOM
.
Boolean apiKeyRequired
A boolean flag specifying whether a valid ApiKey is required to invoke this method.
Map<K,V> requestParameters
A key-value map defining required or optional method request parameters that can be accepted by Amazon API
Gateway. A key is a method request parameter name matching the pattern of
method.request.{location}.{name}
, where location
is querystring
,
path
, or header
and name
is a valid and unique parameter name. The value
associated with the key is a Boolean flag indicating whether the parameter is required (true
) or
optional (false
). The method request parameter names defined here are available in
Integration to be mapped to integration request parameters or templates.
Map<K,V> requestModels
A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).
Map<K,V> methodResponses
Gets a method response associated with a given HTTP status code.
The collection of method responses are encapsulated in a key-value map, where the key is a response's HTTP status code and the value is a MethodResponse resource that specifies the response returned to the caller from the back end through the integration response.
GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T215008Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
The successful response returns a 200 OK
status code and a payload similar to the following:
{ "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.operator": false, "method.response.header.operand_2": false, "method.response.header.operand_1": false }, "statusCode": "200" }
Integration methodIntegration
Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.
GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T213210Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
The successful response returns a 200 OK
status code and a payload similar to the following:
{ "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "0cjtch", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestTemplates": { "application/json": "{\n \"a\": \"$input.params('operand1')\",\n \"b\": \"$input.params('operand2')\", \n \"op\": \"$input.params('operator')\" \n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.operator": "integration.response.body.op", "method.response.header.operand_2": "integration.response.body.b", "method.response.header.operand_1": "integration.response.body.a" }, "responseTemplates": { "application/json": "#set($res = $input.path('$'))\n{\n \"result\": \"$res.a, $res.b, $res.op => $res.c\",\n \"a\" : \"$res.a\",\n \"b\" : \"$res.b\",\n \"op\" : \"$res.op\",\n \"c\" : \"$res.c\"\n}" }, "selectionPattern": "", "statusCode": "200" } } }
String restApiId
The identifier of the RestApi to be updated.
String mode
The mode
query parameter to specify the update mode. Valid values are "merge" and "overwrite". By
default, the update mode is "merge".
Boolean failOnWarnings
A query parameter to indicate whether to rollback the API update (true
) or not (false
)
when a warning is encountered. The default value is false
.
Map<K,V> parameters
Custom headers supplied as part of the request.
ByteBuffer body
The PUT request body containing external API definitions. Currently, only Swagger definition JSON files are supported.
String id
The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.
String name
The API's name.
String description
The API's description.
Date createdDate
The date when the API was created, in ISO 8601 format.
List<E> warnings
The warning messages reported when failonwarnings
is turned on during API import.
Integer limit
The maximum number of requests that can be made in a given time period.
Integer offset
The number of requests subtracted from the given limit in the initial time period.
String period
The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".
String id
The resource's identifier.
String parentId
The parent resource's identifier.
String pathPart
The last path segment for this resource.
String path
The full path for this resource.
Map<K,V> resourceMethods
Gets an API resource's method of a given HTTP verb.
The resource methods are a map of methods indexed by methods' HTTP verbs enabled on the resource. This method map
is included in the 200 OK
response of the
GET /restapis/{restapi_id}/resources/{resource_id}
or
GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods
request.
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160608T031827Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160608/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
{ "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", "name": "method", "templated": true }, { "href": "http://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/{status_code}", "templated": true } }, "apiKeyRequired": false, "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/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "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#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "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" } } }
If the OPTIONS
is enabled on the resource, you can follow the example here to get that method. Just
replace the GET
of the last path segment in the request URL with OPTIONS
.
String id
The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.
String name
The API's name.
String description
The API's description.
Date createdDate
The date when the API was created, in ISO 8601 format.
List<E> warnings
The warning messages reported when failonwarnings
is turned on during API import.
String retryAfterSeconds
String deploymentId
The identifier of the Deployment that the stage points to.
String clientCertificateId
The identifier of a client certificate for an API stage.
String stageName
The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.
String description
The stage's description.
Boolean cacheClusterEnabled
Specifies whether a cache cluster is enabled for the stage.
String cacheClusterSize
The size of the cache cluster for the stage, if enabled.
String cacheClusterStatus
The status of the cache cluster for the stage, if enabled.
Map<K,V> methodSettings
A map that defines the method settings for a Stage resource. Keys (designated as
/{method_setting_key
below) are method paths defined as {resource_path}/{http_method}
for an individual method override, or /\*/\*
for overriding all methods in the stage.
Map<K,V> variables
A map that defines the stage variables for a Stage resource. Variable names can have alphanumeric and
underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+
.
Date createdDate
The date and time that the stage was created, in ISO 8601 format.
Date lastUpdatedDate
The date and time that information about the stage was last updated, in ISO 8601 format.
String restApiId
Specifies a test invoke authorizer request's RestApi identifier.
String authorizerId
Specifies a test invoke authorizer request's Authorizer ID.
Map<K,V> headers
[Required] A key-value map of headers to simulate an incoming invocation request. This is where the incoming authorization token, or identity source, should be specified.
String pathWithQueryString
[Optional] The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
String body
[Optional] The simulated request body of an incoming invocation request.
Map<K,V> stageVariables
A key-value map of stage variables to simulate an invocation on a deployed Stage.
Map<K,V> additionalContext
[Optional] A key-value map of additional context variables.
Integer clientStatus
The HTTP status code that the client would have received. Value is 0 if the authorizer succeeded.
String log
The Amazon API Gateway execution log for the test authorizer request.
Long latency
The execution latency of the test authorizer request.
String principalId
The principal identity returned by the Authorizer
String policy
The JSON policy document returned by the Authorizer
Map<K,V> authorization
Map<K,V> claims
The open identity claims, with any supported custom attributes, returned from the Cognito Your User Pool configured for the API.
String restApiId
Specifies a test invoke method request's API identifier.
String resourceId
Specifies a test invoke method request's resource ID.
String httpMethod
Specifies a test invoke method request's HTTP method.
String pathWithQueryString
The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
String body
The simulated request body of an incoming invocation request.
Map<K,V> headers
A key-value map of headers to simulate an incoming invocation request.
String clientCertificateId
A ClientCertificate identifier to use in the test invocation. API Gateway will use the certificate when making the HTTPS request to the defined back-end endpoint.
Map<K,V> stageVariables
A key-value map of stage variables to simulate an invocation on a deployed Stage.
Integer status
The HTTP status code.
String body
The body of the HTTP response.
Map<K,V> headers
The headers of the HTTP response.
String log
The Amazon API Gateway execution log for the test invoke request.
Long latency
The execution latency of the test invoke request.
String retryAfterSeconds
String cloudwatchRoleArn
The ARN of an Amazon CloudWatch role for the current Account.
ThrottleSettings throttleSettings
Specifies the API request limits configured for the current Account.
List<E> features
A list of features supported for the account. When usage plans are enabled, the features list will include an
entry of "UsagePlans"
.
String apiKeyVersion
The version of the API keys used for the account.
String id
The identifier of the API Key.
String value
The value of the API Key.
String name
The name of the API Key.
String description
The description of the API Key.
Boolean enabled
Specifies whether the API Key can be used by callers.
Date createdDate
The date when the API Key was created, in ISO 8601 format.
Date lastUpdatedDate
When the API Key was last updated, in ISO 8601 format.
List<E> stageKeys
String restApiId
The RestApi identifier for the Authorizer resource.
String authorizerId
The identifier of the Authorizer resource.
List<E> patchOperations
A list of update operations to be applied to the specified resource and in the order specified in this list.
String id
The identifier for the authorizer resource.
String name
[Required] The name of the authorizer.
String type
[Required] The type of the authorizer. Currently, the only valid type is TOKEN.
List<E> providerARNs
A list of the provider ARNs of the authorizer.
String authType
Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.
String authorizerUri
[Required] Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN authorizers, this must be a
well-formed Lambda function URI. The URI should be of the form
arn:aws:apigateway:{region}:lambda:path/{service_api}
. Region
is used to determine the
right endpoint. In this case, path
is used to indicate that the remaining substring in the URI
should be treated as the path to the resource, including the initial /
. For Lambda functions, this
is usually of the form /2015-03-31/functions/[FunctionARN]/invocations
String authorizerCredentials
Specifies the credentials required for the authorizer, if any. Two options are available. To specify an IAM role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
String identitySource
[Required] The source of the identity in an incoming request. For TOKEN authorizers, this value is a mapping expression with the same syntax as integration parameter mappings. The only valid source for tokens is 'header', so the expression should match 'method.request.header.[headerName]'. The value of the header '[headerName]' will be interpreted as the incoming token.
String identityValidationExpression
A validation expression for the incoming identity. For TOKEN authorizers, this value should be a regular expression. The incoming token from the client is matched against this expression, and will proceed if the token matches. If the token doesn't match, the client receives a 401 Unauthorized response.
Integer authorizerResultTtlInSeconds
The TTL in seconds of cached authorizer results. If greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.
String domainName
The domain name of the BasePathMapping resource to change.
String basePath
The base path of the BasePathMapping resource to change.
List<E> patchOperations
A list of update operations to be applied to the specified resource and in the order specified in this list.
String clientCertificateId
The identifier of the ClientCertificate resource to be updated.
List<E> patchOperations
A list of update operations to be applied to the specified resource and in the order specified in this list.
String clientCertificateId
The identifier of the client certificate.
String description
The description of the client certificate.
String pemEncodedCertificate
The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication in the integration endpoint .
Date createdDate
The date when the client certificate was created, in ISO 8601 format.
Date expirationDate
The date when the client certificate will expire, in ISO 8601 format.
String restApiId
The replacement identifier of the RestApi resource for the Deployment resource to change information about.
String deploymentId
The replacement identifier for the Deployment resource to change information about.
List<E> patchOperations
A list of update operations to be applied to the specified resource and in the order specified in this list.
String id
The identifier for the deployment resource.
String description
The description for the deployment resource.
Date createdDate
The date and time that the deployment resource was created.
Map<K,V> apiSummary
A summary of the RestApi at the date and time that the deployment resource was created.
String domainName
The name of the DomainName resource to be changed.
List<E> patchOperations
A list of update operations to be applied to the specified resource and in the order specified in this list.
String domainName
The name of the DomainName resource.
String certificateName
The name of the certificate.
Date certificateUploadDate
The date when the certificate was uploaded, in ISO 8601 format.
String distributionDomainName
The domain name of the Amazon CloudFront distribution. For more information, see the Amazon CloudFront documentation.
String restApiId
Represents an update integration request's API identifier.
String resourceId
Represents an update integration request's resource identifier.
String httpMethod
Represents an update integration request's HTTP method.
List<E> patchOperations
A list of update operations to be applied to the specified resource and in the order specified in this list.
String restApiId
Specifies an update integration response request's API identifier.
String resourceId
Specifies an update integration response request's resource identifier.
String httpMethod
Specifies an update integration response request's HTTP method.
String statusCode
Specifies an update integration response request's status code.
List<E> patchOperations
A list of update operations to be applied to the specified resource and in the order specified in this list.
String statusCode
Specifies the status code that is used to map the integration response to an existing MethodResponse.
String selectionPattern
Specifies the regular expression (regex) pattern used to choose an integration response based on the response
from the back end. For example, if the success response returns nothing and the error response returns some
string, you could use the .+
regex to match error response. However, make sure that the error
response does not contain any newline (\n
) character in such cases. If the back end is an AWS Lambda
function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status
code is matched.
Map<K,V> responseParameters
A key-value map specifying response parameters that are passed to the method response from the back end. The key
is a method response header parameter name and the mapped value is an integration response header value, a static
value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The
mapping key must match the pattern of method.response.header.{name}
, where name
is a
valid and unique header name. The mapped non-static value must match the pattern of
integration.response.header.{name}
or integration.response.body.{JSON-expression}
,
where name
is a valid and unique response header name and JSON-expression
is a valid
JSON expression without the $
prefix.
Map<K,V> responseTemplates
Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
String type
Specifies the integration's type. The valid value is HTTP
for integrating with an HTTP back end,
AWS
for any AWS service endpoints, MOCK
for testing without actually invoking the back
end, HTTP_PROXY
for integrating with the HTTP proxy integration, or AWS_PROXY
for
integrating with the Lambda proxy integration type.
String httpMethod
Specifies the integration's HTTP method type.
String uri
Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully
formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form
arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}
.
Region
, subdomain
and service
are used to determine the right endpoint.
For AWS services that use the Action=
query string parameter, service_api
should be a
valid action for the desired service. For RESTful AWS service APIs, path
is used to indicate that
the remaining substring in the URI should be treated as the path to the resource, including the initial
/
.
String credentials
Specifies the credentials required for the integration, if any. For AWS integrations, three options are
available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To
require that the caller's identity be passed through from the request, specify the string
arn:aws:iam::\*:user/\*
. To use resource-based permissions on supported AWS services, specify null.
Map<K,V> requestParameters
A key-value map specifying request parameters that are passed from the method request to the back end. The key is
an integration request parameter name and the associated value is a method request parameter value or static
value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request
parameter value must match the pattern of method.request.{location}.{name}
, where
location
is querystring
, path
, or header
and
name
must be a valid and unique method request parameter name.
Map<K,V> requestTemplates
Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.
String passthroughBehavior
Specifies how the method request body of an unmapped content type will be passed through the integration request
to the back end without transformation. A content type is unmapped if no mapping template is defined in the
integration or the content type does not match any of the mapped content types, as specified in
requestTemplates
. There are three valid values: WHEN_NO_MATCH
,
WHEN_NO_TEMPLATES
, and NEVER
.
WHEN_NO_MATCH
passes the method request body through the integration request to the back end
without transformation when the method request content type does not match any content type associated with the
mapping templates defined in the integration request.WHEN_NO_TEMPLATES
passes the method request body through the integration request to the back end
without transformation when no mapping template is defined in the integration request. If a template is defined
when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP
415 Unsupported Media Type
response.NEVER
rejects the method request with an HTTP 415 Unsupported Media Type
response
when either the method request content type does not match any content type associated with the mapping templates
defined in the integration request or no mapping template is defined in the integration request.String cacheNamespace
Specifies the integration's cache namespace.
List<E> cacheKeyParameters
Specifies the integration's cache key parameters.
Map<K,V> integrationResponses
Specifies the integration's responses.
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
The successful response returns 200 OK
status and a payload as follows:
{ "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/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#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }
String restApiId
The RestApi identifier for the MethodResponse resource.
String resourceId
The Resource identifier for the MethodResponse resource.
String httpMethod
The HTTP verb of the Method resource.
String statusCode
The status code for the MethodResponse resource.
List<E> patchOperations
A list of update operations to be applied to the specified resource and in the order specified in this list.
String statusCode
The method response's status code.
Map<K,V> responseParameters
A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the
caller. A key defines a method response header and the value specifies whether the associated method response
header is required or not. The expression of the key must match the pattern
method.response.header.{name}
, where name
is a valid and unique header name. Amazon API
Gateway passes certain integration response data to the method response headers specified here according to the
mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped
include an integration response header expressed in integration.response.header.{name}
, a static
value enclosed within a pair of single quotes (e.g., 'application/json'
), or a JSON expression from
the back-end response payload in the form of integration.response.body.{JSON-expression}
, where
JSON-expression
is a valid JSON expression without the $
prefix.)
Map<K,V> responseModels
String httpMethod
The method's HTTP verb.
String authorizationType
The method's authorization type.
String authorizerId
The identifier of an Authorizer to use on this method. The authorizationType
must be
CUSTOM
.
Boolean apiKeyRequired
A boolean flag specifying whether a valid ApiKey is required to invoke this method.
Map<K,V> requestParameters
A key-value map defining required or optional method request parameters that can be accepted by Amazon API
Gateway. A key is a method request parameter name matching the pattern of
method.request.{location}.{name}
, where location
is querystring
,
path
, or header
and name
is a valid and unique parameter name. The value
associated with the key is a Boolean flag indicating whether the parameter is required (true
) or
optional (false
). The method request parameter names defined here are available in
Integration to be mapped to integration request parameters or templates.
Map<K,V> requestModels
A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).
Map<K,V> methodResponses
Gets a method response associated with a given HTTP status code.
The collection of method responses are encapsulated in a key-value map, where the key is a response's HTTP status code and the value is a MethodResponse resource that specifies the response returned to the caller from the back end through the integration response.
GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T215008Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
The successful response returns a 200 OK
status code and a payload similar to the following:
{ "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.operator": false, "method.response.header.operand_2": false, "method.response.header.operand_1": false }, "statusCode": "200" }
Integration methodIntegration
Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.
GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T213210Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
The successful response returns a 200 OK
status code and a payload similar to the following:
{ "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "0cjtch", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestTemplates": { "application/json": "{\n \"a\": \"$input.params('operand1')\",\n \"b\": \"$input.params('operand2')\", \n \"op\": \"$input.params('operator')\" \n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.operator": "integration.response.body.op", "method.response.header.operand_2": "integration.response.body.b", "method.response.header.operand_1": "integration.response.body.a" }, "responseTemplates": { "application/json": "#set($res = $input.path('$'))\n{\n \"result\": \"$res.a, $res.b, $res.op => $res.c\",\n \"a\" : \"$res.a\",\n \"b\" : \"$res.b\",\n \"op\" : \"$res.op\",\n \"c\" : \"$res.c\"\n}" }, "selectionPattern": "", "statusCode": "200" } } }
String id
The identifier for the model resource.
String name
The name of the model.
String description
The description of the model.
String schema
The schema for the model. For application/json
models, this should be JSON-schema draft v4 model. Do not include
"\*/" characters in the description of any properties because such "\*/" characters may be interpreted as
the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your
API's SDK generated by API Gateway to fail.
String contentType
The content-type for the model.
String id
The resource's identifier.
String parentId
The parent resource's identifier.
String pathPart
The last path segment for this resource.
String path
The full path for this resource.
Map<K,V> resourceMethods
Gets an API resource's method of a given HTTP verb.
The resource methods are a map of methods indexed by methods' HTTP verbs enabled on the resource. This method map
is included in the 200 OK
response of the
GET /restapis/{restapi_id}/resources/{resource_id}
or
GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods
request.
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160608T031827Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160608/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
{ "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", "name": "method", "templated": true }, { "href": "http://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/{status_code}", "templated": true } }, "apiKeyRequired": false, "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/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "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#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "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" } } }
If the OPTIONS
is enabled on the resource, you can follow the example here to get that method. Just
replace the GET
of the last path segment in the request URL with OPTIONS
.
String id
The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.
String name
The API's name.
String description
The API's description.
Date createdDate
The date when the API was created, in ISO 8601 format.
List<E> warnings
The warning messages reported when failonwarnings
is turned on during API import.
String deploymentId
The identifier of the Deployment that the stage points to.
String clientCertificateId
The identifier of a client certificate for an API stage.
String stageName
The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.
String description
The stage's description.
Boolean cacheClusterEnabled
Specifies whether a cache cluster is enabled for the stage.
String cacheClusterSize
The size of the cache cluster for the stage, if enabled.
String cacheClusterStatus
The status of the cache cluster for the stage, if enabled.
Map<K,V> methodSettings
A map that defines the method settings for a Stage resource. Keys (designated as
/{method_setting_key
below) are method paths defined as {resource_path}/{http_method}
for an individual method override, or /\*/\*
for overriding all methods in the stage.
Map<K,V> variables
A map that defines the stage variables for a Stage resource. Variable names can have alphanumeric and
underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+
.
Date createdDate
The date and time that the stage was created, in ISO 8601 format.
Date lastUpdatedDate
The date and time that information about the stage was last updated, in ISO 8601 format.
String id
The identifier of a UsagePlan resource.
String name
The name of a usage plan.
String description
The description of a usage plan.
List<E> apiStages
The associated API stages of a usage plan.
ThrottleSettings throttle
The request throttle limits of a usage plan.
QuotaSettings quota
The maximum number of permitted requests per a given unit time interval.
String usagePlanId
The Id of the usage plan associated with the usage data.
String keyId
The identifier of the API key associated with the usage plan in which a temporary extension is granted to the remaining quota.
List<E> patchOperations
A list of update operations to be applied to the specified resource and in the order specified in this list.
String usagePlanId
The plan Id associated with this usage data.
String startDate
The starting date of the usage data.
String endDate
The ending date of the usage data.
String position
Map<K,V> items
The usage data, as daily logs of used and remaining quotas, over the specified time interval indexed over the API
keys in a usage plan. For example,
{..., "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]}
, where {api_key}
stands for an API key value and the daily log entry is of the format [used quota, remaining quota]
.
String id
The identifier of a UsagePlan resource.
String name
The name of a usage plan.
String description
The description of a usage plan.
List<E> apiStages
The associated API stages of a usage plan.
ThrottleSettings throttle
The request throttle limits of a usage plan.
QuotaSettings quota
The maximum number of permitted requests per a given unit time interval.
Copyright © 2016. All rights reserved.