Class S3CsvItemReader

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-06T23:25:17.569Z") @Stability(Stable) public class S3CsvItemReader extends software.amazon.jsii.JsiiObject implements IItemReader
Item Reader configuration for iterating over items in a CSV file stored in S3.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.s3.*;
 import software.amazon.awscdk.services.stepfunctions.*;
 Bucket bucket;
 CsvHeaders csvHeaders;
 S3CsvItemReader s3CsvItemReader = S3CsvItemReader.Builder.create()
         .key("key")
         // the properties below are optional
         .bucket(bucket)
         .bucketNamePath("bucketNamePath")
         .csvHeaders(csvHeaders)
         .maxItems(123)
         .build();
 
  • Constructor Details

    • S3CsvItemReader

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

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

      @Stability(Stable) public S3CsvItemReader(@NotNull S3CsvItemReaderProps 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
    • validateItemReader

      @Stability(Stable) @NotNull public List<String> validateItemReader()
      Validate that ItemReader contains exactly either.

      Specified by:
      validateItemReader in interface IItemReader
      See Also:
    • getBucket

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

      @Stability(Stable) @NotNull public CsvHeaders getCsvHeaders()
      CSV headers configuration.
    • 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
    • getBucketNamePath

      @Stability(Stable) @Nullable public String getBucketNamePath()
      S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.
      Specified by:
      getBucketNamePath 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