Amazon API Gateway

2016/05/05 - Amazon API Gateway - 10 updated api methods

Changes  Update apigateway client to latest version

CreateResource (updated) Link ¶
Changes (response)
{'resourceMethods': {'methodIntegration': {'passthroughBehavior': 'string'}}}

Creates a Resource resource.

Request Syntax

client.create_resource(
    restApiId='string',
    parentId='string',
    pathPart='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The identifier of the RestApi for the resource.

type parentId:

string

param parentId:

[REQUIRED]

The parent resource's identifier.

type pathPart:

string

param pathPart:

[REQUIRED]

The last path segment for this resource.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'parentId': 'string',
    'pathPart': 'string',
    'path': 'string',
    'resourceMethods': {
        'string': {
            'httpMethod': 'string',
            'authorizationType': 'string',
            'authorizerId': 'string',
            'apiKeyRequired': True|False,
            'requestParameters': {
                'string': True|False
            },
            'requestModels': {
                'string': 'string'
            },
            'methodResponses': {
                'string': {
                    'statusCode': 'string',
                    'responseParameters': {
                        'string': True|False
                    },
                    'responseModels': {
                        'string': 'string'
                    }
                }
            },
            'methodIntegration': {
                'type': 'HTTP'|'AWS'|'MOCK',
                'httpMethod': 'string',
                'uri': 'string',
                'credentials': 'string',
                'requestParameters': {
                    'string': 'string'
                },
                'requestTemplates': {
                    'string': 'string'
                },
                'passthroughBehavior': 'string',
                'cacheNamespace': 'string',
                'cacheKeyParameters': [
                    'string',
                ],
                'integrationResponses': {
                    'string': {
                        'statusCode': 'string',
                        'selectionPattern': 'string',
                        'responseParameters': {
                            'string': 'string'
                        },
                        'responseTemplates': {
                            'string': 'string'
                        }
                    }
                }
            }
        }
    }
}

Response Structure

  • (dict) --

    Represents a resource.

    • id (string) --

      The resource's identifier.

    • parentId (string) --

      The parent resource's identifier.

    • pathPart (string) --

      The last path segment for this resource.

    • path (string) --

      The full path for this resource.

    • resourceMethods (dict) --

      Map of methods for this resource, which is included only if the request uses the embed query option.

      • (string) --

        • (dict) --

          Represents a method.

          • httpMethod (string) --

            The HTTP method.

          • authorizationType (string) --

            The method's authorization type.

          • authorizerId (string) --

            Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.

          • apiKeyRequired (boolean) --

            Specifies whether the method requires a valid ApiKey.

          • requestParameters (dict) --

            Represents request parameters that can be accepted by Amazon API Gateway. Request parameters are represented as a key/value map, with a source as the key and a Boolean flag as the value. The Boolean flag is used to specify whether the parameter is required. A source must match the pattern method.request.{location}.{name}, where location is either querystring, path, or header. name is a valid, unique parameter name. Sources specified here are available to the integration for mapping to integration request parameters or templates.

            • (string) --

              • (boolean) --

          • requestModels (dict) --

            Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.

            • (string) --

              • (string) --

          • methodResponses (dict) --

            Represents available responses that can be sent to the caller. Method responses are represented as a key/value map, with an HTTP status code as the key and a MethodResponse as the value. The status codes are available for the Integration responses to map to.

            • (string) --

              • (dict) --

                Represents a method response. Amazon API Gateway sends back the status code to the caller as the HTTP status code. Parameters and models can be used to transform the response from the method's integration.

                • statusCode (string) --

                  The method response's status code.

                • responseParameters (dict) --

                  Represents response parameters that can be sent back to the caller by Amazon API Gateway. Response parameters are represented as a key/value map, with a destination as the key and a boolean flag as the value, which is used to specify whether the parameter is required. A destination must match the pattern method.response.header.{name}, where name is a valid, unique header name. Destinations specified here are available to the integration for mapping from integration response parameters.

                  • (string) --

                    • (boolean) --

                • responseModels (dict) --

                  Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

                  • (string) --

                    • (string) --

          • methodIntegration (dict) --

            The method's integration.

            • type (string) --

              Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.

            • 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}:{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 /.

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

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

                • (string) --

            • passthroughBehavior (string) --

              Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. 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 backend without transformation.

              NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

              WHEN_NO_TEMPLATES will allow 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.

            • 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 MethodResponse. 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) --

GetIntegration (updated) Link ¶
Changes (response)
{'passthroughBehavior': 'string'}

Represents a get integration.

Request Syntax

client.get_integration(
    restApiId='string',
    resourceId='string',
    httpMethod='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

Specifies a get integration request's API identifier.

type resourceId:

string

param resourceId:

[REQUIRED]

Specifies a get integration request's resource identifier

type httpMethod:

string

param httpMethod:

[REQUIRED]

Specifies a get integration request's HTTP method.

rtype:

dict

returns:

Response Syntax

{
    'type': 'HTTP'|'AWS'|'MOCK',
    'httpMethod': 'string',
    'uri': 'string',
    'credentials': 'string',
    'requestParameters': {
        'string': 'string'
    },
    'requestTemplates': {
        'string': 'string'
    },
    'passthroughBehavior': '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. The valid value is HTTP, AWS, or MOCK.

    • 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}:{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 /.

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

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

        • (string) --

    • passthroughBehavior (string) --

      Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. 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 backend without transformation.

      NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

      WHEN_NO_TEMPLATES will allow 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.

    • 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 MethodResponse. 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) --

GetMethod (updated) Link ¶
Changes (response)
{'methodIntegration': {'passthroughBehavior': 'string'}}

Describe an existing Method resource.

Request Syntax

client.get_method(
    restApiId='string',
    resourceId='string',
    httpMethod='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The RestApi identifier for the Method resource.

type resourceId:

string

param resourceId:

[REQUIRED]

The Resource identifier for the Method resource.

type httpMethod:

string

param httpMethod:

[REQUIRED]

Specifies the put method request's HTTP method type.

rtype:

dict

returns:

Response Syntax

{
    'httpMethod': 'string',
    'authorizationType': 'string',
    'authorizerId': 'string',
    'apiKeyRequired': True|False,
    'requestParameters': {
        'string': True|False
    },
    'requestModels': {
        'string': 'string'
    },
    'methodResponses': {
        'string': {
            'statusCode': 'string',
            'responseParameters': {
                'string': True|False
            },
            'responseModels': {
                'string': 'string'
            }
        }
    },
    'methodIntegration': {
        'type': 'HTTP'|'AWS'|'MOCK',
        'httpMethod': 'string',
        'uri': 'string',
        'credentials': 'string',
        'requestParameters': {
            'string': 'string'
        },
        'requestTemplates': {
            'string': 'string'
        },
        'passthroughBehavior': 'string',
        'cacheNamespace': 'string',
        'cacheKeyParameters': [
            'string',
        ],
        'integrationResponses': {
            'string': {
                'statusCode': 'string',
                'selectionPattern': 'string',
                'responseParameters': {
                    'string': 'string'
                },
                'responseTemplates': {
                    'string': 'string'
                }
            }
        }
    }
}

Response Structure

  • (dict) --

    Represents a method.

    • httpMethod (string) --

      The HTTP method.

    • authorizationType (string) --

      The method's authorization type.

    • authorizerId (string) --

      Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.

    • apiKeyRequired (boolean) --

      Specifies whether the method requires a valid ApiKey.

    • requestParameters (dict) --

      Represents request parameters that can be accepted by Amazon API Gateway. Request parameters are represented as a key/value map, with a source as the key and a Boolean flag as the value. The Boolean flag is used to specify whether the parameter is required. A source must match the pattern method.request.{location}.{name}, where location is either querystring, path, or header. name is a valid, unique parameter name. Sources specified here are available to the integration for mapping to integration request parameters or templates.

      • (string) --

        • (boolean) --

    • requestModels (dict) --

      Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.

      • (string) --

        • (string) --

    • methodResponses (dict) --

      Represents available responses that can be sent to the caller. Method responses are represented as a key/value map, with an HTTP status code as the key and a MethodResponse as the value. The status codes are available for the Integration responses to map to.

      • (string) --

        • (dict) --

          Represents a method response. Amazon API Gateway sends back the status code to the caller as the HTTP status code. Parameters and models can be used to transform the response from the method's integration.

          • statusCode (string) --

            The method response's status code.

          • responseParameters (dict) --

            Represents response parameters that can be sent back to the caller by Amazon API Gateway. Response parameters are represented as a key/value map, with a destination as the key and a boolean flag as the value, which is used to specify whether the parameter is required. A destination must match the pattern method.response.header.{name}, where name is a valid, unique header name. Destinations specified here are available to the integration for mapping from integration response parameters.

            • (string) --

              • (boolean) --

          • responseModels (dict) --

            Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

            • (string) --

              • (string) --

    • methodIntegration (dict) --

      The method's integration.

      • type (string) --

        Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.

      • 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}:{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 /.

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

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

          • (string) --

      • passthroughBehavior (string) --

        Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. 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 backend without transformation.

        NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

        WHEN_NO_TEMPLATES will allow 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.

      • 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 MethodResponse. 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) --

GetResource (updated) Link ¶
Changes (response)
{'resourceMethods': {'methodIntegration': {'passthroughBehavior': 'string'}}}

Lists information about a resource.

Request Syntax

client.get_resource(
    restApiId='string',
    resourceId='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The RestApi identifier for the resource.

type resourceId:

string

param resourceId:

[REQUIRED]

The identifier for the Resource resource.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'parentId': 'string',
    'pathPart': 'string',
    'path': 'string',
    'resourceMethods': {
        'string': {
            'httpMethod': 'string',
            'authorizationType': 'string',
            'authorizerId': 'string',
            'apiKeyRequired': True|False,
            'requestParameters': {
                'string': True|False
            },
            'requestModels': {
                'string': 'string'
            },
            'methodResponses': {
                'string': {
                    'statusCode': 'string',
                    'responseParameters': {
                        'string': True|False
                    },
                    'responseModels': {
                        'string': 'string'
                    }
                }
            },
            'methodIntegration': {
                'type': 'HTTP'|'AWS'|'MOCK',
                'httpMethod': 'string',
                'uri': 'string',
                'credentials': 'string',
                'requestParameters': {
                    'string': 'string'
                },
                'requestTemplates': {
                    'string': 'string'
                },
                'passthroughBehavior': 'string',
                'cacheNamespace': 'string',
                'cacheKeyParameters': [
                    'string',
                ],
                'integrationResponses': {
                    'string': {
                        'statusCode': 'string',
                        'selectionPattern': 'string',
                        'responseParameters': {
                            'string': 'string'
                        },
                        'responseTemplates': {
                            'string': 'string'
                        }
                    }
                }
            }
        }
    }
}

Response Structure

  • (dict) --

    Represents a resource.

    • id (string) --

      The resource's identifier.

    • parentId (string) --

      The parent resource's identifier.

    • pathPart (string) --

      The last path segment for this resource.

    • path (string) --

      The full path for this resource.

    • resourceMethods (dict) --

      Map of methods for this resource, which is included only if the request uses the embed query option.

      • (string) --

        • (dict) --

          Represents a method.

          • httpMethod (string) --

            The HTTP method.

          • authorizationType (string) --

            The method's authorization type.

          • authorizerId (string) --

            Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.

          • apiKeyRequired (boolean) --

            Specifies whether the method requires a valid ApiKey.

          • requestParameters (dict) --

            Represents request parameters that can be accepted by Amazon API Gateway. Request parameters are represented as a key/value map, with a source as the key and a Boolean flag as the value. The Boolean flag is used to specify whether the parameter is required. A source must match the pattern method.request.{location}.{name}, where location is either querystring, path, or header. name is a valid, unique parameter name. Sources specified here are available to the integration for mapping to integration request parameters or templates.

            • (string) --

              • (boolean) --

          • requestModels (dict) --

            Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.

            • (string) --

              • (string) --

          • methodResponses (dict) --

            Represents available responses that can be sent to the caller. Method responses are represented as a key/value map, with an HTTP status code as the key and a MethodResponse as the value. The status codes are available for the Integration responses to map to.

            • (string) --

              • (dict) --

                Represents a method response. Amazon API Gateway sends back the status code to the caller as the HTTP status code. Parameters and models can be used to transform the response from the method's integration.

                • statusCode (string) --

                  The method response's status code.

                • responseParameters (dict) --

                  Represents response parameters that can be sent back to the caller by Amazon API Gateway. Response parameters are represented as a key/value map, with a destination as the key and a boolean flag as the value, which is used to specify whether the parameter is required. A destination must match the pattern method.response.header.{name}, where name is a valid, unique header name. Destinations specified here are available to the integration for mapping from integration response parameters.

                  • (string) --

                    • (boolean) --

                • responseModels (dict) --

                  Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

                  • (string) --

                    • (string) --

          • methodIntegration (dict) --

            The method's integration.

            • type (string) --

              Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.

            • 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}:{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 /.

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

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

                • (string) --

            • passthroughBehavior (string) --

              Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. 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 backend without transformation.

              NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

              WHEN_NO_TEMPLATES will allow 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.

            • 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 MethodResponse. 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) --

