ApiKeyCredentialProviderProps Struct
API key credential provider ARNs for gateway outbound auth (Token Vault identity).
Pass this to {@link GatewayCredentialProvider.fromApiKeyIdentityArn } or to {@link ApiKeyCredentialProviderConfiguration}.
| Source | lib/gateway/outbound-auth/api-key.ts |
|---|
Example
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
# 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
// 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();
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
};
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
credentialLocationoptionalApiKeyCredentialLocationcredential_locationoptionalApiKeyCredentialLocationcredentialLocationoptionalApiKeyCredentialLocationCredentialLocationoptionalApiKeyCredentialLocationCredentialLocationoptionalApiKeyCredentialLocation = HEADER #The location of the API key credential.
This field specifies where in the request the API key should be placed.
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
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㊙️name