Amazon API Gateway

2017/12/19 - Amazon API Gateway - 3 new10 updated api methods

Changes  Update apigateway client to latest version

UntagResource (new) Link ¶

Removes Tags from a given resource.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
type resourceArn:

string

param resourceArn:

[REQUIRED]

[Required] The ARN of a resource that can be tagged. At present, Stage is the only taggable resource.

type tagKeys:

list

param tagKeys:

[REQUIRED]

The Tag keys to delete.

  • (string) --

returns:

None

TagResource (new) Link ¶

Adds or updates Tags on a gievn resource.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    resourceArn='string',
    tags={
        'string': 'string'
    }
)
type resourceArn:

string

param resourceArn:

[REQUIRED]

[Required] The ARN of a resource that can be tagged. At present, Stage is the only taggable resource.

type tags:

dict

param tags:

[REQUIRED]

[Required] Key/Value map of strings. Valid character set is [a-zA-Z+-=._:/]. Tag key can be up to 128 characters and must not start with "aws:". Tag value can be up to 256 characters.

  • (string) --

    • (string) --

returns:

None

GetTags (new) Link ¶

Gets the Tags collection for a given resource.

See also: AWS API Documentation

Request Syntax

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

string

param resourceArn:

[REQUIRED]

[Required] The ARN of a resource that can be tagged. At present, Stage is the only taggable resource.

type position:

string

param position:

(Not currently supported) The current pagination position in the paged result set.

type limit:

integer

param limit:

(Not currently supported) The maximum number of returned results per page.

rtype:

dict

returns:

Response Syntax

{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    A collection of Tags associated with a given resource.

    • tags (dict) --

      A collection of Tags associated with a given resource.

      • (string) --

        • (string) --

CreateRestApi (updated) Link ¶
Changes (both)
{'apiKeySource': 'HEADER | AUTHORIZER', 'minimumCompressionSize': 'integer'}

Creates a new RestApi resource.

See also: AWS API Documentation

Request Syntax

client.create_rest_api(
    name='string',
    description='string',
    version='string',
    cloneFrom='string',
    binaryMediaTypes=[
        'string',
    ],
    minimumCompressionSize=123,
    apiKeySource='HEADER'|'AUTHORIZER',
    endpointConfiguration={
        'types': [
            'REGIONAL'|'EDGE',
        ]
    }
)
type name:

string

param name:

[REQUIRED]

The name of the RestApi.

type description:

string

param description:

The description of the RestApi.

type version:

string

param version:

A version identifier for the API.

type cloneFrom:

string

param cloneFrom:

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

type binaryMediaTypes:

list

param binaryMediaTypes:

The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

  • (string) --

type minimumCompressionSize:

integer

param minimumCompressionSize:

A nullable integer used to enable (non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable (null) compression on an API. When compression is enabled, compression or decompression are not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.

type apiKeySource:

string

param apiKeySource:

The source of the API key for metring requests according to a usage plan. Valid values are

  • HEADER to read the API key from the X-API-Key header of a request.

  • AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

type endpointConfiguration:

dict

param endpointConfiguration:

The endpoint configuration of this RestApi showing the endpoint types of the API.

  • types (list) --

    A list of endpoint types of an API ( RestApi) or its custom domain name ( DomainName). For an edge-optimized API and its custom domain name, the endpoint type is "EDGE". For a regional API and its custom domain name, the endpoint type is REGIONAL.

    • (string) --

      The endpoint type. The valid value is EDGE for edge-optimized API setup, most suitable for mobile applications, REGIONAL for regional API endpoint setup, most suitable for calling from AWS Region

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1),
    'version': 'string',
    'warnings': [
        'string',
    ],
    'binaryMediaTypes': [
        'string',
    ],
    'minimumCompressionSize': 123,
    'apiKeySource': 'HEADER'|'AUTHORIZER',
    'endpointConfiguration': {
        'types': [
            'REGIONAL'|'EDGE',
        ]
    }
}

Response Structure

  • (dict) --

    Represents a REST API.

    Create an API

    • id (string) --

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

    • name (string) --

      The API's name.

    • description (string) --

      The API's description.

    • createdDate (datetime) --

      The timestamp when the API was created.

    • version (string) --

      A version identifier for the API.

    • warnings (list) --

      The warning messages reported when failonwarnings is turned on during API import.

      • (string) --

    • binaryMediaTypes (list) --

      The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

      • (string) --

    • minimumCompressionSize (integer) --

      A nullable integer used to enable (non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable (null) compression on an API. When compression is enabled, compression or decompression are not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.

    • apiKeySource (string) --

      The source of the API key for metring requests according to a usage plan. Valid values are

      • HEADER to read the API key from the X-API-Key header of a request.

      • AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

    • endpointConfiguration (dict) --

      The endpoint configuration of this RestApi showing the endpoint types of the API.

      • types (list) --

        A list of endpoint types of an API ( RestApi) or its custom domain name ( DomainName). For an edge-optimized API and its custom domain name, the endpoint type is "EDGE". For a regional API and its custom domain name, the endpoint type is REGIONAL.

        • (string) --

          The endpoint type. The valid value is EDGE for edge-optimized API setup, most suitable for mobile applications, REGIONAL for regional API endpoint setup, most suitable for calling from AWS Region

CreateStage (updated) Link ¶
Changes (both)
{'tags': {'string': 'string'}}

Creates a new Stage resource that references a pre-existing Deployment for the API.

See also: AWS API Documentation

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',
    variables={
        'string': 'string'
    },
    documentationVersion='string',
    canarySettings={
        'percentTraffic': 123.0,
        'deploymentId': 'string',
        'stageVariableOverrides': {
            'string': 'string'
        },
        'useStageCache': True|False
    },
    tags={
        'string': 'string'
    }
)
type restApiId:

string

param restApiId:

[REQUIRED]

The string identifier of the associated RestApi.

type stageName:

string

param stageName:

[REQUIRED]

[Required] The name for the Stage resource.

type deploymentId:

string

param deploymentId:

[REQUIRED]

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

type variables:

dict

param variables:

A map that defines the stage variables for the new Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

  • (string) --

    • (string) --

type documentationVersion:

string

param documentationVersion:

The version of the associated API documentation.

type canarySettings:

dict

param canarySettings:

The canary deployment settings of this stage.

  • percentTraffic (float) --

    The percent (0-100) of traffic diverted to a canary deployment.

  • deploymentId (string) --

    The ID of the canary deployment.

  • stageVariableOverrides (dict) --

    Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values.

    • (string) --

      • (string) --

  • useStageCache (boolean) --

    A Boolean flag to indicate whether the canary deployment uses the stage cache or not.

type tags:

dict

param tags:

Key/Value map of strings. Valid character set is [a-zA-Z+-=._:/]. Tag key can be up to 128 characters and must not start with "aws:". Tag value can be up to 256 characters.

  • (string) --

    • (string) --

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,
            'requireAuthorizationForCacheControl': True|False,
            'unauthorizedCacheControlHeaderStrategy': 'FAIL_WITH_403'|'SUCCEED_WITH_RESPONSE_HEADER'|'SUCCEED_WITHOUT_RESPONSE_HEADER'
        }
    },
    'variables': {
        'string': 'string'
    },
    'documentationVersion': 'string',
    'accessLogSettings': {
        'format': 'string',
        'destinationArn': 'string'
    },
    'canarySettings': {
        'percentTraffic': 123.0,
        'deploymentId': 'string',
        'stageVariableOverrides': {
            'string': 'string'
        },
        'useStageCache': True|False
    },
    'tags': {
        'string': 'string'
    },
    '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.

    Deploy an API

    • deploymentId (string) --

      The identifier of the Deployment that the stage points to.

    • clientCertificateId (string) --

      The identifier of a client certificate for an API stage.

    • stageName (string) --

      The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to 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 (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\*/\* for overriding all methods in the stage.

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

          • requireAuthorizationForCacheControl (boolean) --

            Specifies whether authorization is required for a cache invalidation request. The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl, and the value is a Boolean.

          • unauthorizedCacheControlHeaderStrategy (string) --

            Specifies how to handle unauthorized requests for cache invalidation. The PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.

    • variables (dict) --

      A map that defines the stage variables for a Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

      • (string) --

        • (string) --

    • documentationVersion (string) --

      The version of the associated API documentation.

    • accessLogSettings (dict) --

      Settings for logging access in this stage.

      • format (string) --

        A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.

      • destinationArn (string) --

        The ARN of the CloudWatch Logs log group to receive access logs.

    • canarySettings (dict) --

      Settings for the canary deployment in this stage.

      • percentTraffic (float) --

        The percent (0-100) of traffic diverted to a canary deployment.

      • deploymentId (string) --

        The ID of the canary deployment.

      • stageVariableOverrides (dict) --

        Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values.

        • (string) --

          • (string) --

      • useStageCache (boolean) --

        A Boolean flag to indicate whether the canary deployment uses the stage cache or not.

    • tags (dict) --

      A collection of Tags associated with a given resource.

      • (string) --

        • (string) --

    • createdDate (datetime) --

      The timestamp when the stage was created.

    • lastUpdatedDate (datetime) --

      The timestamp when the stage last updated.

GetRestApi (updated) Link ¶
Changes (response)
{'apiKeySource': 'HEADER | AUTHORIZER', 'minimumCompressionSize': 'integer'}

Lists the RestApi resource in the collection.

See also: AWS API Documentation

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),
    'version': 'string',
    'warnings': [
        'string',
    ],
    'binaryMediaTypes': [
        'string',
    ],
    'minimumCompressionSize': 123,
    'apiKeySource': 'HEADER'|'AUTHORIZER',
    'endpointConfiguration': {
        'types': [
            'REGIONAL'|'EDGE',
        ]
    }
}

Response Structure

  • (dict) --

    Represents a REST API.

    Create an API

    • id (string) --

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

    • name (string) --

      The API's name.

    • description (string) --

      The API's description.

    • createdDate (datetime) --

      The timestamp when the API was created.

    • version (string) --

      A version identifier for the API.

    • warnings (list) --

      The warning messages reported when failonwarnings is turned on during API import.

      • (string) --

    • binaryMediaTypes (list) --

      The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

      • (string) --

    • minimumCompressionSize (integer) --

      A nullable integer used to enable (non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable (null) compression on an API. When compression is enabled, compression or decompression are not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.

    • apiKeySource (string) --

      The source of the API key for metring requests according to a usage plan. Valid values are

      • HEADER to read the API key from the X-API-Key header of a request.

      • AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

    • endpointConfiguration (dict) --

      The endpoint configuration of this RestApi showing the endpoint types of the API.

      • types (list) --

        A list of endpoint types of an API ( RestApi) or its custom domain name ( DomainName). For an edge-optimized API and its custom domain name, the endpoint type is "EDGE". For a regional API and its custom domain name, the endpoint type is REGIONAL.

        • (string) --

          The endpoint type. The valid value is EDGE for edge-optimized API setup, most suitable for mobile applications, REGIONAL for regional API endpoint setup, most suitable for calling from AWS Region

GetRestApis (updated) Link ¶
Changes (response)
{'items': {'apiKeySource': 'HEADER | AUTHORIZER',
           'minimumCompressionSize': 'integer'}}

Lists the RestApis resources for your collection.

See also: AWS API Documentation

Request Syntax

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

string

param position:

The current pagination position in the paged result set.

type limit:

integer

param limit:

The maximum number of returned results per page. The value is 25 by default and could be between 1 - 500.

rtype:

dict

returns:

Response Syntax

{
    'position': 'string',
    'items': [
        {
            'id': 'string',
            'name': 'string',
            'description': 'string',
            'createdDate': datetime(2015, 1, 1),
            'version': 'string',
            'warnings': [
                'string',
            ],
            'binaryMediaTypes': [
                'string',
            ],
            'minimumCompressionSize': 123,
            'apiKeySource': 'HEADER'|'AUTHORIZER',
            'endpointConfiguration': {
                'types': [
                    'REGIONAL'|'EDGE',
                ]
            }
        },
    ]
}

Response Structure

  • (dict) --

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

    Create an API

    • position (string) --

    • items (list) --

      The current page of elements from this collection.

      • (dict) --

        Represents a REST API.

        Create an API

        • id (string) --

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

        • name (string) --

          The API's name.

        • description (string) --

          The API's description.

        • createdDate (datetime) --

          The timestamp when the API was created.

        • version (string) --

          A version identifier for the API.

        • warnings (list) --

          The warning messages reported when failonwarnings is turned on during API import.

          • (string) --

        • binaryMediaTypes (list) --

          The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

          • (string) --

        • minimumCompressionSize (integer) --

          A nullable integer used to enable (non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable (null) compression on an API. When compression is enabled, compression or decompression are not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.

        • apiKeySource (string) --

          The source of the API key for metring requests according to a usage plan. Valid values are

          • HEADER to read the API key from the X-API-Key header of a request.

          • AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

        • endpointConfiguration (dict) --

          The endpoint configuration of this RestApi showing the endpoint types of the API.

          • types (list) --

            A list of endpoint types of an API ( RestApi) or its custom domain name ( DomainName). For an edge-optimized API and its custom domain name, the endpoint type is "EDGE". For a regional API and its custom domain name, the endpoint type is REGIONAL.

            • (string) --

              The endpoint type. The valid value is EDGE for edge-optimized API setup, most suitable for mobile applications, REGIONAL for regional API endpoint setup, most suitable for calling from AWS Region

GetStage (updated) Link ¶
Changes (response)
{'tags': {'string': 'string'}}

Gets information about a Stage resource.

See also: AWS API Documentation

Request Syntax

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

string

param restApiId:

[REQUIRED]

The string identifier of the associated RestApi.

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,
            'requireAuthorizationForCacheControl': True|False,
            'unauthorizedCacheControlHeaderStrategy': 'FAIL_WITH_403'|'SUCCEED_WITH_RESPONSE_HEADER'|'SUCCEED_WITHOUT_RESPONSE_HEADER'
        }
    },
    'variables': {
        'string': 'string'
    },
    'documentationVersion': 'string',
    'accessLogSettings': {
        'format': 'string',
        'destinationArn': 'string'
    },
    'canarySettings': {
        'percentTraffic': 123.0,
        'deploymentId': 'string',
        'stageVariableOverrides': {
            'string': 'string'
        },
        'useStageCache': True|False
    },
    'tags': {
        'string': 'string'
    },
    '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.

    Deploy an API

    • deploymentId (string) --

      The identifier of the Deployment that the stage points to.

    • clientCertificateId (string) --

      The identifier of a client certificate for an API stage.

    • stageName (string) --

      The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to 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 (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\*/\* for overriding all methods in the stage.

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

          • requireAuthorizationForCacheControl (boolean) --

            Specifies whether authorization is required for a cache invalidation request. The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl, and the value is a Boolean.

          • unauthorizedCacheControlHeaderStrategy (string) --

            Specifies how to handle unauthorized requests for cache invalidation. The PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.

    • variables (dict) --

      A map that defines the stage variables for a Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

      • (string) --

        • (string) --

    • documentationVersion (string) --

      The version of the associated API documentation.

    • accessLogSettings (dict) --

      Settings for logging access in this stage.

      • format (string) --

        A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.

      • destinationArn (string) --

        The ARN of the CloudWatch Logs log group to receive access logs.

    • canarySettings (dict) --

      Settings for the canary deployment in this stage.

      • percentTraffic (float) --

        The percent (0-100) of traffic diverted to a canary deployment.

      • deploymentId (string) --

        The ID of the canary deployment.

      • stageVariableOverrides (dict) --

        Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values.

        • (string) --

          • (string) --

      • useStageCache (boolean) --

        A Boolean flag to indicate whether the canary deployment uses the stage cache or not.

    • tags (dict) --

      A collection of Tags associated with a given resource.

      • (string) --

        • (string) --

    • createdDate (datetime) --

      The timestamp when the stage was created.

    • lastUpdatedDate (datetime) --

      The timestamp when the stage last updated.

GetStages (updated) Link ¶
Changes (response)
{'item': {'tags': {'string': 'string'}}}

Gets information about one or more Stage resources.

See also: AWS API Documentation

Request Syntax

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

string

param restApiId:

[REQUIRED]

The string identifier of the associated RestApi.

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,
                    'requireAuthorizationForCacheControl': True|False,
                    'unauthorizedCacheControlHeaderStrategy': 'FAIL_WITH_403'|'SUCCEED_WITH_RESPONSE_HEADER'|'SUCCEED_WITHOUT_RESPONSE_HEADER'
                }
            },
            'variables': {
                'string': 'string'
            },
            'documentationVersion': 'string',
            'accessLogSettings': {
                'format': 'string',
                'destinationArn': 'string'
            },
            'canarySettings': {
                'percentTraffic': 123.0,
                'deploymentId': 'string',
                'stageVariableOverrides': {
                    'string': 'string'
                },
                'useStageCache': True|False
            },
            'tags': {
                'string': 'string'
            },
            'createdDate': datetime(2015, 1, 1),
            'lastUpdatedDate': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

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

    Deploying API in Stages

    • item (list) --

      The current page of elements from this collection.

      • (dict) --

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

        Deploy an API

        • deploymentId (string) --

          The identifier of the Deployment that the stage points to.

        • clientCertificateId (string) --

          The identifier of a client certificate for an API stage.

        • stageName (string) --

          The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to 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 (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\*/\* for overriding all methods in the stage.

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

              • requireAuthorizationForCacheControl (boolean) --

                Specifies whether authorization is required for a cache invalidation request. The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl, and the value is a Boolean.

              • unauthorizedCacheControlHeaderStrategy (string) --

                Specifies how to handle unauthorized requests for cache invalidation. The PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.

        • variables (dict) --

          A map that defines the stage variables for a Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

          • (string) --

            • (string) --

        • documentationVersion (string) --

          The version of the associated API documentation.

        • accessLogSettings (dict) --

          Settings for logging access in this stage.

          • format (string) --

            A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.

          • destinationArn (string) --

            The ARN of the CloudWatch Logs log group to receive access logs.

        • canarySettings (dict) --

          Settings for the canary deployment in this stage.

          • percentTraffic (float) --

            The percent (0-100) of traffic diverted to a canary deployment.

          • deploymentId (string) --

            The ID of the canary deployment.

          • stageVariableOverrides (dict) --

            Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values.

            • (string) --

              • (string) --

          • useStageCache (boolean) --

            A Boolean flag to indicate whether the canary deployment uses the stage cache or not.

        • tags (dict) --

          A collection of Tags associated with a given resource.

          • (string) --

            • (string) --

        • createdDate (datetime) --

          The timestamp when the stage was created.

        • lastUpdatedDate (datetime) --

          The timestamp when the stage last updated.

ImportRestApi (updated) Link ¶
Changes (response)
{'apiKeySource': 'HEADER | AUTHORIZER', 'minimumCompressionSize': 'integer'}

A feature of the API Gateway control service for creating a new API from an external API definition file.

See also: AWS API Documentation

Request Syntax

client.import_rest_api(
    failOnWarnings=True|False,
    parameters={
        'string': 'string'
    },
    body=b'bytes'|file
)
type failOnWarnings:

boolean

param failOnWarnings:

A query parameter to indicate whether to rollback the API creation ( true) or not ( false) when a warning is encountered. The default value is false.

type parameters:

dict

param parameters:

A key-value map of context-specific query string parameters specifying the behavior of different API importing operations. The following shows operation-specific parameters and their supported values.

To exclude DocumentationParts from the import, set parameters as ignore=documentation.

To configure the endpoint type, set parameters as endpointConfigurationTypes=EDGE or endpointConfigurationTypes=REGIONAL. The default endpoint type is EDGE.

To handle imported basePath, set parameters as basePath=ignore, basePath=prepend or basePath=split.

For example, the AWS CLI command to exclude documentation from the imported API is:

aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json

The AWS CLI command to set the regional endpoint on the imported API is:

aws apigateway import-rest-api --parameters endpointConfigurationTypes=REGIONAL --body 'file:///path/to/imported-api-body.json

  • (string) --

    • (string) --

type body:

bytes or seekable file-like object

param body:

[REQUIRED]

The POST request body containing external API definitions. Currently, only Swagger definition JSON files are supported. The maximum size of the API definition file is 2MB.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1),
    'version': 'string',
    'warnings': [
        'string',
    ],
    'binaryMediaTypes': [
        'string',
    ],
    'minimumCompressionSize': 123,
    'apiKeySource': 'HEADER'|'AUTHORIZER',
    'endpointConfiguration': {
        'types': [
            'REGIONAL'|'EDGE',
        ]
    }
}

