Amazon API Gateway

2015/10/29 - Amazon API Gateway - 1 updated api methods

PutIntegration (updated) Link ΒΆ
Changes (request)
{'integrationHttpMethod': 'string'}

Represents a put integration.

Request Syntax

client.put_integration(
    restApiId='string',
    resourceId='string',
    httpMethod='string',
    type='HTTP'|'AWS'|'MOCK',
    integrationHttpMethod='string',
    uri='string',
    credentials='string',
    requestParameters={
        'string': 'string'
    },
    requestTemplates={
        'string': 'string'
    },
    cacheNamespace='string',
    cacheKeyParameters=[
        'string',
    ]
)
type restApiId

string

param restApiId

[REQUIRED]

Specifies a put integration request's API identifier.

type resourceId

string

param resourceId

[REQUIRED]

Specifies a put integration request's resource ID.

type httpMethod

string

param httpMethod

[REQUIRED]

Specifies a put integration request's HTTP method.

type type

string

param type

[REQUIRED]

Specifies a put integration input's type.

type integrationHttpMethod

string

param integrationHttpMethod

Specifies a put integration HTTP method.

type uri

string

param uri

Specifies a put integration input's Uniform Resource Identifier (URI).

type credentials

string

param credentials

Specifies whether credentials are required for a put integration.

type requestParameters

dict

param requestParameters

Represents request parameters that are sent with the backend request. Request parameters are represented as a key/value map, with a destination as the key and a source as the value. A source must match an existing method request parameter, or a static value. Static values must be enclosed with single quotes, and be pre-encoded based on their destination in the request. The destination must match the pattern integration.request.{location}.{name} , where location is either querystring, path, or header. name must be a valid, unique parameter name.

  • (string) --

    • (string) --

type requestTemplates

dict

param requestTemplates

Specifies the templates used to transform the method request body. Request templates are represented as a key/value map, with a content-type as the key and a template as the value.

  • (string) --

    • (string) --

type cacheNamespace

string

param cacheNamespace

Specifies a put integration input's cache namespace.

type cacheKeyParameters

list

param cacheKeyParameters

Specifies a put integration input's cache key parameters.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'type': 'HTTP'|'AWS'|'MOCK',
    'httpMethod': 'string',
    'uri': 'string',
    'credentials': 'string',
    'requestParameters': {
        'string': 'string'
    },
    'requestTemplates': {
        'string': 'string'
    },
    'cacheNamespace': 'string',
    'cacheKeyParameters': [
        'string',
    ],
    'integrationResponses': {
        'string': {
            'statusCode': 'string',
            'selectionPattern': 'string',
            'responseParameters': {
                'string': 'string'
            },
            'responseTemplates': {
                'string': 'string'
            }
        }
    }
}

Response Structure

  • (dict) --

    Represents a HTTP, AWS, or Mock integration.

    • type (string) --

      Specifies the integration's type.

    • httpMethod (string) --

      Specifies the integration's HTTP method type.

    • uri (string) --

      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}:{service}:{path|action}/{service_api} . Region 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 / .

    • credentials (string) --

      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.

    • requestParameters (dict) --

      Represents requests parameters that are sent with the backend request. Request parameters are represented as a key/value map, with a destination as the key and a source as the value. A source must match an existing method request parameter, or a static value. Static values must be enclosed with single quotes, and be pre-encoded based on their destination in the request. The destination must match the pattern integration.request.{location}.{name} , where location is either querystring, path, or header. name must be a valid, unique parameter name.

      • (string) --

        • (string) --

    • requestTemplates (dict) --

      Specifies the integration's request templates.

      • (string) --

        • (string) --

    • cacheNamespace (string) --

      Specifies the integration's cache namespace.

    • cacheKeyParameters (list) --

      Specifies the integration's cache key parameters.

      • (string) --

    • integrationResponses (dict) --

      Specifies the integration's responses.

      • (string) --

        • (dict) --

          Represents an integration response. The status code must map to an existing MethodResponse, and parameters and templates can be used to transform the backend response.

          • statusCode (string) --

            Specifies the status code that is used to map the integration response to an existing MethodResponse.

          • selectionPattern (string) --

            Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend. If the backend is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS backends, the HTTP status code is matched.

          • responseParameters (dict) --

            Represents response parameters that can be read from the backend response. Response parameters are represented as a key/value map, with a destination as the key and a source as the value. A destination must match an existing response parameter in the Method. The source can be a header from the backend response, or a static value. Static values are specified using enclosing single quotes, and backend response headers can be read using the pattern integration.response.header.{name} .

            • (string) --

              • (string) --

          • responseTemplates (dict) --

            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) --

              • (string) --