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

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

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

/**
 * This construct starts State Machine executions based on events, but limits the number of concurrent running executions to a threshold number - S3 - API Gateway - SQS  This version does not yet support passing in a manifest for configuration of Textract features.
 * 

* That will be a future enhancement. * The following resources are created: *

*

    *
  • Lambda function
  • *
  • DynamoDB table. For every document pass in an entry in a DynamoDB table is created with a status (RECEIVED, QUEUED, IN_PROGRESS)
  • *
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.90.0 (build d6bdb4d)", date = "2023-10-26T15:43:30.316Z") @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.SFExecutionsStartThrottle") public class SFExecutionsStartThrottle extends software.constructs.Construct { protected SFExecutionsStartThrottle(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected SFExecutionsStartThrottle(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param parent This parameter is required. * @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public SFExecutionsStartThrottle(final @org.jetbrains.annotations.NotNull software.constructs.Construct parent, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.textract.idp.SFExecutionsStartThrottleProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(parent, "parent is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.IFunction getExecutionsQueueWorkerFunction() { return software.amazon.jsii.Kernel.get(this, "executionsQueueWorkerFunction", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.IFunction.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setExecutionsQueueWorkerFunction(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.IFunction value) { software.amazon.jsii.Kernel.set(this, "executionsQueueWorkerFunction", java.util.Objects.requireNonNull(value, "executionsQueueWorkerFunction is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.IFunction getExecutionsStartThrottleFunction() { return software.amazon.jsii.Kernel.get(this, "executionsStartThrottleFunction", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.IFunction.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setExecutionsStartThrottleFunction(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.IFunction value) { software.amazon.jsii.Kernel.set(this, "executionsStartThrottleFunction", java.util.Objects.requireNonNull(value, "executionsStartThrottleFunction is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.IFunction getExecutionsThrottleCounterResetFunction() { return software.amazon.jsii.Kernel.get(this, "executionsThrottleCounterResetFunction", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.IFunction.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setExecutionsThrottleCounterResetFunction(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.IFunction value) { software.amazon.jsii.Kernel.set(this, "executionsThrottleCounterResetFunction", java.util.Objects.requireNonNull(value, "executionsThrottleCounterResetFunction is required")); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.sqs.IQueue getDocumentQueue() { return software.amazon.jsii.Kernel.get(this, "documentQueue", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sqs.IQueue.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setDocumentQueue(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.sqs.IQueue value) { software.amazon.jsii.Kernel.set(this, "documentQueue", value); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.dynamodb.ITable getDocumentStatusTable() { return software.amazon.jsii.Kernel.get(this, "documentStatusTable", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.dynamodb.ITable.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setDocumentStatusTable(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.dynamodb.ITable value) { software.amazon.jsii.Kernel.set(this, "documentStatusTable", value); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.dynamodb.ITable getExecutionsCounterTable() { return software.amazon.jsii.Kernel.get(this, "executionsCounterTable", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.dynamodb.ITable.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setExecutionsCounterTable(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.dynamodb.ITable value) { software.amazon.jsii.Kernel.set(this, "executionsCounterTable", value); } /** * A fluent builder for {@link software.amazon.textract.idp.SFExecutionsStartThrottle}. */ @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 parent This parameter is required. * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static Builder create(final software.constructs.Construct parent, final java.lang.String id) { return new Builder(parent, id); } private final software.constructs.Construct parent; private final java.lang.String id; private final software.amazon.textract.idp.SFExecutionsStartThrottleProps.Builder props; private Builder(final software.constructs.Construct parent, final java.lang.String id) { this.parent = parent; this.id = id; this.props = new software.amazon.textract.idp.SFExecutionsStartThrottleProps.Builder(); } /** * State Machine ARN. *

* @return {@code this} * @param stateMachineArn State Machine ARN. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder stateMachineArn(final java.lang.String stateMachineArn) { this.props.stateMachineArn(stateMachineArn); return this; } /** * Status table - DynamoDB table with status information for the document execution. *

* @return {@code this} * @param documentStatusTable Status table - DynamoDB table with status information for the document execution. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder documentStatusTable(final software.amazon.awscdk.services.dynamodb.ITable documentStatusTable) { this.props.documentStatusTable(documentStatusTable); return this; } /** * List of PolicyStatements to attach to the Lambda function. *

* @return {@code this} * @param eventSource 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 eventSource(final java.util.List eventSource) { this.props.eventSource(eventSource); return this; } /** * Executions concurrency, default is 100 should be set to whatever the bottleneck of the workflow is For Textract Asynchronous APIs, that would be the number of concurrent jobs that can be processed For Textract Synchronous APIs, that would be the TPS for the API. *

* @return {@code this} * @param executionsConcurrencyThreshold Executions concurrency, default is 100 should be set to whatever the bottleneck of the workflow is For Textract Asynchronous APIs, that would be the number of concurrent jobs that can be processed For Textract Synchronous APIs, that would be the TPS for the API. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder executionsConcurrencyThreshold(final java.lang.Number executionsConcurrencyThreshold) { this.props.executionsConcurrencyThreshold(executionsConcurrencyThreshold); return this; } /** * Step Functions Executions Counter - DynamoDB table with current count of executions. *

* @return {@code this} * @param executionsCounterTable Step Functions Executions Counter - DynamoDB table with current count of executions. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder executionsCounterTable(final software.amazon.awscdk.services.dynamodb.ITable executionsCounterTable) { this.props.executionsCounterTable(executionsCounterTable); 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: = INFO *

* @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; } /** * log level for Lambda function, supports DEBUG|INFO|WARNING|ERROR|FATAL. *

* Default: = DEBUG *

* @return {@code this} * @param lambdaQueueWorkerLogLevel 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 lambdaQueueWorkerLogLevel(final java.lang.String lambdaQueueWorkerLogLevel) { this.props.lambdaQueueWorkerLogLevel(lambdaQueueWorkerLogLevel); return this; } /** * Memory allocated to Lambda function, default 512. *

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

* @return {@code this} * @param lambdaQueueWorkerTimeout Lambda Function Timeout in seconds, default 300. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder lambdaQueueWorkerTimeout(final java.lang.Number lambdaQueueWorkerTimeout) { this.props.lambdaQueueWorkerTimeout(lambdaQueueWorkerTimeout); 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; } /** * 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; } /** * SQS Batch size when catchup up on queued documents (max 10, which is also the default). *

* @return {@code this} * @param sqsBatch SQS Batch size when catchup up on queued documents (max 10, which is also the default). This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder sqsBatch(final java.lang.Number sqsBatch) { this.props.sqsBatch(sqsBatch); return this; } /** * @return a newly built instance of {@link software.amazon.textract.idp.SFExecutionsStartThrottle}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public software.amazon.textract.idp.SFExecutionsStartThrottle build() { return new software.amazon.textract.idp.SFExecutionsStartThrottle( this.parent, this.id, this.props.build() ); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy