ApiKeyCredentialProviderResourceProps Struct
Properties for a new {@link ApiKeyCredentialProvider} (Token Vault resource).
| Source | lib/identity/api-key-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';
import * as cdk from 'aws-cdk-lib';
declare const secretValue: cdk.SecretValue;
const apiKeyCredentialProviderResourceProps: bedrock_agentcore_alpha.ApiKeyCredentialProviderResourceProps = {
apiKey: secretValue,
apiKeyCredentialProviderName: 'apiKeyCredentialProviderName',
tags: {
tagsKey: 'tags',
},
};
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
import aws_cdk as cdk
# secret_value: cdk.SecretValue
api_key_credential_provider_resource_props = bedrock_agentcore_alpha.ApiKeyCredentialProviderResourceProps(
api_key=secret_value,
api_key_credential_provider_name="apiKeyCredentialProviderName",
tags={
"tags_key": "tags"
}
)
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.*;
import software.amazon.awscdk.*;
SecretValue secretValue;
ApiKeyCredentialProviderResourceProps apiKeyCredentialProviderResourceProps = ApiKeyCredentialProviderResourceProps.builder()
.apiKey(secretValue)
.apiKeyCredentialProviderName("apiKeyCredentialProviderName")
.tags(Map.of(
"tagsKey", "tags"))
.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;
using Amazon.CDK;
SecretValue secretValue;
var apiKeyCredentialProviderResourceProps = new ApiKeyCredentialProviderResourceProps {
ApiKey = secretValue,
ApiKeyCredentialProviderName = "apiKeyCredentialProviderName",
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
}
};
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"
import cdk "github.com/aws/aws-cdk-go/awscdk"
var secretValue SecretValue
apiKeyCredentialProviderResourceProps := &ApiKeyCredentialProviderResourceProps{
ApiKey: secretValue,
ApiKeyCredentialProviderName: jsii.String("apiKeyCredentialProviderName"),
Tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
}
Properties
apiKeyoptionalSecretValueapi_keyoptionalSecretValueapiKeyoptionalSecretValueApiKeyoptionalSecretValueApiKeyoptionalSecretValue #The API key value.
Default: no key in template (provider may still be created depending on service behavior)
notes
NOTE: The API key will be included in the CloudFormation template as part of synthesis. The service stores the key in Secrets Manager after creation, but the value is visible in the template and deployment history. Use SecretValue.unsafePlainText() to explicitly acknowledge plaintext, or pass a reference from another construct to avoid embedding the literal value.
If omitted, you can supply the key through another mechanism supported by the service.
apiKeyCredentialProviderNameoptionalstringapi_key_credential_provider_nameoptionalstrapiKeyCredentialProviderNameoptionalStringApiKeyCredentialProviderNameoptionalstringApiKeyCredentialProviderNameoptional*string #Name of the credential provider.
Default: a name generated by CDK
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string #Tags for this credential provider.
Default: no tags