Class S3ObjectsItemReader
Item Reader configuration for iterating over objects in an S3 bucket.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class S3ObjectsItemReader : DeputyBase, IItemReader
Syntax (vb)
Public Class S3ObjectsItemReader
Inherits DeputyBase
Implements IItemReader
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.S3;
/**
* Tree view of bucket:
* my-bucket
* |
* +--item1
* |
* +--otherItem
* |
* +--item2
* |
* ...
*/
var bucket = new Bucket(this, "Bucket", new BucketProps {
BucketName = "my-bucket"
});
var distributedMap = new DistributedMap(this, "DistributedMap", new DistributedMapProps {
ItemReader = new S3ObjectsItemReader(new S3ObjectsItemReaderProps {
Bucket = bucket,
Prefix = "item"
})
});
distributedMap.ItemProcessor(new Pass(this, "Pass"));
Synopsis
Constructors
S3ObjectsItemReader(IS3ObjectsItemReaderProps) | |
S3ObjectsItemReader(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
S3ObjectsItemReader(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
Bucket | S3 Bucket containing objects to iterate over. |
BucketNamePath | S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath. |
MaxItems | Limits the number of items passed to the Distributed Map state. |
Prefix | S3 prefix used to limit objects to iterate over. |
Resource | ARN for the |
Methods
ProvidePolicyStatements() | Compile policy statements to provide relevent permissions to the state machine. |
Render(Nullable<QueryLanguage>) | Renders the ItemReader configuration as JSON object. |
ValidateItemReader() | Validate that ItemReader contains exactly either. |
Constructors
S3ObjectsItemReader(IS3ObjectsItemReaderProps)
public S3ObjectsItemReader(IS3ObjectsItemReaderProps props)
Parameters
S3ObjectsItemReader(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected S3ObjectsItemReader(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
S3ObjectsItemReader(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected S3ObjectsItemReader(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
Bucket
S3 Bucket containing objects to iterate over.
public virtual IBucket Bucket { get; }
Property Value
BucketNamePath
S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.
public virtual string BucketNamePath { get; }
Property Value
System.String
MaxItems
Limits the number of items passed to the Distributed Map state.
public virtual Nullable<double> MaxItems { get; }
Property Value
System.Nullable<System.Double>
Remarks
Default: - Distributed Map state will iterate over all items provided by the ItemReader
Prefix
S3 prefix used to limit objects to iterate over.
public virtual string Prefix { get; }
Property Value
System.String
Remarks
Default: - No prefix
Resource
ARN for the listObjectsV2
method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.
public virtual string Resource { get; }
Property Value
System.String
Methods
ProvidePolicyStatements()
Compile policy statements to provide relevent permissions to the state machine.
public virtual PolicyStatement[] ProvidePolicyStatements()
Returns
Render(Nullable<QueryLanguage>)
Renders the ItemReader configuration as JSON object.
public virtual object Render(Nullable<QueryLanguage> queryLanguage = null)
Parameters
- queryLanguage System.Nullable<QueryLanguage>
Returns
System.Object
- JSON object
ValidateItemReader()
Validate that ItemReader contains exactly either.
public virtual string[] ValidateItemReader()
Returns
System.String[]
Remarks
See: bucketNamePath