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

software.amazon.awsconstructs.services.lambdasns.LambdaToSns Maven / Gradle / Ivy

package software.amazon.awsconstructs.services.lambdasns;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-10-22T17:51:52.174Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.lambdasns.$Module.class, fqn = "@aws-solutions-constructs/aws-lambda-sns.LambdaToSns")
public class LambdaToSns extends software.constructs.Construct {

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

    protected LambdaToSns(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 LambdaToSns(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.lambdasns.LambdaToSnsProps 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.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.NotNull software.amazon.awscdk.services.sns.Topic getSnsTopic() { return software.amazon.jsii.Kernel.get(this, "snsTopic", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sns.Topic.class)); } public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.IVpc getVpc() { return software.amazon.jsii.Kernel.get(this, "vpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class)); } /** * A fluent builder for {@link software.amazon.awsconstructs.services.lambdasns.LambdaToSns}. */ 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.lambdasns.LambdaToSnsProps.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.lambdasns.LambdaToSnsProps.Builder(); } /** * Whether to deploy a new VPC. *

* Default: - false *

* @return {@code this} * @param deployVpc Whether to deploy a new VPC. This parameter is required. */ public Builder deployVpc(final java.lang.Boolean deployVpc) { this.props.deployVpc(deployVpc); return this; } /** * If no key is provided, this flag determines whether the SNS Topic is encrypted with a new CMK or an AWS managed key. *

* This flag is ignored if any of the following are defined: topicProps.masterKey, encryptionKey or encryptionKeyProps. *

* Default: - False if topicProps.masterKey, encryptionKey, and encryptionKeyProps are all undefined. *

* @return {@code this} * @param enableEncryptionWithCustomerManagedKey If no key is provided, this flag determines whether the SNS Topic is encrypted with a new CMK or an AWS managed key. This parameter is required. */ public Builder enableEncryptionWithCustomerManagedKey(final java.lang.Boolean enableEncryptionWithCustomerManagedKey) { this.props.enableEncryptionWithCustomerManagedKey(enableEncryptionWithCustomerManagedKey); return this; } /** * An optional, imported encryption key to encrypt the SNS Topic with. *

* Default: - None *

* @return {@code this} * @param encryptionKey An optional, imported encryption key to encrypt the SNS Topic with. This parameter is required. */ public Builder encryptionKey(final software.amazon.awscdk.services.kms.Key encryptionKey) { this.props.encryptionKey(encryptionKey); return this; } /** * Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SNS Topic with. *

* Default: - None *

* @return {@code this} * @param encryptionKeyProps Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SNS Topic with. This parameter is required. */ public Builder encryptionKeyProps(final software.amazon.awscdk.services.kms.KeyProps encryptionKeyProps) { this.props.encryptionKeyProps(encryptionKeyProps); 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 SNS Topic object, providing both this and topicProps will cause an error.. *

* Default: - Default props are used *

* @return {@code this} * @param existingTopicObj Existing instance of SNS Topic object, providing both this and topicProps will cause an error.. This parameter is required. */ public Builder existingTopicObj(final software.amazon.awscdk.services.sns.Topic existingTopicObj) { this.props.existingTopicObj(existingTopicObj); return this; } /** * An existing VPC for the construct to use (construct will NOT create a new VPC in this case). *

* @return {@code this} * @param existingVpc An existing VPC for the construct to use (construct will NOT create a new VPC in this case). This parameter is required. */ public Builder existingVpc(final software.amazon.awscdk.services.ec2.IVpc existingVpc) { this.props.existingVpc(existingVpc); return this; } /** * User provided props to override the default props for the Lambda function. *

* Default: - Default properties 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 Name for the Lambda function environment variable set to the arn of the Topic. *

* Default: - SNS_TOPIC_ARN *

* @return {@code this} * @param topicArnEnvironmentVariableName Optional Name for the Lambda function environment variable set to the arn of the Topic. This parameter is required. */ public Builder topicArnEnvironmentVariableName(final java.lang.String topicArnEnvironmentVariableName) { this.props.topicArnEnvironmentVariableName(topicArnEnvironmentVariableName); return this; } /** * Optional Name for the Lambda function environment variable set to the name of the Topic. *

* Default: - SNS_TOPIC_NAME *

* @return {@code this} * @param topicNameEnvironmentVariableName Optional Name for the Lambda function environment variable set to the name of the Topic. This parameter is required. */ public Builder topicNameEnvironmentVariableName(final java.lang.String topicNameEnvironmentVariableName) { this.props.topicNameEnvironmentVariableName(topicNameEnvironmentVariableName); return this; } /** * Optional user provided properties to override the default properties for the SNS topic. *

* Default: - Default properties are used. *

* @return {@code this} * @param topicProps Optional user provided properties to override the default properties for the SNS topic. This parameter is required. */ public Builder topicProps(final software.amazon.awscdk.services.sns.TopicProps topicProps) { this.props.topicProps(topicProps); return this; } /** * Properties to override default properties if deployVpc is true. *

* @return {@code this} * @param vpcProps Properties to override default properties if deployVpc is true. This parameter is required. */ public Builder vpcProps(final software.amazon.awscdk.services.ec2.VpcProps vpcProps) { this.props.vpcProps(vpcProps); return this; } /** * @return a newly built instance of {@link software.amazon.awsconstructs.services.lambdasns.LambdaToSns}. */ @Override public software.amazon.awsconstructs.services.lambdasns.LambdaToSns build() { return new software.amazon.awsconstructs.services.lambdasns.LambdaToSns( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy