All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.textract.idp.TextractGenericAsyncSfnTask Maven / Gradle / Ivy

There is a newer version: 0.0.43
Show newest version
package software.amazon.textract.idp;

/**
 * This Task calls the Textract through the asynchronous API.
 * 

* Which API to call is defined in *

* When GENERIC is called with features in the manifest definition, will call the AnalzyeDocument API. *

* Takes the configuration from "Payload"."manifest" *

* Will retry on recoverable errors based on textractAsyncCallMaxRetries * errors for retry: ['ThrottlingException', 'LimitExceededException', 'InternalServerError', 'ProvisionedThroughputExceededException'], *

* Internally calls Start* calls with OutputConfig and SNSNotification. * Another Lambda functions waits for SNS Notification event and notifies the Step Function flow with the task token. *

* Step Function JSON input requirements *

* Input: "Payload"."manifest" *

* Output: "TextractTempOutputJsonPath" points to potentially paginated Textract JSON Schema output at "TextractTempOutputJsonPath" (using the example code it will be at: "textract_result"."TextractTempOutputJsonPath") *

* Works together with TextractAsyncToJSON, which takes the s3_output_bucket/s3_temp_output_prefix location as input *

* Example (Python) *

*

 *  textract_async_task = tcdk.TextractGenericAsyncSfnTask(
 *      self,
 *      "TextractAsync",
 *      s3_output_bucket=s3_output_bucket,
 *      s3_temp_output_prefix=s3_temp_output_prefix,
 *      integration_pattern=sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
 *      lambda_log_level="DEBUG",
 *      timeout=Duration.hours(24),
 *      input=sfn.TaskInput.from_object({
 *          "Token":
 *          sfn.JsonPath.task_token,
 *          "ExecutionId":
 *          sfn.JsonPath.string_at('$$.Execution.Id'),
 *          "Payload":
 *          sfn.JsonPath.entire_payload,
 *      }),
 *      result_path="$.textract_result")
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.90.0 (build d6bdb4d)", date = "2023-10-26T15:43:30.351Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Jsii(module = software.amazon.textract.idp.$Module.class, fqn = "amazon-textract-idp-cdk-constructs.TextractGenericAsyncSfnTask") public class TextractGenericAsyncSfnTask extends software.amazon.awscdk.services.stepfunctions.TaskStateBase { protected TextractGenericAsyncSfnTask(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected TextractGenericAsyncSfnTask(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param scope This parameter is required. * @param id Descriptive identifier for this chainable. This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public TextractGenericAsyncSfnTask(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.textract.idp.TextractGenericAsyncSfnTaskProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) protected @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.stepfunctions.TaskMetricsConfig getTaskMetrics() { return software.amazon.jsii.Kernel.get(this, "taskMetrics", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.stepfunctions.TaskMetricsConfig.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) protected @org.jetbrains.annotations.Nullable java.util.List getTaskPolicies() { return java.util.Optional.ofNullable((java.util.List)(software.amazon.jsii.Kernel.get(this, "taskPolicies", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.PolicyStatement.class))))).map(java.util.Collections::unmodifiableList).orElse(null); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.stepfunctions.IStateMachine getStateMachine() { return software.amazon.jsii.Kernel.get(this, "stateMachine", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.stepfunctions.IStateMachine.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setStateMachine(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.stepfunctions.IStateMachine value) { software.amazon.jsii.Kernel.set(this, "stateMachine", java.util.Objects.requireNonNull(value, "stateMachine is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.dynamodb.ITable getTaskTokenTable() { return software.amazon.jsii.Kernel.get(this, "taskTokenTable", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.dynamodb.ITable.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setTaskTokenTable(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.dynamodb.ITable value) { software.amazon.jsii.Kernel.set(this, "taskTokenTable", java.util.Objects.requireNonNull(value, "taskTokenTable is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getTaskTokenTableName() { return software.amazon.jsii.Kernel.get(this, "taskTokenTableName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setTaskTokenTableName(final @org.jetbrains.annotations.NotNull java.lang.String value) { software.amazon.jsii.Kernel.set(this, "taskTokenTableName", java.util.Objects.requireNonNull(value, "taskTokenTableName is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.IFunction getTextractAsyncCallFunction() { return software.amazon.jsii.Kernel.get(this, "textractAsyncCallFunction", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.IFunction.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setTextractAsyncCallFunction(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.IFunction value) { software.amazon.jsii.Kernel.set(this, "textractAsyncCallFunction", java.util.Objects.requireNonNull(value, "textractAsyncCallFunction is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.IFunction getTextractAsyncReceiveSNSFunction() { return software.amazon.jsii.Kernel.get(this, "textractAsyncReceiveSNSFunction", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.IFunction.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setTextractAsyncReceiveSNSFunction(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.IFunction value) { software.amazon.jsii.Kernel.set(this, "textractAsyncReceiveSNSFunction", java.util.Objects.requireNonNull(value, "textractAsyncReceiveSNSFunction is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.sns.ITopic getTextractAsyncSNS() { return software.amazon.jsii.Kernel.get(this, "textractAsyncSNS", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sns.ITopic.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setTextractAsyncSNS(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.sns.ITopic value) { software.amazon.jsii.Kernel.set(this, "textractAsyncSNS", java.util.Objects.requireNonNull(value, "textractAsyncSNS is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IRole getTextractAsyncSNSRole() { return software.amazon.jsii.Kernel.get(this, "textractAsyncSNSRole", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setTextractAsyncSNSRole(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IRole value) { software.amazon.jsii.Kernel.set(this, "textractAsyncSNSRole", java.util.Objects.requireNonNull(value, "textractAsyncSNSRole is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.IMetric getAsyncDurationMetric() { return software.amazon.jsii.Kernel.get(this, "asyncDurationMetric", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.IMetric.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setAsyncDurationMetric(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.IMetric value) { software.amazon.jsii.Kernel.set(this, "asyncDurationMetric", value); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.IMetric getAsyncJobFailureMetric() { return software.amazon.jsii.Kernel.get(this, "asyncJobFailureMetric", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.IMetric.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setAsyncJobFailureMetric(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.IMetric value) { software.amazon.jsii.Kernel.set(this, "asyncJobFailureMetric", value); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.IMetric getAsyncJobFinshedMetric() { return software.amazon.jsii.Kernel.get(this, "asyncJobFinshedMetric", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.IMetric.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setAsyncJobFinshedMetric(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.IMetric value) { software.amazon.jsii.Kernel.set(this, "asyncJobFinshedMetric", value); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.IMetric getAsyncJobStartedMetric() { return software.amazon.jsii.Kernel.get(this, "asyncJobStartedMetric", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.IMetric.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setAsyncJobStartedMetric(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.IMetric value) { software.amazon.jsii.Kernel.set(this, "asyncJobStartedMetric", value); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.IMetric getAsyncNumberPagesMetric() { return software.amazon.jsii.Kernel.get(this, "asyncNumberPagesMetric", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.IMetric.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setAsyncNumberPagesMetric(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.IMetric value) { software.amazon.jsii.Kernel.set(this, "asyncNumberPagesMetric", value); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.IMetric getAsyncNumberPagesSendMetric() { return software.amazon.jsii.Kernel.get(this, "asyncNumberPagesSendMetric", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.IMetric.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setAsyncNumberPagesSendMetric(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.IMetric value) { software.amazon.jsii.Kernel.set(this, "asyncNumberPagesSendMetric", value); } /** * A fluent builder for {@link software.amazon.textract.idp.TextractGenericAsyncSfnTask}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope This parameter is required. * @param id Descriptive identifier for this chainable. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static Builder create(final software.constructs.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.constructs.Construct scope; private final java.lang.String id; private final software.amazon.textract.idp.TextractGenericAsyncSfnTaskProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; this.props = new software.amazon.textract.idp.TextractGenericAsyncSfnTaskProps.Builder(); } /** * An optional description for this state. *

* Default: - No comment *

* @return {@code this} * @param comment An optional description for this state. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder comment(final java.lang.String comment) { this.props.comment(comment); return this; } /** * Credentials for an IAM Role that the State Machine assumes for executing the task. *

* This enables cross-account resource invocations. *

* Default: - None (Task is executed using the State Machine's execution role) *

* @return {@code this} * @see https://docs.aws.amazon.com/step-functions/latest/dg/concepts-access-cross-acct-resources.html * @param credentials Credentials for an IAM Role that the State Machine assumes for executing the task. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder credentials(final software.amazon.awscdk.services.stepfunctions.Credentials credentials) { this.props.credentials(credentials); return this; } /** * (deprecated) Timeout for the heartbeat. *

* Default: - None *

* @return {@code this} * @deprecated use heartbeatTimeout * @param heartbeat Timeout for the heartbeat. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public Builder heartbeat(final software.amazon.awscdk.Duration heartbeat) { this.props.heartbeat(heartbeat); return this; } /** * Timeout for the heartbeat. *

* [disable-awslint:duration-prop-type] is needed because all props interface in * aws-stepfunctions-tasks extend this interface *

* Default: - None *

* @return {@code this} * @param heartbeatTimeout Timeout for the heartbeat. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder heartbeatTimeout(final software.amazon.awscdk.services.stepfunctions.Timeout heartbeatTimeout) { this.props.heartbeatTimeout(heartbeatTimeout); return this; } /** * JSONPath expression to select part of the state to be the input to this state. *

* May also be the special value JsonPath.DISCARD, which will cause the effective * input to be the empty object {}. *

* Default: - The entire task input (JSON path '$') *

* @return {@code this} * @param inputPath JSONPath expression to select part of the state to be the input to this state. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder inputPath(final java.lang.String inputPath) { this.props.inputPath(inputPath); return this; } /** * AWS Step Functions integrates with services directly in the Amazon States Language. *

* You can control these AWS services using service integration patterns *

* Default: - `IntegrationPattern.REQUEST_RESPONSE` for most tasks. * `IntegrationPattern.RUN_JOB` for the following exceptions: * `BatchSubmitJob`, `EmrAddStep`, `EmrCreateCluster`, `EmrTerminationCluster`, and `EmrContainersStartJobRun`. *

* @return {@code this} * @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token * @param integrationPattern AWS Step Functions integrates with services directly in the Amazon States Language. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder integrationPattern(final software.amazon.awscdk.services.stepfunctions.IntegrationPattern integrationPattern) { this.props.integrationPattern(integrationPattern); return this; } /** * JSONPath expression to select select a portion of the state output to pass to the next state. *

* May also be the special value JsonPath.DISCARD, which will cause the effective * output to be the empty object {}. *

* Default: - The entire JSON node determined by the state input, the task result, * and resultPath is passed to the next state (JSON path '$') *

* @return {@code this} * @param outputPath JSONPath expression to select select a portion of the state output to pass to the next state. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder outputPath(final java.lang.String outputPath) { this.props.outputPath(outputPath); return this; } /** * JSONPath expression to indicate where to inject the state's output. *

* May also be the special value JsonPath.DISCARD, which will cause the state's * input to become its output. *

* Default: - Replaces the entire input with the result (JSON path '$') *

* @return {@code this} * @param resultPath JSONPath expression to indicate where to inject the state's output. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder resultPath(final java.lang.String resultPath) { this.props.resultPath(resultPath); return this; } /** * The JSON that will replace the state's raw result and become the effective result before ResultPath is applied. *

* You can use ResultSelector to create a payload with values that are static * or selected from the state's raw result. *

* Default: - None *

* @return {@code this} * @see https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector * @param resultSelector The JSON that will replace the state's raw result and become the effective result before ResultPath is applied. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder resultSelector(final java.util.Map resultSelector) { this.props.resultSelector(resultSelector); return this; } /** * Timeout for the task. *

* [disable-awslint:duration-prop-type] is needed because all props interface in * aws-stepfunctions-tasks extend this interface *

* Default: - None *

* @return {@code this} * @param taskTimeout Timeout for the task. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder taskTimeout(final software.amazon.awscdk.services.stepfunctions.Timeout taskTimeout) { this.props.taskTimeout(taskTimeout); return this; } /** * (deprecated) Timeout for the task. *

* Default: - None *

* @return {@code this} * @deprecated use taskTimeout * @param timeout Timeout for the task. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public Builder timeout(final software.amazon.awscdk.Duration timeout) { this.props.timeout(timeout); return this; } /** * Bucketname to output data to. *

* @return {@code this} * @param s3OutputBucket Bucketname to output data to. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder s3OutputBucket(final java.lang.String s3OutputBucket) { this.props.s3OutputBucket(s3OutputBucket); return this; } /** * The prefix to use for the temporary output files (e. *

* g. output from async process before stiching together) *

* @return {@code this} * @param s3TempOutputPrefix The prefix to use for the temporary output files (e. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder s3TempOutputPrefix(final java.lang.String s3TempOutputPrefix) { this.props.s3TempOutputPrefix(s3TempOutputPrefix); return this; } /** * Pass the execution ID from the context object to the execution input. *

* This allows the Step Functions UI to link child executions from parent executions, making it easier to trace execution flow across state machines. *

* If you set this property to true, the input property must be an object (provided by sfn.TaskInput.fromObject) or omitted entirely. *

* Default: - false *

* @return {@code this} * @see https://docs.aws.amazon.com/step-functions/latest/dg/concepts-nested-workflows.html#nested-execution-startid * @param associateWithParent Pass the execution ID from the context object to the execution input. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder associateWithParent(final java.lang.Boolean associateWithParent) { this.props.associateWithParent(associateWithParent); return this; } /** * @return {@code this} * @param enableCloudWatchMetricsAndDashboard This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder enableCloudWatchMetricsAndDashboard(final java.lang.Boolean enableCloudWatchMetricsAndDashboard) { this.props.enableCloudWatchMetricsAndDashboard(enableCloudWatchMetricsAndDashboard); return this; } /** * The JSON input for the execution, same as that of StartExecution. *

* Default: - The state input (JSON path '$') *

* @return {@code this} * @see https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html * @param input The JSON input for the execution, same as that of StartExecution. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder input(final software.amazon.awscdk.services.stepfunctions.TaskInput input) { this.props.input(input); return this; } /** * List of PolicyStatements to attach to the Lambda function. *

* @return {@code this} * @param inputPolicyStatements List of PolicyStatements to attach to the Lambda function. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder inputPolicyStatements(final java.util.List inputPolicyStatements) { this.props.inputPolicyStatements(inputPolicyStatements); return this; } /** * log level for Lambda function, supports DEBUG|INFO|WARNING|ERROR|FATAL. *

* Default: = DEBUG *

* @return {@code this} * @param lambdaLogLevel log level for Lambda function, supports DEBUG|INFO|WARNING|ERROR|FATAL. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder lambdaLogLevel(final java.lang.String lambdaLogLevel) { this.props.lambdaLogLevel(lambdaLogLevel); return this; } /** * Memory allocated to Lambda function, default 512. *

* @return {@code this} * @param lambdaMemory Memory allocated to Lambda function, default 512. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder lambdaMemory(final java.lang.Number lambdaMemory) { this.props.lambdaMemory(lambdaMemory); return this; } /** * Lambda Function Timeout in seconds, default 300. *

* @return {@code this} * @param lambdaTimeout Lambda Function Timeout in seconds, default 300. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder lambdaTimeout(final java.lang.Number lambdaTimeout) { this.props.lambdaTimeout(lambdaTimeout); return this; } /** * The name of the execution, same as that of StartExecution. *

* Default: - None *

* @return {@code this} * @see https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html * @param name The name of the execution, same as that of StartExecution. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder name(final java.lang.String name) { this.props.name(name); return this; } /** * List of PolicyStatements to attach to the Lambda function. *

* @return {@code this} * @param outputPolicyStatements List of PolicyStatements to attach to the Lambda function. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder outputPolicyStatements(final java.util.List outputPolicyStatements) { this.props.outputPolicyStatements(outputPolicyStatements); return this; } /** * Bucketname and prefix to read document from /** location of input S3 objects - if left empty will generate rule for s3 access to all [*]. *

* @return {@code this} * @param s3InputBucket Bucketname and prefix to read document from /** location of input S3 objects - if left empty will generate rule for s3 access to all [*]. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder s3InputBucket(final java.lang.String s3InputBucket) { this.props.s3InputBucket(s3InputBucket); return this; } /** * prefix for input S3 objects - if left empty will generate rule for s3 access to all in bucket. *

* @return {@code this} * @param s3InputPrefix prefix for input S3 objects - if left empty will generate rule for s3 access to all in bucket. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder s3InputPrefix(final java.lang.String s3InputPrefix) { this.props.s3InputPrefix(s3InputPrefix); return this; } /** * IAM Role to assign to Textract, by default new iam.Role(this, 'TextractAsyncSNSRole', { assumedBy: new iam.ServicePrincipal('textract.amazonaws.com'), managedPolicies: [ManagedPolicy.fromAwsManagedPolicyName('AmazonSQSFullAccess'), ManagedPolicy.fromAwsManagedPolicyName('AmazonSNSFullAccess'), ManagedPolicy.fromAwsManagedPolicyName('AmazonS3ReadOnlyAccess'), ManagedPolicy.fromAwsManagedPolicyName('AmazonTextractFullAccess')], }); *

* @return {@code this} * @param snsRoleTextract IAM Role to assign to Textract, by default new iam.Role(this, 'TextractAsyncSNSRole', { assumedBy: new iam.ServicePrincipal('textract.amazonaws.com'), managedPolicies: [ManagedPolicy.fromAwsManagedPolicyName('AmazonSQSFullAccess'), ManagedPolicy.fromAwsManagedPolicyName('AmazonSNSFullAccess'), ManagedPolicy.fromAwsManagedPolicyName('AmazonS3ReadOnlyAccess'), ManagedPolicy.fromAwsManagedPolicyName('AmazonTextractFullAccess')], });. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder snsRoleTextract(final software.amazon.awscdk.services.iam.IRole snsRoleTextract) { this.props.snsRoleTextract(snsRoleTextract); return this; } /** * task token table to use for mapping of Textract JobTag to the TaskToken. *

* @return {@code this} * @param taskTokenTable task token table to use for mapping of Textract JobTag to the TaskToken. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder taskTokenTable(final software.amazon.awscdk.services.dynamodb.ITable taskTokenTable) { this.props.taskTokenTable(taskTokenTable); return this; } /** * Which Textract API to call ALL asynchronous Textract API calls are supported. Valid values are GENERIC | EXPENSE | LENDING. *

* For GENERIC, when called without features (e. g. FORMS, TABLES, QUERIES, SIGNATURE), StartDetectText is called and only OCR is returned. * For GENERIC, when called with a feature (e. g. FORMS, TABLES, QUERIES, SIGNATURE), StartAnalyzeDocument is called. *

* Default: - GENERIC *

* @return {@code this} * @param textractApi Which Textract API to call ALL asynchronous Textract API calls are supported. Valid values are GENERIC | EXPENSE | LENDING. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder textractApi(final java.lang.String textractApi) { this.props.textractApi(textractApi); return this; } /** * retyr backoff rate. *

* Default: is 1.1 *

* @return {@code this} * @param textractAsyncCallBackoffRate retyr backoff rate. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder textractAsyncCallBackoffRate(final java.lang.Number textractAsyncCallBackoffRate) { this.props.textractAsyncCallBackoffRate(textractAsyncCallBackoffRate); return this; } /** * time in seconds to wait before next retry. *

* Default: is 1 *

* @return {@code this} * @param textractAsyncCallInterval time in seconds to wait before next retry. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder textractAsyncCallInterval(final java.lang.Number textractAsyncCallInterval) { this.props.textractAsyncCallInterval(textractAsyncCallInterval); return this; } /** * number of retries in Step Function flow. *

* Default: is 100 *

* @return {@code this} * @param textractAsyncCallMaxRetries number of retries in Step Function flow. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder textractAsyncCallMaxRetries(final java.lang.Number textractAsyncCallMaxRetries) { this.props.textractAsyncCallMaxRetries(textractAsyncCallMaxRetries); return this; } /** * how long can we wait for the process. *

* Default: - 2880 (48 hours (60 min * 48 hours = 2880)) *

* @return {@code this} * @param textractStateMachineTimeoutMinutes how long can we wait for the process. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder textractStateMachineTimeoutMinutes(final java.lang.Number textractStateMachineTimeoutMinutes) { this.props.textractStateMachineTimeoutMinutes(textractStateMachineTimeoutMinutes); return this; } /** * @return a newly built instance of {@link software.amazon.textract.idp.TextractGenericAsyncSfnTask}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public software.amazon.textract.idp.TextractGenericAsyncSfnTask build() { return new software.amazon.textract.idp.TextractGenericAsyncSfnTask( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy