java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IAction, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:14.417Z") @Stability(Stable) public class S3SourceAction extends Action
Source that is provided by a specific Amazon S3 object.

Will trigger the pipeline as soon as the S3 object changes, but only if there is a CloudTrail Trail in the account that captures the S3 event.

Example:

 import software.amazon.awscdk.services.cloudtrail.*;
 Bucket sourceBucket;
 Artifact sourceOutput = new Artifact();
 String key = "some/key.zip";
 Trail trail = new Trail(this, "CloudTrail");
 trail.addS3EventSelector(List.of(S3EventSelector.builder()
         .bucket(sourceBucket)
         .objectPrefix(key)
         .build()), AddEventSelectorOptions.builder()
         .readWriteType(ReadWriteType.WRITE_ONLY)
         .build());
 S3SourceAction sourceAction = S3SourceAction.Builder.create()
         .actionName("S3Source")
         .bucketKey(key)
         .bucket(sourceBucket)
         .output(sourceOutput)
         .trigger(S3Trigger.EVENTS)
         .build();
 
  • Constructor Details

    • S3SourceAction

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

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

      @Stability(Stable) public S3SourceAction(@NotNull S3SourceActionProps props)
      Parameters:
      props - This parameter is required.
  • Method Details

    • bound

      @Stability(Stable) @NotNull protected ActionConfig bound(@NotNull software.constructs.Construct _scope, @NotNull IStage stage, @NotNull ActionBindOptions options)
      This is a renamed version of the IAction.bind method.

      Specified by:
      bound in class Action
      Parameters:
      _scope - This parameter is required.
      stage - This parameter is required.
      options - This parameter is required.
    • getVariables

      @Stability(Stable) @NotNull public S3SourceVariables getVariables()
      The variables emitted by this action.