Amazon API Gateway

2015/10/26 - Amazon API Gateway - 67 new api methods

CreateDomainName (new) Link ¶

Creates a new domain name.

Request Syntax

client.create_domain_name(
    domainName='string',
    certificateName='string',
    certificateBody='string',
    certificatePrivateKey='string',
    certificateChain='string'
)
type domainName:

string

param domainName:

[REQUIRED]

The name of the DomainName resource.

type certificateName:

string

param certificateName:

[REQUIRED]

The name of the certificate.

type certificateBody:

string

param certificateBody:

[REQUIRED]

The body of the server certificate provided by your certificate authority.

type certificatePrivateKey:

string

param certificatePrivateKey:

[REQUIRED]

Your certificate's private key.

type certificateChain:

string

param certificateChain:

[REQUIRED]

The intermediate certificates and optionally the root certificate, one after the other without any blank lines. If you include the root certificate, your certificate chain must start with intermediate certificates and end with the root certificate. Use the intermediate certificates that were provided by your certificate authority. Do not include any intermediaries that are not in the chain of trust path.

rtype:

dict

returns:

Response Syntax

{
    'domainName': 'string',
    'certificateName': 'string',
    'certificateUploadDate': datetime(2015, 1, 1),
    'distributionDomainName': 'string'
}

Response Structure

  • (dict) --

    Represents a domain name that is contained in a simpler, more intuitive URL that can be called.

    • domainName (string) --

      The name of the DomainName resource.

    • certificateName (string) --

      The name of the certificate.

    • certificateUploadDate (datetime) --

      The date when the certificate was uploaded, in ISO 8601 format.

    • distributionDomainName (string) --

      The domain name of the Amazon CloudFront distribution. For more information, see the Amazon CloudFront documentation.

GetMethod (new) Link ¶

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',
    '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'
        },
        '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.

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

      • httpMethod (string) --

        Specifies the integration's HTTP method type.

      • uri (string) --

        Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}. Region and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

      • credentials (string) --

        Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify null.

      • requestParameters (dict) --

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

        • (string) --

          • (string) --

      • requestTemplates (dict) --

        Specifies the integration's request templates.

        • (string) --

          • (string) --

      • cacheNamespace (string) --

        Specifies the integration's cache namespace.

      • cacheKeyParameters (list) --

        Specifies the integration's cache key parameters.

        • (string) --

      • integrationResponses (dict) --

        Specifies the integration's responses.

        • (string) --

          • (dict) --

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

            • statusCode (string) --

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

            • selectionPattern (string) --

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

            • responseParameters (dict) --

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

              • (string) --

                • (string) --

            • responseTemplates (dict) --

              Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

              • (string) --

                • (string) --

GetBasePathMappings (new) Link ¶

Represents a collection of BasePathMapping resources.

Request Syntax

client.get_base_path_mappings(
    domainName='string',
    position='string',
    limit=123
)
type domainName:

string

param domainName:

[REQUIRED]

The domain name of a BasePathMapping resource.

type position:

string

param position:

The position of the current BasePathMapping resource in the collection to get information about.

type limit:

integer

param limit:

The maximum number of BasePathMapping resources in the collection to get information about. The default limit is 25. It should be an integer between 1 - 500.

rtype:

dict

returns:

Response Syntax

{
    'position': 'string',
    'items': [
        {
            'basePath': 'string',
            'restApiId': 'string',
            'stage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Represents a collection of BasePathMapping resources.

    • position (string) --

    • items (list) --

      The current page of any BasePathMapping resources in the collection of base path mapping resources.

      • (dict) --

        Represents the base path that callers of the API that must provide as part of the URL after the domain name.

        • basePath (string) --

          The base path name that callers of the API must provide as part of the URL after the domain name.

        • restApiId (string) --

          The name of the API.

        • stage (string) --

          The name of the API's stage.

GetStages (new) Link ¶

Gets information about one or more Stage resources.

Request Syntax

client.get_stages(
    restApiId='string',
    deploymentId='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The stages' API identifiers.

type deploymentId:

string

param deploymentId:

The stages' deployment identifiers.

rtype:

dict

returns:

Response Syntax

{
    'item': [
        {
            'deploymentId': 'string',
            'clientCertificateId': 'string',
            'stageName': 'string',
            'description': 'string',
            'cacheClusterEnabled': True|False,
            'cacheClusterSize': '0.5'|'1.6'|'6.1'|'13.5'|'28.4'|'58.2'|'118'|'237',
            'cacheClusterStatus': 'CREATE_IN_PROGRESS'|'AVAILABLE'|'DELETE_IN_PROGRESS'|'NOT_AVAILABLE'|'FLUSH_IN_PROGRESS',
            'methodSettings': {
                'string': {
                    'metricsEnabled': True|False,
                    'loggingLevel': 'string',
                    'dataTraceEnabled': True|False,
                    'throttlingBurstLimit': 123,
                    'throttlingRateLimit': 123.0,
                    'cachingEnabled': True|False,
                    'cacheTtlInSeconds': 123,
                    'cacheDataEncrypted': True|False
                }
            },
            'createdDate': datetime(2015, 1, 1),
            'lastUpdatedDate': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    A list of Stage resource that are associated with the ApiKey resource.

    • item (list) --

      An individual Stage resource.

      • (dict) --

        Represents a unique identifier for a version of a deployed RestApi that is callable by users.

        • deploymentId (string) --

          The identifier of the Deployment that the stage points to.

        • clientCertificateId (string) --

        • stageName (string) --

          The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.

        • description (string) --

          The stage's description.

        • cacheClusterEnabled (boolean) --

          Specifies whether a cache cluster is enabled for the stage.

        • cacheClusterSize (string) --

          The size of the cache cluster for the stage, if enabled.

        • cacheClusterStatus (string) --

          The status of the cache cluster for the stage, if enabled.

        • methodSettings (dict) --

          A map that defines the method settings for a Stage resource. Keys are defined as {resource_path}/{http_method} for an individual method override, or \*/\* for the settings applied to all methods in the stage.

          • (string) --

            • (dict) --

              Specifies the method setting properties.

              • metricsEnabled (boolean) --

                Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is /{method_setting_key}/metrics/enabled, and the value is a Boolean.

              • loggingLevel (string) --

                Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, and the available levels are OFF, ERROR, and INFO.

              • dataTraceEnabled (boolean) --

                Specifies the whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

              • throttlingBurstLimit (integer) --

                Specifies the throttling burst limit. The PATCH path for this setting is /{method_setting_key}/throttling/burstLimit, and the value is an integer.

              • throttlingRateLimit (float) --

                Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit, and the value is a double.

              • cachingEnabled (boolean) --

                Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached. The PATCH path for this setting is /{method_setting_key}/caching/enabled, and the value is a Boolean.

              • cacheTtlInSeconds (integer) --

                Specifies the time to live (TTL) in seconds, for cached responses. The higher a the TTL, the longer the response will be cached. The PATCH path for this setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an integer.

              • cacheDataEncrypted (boolean) --

                Specifies whether the cached responses are encrypted. The PATCH path for this setting is /{method_setting_key}/caching/dataEncrypted, and the value is a Boolean.

        • createdDate (datetime) --

          The date and time that the stage was created, in ISO 8601 format.

        • lastUpdatedDate (datetime) --

          The date and time that information about the stage was last updated, in ISO 8601 format.

DeleteBasePathMapping (new) Link ¶

Deletes the BasePathMapping resource.

Request Syntax

client.delete_base_path_mapping(
    domainName='string',
    basePath='string'
)
type domainName:

string

param domainName:

[REQUIRED]

The domain name of the BasePathMapping resource to delete.

type basePath:

string

param basePath:

[REQUIRED]

The base path name of the BasePathMapping resource to delete.

returns:

None

GetApiKey (new) Link ¶

Gets information about the current ApiKey resource.

Request Syntax

client.get_api_key(
    apiKey='string'
)
type apiKey:

string

param apiKey:

[REQUIRED]

The identifier of the ApiKey resource.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'enabled': True|False,
    'stageKeys': [
        'string',
    ],
    'createdDate': datetime(2015, 1, 1),
    'lastUpdatedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    A resource that can be distributed to callers for executing Method resources that require an API key. API keys can be mapped to any Stage on any RestApi, which indicates that the callers with the API key can make requests to that stage.

    • id (string) --

      The identifier of the API Key.

    • name (string) --

      The name of the API Key.

    • description (string) --

      The description of the API Key.

    • enabled (boolean) --

      Specifies whether the API Key can be used by callers.

    • stageKeys (list) --

      A list of Stage resources that are associated with the ApiKey resource.

      • (string) --

    • createdDate (datetime) --

      The date when the API Key was created, in ISO 8601 format.

    • lastUpdatedDate (datetime) --

      When the API Key was last updated, in ISO 8601 format.

GetClientCertificates (new) Link ¶

Request Syntax

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

string

param position:

type limit:

integer

param limit:

rtype:

dict

returns:

Response Syntax

{
    'position': 'string',
    'items': [
        {
            'clientCertificateId': 'string',
            'description': 'string',
            'pemEncodedCertificate': 'string',
            'createdDate': datetime(2015, 1, 1),
            'expirationDate': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • position (string) --

    • items (list) --

      • (dict) --

        • clientCertificateId (string) --

        • description (string) --

        • pemEncodedCertificate (string) --

        • createdDate (datetime) --

        • expirationDate (datetime) --

CreateBasePathMapping (new) Link ¶

Creates a new BasePathMapping resource.

Request Syntax

client.create_base_path_mapping(
    domainName='string',
    basePath='string',
    restApiId='string',
    stage='string'
)
type domainName:

string

param domainName:

[REQUIRED]

The domain name of the BasePathMapping resource to create.

type basePath:

string

param basePath:

The base path name that callers of the API must provide as part of the URL after the domain name. This value must be unique for all of the mappings across a single API. Leave this blank if you do not want callers to specify a base path name after the domain name.

type restApiId:

string

param restApiId:

[REQUIRED]

The name of the API that you want to apply this mapping to.

type stage:

string

param stage:

The name of the API's stage that you want to use for this mapping. Leave this blank if you do not want callers to explicitly specify the stage name after any base path name.

rtype:

dict

returns:

Response Syntax

{
    'basePath': 'string',
    'restApiId': 'string',
    'stage': 'string'
}

Response Structure

  • (dict) --

    Represents the base path that callers of the API that must provide as part of the URL after the domain name.

    • basePath (string) --

      The base path name that callers of the API must provide as part of the URL after the domain name.

    • restApiId (string) --

      The name of the API.

    • stage (string) --

      The name of the API's stage.

DeleteIntegrationResponse (new) Link ¶

Represents a delete integration response.

Request Syntax

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

string

param restApiId:

[REQUIRED]

Specifies a delete integration response request's API identifier.

type resourceId:

string

param resourceId:

[REQUIRED]

Specifies a delete integration response request's resource identifier.

type httpMethod:

string

param httpMethod:

[REQUIRED]

Specifies a delete integration response request's HTTP method.

type statusCode:

string

param statusCode:

[REQUIRED]

Specifies a delete integration response request's status code.

returns:

None

GetDeployment (new) Link ¶

Gets information about a Deployment resource.

Request Syntax

client.get_deployment(
    restApiId='string',
    deploymentId='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The identifier of the RestApi resource for the Deployment resource to get information about.

type deploymentId:

string

param deploymentId:

[REQUIRED]

The identifier of the Deployment resource to get information about.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1),
    'apiSummary': {
        'string': {
            'string': {
                'authorizationType': 'string',
                'apiKeyRequired': True|False
            }
        }
    }
}

Response Structure

  • (dict) --

    An immutable representation of a RestApi resource that can be called by users using Stages. A deployment must be associated with a Stage for it to be callable over the Internet.

    • id (string) --

      The identifier for the deployment resource.

    • description (string) --

      The description for the deployment resource.

    • createdDate (datetime) --

      The date and time that the deployment resource was created.

    • apiSummary (dict) --

      Gets a summary of the RestApi at the date and time that the deployment resource was created.

      • (string) --

        • (dict) --

          • (string) --

            • (dict) --

              Represents a summary of a Method resource, given a particular date and time.

              • authorizationType (string) --

                Specifies the type of authorization used for the method.

              • apiKeyRequired (boolean) --

                Specifies whether the method requires a valid ApiKey.

GetModelTemplate (new) Link ¶

Generates a sample mapping template that can be used to transform a payload into the structure of a model.

Request Syntax

client.get_model_template(
    restApiId='string',
    modelName='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The ID of the RestApi under which the model exists.

type modelName:

string

param modelName:

[REQUIRED]

The name of the model for which to generate a template.

rtype:

dict

returns:

Response Syntax

{
    'value': 'string'
}

Response Structure

  • (dict) --

    Represents a mapping template used to transform a payload.

UpdateApiKey (new) Link ¶

Changes information about an ApiKey resource.

Request Syntax

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

string

param apiKey:

[REQUIRED]

The identifier of the ApiKey resource to be updated.

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',
    'name': 'string',
    'description': 'string',
    'enabled': True|False,
    'stageKeys': [
        'string',
    ],
    'createdDate': datetime(2015, 1, 1),
    'lastUpdatedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    A resource that can be distributed to callers for executing Method resources that require an API key. API keys can be mapped to any Stage on any RestApi, which indicates that the callers with the API key can make requests to that stage.

    • id (string) --

      The identifier of the API Key.

    • name (string) --

      The name of the API Key.

    • description (string) --

      The description of the API Key.

    • enabled (boolean) --

      Specifies whether the API Key can be used by callers.

    • stageKeys (list) --

      A list of Stage resources that are associated with the ApiKey resource.

      • (string) --

    • createdDate (datetime) --

      The date when the API Key was created, in ISO 8601 format.

    • lastUpdatedDate (datetime) --

      When the API Key was last updated, in ISO 8601 format.

UpdateIntegration (new) Link ¶

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'
    },
    'cacheNamespace': 'string',
    'cacheKeyParameters': [
        'string',
    ],
    'integrationResponses': {
        'string': {
            'statusCode': 'string',
            'selectionPattern': 'string',
            'responseParameters': {
                'string': 'string'
            },
            'responseTemplates': {
                'string': 'string'
            }
        }
    }
}

Response Structure

  • (dict) --

    Represents a HTTP, AWS, or Mock integration.

    • type (string) --

      Specifies the integration's type.

    • httpMethod (string) --

      Specifies the integration's HTTP method type.

    • uri (string) --

      Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}. Region and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

    • credentials (string) --

      Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify null.

    • requestParameters (dict) --

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

      • (string) --

        • (string) --

    • requestTemplates (dict) --

      Specifies the integration's request templates.

      • (string) --

        • (string) --

    • cacheNamespace (string) --

      Specifies the integration's cache namespace.

    • cacheKeyParameters (list) --

      Specifies the integration's cache key parameters.

      • (string) --

    • integrationResponses (dict) --

      Specifies the integration's responses.

      • (string) --

        • (dict) --

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

          • statusCode (string) --

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

          • selectionPattern (string) --

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

          • responseParameters (dict) --

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

            • (string) --

              • (string) --

          • responseTemplates (dict) --

            Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

            • (string) --

              • (string) --

GetBasePathMapping (new) Link ¶

Describe a BasePathMapping resource.

Request Syntax

client.get_base_path_mapping(
    domainName='string',
    basePath='string'
)
type domainName:

string

param domainName:

[REQUIRED]

The domain name of the BasePathMapping resource to be described.

type basePath:

string

param basePath:

[REQUIRED]

The base path name that callers of the API must provide as part of the URL after the domain name. This value must be unique for all of the mappings across a single API. Leave this blank if you do not want callers to specify any base path name after the domain name.

rtype:

dict

returns:

Response Syntax

{
    'basePath': 'string',
    'restApiId': 'string',
    'stage': 'string'
}

Response Structure

  • (dict) --

    Represents the base path that callers of the API that must provide as part of the URL after the domain name.

    • basePath (string) --

      The base path name that callers of the API must provide as part of the URL after the domain name.

    • restApiId (string) --

      The name of the API.

    • stage (string) --

      The name of the API's stage.

CreateDeployment (new) Link ¶

Creates a Deployment resource, which makes a specified RestApi callable over the internet.

Request Syntax

client.create_deployment(
    restApiId='string',
    stageName='string',
    stageDescription='string',
    description='string',
    cacheClusterEnabled=True|False,
    cacheClusterSize='0.5'|'1.6'|'6.1'|'13.5'|'28.4'|'58.2'|'118'|'237'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The RestApi resource identifier for the Deployment resource to create.

type stageName:

string

param stageName:

[REQUIRED]

The name of the Stage resource for the Deployment resource to create.

type stageDescription:

string

param stageDescription:

The description of the Stage resource for the Deployment resource to create.

type description:

string

param description:

The description for the Deployment resource to create.

type cacheClusterEnabled:

boolean

param cacheClusterEnabled:

Enables a cache cluster for the Stage resource specified in the input.

type cacheClusterSize:

string

param cacheClusterSize:

Specifies the cache cluster size for the Stage resource specified in the input, if a cache cluster is enabled.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1),
    'apiSummary': {
        'string': {
            'string': {
                'authorizationType': 'string',
                'apiKeyRequired': True|False
            }
        }
    }
}

Response Structure

  • (dict) --

    An immutable representation of a RestApi resource that can be called by users using Stages. A deployment must be associated with a Stage for it to be callable over the Internet.

    • id (string) --

      The identifier for the deployment resource.

    • description (string) --

      The description for the deployment resource.

    • createdDate (datetime) --

      The date and time that the deployment resource was created.

    • apiSummary (dict) --

      Gets a summary of the RestApi at the date and time that the deployment resource was created.

      • (string) --

        • (dict) --

          • (string) --

            • (dict) --

              Represents a summary of a Method resource, given a particular date and time.

              • authorizationType (string) --

                Specifies the type of authorization used for the method.

              • apiKeyRequired (boolean) --

                Specifies whether the method requires a valid ApiKey.

GetDeployments (new) Link ¶

Gets information about a Deployments collection.

Request Syntax

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

string

param restApiId:

[REQUIRED]

The identifier of the RestApi resource for the collection of Deployment resources to get information about.

type position:

string

param position:

The position of the current Deployment resource in the collection to get information about.

type limit:

integer

param limit:

The maximum number of Deployment resources in the collection to get information about. The default limit is 25. It should be an integer between 1 - 500.

rtype:

dict

returns:

Response Syntax

{
    'position': 'string',
    'items': [
        {
            'id': 'string',
            'description': 'string',
            'createdDate': datetime(2015, 1, 1),
            'apiSummary': {
                'string': {
                    'string': {
                        'authorizationType': 'string',
                        'apiKeyRequired': True|False
                    }
                }
            }
        },
    ]
}

Response Structure

  • (dict) --

    Represents a collection resource that contains zero or more references to your existing deployments, and links that guide you on ways to interact with your collection. The collection offers a paginated view of the contained deployments.

    • position (string) --

    • items (list) --

      The current page of any Deployment resources in the collection of deployment resources.

      • (dict) --

        An immutable representation of a RestApi resource that can be called by users using Stages. A deployment must be associated with a Stage for it to be callable over the Internet.

        • id (string) --

          The identifier for the deployment resource.

        • description (string) --

          The description for the deployment resource.

        • createdDate (datetime) --

          The date and time that the deployment resource was created.

        • apiSummary (dict) --

          Gets a summary of the RestApi at the date and time that the deployment resource was created.

          • (string) --

            • (dict) --

              • (string) --

                • (dict) --

                  Represents a summary of a Method resource, given a particular date and time.

                  • authorizationType (string) --

                    Specifies the type of authorization used for the method.

                  • apiKeyRequired (boolean) --

                    Specifies whether the method requires a valid ApiKey.

GetResources (new) Link ¶

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',
                    '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'
                        },
                        '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 requested using the embed option.

          • (string) --

            • (dict) --

              Represents a method.

              • httpMethod (string) --

                The HTTP method.

              • authorizationType (string) --

                The method's authorization type.

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

                • httpMethod (string) --

                  Specifies the integration's HTTP method type.

                • uri (string) --

                  Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}. Region and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

                • credentials (string) --

                  Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify null.

                • requestParameters (dict) --

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

                  • (string) --

                    • (string) --

                • requestTemplates (dict) --

                  Specifies the integration's request templates.

                  • (string) --

                    • (string) --

                • cacheNamespace (string) --

                  Specifies the integration's cache namespace.

                • cacheKeyParameters (list) --

                  Specifies the integration's cache key parameters.

                  • (string) --

                • integrationResponses (dict) --

                  Specifies the integration's responses.

                  • (string) --

                    • (dict) --

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

                      • statusCode (string) --

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

                      • selectionPattern (string) --

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

                      • responseParameters (dict) --

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

                        • (string) --

                          • (string) --

                      • responseTemplates (dict) --

                        Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

                        • (string) --

                          • (string) --

GetRestApis (new) Link ¶

Lists the RestApis resources for your collection.

Request Syntax

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

string

param position:

The position of the current RestApis resource in the collection to get information about.

type limit:

integer

param limit:

The maximum number of RestApi 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',
            'name': 'string',
            'description': 'string',
            'createdDate': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    Contains references to your APIs and links that guide you in ways to interact with your collection. A collection offers a paginated view of your APIs.

    • position (string) --

    • items (list) --

      An array of links to the current page of RestApi resources.

      • (dict) --

        Represents a REST API.

        • id (string) --

          The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

        • name (string) --

          The API's name.

        • description (string) --

          The API's description.

        • createdDate (datetime) --

          The date when the API was created, in ISO 8601 format.

DeleteDomainName (new) Link ¶

Deletes the DomainName resource.

Request Syntax

client.delete_domain_name(
    domainName='string'
)
type domainName:

string

param domainName:

[REQUIRED]

The name of the DomainName resource to be deleted.

returns:

None

CreateResource (new) Link ¶

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',
            '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'
                },
                '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 requested using the embed option.

      • (string) --

        • (dict) --

          Represents a method.

          • httpMethod (string) --

            The HTTP method.

          • authorizationType (string) --

            The method's authorization type.

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

            • httpMethod (string) --

              Specifies the integration's HTTP method type.

            • uri (string) --

              Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}. Region and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

            • credentials (string) --

              Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify null.

            • requestParameters (dict) --

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

              • (string) --

                • (string) --

            • requestTemplates (dict) --

              Specifies the integration's request templates.

              • (string) --

                • (string) --

            • cacheNamespace (string) --

              Specifies the integration's cache namespace.

            • cacheKeyParameters (list) --

              Specifies the integration's cache key parameters.

              • (string) --

            • integrationResponses (dict) --

              Specifies the integration's responses.

              • (string) --

                • (dict) --

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

                  • statusCode (string) --

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

                  • selectionPattern (string) --

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

                  • responseParameters (dict) --

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

                    • (string) --

                      • (string) --

                  • responseTemplates (dict) --

                    Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

                    • (string) --

                      • (string) --

UpdateDeployment (new) Link ¶

Changes information about a Deployment resource.

Request Syntax

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

string

param restApiId:

[REQUIRED]

The replacement identifier of the RestApi resource for the Deployment resource to change information about.

type deploymentId:

string

param deploymentId:

[REQUIRED]

The replacment identifier for the Deployment resource to change information about.

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',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1),
    'apiSummary': {
        'string': {
            'string': {
                'authorizationType': 'string',
                'apiKeyRequired': True|False
            }
        }
    }
}

Response Structure

  • (dict) --

    An immutable representation of a RestApi resource that can be called by users using Stages. A deployment must be associated with a Stage for it to be callable over the Internet.

    • id (string) --

      The identifier for the deployment resource.

    • description (string) --

      The description for the deployment resource.

    • createdDate (datetime) --

      The date and time that the deployment resource was created.

    • apiSummary (dict) --

      Gets a summary of the RestApi at the date and time that the deployment resource was created.

      • (string) --

        • (dict) --

          • (string) --

            • (dict) --

              Represents a summary of a Method resource, given a particular date and time.

              • authorizationType (string) --

                Specifies the type of authorization used for the method.

              • apiKeyRequired (boolean) --

                Specifies whether the method requires a valid ApiKey.

GetClientCertificate (new) Link ¶

Request Syntax

client.get_client_certificate(
    clientCertificateId='string'
)
type clientCertificateId:

string

param clientCertificateId:

[REQUIRED]

rtype:

dict

returns:

Response Syntax

{
    'clientCertificateId': 'string',
    'description': 'string',
    'pemEncodedCertificate': 'string',
    'createdDate': datetime(2015, 1, 1),
    'expirationDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • clientCertificateId (string) --

    • description (string) --

    • pemEncodedCertificate (string) --

    • createdDate (datetime) --

    • expirationDate (datetime) --

DeleteResource (new) Link ¶

Deletes a Resource resource.

Request Syntax

client.delete_resource(
    restApiId='string',
    resourceId='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.

returns:

None

UpdateClientCertificate (new) Link ¶

Request Syntax

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

string

param clientCertificateId:

[REQUIRED]

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

{
    'clientCertificateId': 'string',
    'description': 'string',
    'pemEncodedCertificate': 'string',
    'createdDate': datetime(2015, 1, 1),
    'expirationDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • clientCertificateId (string) --

    • description (string) --

    • pemEncodedCertificate (string) --

    • createdDate (datetime) --

    • expirationDate (datetime) --

GetSdk (new) Link ¶

Request Syntax

client.get_sdk(
    restApiId='string',
    stageName='string',
    sdkType='string',
    parameters={
        'string': 'string'
    }
)
type restApiId:

string

param restApiId:

[REQUIRED]

type stageName:

string

param stageName:

[REQUIRED]

type sdkType:

string

param sdkType:

[REQUIRED]

type parameters:

dict

param parameters:
  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'contentType': 'string',
    'contentDisposition': 'string',
    'body': StreamingBody()
}

Response Structure

  • (dict) --

    • contentType (string) --

    • contentDisposition (string) --

    • body (:class:`.StreamingBody`) --

DeleteMethod (new) Link ¶

Deletes an existing Method resource.

Request Syntax

client.delete_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]

The HTTP verb that identifies the Method resource.

returns:

None

PutMethod (new) Link ¶

Add a method to an existing Resource resource.

Request Syntax

client.put_method(
    restApiId='string',
    resourceId='string',
    httpMethod='string',
    authorizationType='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 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',
    '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'
        },
        '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.

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

      • httpMethod (string) --

        Specifies the integration's HTTP method type.

      • uri (string) --

        Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}. Region and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

      • credentials (string) --

        Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify null.

      • requestParameters (dict) --

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

        • (string) --

          • (string) --

      • requestTemplates (dict) --

        Specifies the integration's request templates.

        • (string) --

          • (string) --

      • cacheNamespace (string) --

        Specifies the integration's cache namespace.

      • cacheKeyParameters (list) --

        Specifies the integration's cache key parameters.

        • (string) --

      • integrationResponses (dict) --

        Specifies the integration's responses.

        • (string) --

          • (dict) --

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

            • statusCode (string) --

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

            • selectionPattern (string) --

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

            • responseParameters (dict) --

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

              • (string) --

                • (string) --

            • responseTemplates (dict) --

              Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

              • (string) --

                • (string) --

FlushStageCache (new) Link ¶

Flushes a stage's cache.

Request Syntax

client.flush_stage_cache(
    restApiId='string',
    stageName='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The API identifier of the stage to flush its cache.

type stageName:

string

param stageName:

[REQUIRED]

The name of the stage to flush its cache.

returns:

None

GetModels (new) Link ¶

Describes existing Models defined for a RestApi resource.

Request Syntax

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

string

param restApiId:

[REQUIRED]

The RestApi identifier.

type position:

string

param position:

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

type limit:

integer

param limit:

The maximum number of models in the collection to get information about. The default limit is 25. It should be an integer between 1 - 500.

rtype:

dict

returns:

Response Syntax

{
    'position': 'string',
    'items': [
        {
            'id': 'string',
            'name': 'string',
            'description': 'string',
            'schema': 'string',
            'contentType': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Represents a collection of Model resources.

    • position (string) --

    • items (list) --

      Gets the current Model resource in the collection.

      • (dict) --

        Represents the structure of a request or response payload for a method.

        • id (string) --

          The identifier for the model resource.

        • name (string) --

          The name of the model.

        • description (string) --

          The description of the model.

        • schema (string) --

          The schema for the model. For application/json models, this should be JSON-schema draft v4 model.

        • contentType (string) --

          The content-type for the model.

GetStage (new) Link ¶

Gets information about a Stage resource.

Request Syntax

client.get_stage(
    restApiId='string',
    stageName='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The identifier of the RestApi resource for the Stage resource to get information about.

type stageName:

string

param stageName:

[REQUIRED]

The name of the Stage resource to get information about.

rtype:

dict

returns:

Response Syntax

{
    'deploymentId': 'string',
    'clientCertificateId': 'string',
    'stageName': 'string',
    'description': 'string',
    'cacheClusterEnabled': True|False,
    'cacheClusterSize': '0.5'|'1.6'|'6.1'|'13.5'|'28.4'|'58.2'|'118'|'237',
    'cacheClusterStatus': 'CREATE_IN_PROGRESS'|'AVAILABLE'|'DELETE_IN_PROGRESS'|'NOT_AVAILABLE'|'FLUSH_IN_PROGRESS',
    'methodSettings': {
        'string': {
            'metricsEnabled': True|False,
            'loggingLevel': 'string',
            'dataTraceEnabled': True|False,
            'throttlingBurstLimit': 123,
            'throttlingRateLimit': 123.0,
            'cachingEnabled': True|False,
            'cacheTtlInSeconds': 123,
            'cacheDataEncrypted': True|False
        }
    },
    'createdDate': datetime(2015, 1, 1),
    'lastUpdatedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    Represents a unique identifier for a version of a deployed RestApi that is callable by users.

    • deploymentId (string) --

      The identifier of the Deployment that the stage points to.

    • clientCertificateId (string) --

    • stageName (string) --

      The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.

    • description (string) --

      The stage's description.

    • cacheClusterEnabled (boolean) --

      Specifies whether a cache cluster is enabled for the stage.

    • cacheClusterSize (string) --

      The size of the cache cluster for the stage, if enabled.

    • cacheClusterStatus (string) --

      The status of the cache cluster for the stage, if enabled.

    • methodSettings (dict) --

      A map that defines the method settings for a Stage resource. Keys are defined as {resource_path}/{http_method} for an individual method override, or \*/\* for the settings applied to all methods in the stage.

      • (string) --

        • (dict) --

          Specifies the method setting properties.

          • metricsEnabled (boolean) --

            Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is /{method_setting_key}/metrics/enabled, and the value is a Boolean.

          • loggingLevel (string) --

            Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, and the available levels are OFF, ERROR, and INFO.

          • dataTraceEnabled (boolean) --

            Specifies the whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

          • throttlingBurstLimit (integer) --

            Specifies the throttling burst limit. The PATCH path for this setting is /{method_setting_key}/throttling/burstLimit, and the value is an integer.

          • throttlingRateLimit (float) --

            Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit, and the value is a double.

          • cachingEnabled (boolean) --

            Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached. The PATCH path for this setting is /{method_setting_key}/caching/enabled, and the value is a Boolean.

          • cacheTtlInSeconds (integer) --

            Specifies the time to live (TTL) in seconds, for cached responses. The higher a the TTL, the longer the response will be cached. The PATCH path for this setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an integer.

          • cacheDataEncrypted (boolean) --

            Specifies whether the cached responses are encrypted. The PATCH path for this setting is /{method_setting_key}/caching/dataEncrypted, and the value is a Boolean.

    • createdDate (datetime) --

      The date and time that the stage was created, in ISO 8601 format.

    • lastUpdatedDate (datetime) --

      The date and time that information about the stage was last updated, in ISO 8601 format.

UpdateMethodResponse (new) Link ¶

Updates an existing MethodResponse resource.

Request Syntax

client.update_method_response(
    restApiId='string',
    resourceId='string',
    httpMethod='string',
    statusCode='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 MethodResponse resource.

type resourceId:

string

param resourceId:

[REQUIRED]

The Resource identifier for the MethodResponse resource.

type httpMethod:

string

param httpMethod:

[REQUIRED]

The HTTP verb identifier for the parent Method resource.

type statusCode:

string

param statusCode:

[REQUIRED]

The status code identifier for the MethodResponse 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

{
    'statusCode': 'string',
    'responseParameters': {
        'string': True|False
    },
    'responseModels': {
        'string': 'string'
    }
}

Response Structure

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

DeleteStage (new) Link ¶

Deletes a Stage resource.

Request Syntax

client.delete_stage(
    restApiId='string',
    stageName='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The identifier of the RestApi resource for the Stage resource to delete.

type stageName:

string

param stageName:

[REQUIRED]

The name of the Stage resource to delete.

returns:

None

UpdateResource (new) Link ¶

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',
            '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'
                },
                '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 requested using the embed option.

      • (string) --

        • (dict) --

          Represents a method.

          • httpMethod (string) --

            The HTTP method.

          • authorizationType (string) --

            The method's authorization type.

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

            • httpMethod (string) --

              Specifies the integration's HTTP method type.

            • uri (string) --

              Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}. Region and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

            • credentials (string) --

              Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify null.

            • requestParameters (dict) --

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

              • (string) --

                • (string) --

            • requestTemplates (dict) --

              Specifies the integration's request templates.

              • (string) --

                • (string) --

            • cacheNamespace (string) --

              Specifies the integration's cache namespace.

            • cacheKeyParameters (list) --

              Specifies the integration's cache key parameters.

              • (string) --

            • integrationResponses (dict) --

              Specifies the integration's responses.

              • (string) --

                • (dict) --

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

                  • statusCode (string) --

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

                  • selectionPattern (string) --

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

                  • responseParameters (dict) --

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

                    • (string) --

                      • (string) --

                  • responseTemplates (dict) --

                    Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

                    • (string) --

                      • (string) --

UpdateRestApi (new) Link ¶

Changes information about the specified API.

Request Syntax

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

string

param restApiId:

[REQUIRED]

The ID of the RestApi you want to update.

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',
    'name': 'string',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    Represents a REST API.

    • id (string) --

      The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

    • name (string) --

      The API's name.

    • description (string) --

      The API's description.

    • createdDate (datetime) --

      The date when the API was created, in ISO 8601 format.

CreateModel (new) Link ¶

Adds a new Model resource to an existing RestApi resource.

Request Syntax

client.create_model(
    restApiId='string',
    name='string',
    description='string',
    schema='string',
    contentType='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The RestApi identifier under which the Model will be created.

type name:

string

param name:

[REQUIRED]

The name of the model.

type description:

string

param description:

The description of the model.

type schema:

string

param schema:

The schema for the model. For application/json models, this should be JSON-schema draft v4 model.

type contentType:

string

param contentType:

[REQUIRED]

The content-type for the model.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'schema': 'string',
    'contentType': 'string'
}

Response Structure

  • (dict) --

    Represents the structure of a request or response payload for a method.

    • id (string) --

      The identifier for the model resource.

    • name (string) --

      The name of the model.

    • description (string) --

      The description of the model.

    • schema (string) --

      The schema for the model. For application/json models, this should be JSON-schema draft v4 model.

    • contentType (string) --

      The content-type for the model.

UpdateModel (new) Link ¶

Changes information about a model.

Request Syntax

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

string

param restApiId:

[REQUIRED]

The RestApi identifier under which the model exists.

type modelName:

string

param modelName:

[REQUIRED]

The name of the model to update.

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',
    'name': 'string',
    'description': 'string',
    'schema': 'string',
    'contentType': 'string'
}

Response Structure

  • (dict) --

    Represents the structure of a request or response payload for a method.

    • id (string) --

      The identifier for the model resource.

    • name (string) --

      The name of the model.

    • description (string) --

      The description of the model.

    • schema (string) --

      The schema for the model. For application/json models, this should be JSON-schema draft v4 model.

    • contentType (string) --

      The content-type for the model.

GetIntegrationResponse (new) Link ¶

Represents a get integration response.

Request Syntax

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

string

param restApiId:

[REQUIRED]

Specifies a get integration response request's API identifier.

type resourceId:

string

param resourceId:

[REQUIRED]

Specifies a get integration response request's resource identifier.

type httpMethod:

string

param httpMethod:

[REQUIRED]

Specifies a get integration response request's HTTP method.

type statusCode:

string

param statusCode:

[REQUIRED]

Specifies a get integration response request's status code.

rtype:

dict

returns:

Response Syntax

{
    'statusCode': 'string',
    'selectionPattern': 'string',
    'responseParameters': {
        'string': 'string'
    },
    'responseTemplates': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

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

    • statusCode (string) --

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

    • selectionPattern (string) --

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

    • responseParameters (dict) --

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

      • (string) --

        • (string) --

    • responseTemplates (dict) --

      Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

      • (string) --

        • (string) --

UpdateBasePathMapping (new) Link ¶

Changes information about the BasePathMapping resource.

Request Syntax

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

string

param domainName:

[REQUIRED]

The domain name of the BasePathMapping resource to change.

type basePath:

string

param basePath:

[REQUIRED]

The base path of the BasePathMapping resource to change.

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

{
    'basePath': 'string',
    'restApiId': 'string',
    'stage': 'string'
}

Response Structure

  • (dict) --

    Represents the base path that callers of the API that must provide as part of the URL after the domain name.

    • basePath (string) --

      The base path name that callers of the API must provide as part of the URL after the domain name.

    • restApiId (string) --

      The name of the API.

    • stage (string) --

      The name of the API's stage.

GetDomainName (new) Link ¶

Represents a domain name that is contained in a simpler, more intuitive URL that can be called.

Request Syntax

client.get_domain_name(
    domainName='string'
)
type domainName:

string

param domainName:

[REQUIRED]

The name of the DomainName resource.

rtype:

dict

returns:

Response Syntax

{
    'domainName': 'string',
    'certificateName': 'string',
    'certificateUploadDate': datetime(2015, 1, 1),
    'distributionDomainName': 'string'
}

Response Structure

  • (dict) --

    Represents a domain name that is contained in a simpler, more intuitive URL that can be called.

    • domainName (string) --

      The name of the DomainName resource.

    • certificateName (string) --

      The name of the certificate.

    • certificateUploadDate (datetime) --

      The date when the certificate was uploaded, in ISO 8601 format.

    • distributionDomainName (string) --

      The domain name of the Amazon CloudFront distribution. For more information, see the Amazon CloudFront documentation.

GetAccount (new) Link ¶

Gets information about the current Account resource.

Request Syntax

client.get_account()
rtype:

dict

returns:

Response Syntax

{
    'cloudwatchRoleArn': 'string',
    'throttleSettings': {
        'burstLimit': 123,
        'rateLimit': 123.0
    }
}

Response Structure

  • (dict) --

    Represents an AWS account that is associated with Amazon API Gateway.

    • cloudwatchRoleArn (string) --

      Specifies the Amazon resource name (ARN) of an Amazon CloudWatch role for the current Account resource.

    • throttleSettings (dict) --

      Specifies the application programming interface (API) throttle settings for the current Account resource.

      • burstLimit (integer) --

        Returns the burstLimit when ThrottleSettings is called.

      • rateLimit (float) --

        Returns the rateLimit when ThrottleSettings is called.

GetApiKeys (new) Link ¶

Gets information about the current ApiKeys resource.

Request Syntax

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

string

param position:

The position of the current ApiKeys resource to get information about.

type limit:

integer

param limit:

The maximum number of ApiKeys to get information about.

rtype:

dict

returns:

Response Syntax

{
    'position': 'string',
    'items': [
        {
            'id': 'string',
            'name': 'string',
            'description': 'string',
            'enabled': True|False,
            'stageKeys': [
                'string',
            ],
            'createdDate': datetime(2015, 1, 1),
            'lastUpdatedDate': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    Represents a collection of ApiKey resources.

    • position (string) --

    • items (list) --

      The current page of any ApiKey resources in the collection of ApiKey resources.

      • (dict) --

        A resource that can be distributed to callers for executing Method resources that require an API key. API keys can be mapped to any Stage on any RestApi, which indicates that the callers with the API key can make requests to that stage.

        • id (string) --

          The identifier of the API Key.

        • name (string) --

          The name of the API Key.

        • description (string) --

          The description of the API Key.

        • enabled (boolean) --

          Specifies whether the API Key can be used by callers.

        • stageKeys (list) --

          A list of Stage resources that are associated with the ApiKey resource.

          • (string) --

        • createdDate (datetime) --

          The date when the API Key was created, in ISO 8601 format.

        • lastUpdatedDate (datetime) --

          When the API Key was last updated, in ISO 8601 format.

GetResource (new) Link ¶

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',
            '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'
                },
                '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 requested using the embed option.

      • (string) --

        • (dict) --

          Represents a method.

          • httpMethod (string) --

            The HTTP method.

          • authorizationType (string) --

            The method's authorization type.

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

            • httpMethod (string) --

              Specifies the integration's HTTP method type.

            • uri (string) --

              Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}. Region and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

            • credentials (string) --

              Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify null.

            • requestParameters (dict) --

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

              • (string) --

                • (string) --

            • requestTemplates (dict) --

              Specifies the integration's request templates.

              • (string) --

                • (string) --

            • cacheNamespace (string) --

              Specifies the integration's cache namespace.

            • cacheKeyParameters (list) --

              Specifies the integration's cache key parameters.

              • (string) --

            • integrationResponses (dict) --

              Specifies the integration's responses.

              • (string) --

                • (dict) --

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

                  • statusCode (string) --

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

                  • selectionPattern (string) --

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

                  • responseParameters (dict) --

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

                    • (string) --

                      • (string) --

                  • responseTemplates (dict) --

                    Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

                    • (string) --

                      • (string) --

GetIntegration (new) Link ¶

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'
    },
    'cacheNamespace': 'string',
    'cacheKeyParameters': [
        'string',
    ],
    'integrationResponses': {
        'string': {
            'statusCode': 'string',
            'selectionPattern': 'string',
            'responseParameters': {
                'string': 'string'
            },
            'responseTemplates': {
                'string': 'string'
            }
        }
    }
}

Response Structure

  • (dict) --

    Represents a HTTP, AWS, or Mock integration.

    • type (string) --

      Specifies the integration's type.

    • httpMethod (string) --

      Specifies the integration's HTTP method type.

    • uri (string) --

      Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}. Region and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

    • credentials (string) --

      Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify null.

    • requestParameters (dict) --

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

      • (string) --

        • (string) --

    • requestTemplates (dict) --

      Specifies the integration's request templates.

      • (string) --

        • (string) --

    • cacheNamespace (string) --

      Specifies the integration's cache namespace.

    • cacheKeyParameters (list) --

      Specifies the integration's cache key parameters.

      • (string) --

    • integrationResponses (dict) --

      Specifies the integration's responses.

      • (string) --

        • (dict) --

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

          • statusCode (string) --

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

          • selectionPattern (string) --

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

          • responseParameters (dict) --

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

            • (string) --

              • (string) --

          • responseTemplates (dict) --

            Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

            • (string) --

              • (string) --

GetMethodResponse (new) Link ¶

Describes a MethodResponse resource.

Request Syntax

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

string

param restApiId:

[REQUIRED]

The RestApi identifier for the MethodResponse resource.

type resourceId:

string

param resourceId:

[REQUIRED]

The Resource identifier for the MethodResponse resource.

type httpMethod:

string

param httpMethod:

[REQUIRED]

The HTTP verb identifier for the parent Method resource.

type statusCode:

string

param statusCode:

[REQUIRED]

The status code identifier for the MethodResponse resource.

rtype:

dict

returns:

Response Syntax

{
    'statusCode': 'string',
    'responseParameters': {
        'string': True|False
    },
    'responseModels': {
        'string': 'string'
    }
}

Response Structure

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

UpdateDomainName (new) Link ¶

Changes information about the DomainName resource.

Request Syntax

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

string

param domainName:

[REQUIRED]

The name of the DomainName resource to be changed.

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

{
    'domainName': 'string',
    'certificateName': 'string',
    'certificateUploadDate': datetime(2015, 1, 1),
    'distributionDomainName': 'string'
}

Response Structure

  • (dict) --

    Represents a domain name that is contained in a simpler, more intuitive URL that can be called.

    • domainName (string) --

      The name of the DomainName resource.

    • certificateName (string) --

      The name of the certificate.

    • certificateUploadDate (datetime) --

      The date when the certificate was uploaded, in ISO 8601 format.

    • distributionDomainName (string) --

      The domain name of the Amazon CloudFront distribution. For more information, see the Amazon CloudFront documentation.

DeleteRestApi (new) Link ¶

Deletes the specified API.

Request Syntax

client.delete_rest_api(
    restApiId='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The ID of the RestApi you want to delete.

returns:

None

PutMethodResponse (new) Link ¶

Adds a MethodResponse to an existing Method resource.

Request Syntax

client.put_method_response(
    restApiId='string',
    resourceId='string',
    httpMethod='string',
    statusCode='string',
    responseParameters={
        'string': True|False
    },
    responseModels={
        'string': '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 statusCode:

string

param statusCode:

[REQUIRED]

The method response's status code.

type responseParameters:

dict

param responseParameters:

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. The Boolean flag 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) --

type responseModels:

dict

param responseModels:

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

rtype:

dict

returns:

Response Syntax

{
    'statusCode': 'string',
    'responseParameters': {
        'string': True|False
    },
    'responseModels': {
        'string': 'string'
    }
}

Response Structure

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

DeleteModel (new) Link ¶

Deletes a model.

Request Syntax

client.delete_model(
    restApiId='string',
    modelName='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The RestApi under which the model will be deleted.

type modelName:

string

param modelName:

[REQUIRED]

The name of the model to delete.

returns:

None

GetDomainNames (new) Link ¶

Represents a collection of DomainName resources.

Request Syntax

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

string

param position:

The position of the current domain names to get information about.

type limit:

integer

param limit:

The maximum number of DomainName resources in the collection to get information about. The default limit is 25. It should be an integer between 1 - 500.

rtype:

dict

returns:

Response Syntax

{
    'position': 'string',
    'items': [
        {
            'domainName': 'string',
            'certificateName': 'string',
            'certificateUploadDate': datetime(2015, 1, 1),
            'distributionDomainName': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Represents a collection of DomainName resources.

    • position (string) --

    • items (list) --

      The current page of any DomainName resources in the collection of DomainName resources.

      • (dict) --

        Represents a domain name that is contained in a simpler, more intuitive URL that can be called.

        • domainName (string) --

          The name of the DomainName resource.

        • certificateName (string) --

          The name of the certificate.

        • certificateUploadDate (datetime) --

          The date when the certificate was uploaded, in ISO 8601 format.

        • distributionDomainName (string) --

          The domain name of the Amazon CloudFront distribution. For more information, see the Amazon CloudFront documentation.

CreateRestApi (new) Link ¶

Creates a new RestApi resource.

Request Syntax

client.create_rest_api(
    name='string',
    description='string',
    cloneFrom='string'
)
type name:

string

param name:

[REQUIRED]

The name of the RestApi.

type description:

string

param description:

The description of the RestApi.

type cloneFrom:

string

param cloneFrom:

The name of the RestApi that you want to clone from.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    Represents a REST API.

    • id (string) --

      The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

    • name (string) --

      The API's name.

    • description (string) --

      The API's description.

    • createdDate (datetime) --

      The date when the API was created, in ISO 8601 format.

PutIntegrationResponse (new) Link ¶

Represents a put integration.

Request Syntax

client.put_integration_response(
    restApiId='string',
    resourceId='string',
    httpMethod='string',
    statusCode='string',
    selectionPattern='string',
    responseParameters={
        'string': 'string'
    },
    responseTemplates={
        'string': 'string'
    }
)
type restApiId:

string

param restApiId:

[REQUIRED]

Specifies a put integration response request's API identifier.

type resourceId:

string

param resourceId:

[REQUIRED]

Specifies a put integration response request's resource identifier.

type httpMethod:

string

param httpMethod:

[REQUIRED]

Specifies a put integration response request's HTTP method.

type statusCode:

string

param statusCode:

[REQUIRED]

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

type selectionPattern:

string

param selectionPattern:

Specifies the selection pattern of a put integration response.

type responseParameters:

dict

param responseParameters:

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

  • (string) --

    • (string) --

type responseTemplates:

dict

param responseTemplates:

Specifies a put integration response's templates.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'statusCode': 'string',
    'selectionPattern': 'string',
    'responseParameters': {
        'string': 'string'
    },
    'responseTemplates': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

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

    • statusCode (string) --

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

    • selectionPattern (string) --

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

    • responseParameters (dict) --

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

      • (string) --

        • (string) --

    • responseTemplates (dict) --

      Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

      • (string) --

        • (string) --

UpdateMethod (new) Link ¶

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',
    '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'
        },
        '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.

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

      • httpMethod (string) --

        Specifies the integration's HTTP method type.

      • uri (string) --

        Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}. Region and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

      • credentials (string) --

        Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify null.

      • requestParameters (dict) --

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

        • (string) --

          • (string) --

      • requestTemplates (dict) --

        Specifies the integration's request templates.

        • (string) --

          • (string) --

      • cacheNamespace (string) --

        Specifies the integration's cache namespace.

      • cacheKeyParameters (list) --

        Specifies the integration's cache key parameters.

        • (string) --

      • integrationResponses (dict) --

        Specifies the integration's responses.

        • (string) --

          • (dict) --

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

            • statusCode (string) --

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

            • selectionPattern (string) --

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

            • responseParameters (dict) --

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

              • (string) --

                • (string) --

            • responseTemplates (dict) --

              Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

              • (string) --

                • (string) --

CreateApiKey (new) Link ¶

Request Syntax

client.create_api_key(
    name='string',
    description='string',
    enabled=True|False,
    stageKeys=[
        {
            'restApiId': 'string',
            'stageName': 'string'
        },
    ]
)
type name:

string

param name:

The name of the ApiKey.

type description:

string

param description:

The description of the ApiKey.

type enabled:

boolean

param enabled:

Specifies whether the ApiKey can be used by callers.

type stageKeys:

list

param stageKeys:

Specifies whether the ApiKey can be used by callers.

  • (dict) --

    A reference to a unique stage identified in the format {restApiId}/{stage}.

    • restApiId (string) --

      A list of Stage resources that are associated with the ApiKey resource.

    • stageName (string) --

      The stage name in the RestApi that the stage key references.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'enabled': True|False,
    'stageKeys': [
        'string',
    ],
    'createdDate': datetime(2015, 1, 1),
    'lastUpdatedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    A resource that can be distributed to callers for executing Method resources that require an API key. API keys can be mapped to any Stage on any RestApi, which indicates that the callers with the API key can make requests to that stage.

    • id (string) --

      The identifier of the API Key.

    • name (string) --

      The name of the API Key.

    • description (string) --

      The description of the API Key.

    • enabled (boolean) --

      Specifies whether the API Key can be used by callers.

    • stageKeys (list) --

      A list of Stage resources that are associated with the ApiKey resource.

      • (string) --

    • createdDate (datetime) --

      The date when the API Key was created, in ISO 8601 format.

    • lastUpdatedDate (datetime) --

      When the API Key was last updated, in ISO 8601 format.

CreateStage (new) Link ¶

Creates a Stage resource.

Request Syntax

client.create_stage(
    restApiId='string',
    stageName='string',
    deploymentId='string',
    description='string',
    cacheClusterEnabled=True|False,
    cacheClusterSize='0.5'|'1.6'|'6.1'|'13.5'|'28.4'|'58.2'|'118'|'237'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The identifier of the RestApi resource for the Stage resource to create.

type stageName:

string

param stageName:

[REQUIRED]

The name for the Stage resource.

type deploymentId:

string

param deploymentId:

[REQUIRED]

The identifier of the Deployment resource for the Stage resource.

type description:

string

param description:

The description of the Stage resource.

type cacheClusterEnabled:

boolean

param cacheClusterEnabled:

Whether cache clustering is enabled for the stage.

type cacheClusterSize:

string

param cacheClusterSize:

The stage's cache cluster size.

rtype:

dict

returns:

Response Syntax

{
    'deploymentId': 'string',
    'clientCertificateId': 'string',
    'stageName': 'string',
    'description': 'string',
    'cacheClusterEnabled': True|False,
    'cacheClusterSize': '0.5'|'1.6'|'6.1'|'13.5'|'28.4'|'58.2'|'118'|'237',
    'cacheClusterStatus': 'CREATE_IN_PROGRESS'|'AVAILABLE'|'DELETE_IN_PROGRESS'|'NOT_AVAILABLE'|'FLUSH_IN_PROGRESS',
    'methodSettings': {
        'string': {
            'metricsEnabled': True|False,
            'loggingLevel': 'string',
            'dataTraceEnabled': True|False,
            'throttlingBurstLimit': 123,
            'throttlingRateLimit': 123.0,
            'cachingEnabled': True|False,
            'cacheTtlInSeconds': 123,
            'cacheDataEncrypted': True|False
        }
    },
    'createdDate': datetime(2015, 1, 1),
    'lastUpdatedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    Represents a unique identifier for a version of a deployed RestApi that is callable by users.

    • deploymentId (string) --

      The identifier of the Deployment that the stage points to.

    • clientCertificateId (string) --

    • stageName (string) --

      The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.

    • description (string) --

      The stage's description.

    • cacheClusterEnabled (boolean) --

      Specifies whether a cache cluster is enabled for the stage.

    • cacheClusterSize (string) --

      The size of the cache cluster for the stage, if enabled.

    • cacheClusterStatus (string) --

      The status of the cache cluster for the stage, if enabled.

    • methodSettings (dict) --

      A map that defines the method settings for a Stage resource. Keys are defined as {resource_path}/{http_method} for an individual method override, or \*/\* for the settings applied to all methods in the stage.

      • (string) --

        • (dict) --

          Specifies the method setting properties.

          • metricsEnabled (boolean) --

            Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is /{method_setting_key}/metrics/enabled, and the value is a Boolean.

          • loggingLevel (string) --

            Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, and the available levels are OFF, ERROR, and INFO.

          • dataTraceEnabled (boolean) --

            Specifies the whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

          • throttlingBurstLimit (integer) --

            Specifies the throttling burst limit. The PATCH path for this setting is /{method_setting_key}/throttling/burstLimit, and the value is an integer.

          • throttlingRateLimit (float) --

            Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit, and the value is a double.

          • cachingEnabled (boolean) --

            Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached. The PATCH path for this setting is /{method_setting_key}/caching/enabled, and the value is a Boolean.

          • cacheTtlInSeconds (integer) --

            Specifies the time to live (TTL) in seconds, for cached responses. The higher a the TTL, the longer the response will be cached. The PATCH path for this setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an integer.

          • cacheDataEncrypted (boolean) --

            Specifies whether the cached responses are encrypted. The PATCH path for this setting is /{method_setting_key}/caching/dataEncrypted, and the value is a Boolean.

    • createdDate (datetime) --

      The date and time that the stage was created, in ISO 8601 format.

    • lastUpdatedDate (datetime) --

      The date and time that information about the stage was last updated, in ISO 8601 format.

DeleteClientCertificate (new) Link ¶

Request Syntax

client.delete_client_certificate(
    clientCertificateId='string'
)
type clientCertificateId:

string

param clientCertificateId:

[REQUIRED]

returns:

None

PutIntegration (new) Link ¶

Represents a put integration.

Request Syntax

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

string

param restApiId:

[REQUIRED]

Specifies a put integration request's API identifier.

type resourceId:

string

param resourceId:

[REQUIRED]

Specifies a put integration request's resource ID.

type httpMethod:

string

param httpMethod:

[REQUIRED]

Specifies a put integration HTTP method.

type type:

string

param type:

[REQUIRED]

Specifies a put integration input's type.

type uri:

string

param uri:

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

type credentials:

string

param credentials:

Specifies whether credentials are required for a put integration.

type requestParameters:

dict

param requestParameters:

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

  • (string) --

    • (string) --

type requestTemplates:

dict

param requestTemplates:

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

  • (string) --

    • (string) --

type cacheNamespace:

string

param cacheNamespace:

Specifies a put integration input's cache namespace.

type cacheKeyParameters:

list

param cacheKeyParameters:

Specifies a put integration input's cache key parameters.

  • (string) --

rtype:

dict

returns:

Response Syntax

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

Response Structure

  • (dict) --

    Represents a HTTP, AWS, or Mock integration.

    • type (string) --

      Specifies the integration's type.

    • httpMethod (string) --

      Specifies the integration's HTTP method type.

    • uri (string) --

      Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{service}:{path|action}/{service_api}. Region and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

    • credentials (string) --

      Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS services, specify null.

    • requestParameters (dict) --

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

      • (string) --

        • (string) --

    • requestTemplates (dict) --

      Specifies the integration's request templates.

      • (string) --

        • (string) --

    • cacheNamespace (string) --

      Specifies the integration's cache namespace.

    • cacheKeyParameters (list) --

      Specifies the integration's cache key parameters.

      • (string) --

    • integrationResponses (dict) --

      Specifies the integration's responses.

      • (string) --

        • (dict) --

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

          • statusCode (string) --

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

          • selectionPattern (string) --

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

          • responseParameters (dict) --

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

            • (string) --

              • (string) --

          • responseTemplates (dict) --

            Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

            • (string) --

              • (string) --

UpdateAccount (new) Link ¶

Changes information about the current Account resource.

Request Syntax

client.update_account(
    patchOperations=[
        {
            'op': 'add'|'remove'|'replace'|'move'|'copy'|'test',
            'path': 'string',
            'value': 'string',
            'from': 'string'
        },
    ]
)
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

{
    'cloudwatchRoleArn': 'string',
    'throttleSettings': {
        'burstLimit': 123,
        'rateLimit': 123.0
    }
}

Response Structure

  • (dict) --

    Represents an AWS account that is associated with Amazon API Gateway.

    • cloudwatchRoleArn (string) --

      Specifies the Amazon resource name (ARN) of an Amazon CloudWatch role for the current Account resource.

    • throttleSettings (dict) --

      Specifies the application programming interface (API) throttle settings for the current Account resource.

      • burstLimit (integer) --

        Returns the burstLimit when ThrottleSettings is called.

      • rateLimit (float) --

        Returns the rateLimit when ThrottleSettings is called.

GetModel (new) Link ¶

Describes an existing model defined for a RestApi resource.

Request Syntax

client.get_model(
    restApiId='string',
    modelName='string',
    flatten=True|False
)
type restApiId:

string

param restApiId:

[REQUIRED]

The RestApi identifier under which the Model exists.

type modelName:

string

param modelName:

[REQUIRED]

The name of the model as an identifier.

type flatten:

boolean

param flatten:

Resolves all external model references and returns a flattened model schema.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'schema': 'string',
    'contentType': 'string'
}

Response Structure

  • (dict) --

    Represents the structure of a request or response payload for a method.

    • id (string) --

      The identifier for the model resource.

    • name (string) --

      The name of the model.

    • description (string) --

      The description of the model.

    • schema (string) --

      The schema for the model. For application/json models, this should be JSON-schema draft v4 model.

    • contentType (string) --

      The content-type for the model.

DeleteMethodResponse (new) Link ¶

Deletes an existing MethodResponse resource.

Request Syntax

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

string

param restApiId:

[REQUIRED]

The RestApi identifier for the MethodResponse resource.

type resourceId:

string

param resourceId:

[REQUIRED]

The Resource identifier for the MethodResponse resource.

type httpMethod:

string

param httpMethod:

[REQUIRED]

The HTTP verb identifier for the parent Method resource.

type statusCode:

string

param statusCode:

[REQUIRED]

The status code identifier for the MethodResponse resource.

returns:

None

UpdateStage (new) Link ¶

Changes information about a Stage resource.

Request Syntax

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

string

param restApiId:

[REQUIRED]

The identifier of the RestApi resource for the Stage resource to change information about.

type stageName:

string

param stageName:

[REQUIRED]

The name of the Stage resource to change information about.

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

{
    'deploymentId': 'string',
    'clientCertificateId': 'string',
    'stageName': 'string',
    'description': 'string',
    'cacheClusterEnabled': True|False,
    'cacheClusterSize': '0.5'|'1.6'|'6.1'|'13.5'|'28.4'|'58.2'|'118'|'237',
    'cacheClusterStatus': 'CREATE_IN_PROGRESS'|'AVAILABLE'|'DELETE_IN_PROGRESS'|'NOT_AVAILABLE'|'FLUSH_IN_PROGRESS',
    'methodSettings': {
        'string': {
            'metricsEnabled': True|False,
            'loggingLevel': 'string',
            'dataTraceEnabled': True|False,
            'throttlingBurstLimit': 123,
            'throttlingRateLimit': 123.0,
            'cachingEnabled': True|False,
            'cacheTtlInSeconds': 123,
            'cacheDataEncrypted': True|False
        }
    },
    'createdDate': datetime(2015, 1, 1),
    'lastUpdatedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    Represents a unique identifier for a version of a deployed RestApi that is callable by users.

    • deploymentId (string) --

      The identifier of the Deployment that the stage points to.

    • clientCertificateId (string) --

    • stageName (string) --

      The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.

    • description (string) --

      The stage's description.

    • cacheClusterEnabled (boolean) --

      Specifies whether a cache cluster is enabled for the stage.

    • cacheClusterSize (string) --

      The size of the cache cluster for the stage, if enabled.

    • cacheClusterStatus (string) --

      The status of the cache cluster for the stage, if enabled.

    • methodSettings (dict) --

      A map that defines the method settings for a Stage resource. Keys are defined as {resource_path}/{http_method} for an individual method override, or \*/\* for the settings applied to all methods in the stage.

      • (string) --

        • (dict) --

          Specifies the method setting properties.

          • metricsEnabled (boolean) --

            Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is /{method_setting_key}/metrics/enabled, and the value is a Boolean.

          • loggingLevel (string) --

            Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, and the available levels are OFF, ERROR, and INFO.

          • dataTraceEnabled (boolean) --

            Specifies the whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

          • throttlingBurstLimit (integer) --

            Specifies the throttling burst limit. The PATCH path for this setting is /{method_setting_key}/throttling/burstLimit, and the value is an integer.

          • throttlingRateLimit (float) --

            Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit, and the value is a double.

          • cachingEnabled (boolean) --

            Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached. The PATCH path for this setting is /{method_setting_key}/caching/enabled, and the value is a Boolean.

          • cacheTtlInSeconds (integer) --

            Specifies the time to live (TTL) in seconds, for cached responses. The higher a the TTL, the longer the response will be cached. The PATCH path for this setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an integer.

          • cacheDataEncrypted (boolean) --

            Specifies whether the cached responses are encrypted. The PATCH path for this setting is /{method_setting_key}/caching/dataEncrypted, and the value is a Boolean.

    • createdDate (datetime) --

      The date and time that the stage was created, in ISO 8601 format.

    • lastUpdatedDate (datetime) --

      The date and time that information about the stage was last updated, in ISO 8601 format.

DeleteIntegration (new) Link ¶

Represents a delete integration.

Request Syntax

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

string

param restApiId:

[REQUIRED]

Specifies a delete integration request's API identifier.

type resourceId:

string

param resourceId:

[REQUIRED]

Specifies a delete integration request's resource identifier.

type httpMethod:

string

param httpMethod:

[REQUIRED]

Specifies a delete integration request's HTTP method.

returns:

None

GetRestApi (new) Link ¶

Lists the RestApi resource in the collection.

Request Syntax

client.get_rest_api(
    restApiId='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The identifier of the RestApi resource.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    Represents a REST API.

    • id (string) --

      The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

    • name (string) --

      The API's name.

    • description (string) --

      The API's description.

    • createdDate (datetime) --

      The date when the API was created, in ISO 8601 format.

DeleteDeployment (new) Link ¶

Deletes a Deployment resource. Deleting a deployment will only succeed if there are no Stage resources associated with it.

Request Syntax

client.delete_deployment(
    restApiId='string',
    deploymentId='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The identifier of the RestApi resource for the Deployment resource to delete.

type deploymentId:

string

param deploymentId:

[REQUIRED]

The identifier of the Deployment resource to delete.

returns:

None

TestInvokeMethod (new) Link ¶

Request Syntax

client.test_invoke_method(
    restApiId='string',
    resourceId='string',
    httpMethod='string',
    pathWithQueryString='string',
    body='string',
    headers={
        'string': 'string'
    },
    clientCertificateId='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

type resourceId:

string

param resourceId:

[REQUIRED]

type httpMethod:

string

param httpMethod:

[REQUIRED]

type pathWithQueryString:

string

param pathWithQueryString:

type body:

string

param body:

type headers:

dict

param headers:
  • (string) --

    • (string) --

type clientCertificateId:

string

param clientCertificateId:

rtype:

dict

returns:

Response Syntax

{
    'status': 123,
    'body': 'string',
    'headers': {
        'string': 'string'
    },
    'log': 'string',
    'latency': 123
}

Response Structure

  • (dict) --

    Represents the response of the test invoke request in HTTP method.

    • status (integer) --

      The HTTP status code.

    • body (string) --

      The body of HTTP response.

    • headers (dict) --

      The headers of HTTP response.

      • (string) --

        • (string) --

    • log (string) --

      The Amazon API Gateway execution log for the test invoke request.

    • latency (integer) --

      The execution latency of the test invoke request.

GenerateClientCertificate (new) Link ¶

Request Syntax

client.generate_client_certificate(
    description='string'
)
type description:

string

param description:

rtype:

dict

returns:

Response Syntax

{
    'clientCertificateId': 'string',
    'description': 'string',
    'pemEncodedCertificate': 'string',
    'createdDate': datetime(2015, 1, 1),
    'expirationDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • clientCertificateId (string) --

    • description (string) --

    • pemEncodedCertificate (string) --

    • createdDate (datetime) --

    • expirationDate (datetime) --

DeleteApiKey (new) Link ¶

Deletes the ApiKey resource.

Request Syntax

client.delete_api_key(
    apiKey='string'
)
type apiKey:

string

param apiKey:

[REQUIRED]

The identifier of the ApiKey resource to be deleted.

returns:

None

UpdateIntegrationResponse (new) Link ¶

Represents an update integration response.

Request Syntax

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

string

param restApiId:

[REQUIRED]

Specifies an update integration response request's API identifier.

type resourceId:

string

param resourceId:

[REQUIRED]

Specifies an update integration response request's resource identifier.

type httpMethod:

string

param httpMethod:

[REQUIRED]

Specifies an update integration response request's HTTP method.

type statusCode:

string

param statusCode:

[REQUIRED]

Specifies an update integration response request's status code.

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

{
    'statusCode': 'string',
    'selectionPattern': 'string',
    'responseParameters': {
        'string': 'string'
    },
    'responseTemplates': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

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

    • statusCode (string) --

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

    • selectionPattern (string) --

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

    • responseParameters (dict) --

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

      • (string) --

        • (string) --

    • responseTemplates (dict) --

      Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

      • (string) --

        • (string) --