java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.stepfunctions.Activity
All Implemented Interfaces:
IResource, IActivity, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-06T23:25:17.500Z") @Stability(Stable) public class Activity extends Resource implements IActivity
Define a new Step Functions Activity.

Example:

 Activity activity = new Activity(this, "Activity");
 Role role = Role.Builder.create(this, "Role")
         .assumedBy(new ServicePrincipal("lambda.amazonaws.com"))
         .build();
 activity.grant(role, "states:SendTaskSuccess");
 
  • Constructor Details

    • Activity

      protected Activity(software.amazon.jsii.JsiiObjectRef objRef)
    • Activity

      protected Activity(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Activity

      @Stability(Stable) public Activity(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ActivityProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • Activity

      @Stability(Stable) public Activity(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • fromActivityArn

      @Stability(Stable) @NotNull public static IActivity fromActivityArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String activityArn)
      Construct an Activity from an existing Activity ARN.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      activityArn - This parameter is required.
    • fromActivityName

      @Stability(Stable) @NotNull public static IActivity fromActivityName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String activityName)
      Construct an Activity from an existing Activity Name.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      activityName - This parameter is required.
    • grant

      @Stability(Stable) @NotNull public Grant grant(@NotNull IGrantable identity, @NotNull @NotNull String... actions)
      Grant the given identity permissions on this Activity.

      Parameters:
      identity - The principal. This parameter is required.
      actions - The list of desired actions. This parameter is required.
    • metric

      @Stability(Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
      Return the given named metric for this Activity.

      Default: sum over 5 minutes

      Parameters:
      metricName - This parameter is required.
      props -
    • metric

      @Stability(Stable) @NotNull public Metric metric(@NotNull String metricName)
      Return the given named metric for this Activity.

      Default: sum over 5 minutes

      Parameters:
      metricName - This parameter is required.
    • metricFailed

      @Stability(Stable) @NotNull public Metric metricFailed(@Nullable MetricOptions props)
      Metric for the number of times this activity fails.

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricFailed

      @Stability(Stable) @NotNull public Metric metricFailed()
      Metric for the number of times this activity fails.

      Default: sum over 5 minutes

    • metricHeartbeatTimedOut

      @Stability(Stable) @NotNull public Metric metricHeartbeatTimedOut(@Nullable MetricOptions props)
      Metric for the number of times the heartbeat times out for this activity.

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricHeartbeatTimedOut

      @Stability(Stable) @NotNull public Metric metricHeartbeatTimedOut()
      Metric for the number of times the heartbeat times out for this activity.

      Default: sum over 5 minutes

    • metricRunTime

      @Stability(Stable) @NotNull public Metric metricRunTime(@Nullable MetricOptions props)
      The interval, in milliseconds, between the time the activity starts and the time it closes.

      Default: average over 5 minutes

      Parameters:
      props -
    • metricRunTime

      @Stability(Stable) @NotNull public Metric metricRunTime()
      The interval, in milliseconds, between the time the activity starts and the time it closes.

      Default: average over 5 minutes

    • metricScheduled

      @Stability(Stable) @NotNull public Metric metricScheduled(@Nullable MetricOptions props)
      Metric for the number of times this activity is scheduled.

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricScheduled

      @Stability(Stable) @NotNull public Metric metricScheduled()
      Metric for the number of times this activity is scheduled.

      Default: sum over 5 minutes

    • metricScheduleTime

      @Stability(Stable) @NotNull public Metric metricScheduleTime(@Nullable MetricOptions props)
      The interval, in milliseconds, for which the activity stays in the schedule state.

      Default: average over 5 minutes

      Parameters:
      props -
    • metricScheduleTime

      @Stability(Stable) @NotNull public Metric metricScheduleTime()
      The interval, in milliseconds, for which the activity stays in the schedule state.

      Default: average over 5 minutes

    • metricStarted

      @Stability(Stable) @NotNull public Metric metricStarted(@Nullable MetricOptions props)
      Metric for the number of times this activity is started.

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricStarted

      @Stability(Stable) @NotNull public Metric metricStarted()
      Metric for the number of times this activity is started.

      Default: sum over 5 minutes

    • metricSucceeded

      @Stability(Stable) @NotNull public Metric metricSucceeded(@Nullable MetricOptions props)
      Metric for the number of times this activity succeeds.

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricSucceeded

      @Stability(Stable) @NotNull public Metric metricSucceeded()
      Metric for the number of times this activity succeeds.

      Default: sum over 5 minutes

    • metricTime

      @Stability(Stable) @NotNull public Metric metricTime(@Nullable MetricOptions props)
      The interval, in milliseconds, between the time the activity is scheduled and the time it closes.

      Default: average over 5 minutes

      Parameters:
      props -
    • metricTime

      @Stability(Stable) @NotNull public Metric metricTime()
      The interval, in milliseconds, between the time the activity is scheduled and the time it closes.

      Default: average over 5 minutes

    • metricTimedOut

      @Stability(Stable) @NotNull public Metric metricTimedOut(@Nullable MetricOptions props)
      Metric for the number of times this activity times out.

      Default: sum over 5 minutes

      Parameters:
      props -
    • metricTimedOut

      @Stability(Stable) @NotNull public Metric metricTimedOut()
      Metric for the number of times this activity times out.

      Default: sum over 5 minutes

    • getActivityArn

      @Stability(Stable) @NotNull public String getActivityArn()
      The ARN of the activity.
      Specified by:
      getActivityArn in interface IActivity
    • getActivityName

      @Stability(Stable) @NotNull public String getActivityName()
      The name of the activity.
      Specified by:
      getActivityName in interface IActivity
    • getEncryptionConfiguration

      @Stability(Stable) @Nullable public EncryptionConfiguration getEncryptionConfiguration()
      The encryptionConfiguration object used for server-side encryption of the activity inputs.
      Specified by:
      getEncryptionConfiguration in interface IActivity