2015/11/10 - Amazon API Gateway - 6 updated api methods
{'variables': {'string': 'string'}}
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', variables={ 'string': 'string' } )
string
[REQUIRED]
The RestApi resource identifier for the Deployment resource to create.
string
[REQUIRED]
The name of the Stage resource for the Deployment resource to create.
string
The description of the Stage resource for the Deployment resource to create.
string
The description for the Deployment resource to create.
boolean
Enables a cache cluster for the Stage resource specified in the input.
string
Specifies the cache cluster size for the Stage resource specified in the input, if a cache cluster is enabled.
dict
A map that defines the stage variables for the Stage resource that is associated with the new deployment. Variable names can have alphabetic characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+
(string) --
(string) --
dict
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.
{'variables': {'string': 'string'}}
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', variables={ 'string': 'string' } )
string
[REQUIRED]
The identifier of the RestApi resource for the Stage resource to create.
string
[REQUIRED]
The name for the Stage resource.
string
[REQUIRED]
The identifier of the Deployment resource for the Stage resource.
string
The description of the Stage resource.
boolean
Whether cache clustering is enabled for the stage.
string
The stage's cache cluster size.
dict
A map that defines the stage variables for the new Stage resource. Variable names can have alphabetic characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+
(string) --
(string) --
dict
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 } }, 'variables': { '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.
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.
variables (dict) --
A map that defines the stage variables for a Stage resource. Variable names can have alphabetic characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+
(string) --
(string) --
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.
{'variables': {'string': 'string'}}
Gets information about a Stage resource.
Request Syntax
client.get_stage( restApiId='string', stageName='string' )
string
[REQUIRED]
The identifier of the RestApi resource for the Stage resource to get information about.
string
[REQUIRED]
The name of the Stage resource to get information about.
dict
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 } }, 'variables': { '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.
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.
variables (dict) --
A map that defines the stage variables for a Stage resource. Variable names can have alphabetic characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+
(string) --
(string) --
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.
{'item': {'variables': {'string': 'string'}}}
Gets information about one or more Stage resources.
Request Syntax
client.get_stages( restApiId='string', deploymentId='string' )
string
[REQUIRED]
The stages' API identifiers.
string
The stages' deployment identifiers.
dict
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 } }, 'variables': { 'string': 'string' }, '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.
variables (dict) --
A map that defines the stage variables for a Stage resource. Variable names can have alphabetic characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+
(string) --
(string) --
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.
{'stageVariables': {'string': 'string'}}
Request Syntax
client.test_invoke_method( restApiId='string', resourceId='string', httpMethod='string', pathWithQueryString='string', body='string', headers={ 'string': 'string' }, clientCertificateId='string', stageVariables={ 'string': 'string' } )
string
[REQUIRED]
string
[REQUIRED]
string
[REQUIRED]
string
string
dict
(string) --
(string) --
string
dict
(string) --
(string) --
dict
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.
{'variables': {'string': 'string'}}
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' }, ] )
string
[REQUIRED]
The identifier of the RestApi resource for the Stage resource to change information about.
string
[REQUIRED]
The name of the Stage resource to change information about.
list
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.
dict
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 } }, 'variables': { '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.
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.
variables (dict) --
A map that defines the stage variables for a Stage resource. Variable names can have alphabetic characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+
(string) --
(string) --
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.