Response Structure

  • (dict) --

    Represents a REST API.

    Create an API

    • id (string) --

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

    • name (string) --

      The API's name.

    • description (string) --

      The API's description.

    • createdDate (datetime) --

      The timestamp when the API was created.

    • version (string) --

      A version identifier for the API.

    • warnings (list) --

      The warning messages reported when failonwarnings is turned on during API import.

      • (string) --

    • binaryMediaTypes (list) --

      The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

      • (string) --

    • minimumCompressionSize (integer) --

      A nullable integer used to enable (non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable (null) compression on an API. When compression is enabled, compression or decompression are not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.

    • apiKeySource (string) --

      The source of the API key for metring requests according to a usage plan. Valid values are

      • HEADER to read the API key from the X-API-Key header of a request.

      • AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

    • endpointConfiguration (dict) --

      The endpoint configuration of this RestApi showing the endpoint types of the API.

      • types (list) --

        A list of endpoint types of an API ( RestApi) or its custom domain name ( DomainName). For an edge-optimized API and its custom domain name, the endpoint type is "EDGE". For a regional API and its custom domain name, the endpoint type is REGIONAL.

        • (string) --

          The endpoint type. The valid value is EDGE for edge-optimized API setup, most suitable for mobile applications, REGIONAL for regional API endpoint setup, most suitable for calling from AWS Region

PutRestApi (updated) Link ¶
Changes (response)
{'apiKeySource': 'HEADER | AUTHORIZER', 'minimumCompressionSize': 'integer'}

A feature of the API Gateway control service for updating an existing API with an input of external API definitions. The update can take the form of merging the supplied definition into the existing API or overwriting the existing API.

See also: AWS API Documentation

Request Syntax

client.put_rest_api(
    restApiId='string',
    mode='merge'|'overwrite',
    failOnWarnings=True|False,
    parameters={
        'string': 'string'
    },
    body=b'bytes'|file
)
type restApiId:

string

param restApiId:

[REQUIRED]

The string identifier of the associated RestApi.

type mode:

string

param mode:

The mode query parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".

type failOnWarnings:

boolean

param failOnWarnings:

A query parameter to indicate whether to rollback the API update ( true) or not ( false) when a warning is encountered. The default value is false.

type parameters:

dict

param parameters:

Custom header parameters as part of the request. For example, to exclude DocumentationParts from an imported API, set ignore=documentation as a parameters value, as in the AWS CLI command of aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json.

  • (string) --

    • (string) --

type body:

bytes or seekable file-like object

param body:

[REQUIRED]

The PUT request body containing external API definitions. Currently, only Swagger definition JSON files are supported. The maximum size of the API definition file is 2MB.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1),
    'version': 'string',
    'warnings': [
        'string',
    ],
    'binaryMediaTypes': [
        'string',
    ],
    'minimumCompressionSize': 123,
    'apiKeySource': 'HEADER'|'AUTHORIZER',
    'endpointConfiguration': {
        'types': [
            'REGIONAL'|'EDGE',
        ]
    }
}

