create_api_key
(**kwargs)¶Creates a unique key that you can distribute to clients who invoke your API.
See also: AWS API Documentation
Request Syntax
response = client.create_api_key(
apiId='string',
description='string',
expires=123
)
[REQUIRED]
The ID for your GraphQL API.
dict
Response Syntax
{
'apiKey': {
'id': 'string',
'description': 'string',
'expires': 123,
'deletes': 123
}
}
Response Structure
(dict) --
apiKey (dict) --
The API key.
id (string) --
The API key ID.
description (string) --
A description of the purpose of the API key.
expires (integer) --
The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.
deletes (integer) --
The time after which the API key is deleted. The date is represented as seconds since the epoch, rounded down to the nearest hour.
Exceptions
AppSync.Client.exceptions.BadRequestException
AppSync.Client.exceptions.NotFoundException
AppSync.Client.exceptions.LimitExceededException
AppSync.Client.exceptions.UnauthorizedException
AppSync.Client.exceptions.LimitExceededException
AppSync.Client.exceptions.InternalFailureException
AppSync.Client.exceptions.ApiKeyLimitExceededException
AppSync.Client.exceptions.ApiKeyValidityOutOfBoundsException