CredentialBroker / Client / get_api_key
get_api_key¶
- CredentialBroker.Client.get_api_key(**kwargs)¶
Retrieves the API key held by an API key credential provider. The broker reads the key from the AWS Secrets Manager secret the provider was configured with and returns it, so your workload does not need its own access to that secret.
See also: AWS API Documentation
Request Syntax
response = client.get_api_key( credentialProviderArn='string' )
- Parameters:
credentialProviderArn (string) –
[REQUIRED]
Amazon Resource Name of the credential provider to obtain the key from. The provider must be an API key provider and must be READY.
- Return type:
dict
- Returns:
Response Syntax
{ 'apiKey': 'string' }
Response Structure
(dict) –
apiKey (string) –
The API key. Present it to the third-party API however that API expects, commonly a header or query parameter.
Exceptions
CredentialBroker.Client.exceptions.ThrottlingExceptionCredentialBroker.Client.exceptions.ResourceNotFoundExceptionCredentialBroker.Client.exceptions.InternalServerExceptionCredentialBroker.Client.exceptions.AccessDeniedExceptionCredentialBroker.Client.exceptions.ValidationException