APIGateway / Client / import_api_keys
import_api_keys#
- APIGateway.Client.import_api_keys(**kwargs)#
Import API keys from an external source, such as a CSV-formatted file.
See also: AWS API Documentation
Request Syntax
response = client.import_api_keys( body=b'bytes'|file, format='csv', failOnWarnings=True|False )
- Parameters:
body (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.
format (string) –
[REQUIRED]
A query parameter to specify the input format to imported API keys. Currently, only the
csv
format is supported.failOnWarnings (boolean) – A query parameter to indicate whether to rollback ApiKey importation (
true
) or not (false
) when error is encountered.
- Return type:
dict
- Returns:
Response Syntax
{ 'ids': [ 'string', ], 'warnings': [ 'string', ] }
Response Structure
(dict) –
The identifier of an ApiKey used in a UsagePlan.
ids (list) –
A list of all the ApiKey identifiers.
(string) –
warnings (list) –
A list of warning messages.
(string) –
Exceptions
APIGateway.Client.exceptions.BadRequestException
APIGateway.Client.exceptions.ConflictException
APIGateway.Client.exceptions.LimitExceededException
APIGateway.Client.exceptions.NotFoundException
APIGateway.Client.exceptions.UnauthorizedException
APIGateway.Client.exceptions.TooManyRequestsException