BedrockAgentCoreControl / Client / create_api_key_credential_provider
create_api_key_credential_provider¶
- BedrockAgentCoreControl.Client.create_api_key_credential_provider(**kwargs)¶
Creates a new API key credential provider.
See also: AWS API Documentation
Request Syntax
response = client.create_api_key_credential_provider( name='string', apiKey='string', apiKeySecretConfig={ 'secretId': 'string', 'jsonKey': 'string' }, apiKeySecretSource='MANAGED'|'EXTERNAL', tags={ 'string': 'string' } )
- Parameters:
name (string) –
[REQUIRED]
The name of the API key credential provider. The name must be unique within your account.
apiKey (string) – The API key to use for authentication. This value is encrypted and stored securely.
apiKeySecretConfig (dict) –
A reference to the AWS Secrets Manager secret that stores the API key. This includes the secret ID and the JSON key used to extract the API key value from the secret. Required when
apiKeySecretSourceis set toEXTERNAL.secretId (string) – [REQUIRED]
The ID of the AWS Secrets Manager secret that stores the secret value.
jsonKey (string) – [REQUIRED]
The JSON key used to extract the secret value from the AWS Secrets Manager secret.
apiKeySecretSource (string) – The source type of the API key secret. Use
MANAGEDif the secret is managed by the service, orEXTERNALif you manage the secret yourself in AWS Secrets Manager.tags (dict) –
A map of tag keys and values to assign to the API key credential provider. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.
(string) –
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'apiKeySecretArn': { 'secretArn': 'string' }, 'apiKeySecretJsonKey': 'string', 'apiKeySecretSource': 'MANAGED'|'EXTERNAL', 'name': 'string', 'credentialProviderArn': 'string' }
Response Structure
(dict) –
apiKeySecretArn (dict) –
The Amazon Resource Name (ARN) of the secret containing the API key.
secretArn (string) –
The Amazon Resource Name (ARN) of the secret in AWS Secrets Manager.
apiKeySecretJsonKey (string) –
The JSON key used to extract the API key value from the AWS Secrets Manager secret.
apiKeySecretSource (string) –
The source type of the API key secret. Either
MANAGEDif the secret is managed by the service, orEXTERNALif managed by the user in AWS Secrets Manager.name (string) –
The name of the created API key credential provider.
credentialProviderArn (string) –
The Amazon Resource Name (ARN) of the created API key credential provider.
Exceptions
BedrockAgentCoreControl.Client.exceptions.ServiceQuotaExceededExceptionBedrockAgentCoreControl.Client.exceptions.UnauthorizedExceptionBedrockAgentCoreControl.Client.exceptions.ResourceLimitExceededExceptionBedrockAgentCoreControl.Client.exceptions.ValidationExceptionBedrockAgentCoreControl.Client.exceptions.ConflictExceptionBedrockAgentCoreControl.Client.exceptions.AccessDeniedExceptionBedrockAgentCoreControl.Client.exceptions.DecryptionFailureBedrockAgentCoreControl.Client.exceptions.ResourceNotFoundExceptionBedrockAgentCoreControl.Client.exceptions.ThrottlingExceptionBedrockAgentCoreControl.Client.exceptions.InternalServerExceptionBedrockAgentCoreControl.Client.exceptions.EncryptionFailure