Response Structure

  • (dict) --

    Represents a REST API.

    Create an API

    • id (string) --

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

    • name (string) --

      The API's name.

    • description (string) --

      The API's description.

    • createdDate (datetime) --

      The timestamp when the API was created.

    • version (string) --

      A version identifier for the API.

    • warnings (list) --

      The warning messages reported when failonwarnings is turned on during API import.

      • (string) --

    • binaryMediaTypes (list) --

      The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

      • (string) --

    • minimumCompressionSize (integer) --

      A nullable integer used to enable (non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable (null) compression on an API. When compression is enabled, compression or decompression are not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.

    • apiKeySource (string) --

      The source of the API key for metring requests according to a usage plan. Valid values are

      • HEADER to read the API key from the X-API-Key header of a request.

      • AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

    • endpointConfiguration (dict) --

      The endpoint configuration of this RestApi showing the endpoint types of the API.

      • types (list) --

        A list of endpoint types of an API ( RestApi) or its custom domain name ( DomainName). For an edge-optimized API and its custom domain name, the endpoint type is "EDGE". For a regional API and its custom domain name, the endpoint type is REGIONAL.

        • (string) --

          The endpoint type. The valid value is EDGE for edge-optimized API setup, most suitable for mobile applications, REGIONAL for regional API endpoint setup, most suitable for calling from AWS Region

UpdateRestApi (updated) Link ¶
Changes (response)
{'apiKeySource': 'HEADER | AUTHORIZER', 'minimumCompressionSize': 'integer'}

Changes information about the specified API.

See also: AWS API Documentation

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 string identifier of the associated RestApi.

type patchOperations:

list

param patchOperations:

A list of update operations to be applied to the specified resource and in the order specified in this 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) --

      An update operation to be performed with this PATCH request. The valid value can be add, remove, replace or copy. Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

    • path (string) --

      The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

    • value (string) --

      The new target value of the update operation. It is applicable for the add or replace operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '{"a": ...}'. In a Windows shell, see Using JSON for Parameters.

    • from (string) --

      The copy update operation's source as identified by a JSON-Pointer value referencing the location within the targeted resource to copy the value from. For example, to promote a canary deployment, you copy the canary deployment ID to the affiliated deployment ID by calling a PATCH request on a Stage resource with "op":"copy", "from":"/canarySettings/deploymentId" and "path":"/deploymentId".

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1),
    'version': 'string',
    'warnings': [
        'string',
    ],
    'binaryMediaTypes': [
        'string',
    ],
    'minimumCompressionSize': 123,
    'apiKeySource': 'HEADER'|'AUTHORIZER',
    'endpointConfiguration': {
        'types': [
            'REGIONAL'|'EDGE',
        ]
    }
}

Response Structure

  • (dict) --

    Represents a REST API.

    Create an API

    • id (string) --

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

    • name (string) --

      The API's name.

    • description (string) --

      The API's description.

    • createdDate (datetime) --

      The timestamp when the API was created.

    • version (string) --

      A version identifier for the API.

    • warnings (list) --

      The warning messages reported when failonwarnings is turned on during API import.

      • (string) --

    • binaryMediaTypes (list) --

      The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

      • (string) --

    • minimumCompressionSize (integer) --

      A nullable integer used to enable (non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable (null) compression on an API. When compression is enabled, compression or decompression are not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.

    • apiKeySource (string) --

      The source of the API key for metring requests according to a usage plan. Valid values are

      • HEADER to read the API key from the X-API-Key header of a request.

      • AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

    • endpointConfiguration (dict) --

      The endpoint configuration of this RestApi showing the endpoint types of the API.

      • types (list) --

        A list of endpoint types of an API ( RestApi) or its custom domain name ( DomainName). For an edge-optimized API and its custom domain name, the endpoint type is "EDGE". For a regional API and its custom domain name, the endpoint type is REGIONAL.

        • (string) --

          The endpoint type. The valid value is EDGE for edge-optimized API setup, most suitable for mobile applications, REGIONAL for regional API endpoint setup, most suitable for calling from AWS Region

UpdateStage (updated) Link ¶
Changes (response)
{'tags': {'string': 'string'}}

Changes information about a Stage resource.

See also: AWS API Documentation

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 string identifier of the associated RestApi.

type stageName:

string

param stageName:

[REQUIRED]

The name of the Stage resource to change information about.

type patchOperations:

list

param patchOperations:

A list of update operations to be applied to the specified resource and in the order specified in this 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) --

      An update operation to be performed with this PATCH request. The valid value can be add, remove, replace or copy. Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

    • path (string) --

      The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

    • value (string) --

      The new target value of the update operation. It is applicable for the add or replace operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '{"a": ...}'. In a Windows shell, see Using JSON for Parameters.

    • from (string) --

      The copy update operation's source as identified by a JSON-Pointer value referencing the location within the targeted resource to copy the value from. For example, to promote a canary deployment, you copy the canary deployment ID to the affiliated deployment ID by calling a PATCH request on a Stage resource with "op":"copy", "from":"/canarySettings/deploymentId" and "path":"/deploymentId".

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,
            'requireAuthorizationForCacheControl': True|False,
            'unauthorizedCacheControlHeaderStrategy': 'FAIL_WITH_403'|'SUCCEED_WITH_RESPONSE_HEADER'|'SUCCEED_WITHOUT_RESPONSE_HEADER'
        }
    },
    'variables': {
        'string': 'string'
    },
    'documentationVersion': 'string',
    'accessLogSettings': {
        'format': 'string',
        'destinationArn': 'string'
    },
    'canarySettings': {
        'percentTraffic': 123.0,
        'deploymentId': 'string',
        'stageVariableOverrides': {
            'string': 'string'
        },
        'useStageCache': True|False
    },
    'tags': {
        'string': 'string'
    },
    '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.

    Deploy an API

    • deploymentId (string) --

      The identifier of the Deployment that the stage points to.

    • clientCertificateId (string) --

      The identifier of a client certificate for an API stage.

    • stageName (string) --

      The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to 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 (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\*/\* for overriding all methods in the stage.

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

          • requireAuthorizationForCacheControl (boolean) --

            Specifies whether authorization is required for a cache invalidation request. The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl, and the value is a Boolean.

          • unauthorizedCacheControlHeaderStrategy (string) --

            Specifies how to handle unauthorized requests for cache invalidation. The PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.

    • variables (dict) --

      A map that defines the stage variables for a Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

      • (string) --

        • (string) --

    • documentationVersion (string) --

      The version of the associated API documentation.

    • accessLogSettings (dict) --

      Settings for logging access in this stage.

      • format (string) --

        A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.

      • destinationArn (string) --

        The ARN of the CloudWatch Logs log group to receive access logs.

    • canarySettings (dict) --

      Settings for the canary deployment in this stage.

      • percentTraffic (float) --

        The percent (0-100) of traffic diverted to a canary deployment.

      • deploymentId (string) --

        The ID of the canary deployment.

      • stageVariableOverrides (dict) --

        Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values.

        • (string) --

          • (string) --

      • useStageCache (boolean) --

        A Boolean flag to indicate whether the canary deployment uses the stage cache or not.

    • tags (dict) --

      A collection of Tags associated with a given resource.

      • (string) --

        • (string) --

    • createdDate (datetime) --

      The timestamp when the stage was created.

    • lastUpdatedDate (datetime) --

      The timestamp when the stage last updated.