Show / Hide Table of Contents

Interface ICredentials

Specifies a target role assumed by the State Machine's execution role for invoking the task's resource.

Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICredentials
Syntax (vb)
Public Interface ICredentials
Remarks

See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-task-state.html#task-state-fields

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Lambda;

             Function submitLambda;
             Role iamRole;


             // use a fixed role for all task invocations
             var 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');

             var submitJob = new LambdaInvoke(this, "Submit Job", new LambdaInvokeProps {
                 LambdaFunction = submitLambda,
                 OutputPath = "$.Payload",
                 // use credentials
                 Credentials = new Credentials { Role = role }
             });

Synopsis

Properties

Role

The role to be assumed for executing the Task.

Properties

Role

The role to be assumed for executing the Task.

TaskRole Role { get; }
Property Value

TaskRole

Remarks

See: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-task-state.html#task-state-fields

ExampleMetadata: infused

Back to top Generated by DocFX