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

software.amazon.awsconstructs.services.kinesisstreamslambda.KinesisStreamsToLambda Maven / Gradle / Ivy

Go to download

CDK constructs for defining an interaction between an Amazon Kinesis Data Stream and an AWS Lambda function.

There is a newer version: 2.75.0
Show newest version
package software.amazon.awsconstructs.services.kinesisstreamslambda;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.96.0 (build 921e240)", date = "2024-04-04T20:59:11.166Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.kinesisstreamslambda.$Module.class, fqn = "@aws-solutions-constructs/aws-kinesisstreams-lambda.KinesisStreamsToLambda")
public class KinesisStreamsToLambda extends software.constructs.Construct {

    protected KinesisStreamsToLambda(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected KinesisStreamsToLambda(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * @param scope 
  • represents the scope for all the resources.
This parameter is required. * @param id
  • this is a a scope-unique id.
This parameter is required. * @param props
  • user provided props for the construct.
This parameter is required. */ public KinesisStreamsToLambda(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.awsconstructs.services.kinesisstreamslambda.KinesisStreamsToLambdaProps 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") }); } public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.kinesis.Stream getKinesisStream() { return software.amazon.jsii.Kernel.get(this, "kinesisStream", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.kinesis.Stream.class)); } public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.Function getLambdaFunction() { return software.amazon.jsii.Kernel.get(this, "lambdaFunction", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.Function.class)); } public @org.jetbrains.annotations.Nullable java.util.List getCloudwatchAlarms() { return java.util.Optional.ofNullable((java.util.List)(software.amazon.jsii.Kernel.get(this, "cloudwatchAlarms", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.Alarm.class))))).map(java.util.Collections::unmodifiableList).orElse(null); } /** * A fluent builder for {@link software.amazon.awsconstructs.services.kinesisstreamslambda.KinesisStreamsToLambda}. */ public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope
  • represents the scope for all the resources.
This parameter is required. * @param id
  • this is a a scope-unique id.
This parameter is required. */ 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.awsconstructs.services.kinesisstreamslambda.KinesisStreamsToLambdaProps.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.awsconstructs.services.kinesisstreamslambda.KinesisStreamsToLambdaProps.Builder(); } /** * Whether to create recommended CloudWatch alarms. *

* Default: - Alarms are created *

* @return {@code this} * @param createCloudWatchAlarms Whether to create recommended CloudWatch alarms. This parameter is required. */ public Builder createCloudWatchAlarms(final java.lang.Boolean createCloudWatchAlarms) { this.props.createCloudWatchAlarms(createCloudWatchAlarms); return this; } /** * Whether to deploy a SQS dead letter queue when a data record reaches the Maximum Retry Attempts or Maximum Record Age, its metadata like shard ID and stream ARN will be sent to an SQS queue. *

* Default: - true. *

* @return {@code this} * @param deploySqsDlqQueue Whether to deploy a SQS dead letter queue when a data record reaches the Maximum Retry Attempts or Maximum Record Age, its metadata like shard ID and stream ARN will be sent to an SQS queue. This parameter is required. */ public Builder deploySqsDlqQueue(final java.lang.Boolean deploySqsDlqQueue) { this.props.deploySqsDlqQueue(deploySqsDlqQueue); return this; } /** * Existing instance of Lambda Function object, providing both this and lambdaFunctionProps will cause an error. *

* Default: - None *

* @return {@code this} * @param existingLambdaObj Existing instance of Lambda Function object, providing both this and lambdaFunctionProps will cause an error. This parameter is required. */ public Builder existingLambdaObj(final software.amazon.awscdk.services.lambda.Function existingLambdaObj) { this.props.existingLambdaObj(existingLambdaObj); return this; } /** * Existing instance of Kinesis Stream, providing both this and kinesisStreamProps will cause an error. *

* Default: - None *

* @return {@code this} * @param existingStreamObj Existing instance of Kinesis Stream, providing both this and kinesisStreamProps will cause an error. This parameter is required. */ public Builder existingStreamObj(final software.amazon.awscdk.services.kinesis.Stream existingStreamObj) { this.props.existingStreamObj(existingStreamObj); return this; } /** * Optional user-provided props to override the default props for the Lambda event source mapping. *

* Default: - Default props are used. *

* @return {@code this} * @param kinesisEventSourceProps Optional user-provided props to override the default props for the Lambda event source mapping. This parameter is required. */ public Builder kinesisEventSourceProps(final java.lang.Object kinesisEventSourceProps) { this.props.kinesisEventSourceProps(kinesisEventSourceProps); return this; } /** * Optional user-provided props to override the default props for the Kinesis stream. *

* Default: - Default props are used. *

* @return {@code this} * @param kinesisStreamProps Optional user-provided props to override the default props for the Kinesis stream. This parameter is required. */ public Builder kinesisStreamProps(final software.amazon.awscdk.services.kinesis.StreamProps kinesisStreamProps) { this.props.kinesisStreamProps(kinesisStreamProps); return this; } /** * User provided props to override the default props for the Lambda function. *

* Default: - Default props are used. *

* @return {@code this} * @param lambdaFunctionProps User provided props to override the default props for the Lambda function. This parameter is required. */ public Builder lambdaFunctionProps(final software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps) { this.props.lambdaFunctionProps(lambdaFunctionProps); return this; } /** * Optional user provided properties for the SQS dead letter queue. *

* Default: - Default props are used *

* @return {@code this} * @param sqsDlqQueueProps Optional user provided properties for the SQS dead letter queue. This parameter is required. */ public Builder sqsDlqQueueProps(final software.amazon.awscdk.services.sqs.QueueProps sqsDlqQueueProps) { this.props.sqsDlqQueueProps(sqsDlqQueueProps); return this; } /** * @return a newly built instance of {@link software.amazon.awsconstructs.services.kinesisstreamslambda.KinesisStreamsToLambda}. */ @Override public software.amazon.awsconstructs.services.kinesisstreamslambda.KinesisStreamsToLambda build() { return new software.amazon.awsconstructs.services.kinesisstreamslambda.KinesisStreamsToLambda( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy