Interface S3SourceActionProps

All Superinterfaces:
CommonActionProps, CommonAwsActionProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
S3SourceActionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:59.002Z") @Stability(Stable) public interface S3SourceActionProps extends software.amazon.jsii.JsiiSerializable, CommonAwsActionProps
Construction properties of the S3SourceAction S3 source Action.

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();
 
  • Method Details

    • getBucket

      @Stability(Stable) @NotNull IBucket getBucket()
      The Amazon S3 bucket that stores the source code.

      If you import an encrypted bucket in your stack, please specify the encryption key at import time by using Bucket.fromBucketAttributes() method.

    • getBucketKey

      @Stability(Stable) @NotNull String getBucketKey()
      The key within the S3 bucket that stores the source code.

      Example:

       "path/to/file.zip";
       
    • getOutput

      @Stability(Stable) @NotNull Artifact getOutput()
    • getTrigger

      @Stability(Stable) @Nullable default S3Trigger getTrigger()
      How should CodePipeline detect source changes for this Action.

      Note that if this is S3Trigger.EVENTS, you need to make sure to include the source Bucket in a CloudTrail Trail, as otherwise the CloudWatch Events will not be emitted.

      Default: S3Trigger.POLL

      See Also:
    • builder

      @Stability(Stable) static S3SourceActionProps.Builder builder()
      Returns:
      a S3SourceActionProps.Builder of S3SourceActionProps