interface IApiKeyCredentialProvider
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.IApiKeyCredentialProvider |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#IApiKeyCredentialProvider |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.IApiKeyCredentialProvider |
Python | aws_cdk.aws_bedrock_agentcore_alpha.IApiKeyCredentialProvider |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป IApiKeyCredentialProvider |
Implements
IDependable, IConstruct, IEnvironment, IResource, IGrantable, IApi
Implemented by
Api
Obtainable from
Api.fromApiKeyCredentialProviderAttributes()
An API key credential provider registered in AgentCore Token Vault.
Properties
| Name | Type | Description |
|---|---|---|
| api | Api | A reference to a ApiKeyCredentialProvider resource. |
| credential | string | The ARN of this credential provider. |
| env | Resource | The environment this resource belongs to. |
| grant | IPrincipal | The principal to grant permissions to. |
| node | Node | The tree node. |
| stack | Stack | The stack in which this resource is defined. |
| api | string | The ARN of the Secrets Manager secret that stores the API key after the resource is created. |
| created | string | Timestamp when the credential provider was created. |
| last | string | Timestamp when the credential provider was last updated. |
apiKeyCredentialProviderRef
Type:
Api
A reference to a ApiKeyCredentialProvider resource.
credentialProviderArn
Type:
string
The ARN of this credential provider.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
grantPrincipal
Type:
IPrincipal
The principal to grant permissions to.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
apiKeySecretArn?
Type:
string
(optional)
The ARN of the Secrets Manager secret that stores the API key after the resource is created.
May be undefined for resources imported without this attribute.
createdTime?
Type:
string
(optional)
Timestamp when the credential provider was created.
lastUpdatedTime?
Type:
string
(optional)
Timestamp when the credential provider was last updated.
Methods
| Name | Description |
|---|---|
| apply | Apply the given removal policy to this resource. |
| bind | ARNs for use with gateway targets (GatewayCredentialProvider.fromApiKeyIdentity or fromApiKeyIdentityArn). |
| grant(grantee, ...actions) | Grants IAM actions to the IAM principal. |
| grant | Grant control plane permissions to manage this provider. |
| grant | Grant read, admin, and credential retrieval permissions. |
| grant | Grant GetApiKeyCredentialProvider and ListApiKeyCredentialProviders, scoped to this provider and parent resources required by the Bedrock AgentCore authorization model. |
| grant | Grant permission to retrieve API key material for outbound calls (GetResourceApiKey). |
| with(...mixins) | Applies one or more mixins to this construct. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
RemovalPolicy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
bindForGatewayApiKeyTarget()
public bindForGatewayApiKeyTarget(): GatewayApiKeyIdentityBinding
Returns
ARNs for use with gateway targets (GatewayCredentialProvider.fromApiKeyIdentity or fromApiKeyIdentityArn).
grant(grantee, ...actions)
public grant(grantee: IGrantable, ...actions: string[]): Grant
Parameters
- grantee
IGrantable - actions
string
Returns
Grants IAM actions to the IAM principal.
grantAdmin(grantee)
public grantAdmin(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant control plane permissions to manage this provider.
grantFullAccess(grantee)
public grantFullAccess(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant read, admin, and credential retrieval permissions.
grantRead(grantee)
public grantRead(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant GetApiKeyCredentialProvider and ListApiKeyCredentialProviders, scoped to this provider and parent resources required by the Bedrock AgentCore authorization model.
grantUse(grantee)
public grantUse(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant permission to retrieve API key material for outbound calls (GetResourceApiKey).
with(...mixins)
public with(...mixins: IMixin[]): IConstruct
Parameters
- mixins
IMixinโ The mixins to apply.
Returns
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

.NET
Go
Java
Python
TypeScript (