java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.glue.alpha.Action
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-10T17:52:11.227Z") @Stability(Experimental) public abstract class Action extends software.amazon.jsii.JsiiObject
(experimental) An action initiated by a trigger.

An action runs exactly one target: use

invalid reference
Action.job
to run a job or
invalid reference
Action.crawler
to run a crawler. Because these are separate factory methods, an action can never target both or neither.

Example:

 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.iam.*;
 Stack stack;
 IRole role;
 Code script;
 // Create a job to run from the workflow
 PySparkEtlJob job = PySparkEtlJob.Builder.create(stack, "Job").role(role).script(script).build();
 // Create a workflow and add a trigger that runs the job
 Workflow workflow = new Workflow(stack, "Workflow");
 workflow.addOnDemandTrigger("OnDemandTrigger", OnDemandTriggerOptions.builder()
         .actions(List.of(Action.job(job)))
         .build());
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    Action(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Action(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Action
    (experimental) Create an action that runs a crawler.
    static Action
    (experimental) Create an action that runs a crawler.
    static Action
    job(IJobRef job)
    (experimental) Create an action that runs a job.
    static Action
    job(IJobRef job, JobActionOptions options)
    (experimental) Create an action that runs a job.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Action

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

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

      @Stability(Experimental) protected Action()
  • Method Details

    • crawler

      @Stability(Experimental) @NotNull public static Action crawler(@NotNull ICrawlerRef crawler, @Nullable CrawlerActionOptions options)
      (experimental) Create an action that runs a crawler.

      Parameters:
      crawler - the crawler to run when the trigger fires. This parameter is required.
      options - additional options for the action.
    • crawler

      @Stability(Experimental) @NotNull public static Action crawler(@NotNull ICrawlerRef crawler)
      (experimental) Create an action that runs a crawler.

      Parameters:
      crawler - the crawler to run when the trigger fires. This parameter is required.
    • job

      @Stability(Experimental) @NotNull public static Action job(@NotNull IJobRef job, @Nullable JobActionOptions options)
      (experimental) Create an action that runs a job.

      Parameters:
      job - the job to run when the trigger fires. This parameter is required.
      options - additional options for the action.
    • job

      @Stability(Experimental) @NotNull public static Action job(@NotNull IJobRef job)
      (experimental) Create an action that runs a job.

      Parameters:
      job - the job to run when the trigger fires. This parameter is required.