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

software.amazon.awscdk.services.pipes.sources.alpha.SqsSource Maven / Gradle / Ivy

There is a newer version: 2.168.0-alpha.0
Show newest version
package software.amazon.awscdk.services.pipes.sources.alpha;

/**
 * (experimental) A source that reads from an SQS queue.
 * 

* Example: *

*

 * Queue sourceQueue;
 * Queue targetQueue;
 * SqsSource pipeSource = new SqsSource(sourceQueue);
 * Pipe pipe = Pipe.Builder.create(this, "Pipe")
 *         .source(pipeSource)
 *         .target(new SomeTarget(targetQueue))
 *         .build();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-08-15T01:32:57.411Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.pipes.sources.alpha.$Module.class, fqn = "@aws-cdk/aws-pipes-sources-alpha.SqsSource") public class SqsSource extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.services.pipes.alpha.ISource { protected SqsSource(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected SqsSource(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param queue This parameter is required. * @param parameters */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public SqsSource(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.sqs.IQueue queue, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.pipes.sources.alpha.SqsSourceParameters parameters) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(queue, "queue is required"), parameters }); } /** * @param queue This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public SqsSource(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.sqs.IQueue queue) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(queue, "queue is required") }); } /** * (experimental) Bind the source to a pipe. *

* @param _pipe This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.pipes.alpha.SourceConfig bind(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.pipes.alpha.IPipe _pipe) { return software.amazon.jsii.Kernel.call(this, "bind", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.pipes.alpha.SourceConfig.class), new Object[] { java.util.Objects.requireNonNull(_pipe, "_pipe is required") }); } /** * (experimental) Grant the pipe role read access to the source. *

* @param grantee This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public void grantRead(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IRole grantee) { software.amazon.jsii.Kernel.call(this, "grantRead", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(grantee, "grantee is required") }); } /** * (experimental) The ARN of the source resource. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getSourceArn() { return software.amazon.jsii.Kernel.get(this, "sourceArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) A fluent builder for {@link software.amazon.awscdk.services.pipes.sources.alpha.SqsSource}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param queue This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static Builder create(final software.amazon.awscdk.services.sqs.IQueue queue) { return new Builder(queue); } private final software.amazon.awscdk.services.sqs.IQueue queue; private software.amazon.awscdk.services.pipes.sources.alpha.SqsSourceParameters.Builder parameters; private Builder(final software.amazon.awscdk.services.sqs.IQueue queue) { this.queue = queue; } /** * (experimental) The maximum number of records to include in each batch. *

* Default: 10 *

* @return {@code this} * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipesourcesqsqueueparameters.html#cfn-pipes-pipe-pipesourcesqsqueueparameters-batchsize * @param batchSize The maximum number of records to include in each batch. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder batchSize(final java.lang.Number batchSize) { this.parameters().batchSize(batchSize); return this; } /** * (experimental) The maximum length of a time to wait for events. *

* Default: 1 *

* @return {@code this} * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipesourcesqsqueueparameters.html#cfn-pipes-pipe-pipesourcesqsqueueparameters-maximumbatchingwindowinseconds * @param maximumBatchingWindow The maximum length of a time to wait for events. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder maximumBatchingWindow(final software.amazon.awscdk.Duration maximumBatchingWindow) { this.parameters().maximumBatchingWindow(maximumBatchingWindow); return this; } /** * @return a newly built instance of {@link software.amazon.awscdk.services.pipes.sources.alpha.SqsSource}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public software.amazon.awscdk.services.pipes.sources.alpha.SqsSource build() { return new software.amazon.awscdk.services.pipes.sources.alpha.SqsSource( this.queue, this.parameters != null ? this.parameters.build() : null ); } private software.amazon.awscdk.services.pipes.sources.alpha.SqsSourceParameters.Builder parameters() { if (this.parameters == null) { this.parameters = new software.amazon.awscdk.services.pipes.sources.alpha.SqsSourceParameters.Builder(); } return this.parameters; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy