Class WorkloadIdentity
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.bedrockagentcore.WorkloadIdentity
- All Implemented Interfaces:
IWorkloadIdentityRef,IEnvironmentAware,IResource,IWorkloadIdentity,IGrantable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.130.0 (build 048a5ee)",
date="2026-05-20T12:39:41.893Z")
@Stability(Stable)
public class WorkloadIdentity
extends Resource
implements IWorkloadIdentity
L2 construct for
AWS::BedrockAgentCore::WorkloadIdentity.
A workload identity is the stable identity of an agent in an AWS account. It ties together IAM roles, OAuth2 flows, API keys, and workload access tokens for consistent authentication across environments.
Example:
WorkloadIdentity.Builder.create(this, "MyWorkloadIdentity")
.workloadIdentityName("customer-support-agent-prod")
.allowedResourceOauth2ReturnUrls(List.of("https://app.example.com/oauth/callback"))
.tags(Map.of("team", "agents", "env", "prod"))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.bedrockagentcore.IWorkloadIdentity
IWorkloadIdentity.Jsii$Default, IWorkloadIdentity.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWorkloadIdentity(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedWorkloadIdentity(software.amazon.jsii.JsiiObjectRef objRef) WorkloadIdentity(software.constructs.Construct scope, String id) WorkloadIdentity(software.constructs.Construct scope, String id, WorkloadIdentityProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IWorkloadIdentityfromWorkloadIdentityAttributes(software.constructs.Construct scope, String id, WorkloadIdentityAttributes attrs) Import an existing workload identity.Timestamp when the workload identity was created.The principal to grant permissions to.Timestamp when the workload identity was last updated.The ARN of this workload identity.The name of this workload identity.A reference to a WorkloadIdentity resource.grant(IGrantable grantee, String... actions) [disable-awslint:no-grants].grantAdmin(IGrantable grantee) [disable-awslint:no-grants].grantFullAccess(IGrantable grantee) [disable-awslint:no-grants].grantRead(IGrantable grantee) [disable-awslint:no-grants].grantUse(IGrantable grantee) [disable-awslint:no-grants].Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource, withMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNode, withMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
WorkloadIdentity
protected WorkloadIdentity(software.amazon.jsii.JsiiObjectRef objRef) -
WorkloadIdentity
protected WorkloadIdentity(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
WorkloadIdentity
@Stability(Stable) public WorkloadIdentity(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable WorkloadIdentityProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
WorkloadIdentity
@Stability(Stable) public WorkloadIdentity(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
fromWorkloadIdentityAttributes
@Stability(Stable) @NotNull public static IWorkloadIdentity fromWorkloadIdentityAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull WorkloadIdentityAttributes attrs) Import an existing workload identity.- Parameters:
scope- This parameter is required.id- This parameter is required.attrs- This parameter is required.
-
grant
@Stability(Stable) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions) [disable-awslint:no-grants].- Specified by:
grantin interfaceIWorkloadIdentity- Parameters:
grantee- This parameter is required.actions- This parameter is required.
-
grantAdmin
[disable-awslint:no-grants].- Specified by:
grantAdminin interfaceIWorkloadIdentity- Parameters:
grantee- This parameter is required.
-
grantFullAccess
[disable-awslint:no-grants].- Specified by:
grantFullAccessin interfaceIWorkloadIdentity- Parameters:
grantee- This parameter is required.
-
grantRead
[disable-awslint:no-grants].- Specified by:
grantReadin interfaceIWorkloadIdentity- Parameters:
grantee- This parameter is required.
-
grantUse
[disable-awslint:no-grants].- Specified by:
grantUsein interfaceIWorkloadIdentity- Parameters:
grantee- This parameter is required.
-
getGrantPrincipal
The principal to grant permissions to.- Specified by:
getGrantPrincipalin interfaceIGrantable
-
getWorkloadIdentityArn
The ARN of this workload identity.- Specified by:
getWorkloadIdentityArnin interfaceIWorkloadIdentity
-
getWorkloadIdentityName
The name of this workload identity.- Specified by:
getWorkloadIdentityNamein interfaceIWorkloadIdentity
-
getWorkloadIdentityRef
A reference to a WorkloadIdentity resource.- Specified by:
getWorkloadIdentityRefin interfaceIWorkloadIdentityRef
-
getCreatedTime
Timestamp when the workload identity was created.- Specified by:
getCreatedTimein interfaceIWorkloadIdentity
-
getLastUpdatedTime
Timestamp when the workload identity was last updated.- Specified by:
getLastUpdatedTimein interfaceIWorkloadIdentity
-