FromApiKeyIdentityOptions Struct
Optional gateway settings when binding an {@link IApiKeyCredentialProvider} to a target.
| Source | lib/gateway/outbound-auth/credential-provider.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 fromApiKeyIdentityOptions: bedrock_agentcore_alpha.FromApiKeyIdentityOptions = {
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
from_api_key_identity_options = bedrock_agentcore_alpha.FromApiKeyIdentityOptions(
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;
FromApiKeyIdentityOptions fromApiKeyIdentityOptions = FromApiKeyIdentityOptions.builder()
.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 fromApiKeyIdentityOptions = new FromApiKeyIdentityOptions {
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
fromApiKeyIdentityOptions := &FromApiKeyIdentityOptions{
CredentialLocation: apiKeyCredentialLocation,
}
Properties
credentialLocationoptionalApiKeyCredentialLocationcredential_locationoptionalApiKeyCredentialLocationcredentialLocationoptionalApiKeyCredentialLocationCredentialLocationoptionalApiKeyCredentialLocationCredentialLocationoptionalApiKeyCredentialLocation #Where to place the API key on outbound requests.
Default: header Authorization with Bearer prefix