GetResources (updated) Link ¶
Changes (response)
{'items': {'resourceMethods': {'methodIntegration': {'passthroughBehavior': 'string'}}}}

Lists information about a collection of Resource resources.

Request Syntax

client.get_resources(
    restApiId='string',
    position='string',
    limit=123
)
type restApiId:

string

param restApiId:

[REQUIRED]

The RestApi identifier for the Resource.

type position:

string

param position:

The position of the next set of results in the current Resources resource to get information about.

type limit:

integer

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

rtype:

dict

returns:

Response Syntax

{
    'position': 'string',
    'items': [
        {
            'id': 'string',
            'parentId': 'string',
            'pathPart': 'string',
            'path': 'string',
            'resourceMethods': {
                'string': {
                    'httpMethod': 'string',
                    'authorizationType': 'string',
                    'authorizerId': 'string',
                    'apiKeyRequired': True|False,
                    'requestParameters': {
                        'string': True|False
                    },
                    'requestModels': {
                        'string': 'string'
                    },
                    'methodResponses': {
                        'string': {
                            'statusCode': 'string',
                            'responseParameters': {
                                'string': True|False
                            },
                            'responseModels': {
                                'string': 'string'
                            }
                        }
                    },
                    'methodIntegration': {
                        'type': 'HTTP'|'AWS'|'MOCK',
                        'httpMethod': 'string',
                        'uri': 'string',
                        'credentials': 'string',
                        'requestParameters': {
                            'string': 'string'
                        },
                        'requestTemplates': {
                            'string': 'string'
                        },
                        'passthroughBehavior': 'string',
                        'cacheNamespace': 'string',
                        'cacheKeyParameters': [
                            'string',
                        ],
                        'integrationResponses': {
                            'string': {
                                'statusCode': 'string',
                                'selectionPattern': 'string',
                                'responseParameters': {
                                    'string': 'string'
                                },
                                'responseTemplates': {
                                    'string': 'string'
                                }
                            }
                        }
                    }
                }
            }
        },
    ]
}

Response Structure

  • (dict) --

    Represents a collection of Resource resources.

    • position (string) --

    • items (list) --

      Gets the current Resource resource in the collection.

      • (dict) --

        Represents a resource.

        • id (string) --

          The resource's identifier.

        • parentId (string) --

          The parent resource's identifier.

        • pathPart (string) --

          The last path segment for this resource.

        • path (string) --

          The full path for this resource.

        • resourceMethods (dict) --

          Map of methods for this resource, which is included only if the request uses the embed query option.

          • (string) --

            • (dict) --

              Represents a method.

              • httpMethod (string) --

                The HTTP method.

              • authorizationType (string) --

                The method's authorization type.

              • authorizerId (string) --

                Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.

              • apiKeyRequired (boolean) --

                Specifies whether the method requires a valid ApiKey.

              • requestParameters (dict) --

                Represents request parameters that can be accepted by Amazon API Gateway. Request parameters are represented as a key/value map, with a source as the key and a Boolean flag as the value. The Boolean flag is used to specify whether the parameter is required. A source must match the pattern method.request.{location}.{name}, where location is either querystring, path, or header. name is a valid, unique parameter name. Sources specified here are available to the integration for mapping to integration request parameters or templates.

                • (string) --

                  • (boolean) --

              • requestModels (dict) --

                Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.

                • (string) --

                  • (string) --

              • methodResponses (dict) --

                Represents available responses that can be sent to the caller. Method responses are represented as a key/value map, with an HTTP status code as the key and a MethodResponse as the value. The status codes are available for the Integration responses to map to.

                • (string) --

                  • (dict) --

                    Represents a method response. Amazon API Gateway sends back the status code to the caller as the HTTP status code. Parameters and models can be used to transform the response from the method's integration.

                    • statusCode (string) --

                      The method response's status code.

                    • responseParameters (dict) --

                      Represents response parameters that can be sent back to the caller by Amazon API Gateway. Response parameters are represented as a key/value map, with a destination as the key and a boolean flag as the value, which is used to specify whether the parameter is required. A destination must match the pattern method.response.header.{name}, where name is a valid, unique header name. Destinations specified here are available to the integration for mapping from integration response parameters.

                      • (string) --

                        • (boolean) --

                    • responseModels (dict) --

                      Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

                      • (string) --

                        • (string) --

              • methodIntegration (dict) --

                The method's integration.

                • type (string) --

                  Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.

                • 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}:{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 /.

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

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

                    • (string) --

                • passthroughBehavior (string) --

                  Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. 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 backend without transformation.

                  NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

                  WHEN_NO_TEMPLATES will allow 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.

                • 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 MethodResponse. 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) --

PutIntegration (updated) Link ¶
Changes (both)
{'passthroughBehavior': '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'
    },
    passthroughBehavior='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. When the integration type is HTTP or AWS, this field is required.

type uri:

string

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

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:

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

    • (string) --

type passthroughBehavior:

string

param passthroughBehavior:

Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. 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 backend without transformation.

NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

WHEN_NO_TEMPLATES will allow 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.

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'
    },
    'passthroughBehavior': '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. The valid value is HTTP, AWS, or MOCK.

    • 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}:{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 /.

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

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

        • (string) --

    • passthroughBehavior (string) --

      Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. 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 backend without transformation.

      NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

      WHEN_NO_TEMPLATES will allow 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.

    • 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 MethodResponse. 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) --

PutMethod (updated) Link ¶
Changes (response)
{'methodIntegration': {'passthroughBehavior': 'string'}}

Add a method to an existing Resource resource.

Request Syntax

client.put_method(
    restApiId='string',
    resourceId='string',
    httpMethod='string',
    authorizationType='string',
    authorizerId='string',
    apiKeyRequired=True|False,
    requestParameters={
        'string': True|False
    },
    requestModels={
        'string': 'string'
    }
)
type restApiId:

string

param restApiId:

[REQUIRED]

The RestApi identifier for the new Method resource.

type resourceId:

string

param resourceId:

[REQUIRED]

The Resource identifier for the new Method resource.

type httpMethod:

string

param httpMethod:

[REQUIRED]

Specifies the put method request's HTTP method type.

type authorizationType:

string

param authorizationType:

[REQUIRED]

Specifies the type of authorization used for the method.

type authorizerId:

string

param authorizerId:

Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM.

type apiKeyRequired:

boolean

param apiKeyRequired:

Specifies whether the method required a valid ApiKey.

type requestParameters:

dict

param requestParameters:

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

    • (boolean) --

type requestModels:

dict

param requestModels:

Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'httpMethod': 'string',
    'authorizationType': 'string',
    'authorizerId': 'string',
    'apiKeyRequired': True|False,
    'requestParameters': {
        'string': True|False
    },
    'requestModels': {
        'string': 'string'
    },
    'methodResponses': {
        'string': {
            'statusCode': 'string',
            'responseParameters': {
                'string': True|False
            },
            'responseModels': {
                'string': 'string'
            }
        }
    },
    'methodIntegration': {
        'type': 'HTTP'|'AWS'|'MOCK',
        'httpMethod': 'string',
        'uri': 'string',
        'credentials': 'string',
        'requestParameters': {
            'string': 'string'
        },
        'requestTemplates': {
            'string': 'string'
        },
        'passthroughBehavior': 'string',
        'cacheNamespace': 'string',
        'cacheKeyParameters': [
            'string',
        ],
        'integrationResponses': {
            'string': {
                'statusCode': 'string',
                'selectionPattern': 'string',
                'responseParameters': {
                    'string': 'string'
                },
                'responseTemplates': {
                    'string': 'string'
                }
            }
        }
    }
}

Response Structure

  • (dict) --

    Represents a method.

    • httpMethod (string) --

      The HTTP method.

    • authorizationType (string) --

      The method's authorization type.

    • authorizerId (string) --

      Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.

    • apiKeyRequired (boolean) --

      Specifies whether the method requires a valid ApiKey.

    • requestParameters (dict) --

      Represents request parameters that can be accepted by Amazon API Gateway. Request parameters are represented as a key/value map, with a source as the key and a Boolean flag as the value. The Boolean flag is used to specify whether the parameter is required. A source must match the pattern method.request.{location}.{name}, where location is either querystring, path, or header. name is a valid, unique parameter name. Sources specified here are available to the integration for mapping to integration request parameters or templates.

      • (string) --

        • (boolean) --

    • requestModels (dict) --

      Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.

      • (string) --

        • (string) --

    • methodResponses (dict) --

      Represents available responses that can be sent to the caller. Method responses are represented as a key/value map, with an HTTP status code as the key and a MethodResponse as the value. The status codes are available for the Integration responses to map to.

      • (string) --

        • (dict) --

          Represents a method response. Amazon API Gateway sends back the status code to the caller as the HTTP status code. Parameters and models can be used to transform the response from the method's integration.

          • statusCode (string) --

            The method response's status code.

          • responseParameters (dict) --

            Represents response parameters that can be sent back to the caller by Amazon API Gateway. Response parameters are represented as a key/value map, with a destination as the key and a boolean flag as the value, which is used to specify whether the parameter is required. A destination must match the pattern method.response.header.{name}, where name is a valid, unique header name. Destinations specified here are available to the integration for mapping from integration response parameters.

            • (string) --

              • (boolean) --

          • responseModels (dict) --

            Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

            • (string) --

              • (string) --

    • methodIntegration (dict) --

      The method's integration.

      • type (string) --

        Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.

      • 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}:{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 /.

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

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

          • (string) --

      • passthroughBehavior (string) --

        Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. 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 backend without transformation.

        NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

        WHEN_NO_TEMPLATES will allow 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.

      • 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 MethodResponse. 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) --

UpdateIntegration (updated) Link ¶
Changes (response)
{'passthroughBehavior': 'string'}

Represents an update integration.

Request Syntax

client.update_integration(
    restApiId='string',
    resourceId='string',
    httpMethod='string',
    patchOperations=[
        {
            'op': 'add'|'remove'|'replace'|'move'|'copy'|'test',
            'path': 'string',
            'value': 'string',
            'from': 'string'
        },
    ]
)
type restApiId:

string

param restApiId:

[REQUIRED]

Represents an update integration request's API identifier.

type resourceId:

string

param resourceId:

[REQUIRED]

Represents an update integration request's resource identifier.

type httpMethod:

string

param httpMethod:

[REQUIRED]

Represents an update integration request's HTTP method.

type patchOperations:

list

param patchOperations:

A list of operations describing the updates to apply to the specified resource. The patches are applied in the order specified in the list.

  • (dict) -- A single patch operation to apply to the specified resource. Please refer to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how each operation is used.

    • op (string) --

      A patch operation whose value indicates the operation to perform. Its value MUST be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors.

    • path (string) --

      Operation objects MUST have exactly one "path" member. That member's value is a string containing a JSON-Pointer value that references a location within the target document (the "target location") where the operation is performed.

    • value (string) --

      The actual value content.

    • from (string) --

      The "move" and "copy" operation object MUST contain a "from" member, which is a string containing a JSON Pointer value that references the location in the target document to move the value from.

rtype:

dict

returns:

Response Syntax

{
    'type': 'HTTP'|'AWS'|'MOCK',
    'httpMethod': 'string',
    'uri': 'string',
    'credentials': 'string',
    'requestParameters': {
        'string': 'string'
    },
    'requestTemplates': {
        'string': 'string'
    },
    'passthroughBehavior': '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. The valid value is HTTP, AWS, or MOCK.

    • 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}:{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 /.

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

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

        • (string) --

    • passthroughBehavior (string) --

      Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. 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 backend without transformation.

      NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

      WHEN_NO_TEMPLATES will allow 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.

    • 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 MethodResponse. 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) --

UpdateMethod (updated) Link ¶
Changes (response)
{'methodIntegration': {'passthroughBehavior': 'string'}}

Updates an existing Method resource.

Request Syntax

client.update_method(
    restApiId='string',
    resourceId='string',
    httpMethod='string',
    patchOperations=[
        {
            'op': 'add'|'remove'|'replace'|'move'|'copy'|'test',
            'path': 'string',
            'value': 'string',
            'from': 'string'
        },
    ]
)
type restApiId:

string

param restApiId:

[REQUIRED]

The RestApi identifier for the Method resource.

type resourceId:

string

param resourceId:

[REQUIRED]

The Resource identifier for the Method resource.

type httpMethod:

string

param httpMethod:

[REQUIRED]

The HTTP verb that identifies the Method resource.

type patchOperations:

list

param patchOperations:

A list of operations describing the updates to apply to the specified resource. The patches are applied in the order specified in the list.

  • (dict) -- A single patch operation to apply to the specified resource. Please refer to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how each operation is used.

    • op (string) --

      A patch operation whose value indicates the operation to perform. Its value MUST be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors.

    • path (string) --

      Operation objects MUST have exactly one "path" member. That member's value is a string containing a JSON-Pointer value that references a location within the target document (the "target location") where the operation is performed.

    • value (string) --

      The actual value content.

    • from (string) --

      The "move" and "copy" operation object MUST contain a "from" member, which is a string containing a JSON Pointer value that references the location in the target document to move the value from.

rtype:

dict

returns:

Response Syntax

{
    'httpMethod': 'string',
    'authorizationType': 'string',
    'authorizerId': 'string',
    'apiKeyRequired': True|False,
    'requestParameters': {
        'string': True|False
    },
    'requestModels': {
        'string': 'string'
    },
    'methodResponses': {
        'string': {
            'statusCode': 'string',
            'responseParameters': {
                'string': True|False
            },
            'responseModels': {
                'string': 'string'
            }
        }
    },
    'methodIntegration': {
        'type': 'HTTP'|'AWS'|'MOCK',
        'httpMethod': 'string',
        'uri': 'string',
        'credentials': 'string',
        'requestParameters': {
            'string': 'string'
        },
        'requestTemplates': {
            'string': 'string'
        },
        'passthroughBehavior': 'string',
        'cacheNamespace': 'string',
        'cacheKeyParameters': [
            'string',
        ],
        'integrationResponses': {
            'string': {
                'statusCode': 'string',
                'selectionPattern': 'string',
                'responseParameters': {
                    'string': 'string'
                },
                'responseTemplates': {
                    'string': 'string'
                }
            }
        }
    }
}

Response Structure

  • (dict) --

    Represents a method.

    • httpMethod (string) --

      The HTTP method.

    • authorizationType (string) --

      The method's authorization type.

    • authorizerId (string) --

      Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.

    • apiKeyRequired (boolean) --

      Specifies whether the method requires a valid ApiKey.

    • requestParameters (dict) --

      Represents request parameters that can be accepted by Amazon API Gateway. Request parameters are represented as a key/value map, with a source as the key and a Boolean flag as the value. The Boolean flag is used to specify whether the parameter is required. A source must match the pattern method.request.{location}.{name}, where location is either querystring, path, or header. name is a valid, unique parameter name. Sources specified here are available to the integration for mapping to integration request parameters or templates.

      • (string) --

        • (boolean) --

    • requestModels (dict) --

      Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.

      • (string) --

        • (string) --

    • methodResponses (dict) --

      Represents available responses that can be sent to the caller. Method responses are represented as a key/value map, with an HTTP status code as the key and a MethodResponse as the value. The status codes are available for the Integration responses to map to.

      • (string) --

        • (dict) --

          Represents a method response. Amazon API Gateway sends back the status code to the caller as the HTTP status code. Parameters and models can be used to transform the response from the method's integration.

          • statusCode (string) --

            The method response's status code.

          • responseParameters (dict) --

            Represents response parameters that can be sent back to the caller by Amazon API Gateway. Response parameters are represented as a key/value map, with a destination as the key and a boolean flag as the value, which is used to specify whether the parameter is required. A destination must match the pattern method.response.header.{name}, where name is a valid, unique header name. Destinations specified here are available to the integration for mapping from integration response parameters.

            • (string) --

              • (boolean) --

          • responseModels (dict) --

            Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

            • (string) --

              • (string) --

    • methodIntegration (dict) --

      The method's integration.

      • type (string) --

        Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.

      • 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}:{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 /.

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

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

          • (string) --

      • passthroughBehavior (string) --

        Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. 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 backend without transformation.

        NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

        WHEN_NO_TEMPLATES will allow 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.

      • 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 MethodResponse. 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) --

UpdateResource (updated) Link ¶
Changes (response)
{'resourceMethods': {'methodIntegration': {'passthroughBehavior': 'string'}}}

Changes information about a Resource resource.

Request Syntax

client.update_resource(
    restApiId='string',
    resourceId='string',
    patchOperations=[
        {
            'op': 'add'|'remove'|'replace'|'move'|'copy'|'test',
            'path': 'string',
            'value': 'string',
            'from': 'string'
        },
    ]
)
type restApiId:

string

param restApiId:

[REQUIRED]

The RestApi identifier for the Resource resource.

type resourceId:

string

param resourceId:

[REQUIRED]

The identifier of the Resource resource.

type patchOperations:

list

param patchOperations:

A list of operations describing the updates to apply to the specified resource. The patches are applied in the order specified in the list.

  • (dict) -- A single patch operation to apply to the specified resource. Please refer to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how each operation is used.

    • op (string) --

      A patch operation whose value indicates the operation to perform. Its value MUST be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors.

    • path (string) --

      Operation objects MUST have exactly one "path" member. That member's value is a string containing a JSON-Pointer value that references a location within the target document (the "target location") where the operation is performed.

    • value (string) --

      The actual value content.

    • from (string) --

      The "move" and "copy" operation object MUST contain a "from" member, which is a string containing a JSON Pointer value that references the location in the target document to move the value from.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'parentId': 'string',
    'pathPart': 'string',
    'path': 'string',
    'resourceMethods': {
        'string': {
            'httpMethod': 'string',
            'authorizationType': 'string',
            'authorizerId': 'string',
            'apiKeyRequired': True|False,
            'requestParameters': {
                'string': True|False
            },
            'requestModels': {
                'string': 'string'
            },
            'methodResponses': {
                'string': {
                    'statusCode': 'string',
                    'responseParameters': {
                        'string': True|False
                    },
                    'responseModels': {
                        'string': 'string'
                    }
                }
            },
            'methodIntegration': {
                'type': 'HTTP'|'AWS'|'MOCK',
                'httpMethod': 'string',
                'uri': 'string',
                'credentials': 'string',
                'requestParameters': {
                    'string': 'string'
                },
                'requestTemplates': {
                    'string': 'string'
                },
                'passthroughBehavior': 'string',
                'cacheNamespace': 'string',
                'cacheKeyParameters': [
                    'string',
                ],
                'integrationResponses': {
                    'string': {
                        'statusCode': 'string',
                        'selectionPattern': 'string',
                        'responseParameters': {
                            'string': 'string'
                        },
                        'responseTemplates': {
                            'string': 'string'
                        }
                    }
                }
            }
        }
    }
}

Response Structure

  • (dict) --

    Represents a resource.

    • id (string) --

      The resource's identifier.

    • parentId (string) --

      The parent resource's identifier.

    • pathPart (string) --

      The last path segment for this resource.

    • path (string) --

      The full path for this resource.

    • resourceMethods (dict) --

      Map of methods for this resource, which is included only if the request uses the embed query option.

      • (string) --

        • (dict) --

          Represents a method.

          • httpMethod (string) --

            The HTTP method.

          • authorizationType (string) --

            The method's authorization type.

          • authorizerId (string) --

            Specifies the identifier of an Authorizer to use on this Method. The authorizationType must be CUSTOM.

          • apiKeyRequired (boolean) --

            Specifies whether the method requires a valid ApiKey.

          • requestParameters (dict) --

            Represents request parameters that can be accepted by Amazon API Gateway. Request parameters are represented as a key/value map, with a source as the key and a Boolean flag as the value. The Boolean flag is used to specify whether the parameter is required. A source must match the pattern method.request.{location}.{name}, where location is either querystring, path, or header. name is a valid, unique parameter name. Sources specified here are available to the integration for mapping to integration request parameters or templates.

            • (string) --

              • (boolean) --

          • requestModels (dict) --

            Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.

            • (string) --

              • (string) --

          • methodResponses (dict) --

            Represents available responses that can be sent to the caller. Method responses are represented as a key/value map, with an HTTP status code as the key and a MethodResponse as the value. The status codes are available for the Integration responses to map to.

            • (string) --

              • (dict) --

                Represents a method response. Amazon API Gateway sends back the status code to the caller as the HTTP status code. Parameters and models can be used to transform the response from the method's integration.

                • statusCode (string) --

                  The method response's status code.

                • responseParameters (dict) --

                  Represents response parameters that can be sent back to the caller by Amazon API Gateway. Response parameters are represented as a key/value map, with a destination as the key and a boolean flag as the value, which is used to specify whether the parameter is required. A destination must match the pattern method.response.header.{name}, where name is a valid, unique header name. Destinations specified here are available to the integration for mapping from integration response parameters.

                  • (string) --

                    • (boolean) --

                • responseModels (dict) --

                  Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

                  • (string) --

                    • (string) --

          • methodIntegration (dict) --

            The method's integration.

            • type (string) --

              Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.

            • 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}:{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 /.

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

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

                • (string) --

            • passthroughBehavior (string) --

              Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. 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 backend without transformation.

              NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.

              WHEN_NO_TEMPLATES will allow 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.

            • 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 MethodResponse. 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) --