AmplifyGen3 / Client / get_api_key
get_api_key¶
- AmplifyGen3.Client.get_api_key(**kwargs)¶
Returns an API key for a branch, including the key value. The key value is a credential. Store it securely and don’t log it.
See also: AWS API Documentation
Request Syntax
response = client.get_api_key( BranchArn='string', ApiKeyId='string' )
- Parameters:
BranchArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the branch that the API key belongs to.
ApiKeyId (string) –
[REQUIRED]
The ID of the API key to return.
- Return type:
dict
- Returns:
Response Syntax
{ 'ApiKey': 'string', 'ApiKeyId': 'string', 'CreatedAt': datetime(2015, 1, 1), 'Status': 'ACTIVE'|'INACTIVE', 'UpdatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) –
ApiKey (string) –
The value of the API key. The key value is a credential. Store it securely and don’t log it.
ApiKeyId (string) –
The ID of the API key. Use the ID to identify the key when you list or revoke keys.
CreatedAt (datetime) –
The time at which the API key was created. The value is in ISO-8601 format.
Status (string) –
The status of the API key.
UpdatedAt (datetime) –
The time at which the API key was last updated. The value is in ISO-8601 format. For a key that was never updated, this is the same as the creation time.
Exceptions