# CfnApiKeyCredentialProviderProps

Struct · External

Properties for defining a `CfnApiKeyCredentialProvider`.

Used as props by: [CfnApiKeyCredentialProvider](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.CfnApiKeyCredentialProvider.html)

- Source: Generated at build time
- Type last changed: v2.260.0 · 16 Jun 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';
const cfnApiKeyCredentialProviderProps: bedrockagentcore.CfnApiKeyCredentialProviderProps = {
  name: 'name',

  // the properties below are optional
  apiKey: 'apiKey',
  apiKeySecretConfig: {
    jsonKey: 'jsonKey',
    secretId: 'secretId',
  },
  apiKeySecretSource: 'apiKeySecretSource',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrockagentcore as bedrockagentcore

cfn_api_key_credential_provider_props = bedrockagentcore.CfnApiKeyCredentialProviderProps(
    name="name",

    # the properties below are optional
    api_key="apiKey",
    api_key_secret_config=bedrockagentcore.CfnApiKeyCredentialProvider.SecretReferenceProperty(
        json_key="jsonKey",
        secret_id="secretId"
    ),
    api_key_secret_source="apiKeySecretSource",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrockagentcore.*;

CfnApiKeyCredentialProviderProps cfnApiKeyCredentialProviderProps = CfnApiKeyCredentialProviderProps.builder()
        .name("name")

        // the properties below are optional
        .apiKey("apiKey")
        .apiKeySecretConfig(SecretReferenceProperty.builder()
                .jsonKey("jsonKey")
                .secretId("secretId")
                .build())
        .apiKeySecretSource("apiKeySecretSource")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C#:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.BedrockAgentCore;

var cfnApiKeyCredentialProviderProps = new CfnApiKeyCredentialProviderProps {
    Name = "name",

    // the properties below are optional
    ApiKey = "apiKey",
    ApiKeySecretConfig = new SecretReferenceProperty {
        JsonKey = "jsonKey",
        SecretId = "secretId"
    },
    ApiKeySecretSource = "apiKeySecretSource",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Go:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnApiKeyCredentialProviderProps := &CfnApiKeyCredentialProviderProps{
	Name: jsii.String("name"),

	// the properties below are optional
	ApiKey: jsii.String("apiKey"),
	ApiKeySecretConfig: &SecretReferenceProperty{
		JsonKey: jsii.String("jsonKey"),
		SecretId: jsii.String("secretId"),
	},
	ApiKeySecretSource: jsii.String("apiKeySecretSource"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `apiKey`: string — The API key to use for authentication.

- `apiKeySecretConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnApiKeyCredentialProvider.SecretReferenceProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.CfnApiKeyCredentialProvider.SecretReferenceProperty.html) — A reference to a customer-provided secret stored in AWS Secrets Manager.

- `apiKeySecretSource`: string — The source of the API key secret.

  Use MANAGED for service-managed secrets or EXTERNAL for customer-provided secrets.

- `name`: string (required) — The name of the API key credential provider.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Tags to assign to the API key credential provider.
