Class SqsToPipesToStepfunctionsProps.Builder
java.lang.Object
software.amazon.awsconstructs.services.sqspipesstepfunctions.SqsToPipesToStepfunctionsProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<SqsToPipesToStepfunctionsProps>
- Enclosing interface:
SqsToPipesToStepfunctionsProps
public static final class SqsToPipesToStepfunctionsProps.Builder
extends Object
implements software.amazon.jsii.Builder<SqsToPipesToStepfunctionsProps>
A builder for
SqsToPipesToStepfunctionsProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.createCloudWatchAlarms(Boolean createCloudWatchAlarms) Sets the value ofSqsToPipesToStepfunctionsProps.getCreateCloudWatchAlarms()deadLetterQueueProps(software.amazon.awscdk.services.sqs.QueueProps deadLetterQueueProps) Sets the value ofSqsToPipesToStepfunctionsProps.getDeadLetterQueueProps()deployDeadLetterQueue(Boolean deployDeadLetterQueue) Sets the value ofSqsToPipesToStepfunctionsProps.getDeployDeadLetterQueue()encryptQueueWithCmk(Boolean encryptQueueWithCmk) Sets the value ofSqsToPipesToStepfunctionsProps.getEncryptQueueWithCmk()enrichmentFunction(software.amazon.awscdk.services.lambda.Function enrichmentFunction) Sets the value ofSqsToPipesToStepfunctionsProps.getEnrichmentFunction()enrichmentStateMachine(software.amazon.awscdk.services.stepfunctions.StateMachine enrichmentStateMachine) Sets the value ofSqsToPipesToStepfunctionsProps.getEnrichmentStateMachine()existingQueueEncryptionKey(software.amazon.awscdk.services.kms.Key existingQueueEncryptionKey) Sets the value ofSqsToPipesToStepfunctionsProps.getExistingQueueEncryptionKey()existingQueueObj(software.amazon.awscdk.services.sqs.Queue existingQueueObj) Sets the value ofSqsToPipesToStepfunctionsProps.getExistingQueueObj()existingStateMachineObj(software.amazon.awscdk.services.stepfunctions.StateMachine existingStateMachineObj) Sets the value ofSqsToPipesToStepfunctionsProps.getExistingStateMachineObj()logGroupProps(software.amazon.awscdk.services.logs.LogGroupProps logGroupProps) Sets the value ofSqsToPipesToStepfunctionsProps.getLogGroupProps()logLevel(software.amazon.awsconstructs.services.core.PipesLogLevel logLevel) Sets the value ofSqsToPipesToStepfunctionsProps.getLogLevel()maxReceiveCount(Number maxReceiveCount) Sets the value ofSqsToPipesToStepfunctionsProps.getMaxReceiveCount()pipeLogProps(software.amazon.awscdk.services.logs.LogGroupProps pipeLogProps) Sets the value ofSqsToPipesToStepfunctionsProps.getPipeLogProps()Sets the value ofSqsToPipesToStepfunctionsProps.getPipeProps()queueEncryptionKeyProps(software.amazon.awscdk.services.kms.KeyProps queueEncryptionKeyProps) Sets the value ofSqsToPipesToStepfunctionsProps.getQueueEncryptionKeyProps()queueProps(software.amazon.awscdk.services.sqs.QueueProps queueProps) Sets the value ofSqsToPipesToStepfunctionsProps.getQueueProps()stateMachineProps(software.amazon.awscdk.services.stepfunctions.StateMachineProps stateMachineProps) Sets the value ofSqsToPipesToStepfunctionsProps.getStateMachineProps()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
createCloudWatchAlarms
public SqsToPipesToStepfunctionsProps.Builder createCloudWatchAlarms(Boolean createCloudWatchAlarms) Sets the value ofSqsToPipesToStepfunctionsProps.getCreateCloudWatchAlarms()- Parameters:
createCloudWatchAlarms- Whether to create recommended CloudWatch alarms. default = true- Returns:
this
-
deadLetterQueueProps
public SqsToPipesToStepfunctionsProps.Builder deadLetterQueueProps(software.amazon.awscdk.services.sqs.QueueProps deadLetterQueueProps) Sets the value ofSqsToPipesToStepfunctionsProps.getDeadLetterQueueProps()- Parameters:
deadLetterQueueProps- Optional user-provided props to override the default props for the dead letter SQS queue.- Returns:
this
-
deployDeadLetterQueue
Sets the value ofSqsToPipesToStepfunctionsProps.getDeployDeadLetterQueue()- Parameters:
deployDeadLetterQueue- Whether to create a secondary queue to be used as a dead letter queue. default = true.- Returns:
this
-
encryptQueueWithCmk
Sets the value ofSqsToPipesToStepfunctionsProps.getEncryptQueueWithCmk()- Parameters:
encryptQueueWithCmk- Whether to encrypt the Queue with a customer managed KMS key (CMK). This is the default behavior, and this property defaults to true - if it is explicitly set to false then the Queue is encrypted with an Amazon managed KMS key. For a completely unencrypted Queue (not recommended), create the Queue separately from the construct and pass it in using the existingQueueObject. Since SNS subscriptions do not currently support SQS queues with AWS managed encryption keys, setting this to false will always result in an error from the underlying CDK - we have still included this property for consistency with topics and to be ready if the services one day support this functionality.- Returns:
this
-
enrichmentFunction
public SqsToPipesToStepfunctionsProps.Builder enrichmentFunction(software.amazon.awscdk.services.lambda.Function enrichmentFunction) Sets the value ofSqsToPipesToStepfunctionsProps.getEnrichmentFunction()- Parameters:
enrichmentFunction- Optional - Lambda function that the construct will configure to be called to enrich the message between source and target. The construct will configure the pipe IAM role to allow invoking the function (but will not affect the IArole assigned to the function). Specifying both this and enrichmentStateMachine is an error. Default - undefined- Returns:
this
-
enrichmentStateMachine
public SqsToPipesToStepfunctionsProps.Builder enrichmentStateMachine(software.amazon.awscdk.services.stepfunctions.StateMachine enrichmentStateMachine) Sets the value ofSqsToPipesToStepfunctionsProps.getEnrichmentStateMachine()- Parameters:
enrichmentStateMachine- Optional - Step Functions state machine that the construct will configure to be called to enrich the message between source and target. The construct will configure the pipe IAM role to allow executing the state machine (but will not affect the IAM role assigned to the state machine). Specifying both this and enrichmentStateMachine is an error. Enrichment is invoked synchronously, so this must be an EXPRESS state machin. Default - undefined- Returns:
this
-
existingQueueEncryptionKey
public SqsToPipesToStepfunctionsProps.Builder existingQueueEncryptionKey(software.amazon.awscdk.services.kms.Key existingQueueEncryptionKey) Sets the value ofSqsToPipesToStepfunctionsProps.getExistingQueueEncryptionKey()- Parameters:
existingQueueEncryptionKey- An optional CMK that will be used by the construct to encrypt the new SQS queue.- Returns:
this
-
existingQueueObj
public SqsToPipesToStepfunctionsProps.Builder existingQueueObj(software.amazon.awscdk.services.sqs.Queue existingQueueObj) Sets the value ofSqsToPipesToStepfunctionsProps.getExistingQueueObj()- Parameters:
existingQueueObj- An optional, existing SQS queue to be used instead of the default queue. Providing both this and queueProps will cause an error.- Returns:
this
-
existingStateMachineObj
public SqsToPipesToStepfunctionsProps.Builder existingStateMachineObj(software.amazon.awscdk.services.stepfunctions.StateMachine existingStateMachineObj) Sets the value ofSqsToPipesToStepfunctionsProps.getExistingStateMachineObj()- Parameters:
existingStateMachineObj- Optional existing state machine to incorporate into the construct.- Returns:
this
-
logGroupProps
public SqsToPipesToStepfunctionsProps.Builder logGroupProps(software.amazon.awscdk.services.logs.LogGroupProps logGroupProps) Sets the value ofSqsToPipesToStepfunctionsProps.getLogGroupProps()- Parameters:
logGroupProps- Optional user provided props to override the default props for for the CloudWatchLogs LogGroup.- Returns:
this
-
logLevel
public SqsToPipesToStepfunctionsProps.Builder logLevel(software.amazon.awsconstructs.services.core.PipesLogLevel logLevel) Sets the value ofSqsToPipesToStepfunctionsProps.getLogLevel()- Parameters:
logLevel- Threshold for what messages the new pipe sends to the log, PipesLogLevel.OFF, PipesLogLevel.ERROR, PipesLogLevel.INFO, PipesLogLevel.TRACE. The default is INFO. Setting the level to OFF will prevent any log group from being created. Providing pipeProps.logConfiguration will controls all aspects of logging and any construct provided log configuration is disabled. If pipeProps.logConfiguration is provided then specifying this or pipeLogProps is an error.- Returns:
this
-
maxReceiveCount
Sets the value ofSqsToPipesToStepfunctionsProps.getMaxReceiveCount()- Parameters:
maxReceiveCount- The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to 15.- Returns:
this
-
pipeLogProps
public SqsToPipesToStepfunctionsProps.Builder pipeLogProps(software.amazon.awscdk.services.logs.LogGroupProps pipeLogProps) Sets the value ofSqsToPipesToStepfunctionsProps.getPipeLogProps()- Parameters:
pipeLogProps- Default behavior is for the this construct to create a new CloudWatch Logs log group for the pipe. These props are used to override defaults set by AWS or this construct. If there are concerns about the cost of log storage, this is where a client can specify a shorter retention duration (in days)- Returns:
this
-
pipeProps
Sets the value ofSqsToPipesToStepfunctionsProps.getPipeProps()- Parameters:
pipeProps- Optional customer provided settings for the EventBridge pipe. source, target and roleArn are set by the construct and cannot be overriden. The construct will generate default sourceParameters, targetParameters and logConfiguration that can be overriden by populating those values in these props. If the client wants to implement enrichment or a filter, this is where that information can be provided. Any other props can be freely overridden.- Returns:
this
-
queueEncryptionKeyProps
public SqsToPipesToStepfunctionsProps.Builder queueEncryptionKeyProps(software.amazon.awscdk.services.kms.KeyProps queueEncryptionKeyProps) Sets the value ofSqsToPipesToStepfunctionsProps.getQueueEncryptionKeyProps()- Parameters:
queueEncryptionKeyProps- An optional subset of key properties to override the default properties used by constructs (enableKeyRotation: true). These properties will be used in constructing the CMK used to encrypt the SQS queue.- Returns:
this
-
queueProps
public SqsToPipesToStepfunctionsProps.Builder queueProps(software.amazon.awscdk.services.sqs.QueueProps queueProps) Sets the value ofSqsToPipesToStepfunctionsProps.getQueueProps()- Parameters:
queueProps- Optional user provided properties to override the default properties for the SQS queue.- Returns:
this
-
stateMachineProps
public SqsToPipesToStepfunctionsProps.Builder stateMachineProps(software.amazon.awscdk.services.stepfunctions.StateMachineProps stateMachineProps) Sets the value ofSqsToPipesToStepfunctionsProps.getStateMachineProps()- Parameters:
stateMachineProps- User provided props for the sfn.StateMachine. This or existingStateMachine is required.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<SqsToPipesToStepfunctionsProps>- Returns:
- a new instance of
SqsToPipesToStepfunctionsProps - Throws:
NullPointerException- if any required attribute was not provided
-