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 apiKeySecretSource is set to EXTERNAL.

    • 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 MANAGED if the secret is managed by the service, or EXTERNAL if 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 MANAGED if the secret is managed by the service, or EXTERNAL if 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.ServiceQuotaExceededException

  • BedrockAgentCoreControl.Client.exceptions.UnauthorizedException

  • BedrockAgentCoreControl.Client.exceptions.ResourceLimitExceededException

  • BedrockAgentCoreControl.Client.exceptions.ValidationException

  • BedrockAgentCoreControl.Client.exceptions.ConflictException

  • BedrockAgentCoreControl.Client.exceptions.AccessDeniedException

  • BedrockAgentCoreControl.Client.exceptions.DecryptionFailure

  • BedrockAgentCoreControl.Client.exceptions.ResourceNotFoundException

  • BedrockAgentCoreControl.Client.exceptions.ThrottlingException

  • BedrockAgentCoreControl.Client.exceptions.InternalServerException

  • BedrockAgentCoreControl.Client.exceptions.EncryptionFailure