Class S3JsonItemReader

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.stepfunctions.S3JsonItemReader
All Implemented Interfaces:
IItemReader, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.94.0 (build b380f01)", date="2024-03-14T22:22:02.299Z") @Stability(Stable) public class S3JsonItemReader extends software.amazon.jsii.JsiiObject implements IItemReader
Item Reader configuration for iterating over items in a JSON array stored in a S3 file.

Example:

 import software.amazon.awscdk.services.s3.*;
 // create a bucket
 Bucket bucket = new Bucket(this, "Bucket");
 DistributedMap distributedMap = DistributedMap.Builder.create(this, "Distributed Map State")
         .itemReader(S3JsonItemReader.Builder.create()
                 .bucket(bucket)
                 .key("my-key.json")
                 .build())
         .resultWriter(ResultWriter.Builder.create()
                 .bucket(bucket)
                 .prefix("my-prefix")
                 .build())
         .build();
 distributedMap.itemProcessor(new Pass(this, "Pass State"));
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for S3JsonItemReader.

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

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.amazon.awscdk.services.stepfunctions.IItemReader

    IItemReader.Jsii$Default, IItemReader.Jsii$Proxy
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    S3 Bucket containing a file with a list to iterate over.
    protected String
     
    S3 key of a file with a list to iterate over.
    Limits the number of items passed to the Distributed Map state.
    ARN for the getObject method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.
    Compile policy statements to provide relevent permissions to the state machine.
    Renders the ItemReader configuration as JSON object.

    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

    • S3JsonItemReader

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

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

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

    • providePolicyStatements

      @Stability(Stable) @NotNull public List<PolicyStatement> providePolicyStatements()
      Compile policy statements to provide relevent permissions to the state machine.
      Specified by:
      providePolicyStatements in interface IItemReader
    • render

      @Stability(Stable) @NotNull public Object render()
      Renders the ItemReader configuration as JSON object.

      Specified by:
      render in interface IItemReader
      Returns:
      • JSON object
    • getBucket

      @Stability(Stable) @NotNull public IBucket getBucket()
      S3 Bucket containing a file with a list to iterate over.
      Specified by:
      getBucket in interface IItemReader
    • getInputType

      @Stability(Stable) @NotNull protected String getInputType()
    • getKey

      @Stability(Stable) @NotNull public String getKey()
      S3 key of a file with a list to iterate over.
    • getResource

      @Stability(Stable) @NotNull public String getResource()
      ARN for the getObject method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.
      Specified by:
      getResource in interface IItemReader
    • getMaxItems

      @Stability(Stable) @Nullable public Number getMaxItems()
      Limits the number of items passed to the Distributed Map state.

      Default: - No maxItems

      Specified by:
      getMaxItems in interface IItemReader