# ApiKeyCredentialProviderProps

API key credential provider ARNs for gateway outbound auth (Token Vault identity).

Pass this to {@link GatewayCredentialProvider.fromApiKeyIdentityArn } or to {@link ApiKeyCredentialProviderConfiguration}.

Used as argument in: [GatewayCredentialProvider.fromApiKeyIdentityArn](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.GatewayCredentialProvider.html#fromapikeyidentityarn)

- Source: [`lib/gateway/outbound-auth/api-key.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-bedrock-agentcore-alpha/lib/gateway/outbound-auth/api-key.ts#L107)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';

declare const apiKeyCredentialLocation: bedrock_agentcore_alpha.ApiKeyCredentialLocation;
const apiKeyCredentialProviderProps: bedrock_agentcore_alpha.ApiKeyCredentialProviderProps = {
  providerArn: 'providerArn',
  secretArn: 'secretArn',

  // the properties below are optional
  credentialLocation: apiKeyCredentialLocation,
};
```

Python:

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

# api_key_credential_location: bedrock_agentcore_alpha.ApiKeyCredentialLocation

api_key_credential_provider_props = bedrock_agentcore_alpha.ApiKeyCredentialProviderProps(
    provider_arn="providerArn",
    secret_arn="secretArn",

    # the properties below are optional
    credential_location=api_key_credential_location
)
```

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.bedrock.agentcore.alpha.*;

ApiKeyCredentialLocation apiKeyCredentialLocation;

ApiKeyCredentialProviderProps apiKeyCredentialProviderProps = ApiKeyCredentialProviderProps.builder()
        .providerArn("providerArn")
        .secretArn("secretArn")

        // the properties below are optional
        .credentialLocation(apiKeyCredentialLocation)
        .build();
```

C# / .NET:

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

ApiKeyCredentialLocation apiKeyCredentialLocation;

var apiKeyCredentialProviderProps = new ApiKeyCredentialProviderProps {
    ProviderArn = "providerArn",
    SecretArn = "secretArn",

    // the properties below are optional
    CredentialLocation = apiKeyCredentialLocation
};
```

Golang:

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

var apiKeyCredentialLocation ApiKeyCredentialLocation

apiKeyCredentialProviderProps := &ApiKeyCredentialProviderProps{
	ProviderArn: jsii.String("providerArn"),
	SecretArn: jsii.String("secretArn"),

	// the properties below are optional
	CredentialLocation: apiKeyCredentialLocation,
}
```

## Properties

- `credentialLocation`: [ApiKeyCredentialLocation](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.ApiKeyCredentialLocation.html) = HEADER — The location of the API key credential.

  This field specifies where in the request the API key should be placed.

- `providerArn`: string (required) — The API key credential provider ARN.

  This is returned when creating the API key credential provider via Console or API.
  Format: arn:aws:bedrock-agentcore:region:account:token-vault/id/apikeycredentialprovider/name

- `secretArn`: string (required) — The ARN of the Secrets Manager secret containing the API key.

  This is returned when creating the API key credential provider via Console or API.
  Format: arn:aws:secretsmanager:region:account:secret:name
