Interface Credentials
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
Credentials.Jsii$Proxy
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-04T09:27:51.129Z")
@Stability(Stable)
public interface Credentials
extends software.amazon.jsii.JsiiSerializable
Specifies a target role assumed by the State Machine's execution role for invoking the task's resource.
Example:
import software.amazon.awscdk.services.lambda.*;
Function submitLambda;
Role iamRole;
// use a fixed role for all task invocations
TaskRole role = TaskRole.fromRole(iamRole);
// or use a json expression to resolve the role at runtime based on task inputs
//const role = sfn.TaskRole.fromRoleArnJsonPath('$.RoleArn');
LambdaInvoke submitJob = LambdaInvoke.Builder.create(this, "Submit Job")
.lambdaFunction(submitLambda)
.outputPath("$.Payload")
// use credentials
.credentials(Credentials.builder().role(role).build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCredentialsstatic final classAn implementation forCredentials -
Method Summary
Modifier and TypeMethodDescriptionstatic Credentials.Builderbuilder()getRole()The role to be assumed for executing the Task.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getRole
The role to be assumed for executing the Task. -
builder
- Returns:
- a
Credentials.BuilderofCredentials
-