2016/12/01 - Amazon API Gateway - 11 new18 updated api methods
Changes Update apigateway client to latest version
See also: AWS API Documentation
Request Syntax
client.delete_documentation_part( restApiId='string', documentationPartId='string' )
string
[REQUIRED]
[Required] Specifies the identifier of an API of the to-be-deleted documentation part.
string
[REQUIRED]
[Required] The identifier of the to-be-deleted documentation part.
None
See also: AWS API Documentation
Request Syntax
client.update_documentation_version( restApiId='string', documentationVersion='string', patchOperations=[ { 'op': 'add'|'remove'|'replace'|'move'|'copy'|'test', 'path': 'string', 'value': 'string', 'from': 'string' }, ] )
string
[REQUIRED]
[Required] The identifier of an API of the to-be-updated documentation version.
string
[REQUIRED]
[Required] The version identifier of the to-be-updated documentation version.
list
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", or "replace". 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.
from (string) --
Not supported.
dict
Response Syntax
{ 'version': 'string', 'createdDate': datetime(2015, 1, 1), 'description': 'string' }
Response Structure
(dict) --
A snapshot of the documentation of an API.
Publishing API documentation involves creating a documentation version associated with an API stage and exporting the versioned documentation to an external (e.g., Swagger) file.
Documenting an API, DocumentationPart, DocumentationVersions
version (string) --
The version identifier of the API documentation snapshot.
createdDate (datetime) --
The date when the API documentation snapshot is created.
description (string) --
The description of the API documentation snapshot.
See also: AWS API Documentation
Request Syntax
client.get_documentation_part( restApiId='string', documentationPartId='string' )
string
[REQUIRED]
[Required] The identifier of an API of the to-be-retrieved documentation part.
string
[REQUIRED]
[Required] The identifier of the to-be-retrieved documentation part.
dict
Response Syntax
{ 'id': 'string', 'location': { 'type': 'API'|'AUTHORIZER'|'MODEL'|'RESOURCE'|'METHOD'|'PATH_PARAMETER'|'QUERY_PARAMETER'|'REQUEST_HEADER'|'REQUEST_BODY'|'RESPONSE'|'RESPONSE_HEADER'|'RESPONSE_BODY', 'path': 'string', 'method': 'string', 'statusCode': 'string', 'name': 'string' }, 'properties': 'string' }
Response Structure
(dict) --
A documentation part for a targeted API entity.
A documentation part consists of a content map ( properties) and a target ( location). The target specifies an API entity to which the documentation content applies. The supported API entity types are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Valid location fields depend on the API entity type. All valid fields are not required.
The content map is a JSON string of API-specific key-value pairs. Although an API can use any shape for the content map, only the Swagger-compliant documentation fields will be injected into the associated API entity definition in the exported Swagger definition file.
Documenting an API, DocumentationParts
id (string) --
The DocumentationPart identifier, generated by Amazon API Gateway when the DocumentationPart is created.
location (dict) --
The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden.
type (string) --
The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, MODEL, or RESOURCE type.
path (string) --
The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.
method (string) --
The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.
statusCode (string) --
The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.
name (string) --
The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.
properties (string) --
A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., "{ \"description\": \"The API does ...\" }". Only Swagger-compliant documentation-related fields from the properties map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a Swagger extension of x-amazon-apigateway-documentation.
See also: AWS API Documentation
Request Syntax
client.update_documentation_part( restApiId='string', documentationPartId='string', patchOperations=[ { 'op': 'add'|'remove'|'replace'|'move'|'copy'|'test', 'path': 'string', 'value': 'string', 'from': 'string' }, ] )
string
[REQUIRED]
[Required] The identifier of an API of the to-be-updated documentation part.
string
[REQUIRED]
[Required] The identifier of the to-be-updated documentation part.
list
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", or "replace". 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.
from (string) --
Not supported.
dict
Response Syntax
{ 'id': 'string', 'location': { 'type': 'API'|'AUTHORIZER'|'MODEL'|'RESOURCE'|'METHOD'|'PATH_PARAMETER'|'QUERY_PARAMETER'|'REQUEST_HEADER'|'REQUEST_BODY'|'RESPONSE'|'RESPONSE_HEADER'|'RESPONSE_BODY', 'path': 'string', 'method': 'string', 'statusCode': 'string', 'name': 'string' }, 'properties': 'string' }
Response Structure
(dict) --
A documentation part for a targeted API entity.
A documentation part consists of a content map ( properties) and a target ( location). The target specifies an API entity to which the documentation content applies. The supported API entity types are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Valid location fields depend on the API entity type. All valid fields are not required.
The content map is a JSON string of API-specific key-value pairs. Although an API can use any shape for the content map, only the Swagger-compliant documentation fields will be injected into the associated API entity definition in the exported Swagger definition file.
Documenting an API, DocumentationParts
id (string) --
The DocumentationPart identifier, generated by Amazon API Gateway when the DocumentationPart is created.
location (dict) --
The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden.
type (string) --
The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, MODEL, or RESOURCE type.
path (string) --
The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.
method (string) --
The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.
statusCode (string) --
The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.
name (string) --
The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.
properties (string) --
A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., "{ \"description\": \"The API does ...\" }". Only Swagger-compliant documentation-related fields from the properties map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a Swagger extension of x-amazon-apigateway-documentation.
See also: AWS API Documentation
Request Syntax
client.get_documentation_version( restApiId='string', documentationVersion='string' )
string
[REQUIRED]
[Required] The identifier of the API of the to-be-retrieved documentation snapshot.
string
[REQUIRED]
[Required] The version identifier of the to-be-retrieved documentation snapshot.
dict
Response Syntax
{ 'version': 'string', 'createdDate': datetime(2015, 1, 1), 'description': 'string' }
Response Structure
(dict) --
A snapshot of the documentation of an API.
Publishing API documentation involves creating a documentation version associated with an API stage and exporting the versioned documentation to an external (e.g., Swagger) file.
Documenting an API, DocumentationPart, DocumentationVersions
version (string) --
The version identifier of the API documentation snapshot.
createdDate (datetime) --
The date when the API documentation snapshot is created.
description (string) --
The description of the API documentation snapshot.
See also: AWS API Documentation
Request Syntax
client.import_documentation_parts( restApiId='string', mode='merge'|'overwrite', failOnWarnings=True|False, body=b'bytes'|file )
string
[REQUIRED]
[Required] The identifier of an API of the to-be-imported documentation parts.
string
A query parameter to indicate whether to overwrite ( OVERWRITE) any existing DocumentationParts definition or to merge ( MERGE) the new definition into the existing one. The default value is MERGE.
boolean
A query parameter to specify whether to rollback the documentation importation ( true) or not ( false) when a warning is encountered. The default value is false.
bytes or seekable file-like object
[REQUIRED]
[Required] Raw byte array representing the to-be-imported documentation parts. To import from a Swagger file, this is a JSON object.
dict
Response Syntax
{ 'ids': [ 'string', ], 'warnings': [ 'string', ] }
Response Structure
(dict) --
A collection of the imported DocumentationPart identifiers.
This is used to return the result when documentation parts in an external (e.g., Swagger) file are imported into Amazon API Gateway Documenting an API, documentationpart:import, DocumentationPart
ids (list) --
A list of the returned documentation part identifiers.
(string) --
warnings (list) --
A list of warning messages reported during import of documentation parts.
(string) --
See also: AWS API Documentation
Request Syntax
client.delete_documentation_version( restApiId='string', documentationVersion='string' )
string
[REQUIRED]
[Required] The identifier of an API of a to-be-deleted documentation snapshot.
string
[REQUIRED]
[Required] The version identifier of a to-be-deleted documentation snapshot.
None
See also: AWS API Documentation
Request Syntax
client.get_documentation_parts( restApiId='string', type='API'|'AUTHORIZER'|'MODEL'|'RESOURCE'|'METHOD'|'PATH_PARAMETER'|'QUERY_PARAMETER'|'REQUEST_HEADER'|'REQUEST_BODY'|'RESPONSE'|'RESPONSE_HEADER'|'RESPONSE_BODY', nameQuery='string', path='string', position='string', limit=123 )
string
[REQUIRED]
[Required] The identifier of the API of the to-be-retrieved documentation parts.
string
The type of API entities of the to-be-retrieved documentation parts.
string
The name of API entities of the to-be-retrieved documentation parts.
string
The path of API entities of the to-be-retrieved documentation parts.
string
The position of the to-be-retrieved documentation part in the DocumentationParts collection.
integer
The size of the paged results.
dict
Response Syntax
{ 'position': 'string', 'items': [ { 'id': 'string', 'location': { 'type': 'API'|'AUTHORIZER'|'MODEL'|'RESOURCE'|'METHOD'|'PATH_PARAMETER'|'QUERY_PARAMETER'|'REQUEST_HEADER'|'REQUEST_BODY'|'RESPONSE'|'RESPONSE_HEADER'|'RESPONSE_BODY', 'path': 'string', 'method': 'string', 'statusCode': 'string', 'name': 'string' }, 'properties': 'string' }, ] }
Response Structure
(dict) --
The collection of documentation parts of an API.
Documenting an API, DocumentationPart
position (string) --
items (list) --
The current page of DocumentationPart resources in the DocumentationParts collection.
(dict) --
A documentation part for a targeted API entity.
A documentation part consists of a content map ( properties) and a target ( location). The target specifies an API entity to which the documentation content applies. The supported API entity types are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Valid location fields depend on the API entity type. All valid fields are not required.
The content map is a JSON string of API-specific key-value pairs. Although an API can use any shape for the content map, only the Swagger-compliant documentation fields will be injected into the associated API entity definition in the exported Swagger definition file.
Documenting an API, DocumentationParts
id (string) --
The DocumentationPart identifier, generated by Amazon API Gateway when the DocumentationPart is created.
location (dict) --
The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden.
type (string) --
The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, MODEL, or RESOURCE type.
path (string) --
The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.
method (string) --
The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.
statusCode (string) --
The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.
name (string) --
The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.
properties (string) --
A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., "{ \"description\": \"The API does ...\" }". Only Swagger-compliant documentation-related fields from the properties map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a Swagger extension of x-amazon-apigateway-documentation.
See also: AWS API Documentation
Request Syntax
client.create_documentation_version( restApiId='string', documentationVersion='string', stageName='string', description='string' )
string
[REQUIRED]
[Required] Specifies the API identifier of the to-be-created documentation version.
string
[REQUIRED]
[Required] The version identifier of the new snapshot.
string
The stage name to be associated with the new documentation snapshot.
string
A description about the new documentation snapshot.
dict
Response Syntax
{ 'version': 'string', 'createdDate': datetime(2015, 1, 1), 'description': 'string' }
Response Structure
(dict) --
A snapshot of the documentation of an API.
Publishing API documentation involves creating a documentation version associated with an API stage and exporting the versioned documentation to an external (e.g., Swagger) file.
Documenting an API, DocumentationPart, DocumentationVersions
version (string) --
The version identifier of the API documentation snapshot.
createdDate (datetime) --
The date when the API documentation snapshot is created.
description (string) --
The description of the API documentation snapshot.
See also: AWS API Documentation
Request Syntax
client.get_documentation_versions( restApiId='string', position='string', limit=123 )
string
[REQUIRED]
[Required] The identifier of an API of the to-be-retrieved documentation versions.
string
The position of the returned DocumentationVersion in the DocumentationVersions collection.
integer
The page size of the returned documentation versions.
dict
Response Syntax
{ 'position': 'string', 'items': [ { 'version': 'string', 'createdDate': datetime(2015, 1, 1), 'description': 'string' }, ] }
Response Structure
(dict) --
The collection of documentation snapshots of an API.
Use the DocumentationVersions to manage documentation snapshots associated with various API stages.
Documenting an API, DocumentationPart, DocumentationVersion
position (string) --
items (list) --
The current page of DocumentationVersion items from the DocumentationVersions collection of an API.
(dict) --
A snapshot of the documentation of an API.
Publishing API documentation involves creating a documentation version associated with an API stage and exporting the versioned documentation to an external (e.g., Swagger) file.
Documenting an API, DocumentationPart, DocumentationVersions
version (string) --
The version identifier of the API documentation snapshot.
createdDate (datetime) --
The date when the API documentation snapshot is created.
description (string) --
The description of the API documentation snapshot.
See also: AWS API Documentation
Request Syntax
client.create_documentation_part( restApiId='string', location={ 'type': 'API'|'AUTHORIZER'|'MODEL'|'RESOURCE'|'METHOD'|'PATH_PARAMETER'|'QUERY_PARAMETER'|'REQUEST_HEADER'|'REQUEST_BODY'|'RESPONSE'|'RESPONSE_HEADER'|'RESPONSE_BODY', 'path': 'string', 'method': 'string', 'statusCode': 'string', 'name': 'string' }, properties='string' )
string
[REQUIRED]
[Required] The identifier of an API of the to-be-created documentation part.
dict
[REQUIRED]
[Required] The location of the targeted API entity of the to-be-created documentation part.
type (string) -- [REQUIRED]
The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, MODEL, or RESOURCE type.
path (string) --
The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.
method (string) --
The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.
statusCode (string) --
The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.
name (string) --
The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.
string
[REQUIRED]
[Required] The new documentation content map of the targeted API entity. Enclosed key-value pairs are API-specific, but only Swagger-compliant key-value pairs can be exported and, hence, published.
dict
Response Syntax
{ 'id': 'string', 'location': { 'type': 'API'|'AUTHORIZER'|'MODEL'|'RESOURCE'|'METHOD'|'PATH_PARAMETER'|'QUERY_PARAMETER'|'REQUEST_HEADER'|'REQUEST_BODY'|'RESPONSE'|'RESPONSE_HEADER'|'RESPONSE_BODY', 'path': 'string', 'method': 'string', 'statusCode': 'string', 'name': 'string' }, 'properties': 'string' }
Response Structure
(dict) --
A documentation part for a targeted API entity.
A documentation part consists of a content map ( properties) and a target ( location). The target specifies an API entity to which the documentation content applies. The supported API entity types are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Valid location fields depend on the API entity type. All valid fields are not required.
The content map is a JSON string of API-specific key-value pairs. Although an API can use any shape for the content map, only the Swagger-compliant documentation fields will be injected into the associated API entity definition in the exported Swagger definition file.
Documenting an API, DocumentationParts
id (string) --
The DocumentationPart identifier, generated by Amazon API Gateway when the DocumentationPart is created.
location (dict) --
The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden.
type (string) --
The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, MODEL, or RESOURCE type.
path (string) --
The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.
method (string) --
The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.
statusCode (string) --
The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.
name (string) --
The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.
properties (string) --
A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., "{ \"description\": \"The API does ...\" }". Only Swagger-compliant documentation-related fields from the properties map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a Swagger extension of x-amazon-apigateway-documentation.
{'customerId': 'string'}
Create an ApiKey resource.
See also: AWS API Documentation
Request Syntax
client.create_api_key( name='string', description='string', enabled=True|False, generateDistinctId=True|False, value='string', stageKeys=[ { 'restApiId': 'string', 'stageName': 'string' }, ], customerId='string' )
string
The name of the ApiKey.
string
The description of the ApiKey.
boolean
Specifies whether the ApiKey can be used by callers.
boolean
Specifies whether ( true) or not ( false) the key identifier is distinct from the created API key value.
string
Specifies a value of the API key.
list
DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
(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.
string
An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace.
dict
Response Syntax
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ] }
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.
value (string) --
The value of the API Key.
name (string) --
The name of the API Key.
customerId (string) --
An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace.
description (string) --
The description of the API Key.
enabled (boolean) --
Specifies whether the API Key can be used by callers.
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.
stageKeys (list) --
A list of Stage resources that are associated with the ApiKey resource.
(string) --
{'version': 'string'}
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', ] )
string
[REQUIRED]
The name of the RestApi.
string
The description of the RestApi.
string
A version identifier for the API.
string
The ID of the RestApi that you want to clone from.
list
The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.
(string) --
dict
Response Syntax
{ 'id': 'string', 'name': 'string', 'description': 'string', 'createdDate': datetime(2015, 1, 1), 'version': 'string', 'warnings': [ 'string', ], 'binaryMediaTypes': [ 'string', ] }
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.
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) --
{'documentationVersion': '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' )
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 alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.
(string) --
(string) --
string
The version of the associated API documentation.
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, 'requireAuthorizationForCacheControl': True|False, 'unauthorizedCacheControlHeaderStrategy': 'FAIL_WITH_403'|'SUCCEED_WITH_RESPONSE_HEADER'|'SUCCEED_WITHOUT_RESPONSE_HEADER' } }, 'variables': { 'string': 'string' }, 'documentationVersion': '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) --
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 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 (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.
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.
{'productCode': 'string'}
Creates a usage plan with the throttle and quota limits, as well as the associated API stages, specified in the payload.
See also: AWS API Documentation
Request Syntax
client.create_usage_plan( name='string', description='string', apiStages=[ { 'apiId': 'string', 'stage': 'string' }, ], throttle={ 'burstLimit': 123, 'rateLimit': 123.0 }, quota={ 'limit': 123, 'offset': 123, 'period': 'DAY'|'WEEK'|'MONTH' } )
string
[REQUIRED]
The name of the usage plan.
string
The description of the usage plan.
list
The associated API stages of the usage plan.
(dict) --
API stage name of the associated API stage in a usage plan.
apiId (string) --
API Id of the associated API stage in a usage plan.
stage (string) --
API stage name of the associated API stage in a usage plan.
dict
The throttling limits of the usage plan.
burstLimit (integer) --
The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.
rateLimit (float) --
The API request steady-state rate limit.
dict
The quota of the usage plan.
limit (integer) --
The maximum number of requests that can be made in a given time period.
offset (integer) --
The number of requests subtracted from the given limit in the initial time period.
period (string) --
The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".
dict
Response Syntax
{ 'id': 'string', 'name': 'string', 'description': 'string', 'apiStages': [ { 'apiId': 'string', 'stage': 'string' }, ], 'throttle': { 'burstLimit': 123, 'rateLimit': 123.0 }, 'quota': { 'limit': 123, 'offset': 123, 'period': 'DAY'|'WEEK'|'MONTH' }, 'productCode': 'string' }
Response Structure
(dict) --
Represents a usage plan than can specify who can assess associated API stages with specified request limits and quotas.
In a usage plan, you associate an API by specifying the API's Id and a stage name of the specified API. You add plan customers by adding API keys to the plan.
id (string) --
The identifier of a UsagePlan resource.
name (string) --
The name of a usage plan.
description (string) --
The description of a usage plan.
apiStages (list) --
The associated API stages of a usage plan.
(dict) --
API stage name of the associated API stage in a usage plan.
apiId (string) --
API Id of the associated API stage in a usage plan.
stage (string) --
API stage name of the associated API stage in a usage plan.
throttle (dict) --
The request throttle limits of a usage plan.
burstLimit (integer) --
The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.
rateLimit (float) --
The API request steady-state rate limit.
quota (dict) --
The maximum number of permitted requests per a given unit time interval.
limit (integer) --
The maximum number of requests that can be made in a given time period.
offset (integer) --
The number of requests subtracted from the given limit in the initial time period.
period (string) --
The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".
productCode (string) --
The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
{'customerId': 'string'}
Gets information about the current ApiKey resource.
See also: AWS API Documentation
Request Syntax
client.get_api_key( apiKey='string', includeValue=True|False )
string
[REQUIRED]
The identifier of the ApiKey resource.
boolean
A boolean flag to specify whether ( true) or not ( false) the result contains the key value.
dict
Response Syntax
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ] }
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.
value (string) --
The value of the API Key.
name (string) --
The name of the API Key.
customerId (string) --
An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace.
description (string) --
The description of the API Key.
enabled (boolean) --
Specifies whether the API Key can be used by callers.
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.
stageKeys (list) --
A list of Stage resources that are associated with the ApiKey resource.
(string) --
{'items': {'customerId': 'string'}}
Gets information about the current ApiKeys resource.
See also: AWS API Documentation
Request Syntax
client.get_api_keys( position='string', limit=123, nameQuery='string', customerId='string', includeValues=True|False )
string
The position of the current ApiKeys resource to get information about.
integer
The maximum number of ApiKeys to get information about.
string
The name of queried API keys.
string
The identifier of a customer in AWS Marketplace or an external system, such as a developer portal.
boolean
A boolean flag to specify whether ( true) or not ( false) the result contains key values.
dict
Response Syntax
{ 'warnings': [ 'string', ], 'position': 'string', 'items': [ { 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ] }, ] }
Response Structure
(dict) --
Represents a collection of API keys as represented by an ApiKeys resource.
warnings (list) --
A list of warning messages logged during the import of API keys when the failOnWarnings option is set to true.
(string) --
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.
value (string) --
The value of the API Key.
name (string) --
The name of the API Key.
customerId (string) --
An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace.
description (string) --
The description of the API Key.
enabled (boolean) --
Specifies whether the API Key can be used by callers.
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.
stageKeys (list) --
A list of Stage resources that are associated with the ApiKey resource.
(string) --
{'version': 'string'}
Lists the RestApi resource in the collection.
See also: AWS API Documentation
Request Syntax
client.get_rest_api( restApiId='string' )
string
[REQUIRED]
The identifier of the RestApi resource.
dict
Response Syntax
{ 'id': 'string', 'name': 'string', 'description': 'string', 'createdDate': datetime(2015, 1, 1), 'version': 'string', 'warnings': [ 'string', ], 'binaryMediaTypes': [ 'string', ] }
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.
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) --
{'items': {'version': 'string'}}
Lists the RestApis resources for your collection.
See also: AWS API Documentation
Request Syntax
client.get_rest_apis( position='string', limit=123 )
string
The position of the current RestApis resource in the collection to get information about.
integer
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.
dict
Response Syntax
{ 'position': 'string', 'items': [ { 'id': 'string', 'name': 'string', 'description': 'string', 'createdDate': datetime(2015, 1, 1), 'version': 'string', 'warnings': [ 'string', ], 'binaryMediaTypes': [ 'string', ] }, ] }
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.
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.
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) --
{'documentationVersion': 'string'}
Gets information about a Stage resource.
See also: AWS API Documentation
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, 'requireAuthorizationForCacheControl': True|False, 'unauthorizedCacheControlHeaderStrategy': 'FAIL_WITH_403'|'SUCCEED_WITH_RESPONSE_HEADER'|'SUCCEED_WITHOUT_RESPONSE_HEADER' } }, 'variables': { 'string': 'string' }, 'documentationVersion': '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) --
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 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 (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.
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': {'documentationVersion': 'string'}}
Gets information about one or more Stage resources.
See also: AWS API Documentation
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, 'requireAuthorizationForCacheControl': True|False, 'unauthorizedCacheControlHeaderStrategy': 'FAIL_WITH_403'|'SUCCEED_WITH_RESPONSE_HEADER'|'SUCCEED_WITHOUT_RESPONSE_HEADER' } }, 'variables': { 'string': 'string' }, 'documentationVersion': '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.
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) --
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 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 (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.
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.
{'productCode': 'string'}
Gets a usage plan of a given plan identifier.
See also: AWS API Documentation
Request Syntax
client.get_usage_plan( usagePlanId='string' )
string
[REQUIRED]
The identifier of the UsagePlan resource to be retrieved.
dict
Response Syntax
{ 'id': 'string', 'name': 'string', 'description': 'string', 'apiStages': [ { 'apiId': 'string', 'stage': 'string' }, ], 'throttle': { 'burstLimit': 123, 'rateLimit': 123.0 }, 'quota': { 'limit': 123, 'offset': 123, 'period': 'DAY'|'WEEK'|'MONTH' }, 'productCode': 'string' }
Response Structure
(dict) --
Represents a usage plan than can specify who can assess associated API stages with specified request limits and quotas.
In a usage plan, you associate an API by specifying the API's Id and a stage name of the specified API. You add plan customers by adding API keys to the plan.
id (string) --
The identifier of a UsagePlan resource.
name (string) --
The name of a usage plan.
description (string) --
The description of a usage plan.
apiStages (list) --
The associated API stages of a usage plan.
(dict) --
API stage name of the associated API stage in a usage plan.
apiId (string) --
API Id of the associated API stage in a usage plan.
stage (string) --
API stage name of the associated API stage in a usage plan.
throttle (dict) --
The request throttle limits of a usage plan.
burstLimit (integer) --
The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.
rateLimit (float) --
The API request steady-state rate limit.
quota (dict) --
The maximum number of permitted requests per a given unit time interval.
limit (integer) --
The maximum number of requests that can be made in a given time period.
offset (integer) --
The number of requests subtracted from the given limit in the initial time period.
period (string) --
The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".
productCode (string) --
The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
{'items': {'productCode': 'string'}}
Gets all the usage plans of the caller's account.
See also: AWS API Documentation
Request Syntax
client.get_usage_plans( position='string', keyId='string', limit=123 )
string
The zero-based array index specifying the position of the to-be-retrieved UsagePlan resource.
string
The identifier of the API key associated with the usage plans.
integer
The number of UsagePlan resources to be returned as the result.
dict
Response Syntax
{ 'position': 'string', 'items': [ { 'id': 'string', 'name': 'string', 'description': 'string', 'apiStages': [ { 'apiId': 'string', 'stage': 'string' }, ], 'throttle': { 'burstLimit': 123, 'rateLimit': 123.0 }, 'quota': { 'limit': 123, 'offset': 123, 'period': 'DAY'|'WEEK'|'MONTH' }, 'productCode': 'string' }, ] }
Response Structure
(dict) --
Represents a collection of usage plans for an AWS account.
position (string) --
items (list) --
Gets the current item when enumerating the collection of UsagePlan.
(dict) --
Represents a usage plan than can specify who can assess associated API stages with specified request limits and quotas.
In a usage plan, you associate an API by specifying the API's Id and a stage name of the specified API. You add plan customers by adding API keys to the plan.
id (string) --
The identifier of a UsagePlan resource.
name (string) --
The name of a usage plan.
description (string) --
The description of a usage plan.
apiStages (list) --
The associated API stages of a usage plan.
(dict) --
API stage name of the associated API stage in a usage plan.
apiId (string) --
API Id of the associated API stage in a usage plan.
stage (string) --
API stage name of the associated API stage in a usage plan.
throttle (dict) --
The request throttle limits of a usage plan.
burstLimit (integer) --
The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.
rateLimit (float) --
The API request steady-state rate limit.
quota (dict) --
The maximum number of permitted requests per a given unit time interval.
limit (integer) --
The maximum number of requests that can be made in a given time period.
offset (integer) --
The number of requests subtracted from the given limit in the initial time period.
period (string) --
The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".
productCode (string) --
The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
{'version': 'string'}
A feature of the Amazon 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 )
boolean
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.
dict
Custom header parameters as part of the request.
(string) --
(string) --
bytes or seekable file-like object
[REQUIRED]
The POST request body containing external API definitions. Currently, only Swagger definition JSON files are supported.
dict
Response Syntax
{ 'id': 'string', 'name': 'string', 'description': 'string', 'createdDate': datetime(2015, 1, 1), 'version': 'string', 'warnings': [ 'string', ], 'binaryMediaTypes': [ 'string', ] }
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.
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) --
{'version': 'string'}
A feature of the Amazon 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 )
string
[REQUIRED]
The identifier of the RestApi to be updated.
string
The mode query parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".
boolean
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.
dict
Custom headers supplied as part of the request.
(string) --
(string) --
bytes or seekable file-like object
[REQUIRED]
The PUT request body containing external API definitions. Currently, only Swagger definition JSON files are supported.
dict
Response Syntax
{ 'id': 'string', 'name': 'string', 'description': 'string', 'createdDate': datetime(2015, 1, 1), 'version': 'string', 'warnings': [ 'string', ], 'binaryMediaTypes': [ 'string', ] }
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.
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) --
{'customerId': 'string'}
Changes information about an ApiKey resource.
See also: AWS API Documentation
Request Syntax
client.update_api_key( apiKey='string', patchOperations=[ { 'op': 'add'|'remove'|'replace'|'move'|'copy'|'test', 'path': 'string', 'value': 'string', 'from': 'string' }, ] )
string
[REQUIRED]
The identifier of the ApiKey resource to be updated.
list
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", or "replace". 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.
from (string) --
Not supported.
dict
Response Syntax
{ 'id': 'string', 'value': 'string', 'name': 'string', 'customerId': 'string', 'description': 'string', 'enabled': True|False, 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1), 'stageKeys': [ 'string', ] }
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.
value (string) --
The value of the API Key.
name (string) --
The name of the API Key.
customerId (string) --
An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace.
description (string) --
The description of the API Key.
enabled (boolean) --
Specifies whether the API Key can be used by callers.
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.
stageKeys (list) --
A list of Stage resources that are associated with the ApiKey resource.
(string) --
{'version': 'string'}
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' }, ] )
string
[REQUIRED]
The ID of the RestApi you want to update.
list
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", or "replace". 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.
from (string) --
Not supported.
dict
Response Syntax
{ 'id': 'string', 'name': 'string', 'description': 'string', 'createdDate': datetime(2015, 1, 1), 'version': 'string', 'warnings': [ 'string', ], 'binaryMediaTypes': [ 'string', ] }
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.
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) --
{'documentationVersion': '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' }, ] )
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 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", or "replace". 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.
from (string) --
Not supported.
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, 'requireAuthorizationForCacheControl': True|False, 'unauthorizedCacheControlHeaderStrategy': 'FAIL_WITH_403'|'SUCCEED_WITH_RESPONSE_HEADER'|'SUCCEED_WITHOUT_RESPONSE_HEADER' } }, 'variables': { 'string': 'string' }, 'documentationVersion': '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) --
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 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 (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.
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.
{'productCode': 'string'}
Updates a usage plan of a given plan Id.
See also: AWS API Documentation
Request Syntax
client.update_usage_plan( usagePlanId='string', patchOperations=[ { 'op': 'add'|'remove'|'replace'|'move'|'copy'|'test', 'path': 'string', 'value': 'string', 'from': 'string' }, ] )
string
[REQUIRED]
The Id of the to-be-updated usage plan.
list
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", or "replace". 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.
from (string) --
Not supported.
dict
Response Syntax
{ 'id': 'string', 'name': 'string', 'description': 'string', 'apiStages': [ { 'apiId': 'string', 'stage': 'string' }, ], 'throttle': { 'burstLimit': 123, 'rateLimit': 123.0 }, 'quota': { 'limit': 123, 'offset': 123, 'period': 'DAY'|'WEEK'|'MONTH' }, 'productCode': 'string' }
Response Structure
(dict) --
Represents a usage plan than can specify who can assess associated API stages with specified request limits and quotas.
In a usage plan, you associate an API by specifying the API's Id and a stage name of the specified API. You add plan customers by adding API keys to the plan.
id (string) --
The identifier of a UsagePlan resource.
name (string) --
The name of a usage plan.
description (string) --
The description of a usage plan.
apiStages (list) --
The associated API stages of a usage plan.
(dict) --
API stage name of the associated API stage in a usage plan.
apiId (string) --
API Id of the associated API stage in a usage plan.
stage (string) --
API stage name of the associated API stage in a usage plan.
throttle (dict) --
The request throttle limits of a usage plan.
burstLimit (integer) --
The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.
rateLimit (float) --
The API request steady-state rate limit.
quota (dict) --
The maximum number of permitted requests per a given unit time interval.
limit (integer) --
The maximum number of requests that can be made in a given time period.
offset (integer) --
The number of requests subtracted from the given limit in the initial time period.
period (string) --
The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".
productCode (string) --
The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.