2016/08/16 - Amazon API Gateway - 12 new6 updated api methods
Changes Update apigateway client to latest version
Gets all the usage plan keys representing the API keys added to a specified usage plan.
Request Syntax
client.get_usage_plan_keys( usagePlanId='string', position='string', limit=123, nameQuery='string' )
string
[REQUIRED]
The Id of the UsagePlan resource representing the usage plan containing the to-be-retrieved UsagePlanKey resource representing a plan customer.
string
A query parameter specifying the zero-based index specifying the position of a usage plan key.
integer
A query parameter specifying the maximum number usage plan keys returned by the GET request.
string
A query parameter specifying the name of the to-be-returned usage plan keys.
dict
Response Syntax
{ 'position': 'string', 'items': [ { 'id': 'string', 'type': 'string', 'value': 'string', 'name': 'string' }, ] }
Response Structure
(dict) --
Represents the collection of usage plan keys added to usage plans for the associated API keys and, possibly, other types of keys.
position (string) --
items (list) --
Gets the current item of the usage plan keys collection.
(dict) --
Represents a usage plan key to identify a plan customer.
To associate an API stage with a selected API key in a usage plan, you must create a UsagePlanKey resource to represent the selected ApiKey.
id (string) --
The Id of a usage plan key.
type (string) --
The type of a usage plan key. Currently, the valid key type is API_KEY.
value (string) --
The value of a usage plan key.
name (string) --
The name of a usage plan key.
Gets all the usage plans of the caller's account.
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' } }, ] }
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".
Deletes a usage plan key and remove the underlying API key from the associated usage plan.
Request Syntax
client.delete_usage_plan_key( usagePlanId='string', keyId='string' )
string
[REQUIRED]
The Id of the UsagePlan resource representing the usage plan containing the to-be-deleted UsagePlanKey resource representing a plan customer.
string
[REQUIRED]
The Id of the UsagePlanKey resource to be deleted.
None
Gets a usage plan of a given plan identifier.
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' } }
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".
Gets a usage plan key of a given key identifier.
Request Syntax
client.get_usage_plan_key( usagePlanId='string', keyId='string' )
string
[REQUIRED]
The Id of the UsagePlan resource representing the usage plan containing the to-be-retrieved UsagePlanKey resource representing a plan customer.
string
[REQUIRED]
The key Id of the to-be-retrieved UsagePlanKey resource representing a plan customer.
dict
Response Syntax
{ 'id': 'string', 'type': 'string', 'value': 'string', 'name': 'string' }
Response Structure
(dict) --
Represents a usage plan key to identify a plan customer.
To associate an API stage with a selected API key in a usage plan, you must create a UsagePlanKey resource to represent the selected ApiKey.
id (string) --
The Id of a usage plan key.
type (string) --
The type of a usage plan key. Currently, the valid key type is API_KEY.
value (string) --
The value of a usage plan key.
name (string) --
The name of a usage plan key.
Grants a temporary extension to the reamining quota of a usage plan associated with a specified API key.
Request Syntax
client.update_usage( usagePlanId='string', keyId='string', patchOperations=[ { 'op': 'add'|'remove'|'replace'|'move'|'copy'|'test', 'path': 'string', 'value': 'string', 'from': 'string' }, ] )
string
[REQUIRED]
The Id of the usage plan associated with the usage data.
string
[REQUIRED]
The identifier of the API key associated with the usage plan in which a temporary extension is granted to the remaining quota.
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
{ 'usagePlanId': 'string', 'startDate': 'string', 'endDate': 'string', 'position': 'string', 'items': { 'string': [ [ 123, ], ] } }
Response Structure
(dict) --
Represents the usage data of a usage plan.
usagePlanId (string) --
The plan Id associated with this usage data.
startDate (string) --
The starting date of the usage data.
endDate (string) --
The ending date of the usage data.
position (string) --
items (dict) --
The usage data, as daily logs of used and remaining quotas, over the specified time interval indexed over the API keys in a usage plan. For example, {..., "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]}, where {api_key} stands for an API key value and the daily log entry is of the format [used quota, remaining quota].
(string) --
(list) --
(list) --
(integer) --
Gets the usage data of a usage plan in a specified time interval.
Request Syntax
client.get_usage( usagePlanId='string', keyId='string', startDate='string', endDate='string', position='string', limit=123 )
string
[REQUIRED]
The Id of the usage plan associated with the usage data.
string
The Id of the API key associated with the resultant usage data.
string
[REQUIRED]
The starting date (e.g., 2016-01-01) of the usage data.
string
[REQUIRED]
The ending date (e.g., 2016-12-31) of the usage data.
string
Position
integer
The maximum number of results to be returned.
dict
Response Syntax
{ 'usagePlanId': 'string', 'startDate': 'string', 'endDate': 'string', 'position': 'string', 'items': { 'string': [ [ 123, ], ] } }
Response Structure
(dict) --
Represents the usage data of a usage plan.
usagePlanId (string) --
The plan Id associated with this usage data.
startDate (string) --
The starting date of the usage data.
endDate (string) --
The ending date of the usage data.
position (string) --
items (dict) --
The usage data, as daily logs of used and remaining quotas, over the specified time interval indexed over the API keys in a usage plan. For example, {..., "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]}, where {api_key} stands for an API key value and the daily log entry is of the format [used quota, remaining quota].
(string) --
(list) --
(list) --
(integer) --
Creates a usage plan with the throttle and quota limits, as well as the associated API stages, specified in the payload.
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' } }
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".
Creates a usage plan key for adding an existing API key to a usage plan.
Request Syntax
client.create_usage_plan_key( usagePlanId='string', keyId='string', keyType='string' )
string
[REQUIRED]
The Id of the UsagePlan resource representing the usage plan containing the to-be-created UsagePlanKey resource representing a plan customer.
string
[REQUIRED]
The identifier of a UsagePlanKey resource for a plan customer.
string
[REQUIRED]
The type of a UsagePlanKey resource for a plan customer.
dict
Response Syntax
{ 'id': 'string', 'type': 'string', 'value': 'string', 'name': 'string' }
Response Structure
(dict) --
Represents a usage plan key to identify a plan customer.
To associate an API stage with a selected API key in a usage plan, you must create a UsagePlanKey resource to represent the selected ApiKey.
id (string) --
The Id of a usage plan key.
type (string) --
The type of a usage plan key. Currently, the valid key type is API_KEY.
value (string) --
The value of a usage plan key.
name (string) --
The name of a usage plan key.
Updates a usage plan of a given plan Id.
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' } }
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".
Import API keys from an external source, such as a CSV-formatted file.
Request Syntax
client.import_api_keys( body=b'bytes'|file, format='csv', failOnWarnings=True|False )
bytes or seekable file-like object
[REQUIRED]
The payload of the POST request to import API keys. For the payload format, see API Key File Format.
string
[REQUIRED]
A query parameter to specify the input format to imported API keys. Currently, only the csv format is supported.
boolean
A query parameter to indicate whether to rollback ApiKey importation ( true) or not ( false) when error is encountered.
dict
Response Syntax
{ 'ids': [ 'string', ], 'warnings': [ 'string', ] }
Response Structure
(dict) --
The identifier of an API key used to reference an API key in a usage plan.
ids (list) --
A list of all the ApiKey identifiers.
(string) --
warnings (list) --
A list of warning messages.
(string) --
Deletes a usage plan of a given plan Id.
Request Syntax
client.delete_usage_plan( usagePlanId='string' )
string
[REQUIRED]
The Id of the to-be-deleted usage plan.
None
{'generateDistinctId': 'boolean', 'value': 'string'}Response
{'value': 'string'}
Create an ApiKey resource.
Request Syntax
client.create_api_key( name='string', description='string', enabled=True|False, generateDistinctId=True|False, value='string', stageKeys=[ { 'restApiId': 'string', 'stageName': '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.
dict
Response Syntax
{ 'id': 'string', 'value': 'string', 'name': '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.
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) --
{'apiKeyVersion': 'string', 'features': ['string']}
Gets information about the current Account resource.
Request Syntax
client.get_account()
dict
Response Syntax
{ 'cloudwatchRoleArn': 'string', 'throttleSettings': { 'burstLimit': 123, 'rateLimit': 123.0 }, 'features': [ 'string', ], 'apiKeyVersion': 'string' }
Response Structure
(dict) --
Represents an AWS account that is associated with Amazon API Gateway.
To view the account info, call GET on this resource.
Error Codes
The following exception may be thrown when the request fails.
UnauthorizedException
NotFoundException
TooManyRequestsException
For detailed error code information, including the corresponding HTTP Status Codes, see API Gateway Error Codes
Example: Get the information about an account. Request ``GET /account HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160531T184618Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} `` Response
The successful response returns a 200 OK status code and a payload similar to the following:
``{ "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/account-apigateway-{rel}.html", "name": "account", "templated": true }, "self": { "href": "/account" }, "account:update": { "href": "/account" } }, "cloudwatchRoleArn": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "throttleSettings": { "rateLimit": 500, "burstLimit": 1000 } } ``
In addition to making the REST API call directly, you can use the AWS CLI and an AWS SDK to access this resource.
cloudwatchRoleArn (string) --
The ARN of an Amazon CloudWatch role for the current Account.
throttleSettings (dict) --
Specifies the API request limits configured for the current Account.
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.
features (list) --
A list of features supported for the account. When usage plans are enabled, the features list will include an entry of "UsagePlans".
(string) --
apiKeyVersion (string) --
The version of the API keys used for the account.
{'includeValue': 'boolean'}Response
{'value': 'string'}
Gets information about the current ApiKey resource.
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', '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.
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) --
{'includeValues': 'boolean', 'nameQuery': 'string'}Response
{'items': {'value': 'string'}, 'warnings': ['string']}
Gets information about the current ApiKeys resource.
Request Syntax
client.get_api_keys( position='string', limit=123, nameQuery='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.
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', '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.
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) --
{'apiKeyVersion': 'string', 'features': ['string']}
Changes information about the current Account resource.
Request Syntax
client.update_account( patchOperations=[ { 'op': 'add'|'remove'|'replace'|'move'|'copy'|'test', 'path': 'string', 'value': 'string', 'from': 'string' }, ] )
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
{ 'cloudwatchRoleArn': 'string', 'throttleSettings': { 'burstLimit': 123, 'rateLimit': 123.0 }, 'features': [ 'string', ], 'apiKeyVersion': 'string' }
Response Structure
(dict) --
Represents an AWS account that is associated with Amazon API Gateway.
To view the account info, call GET on this resource.
Error Codes
The following exception may be thrown when the request fails.
UnauthorizedException
NotFoundException
TooManyRequestsException
For detailed error code information, including the corresponding HTTP Status Codes, see API Gateway Error Codes
Example: Get the information about an account. Request ``GET /account HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160531T184618Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} `` Response
The successful response returns a 200 OK status code and a payload similar to the following:
``{ "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/account-apigateway-{rel}.html", "name": "account", "templated": true }, "self": { "href": "/account" }, "account:update": { "href": "/account" } }, "cloudwatchRoleArn": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "throttleSettings": { "rateLimit": 500, "burstLimit": 1000 } } ``
In addition to making the REST API call directly, you can use the AWS CLI and an AWS SDK to access this resource.
cloudwatchRoleArn (string) --
The ARN of an Amazon CloudWatch role for the current Account.
throttleSettings (dict) --
Specifies the API request limits configured for the current Account.
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.
features (list) --
A list of features supported for the account. When usage plans are enabled, the features list will include an entry of "UsagePlans".
(string) --
apiKeyVersion (string) --
The version of the API keys used for the account.
{'value': 'string'}
Changes information about an ApiKey resource.
Request Syntax
client.update_api_key( apiKey='string', patchOperations=[ { 'op': 'add'|'remove'|'replace'|'move'|'copy'|'test', 'path': 'string', 'value': 'string', 'from': 'string' }, ] )
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', '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.
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) --