Class LambdaToSns.Builder
java.lang.Object
software.amazon.awsconstructs.services.lambdasns.LambdaToSns.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LambdaToSns>
- Enclosing class:
LambdaToSns
public static final class LambdaToSns.Builder
extends Object
implements software.amazon.jsii.Builder<LambdaToSns>
A fluent builder for
LambdaToSns.-
Method Summary
Modifier and TypeMethodDescriptionbuild()static LambdaToSns.BuilderWhether to deploy a new VPC.enableEncryptionWithCustomerManagedKey(Boolean enableEncryptionWithCustomerManagedKey) If no key is provided, this flag determines whether the SNS Topic is encrypted with a new CMK or an AWS managed key.encryptionKey(software.amazon.awscdk.services.kms.Key encryptionKey) An optional, imported encryption key to encrypt the SNS Topic with.encryptionKeyProps(software.amazon.awscdk.services.kms.KeyProps encryptionKeyProps) Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SNS Topic with.existingLambdaObj(software.amazon.awscdk.services.lambda.Function existingLambdaObj) Existing instance of Lambda Function object, providing both this andlambdaFunctionPropswill cause an error.existingTopicObj(software.amazon.awscdk.services.sns.Topic existingTopicObj) Existing instance of SNS Topic object, providing both this and topicProps will cause an error..existingVpc(software.amazon.awscdk.services.ec2.IVpc existingVpc) An existing VPC for the construct to use (construct will NOT create a new VPC in this case).lambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps) User provided props to override the default props for the Lambda function.topicArnEnvironmentVariableName(String topicArnEnvironmentVariableName) Optional Name for the Lambda function environment variable set to the arn of the Topic.topicNameEnvironmentVariableName(String topicNameEnvironmentVariableName) Optional Name for the Lambda function environment variable set to the name of the Topic.topicProps(software.amazon.awscdk.services.sns.TopicProps topicProps) Optional user provided properties to override the default properties for the SNS topic.vpcProps(software.amazon.awscdk.services.ec2.VpcProps vpcProps) Properties to override default properties if deployVpc is true.
-
Method Details
-
create
- Parameters:
scope-- represents the scope for all the resources.
id-- this is a a scope-unique id.
- Returns:
- a new instance of
LambdaToSns.Builder.
-
deployVpc
Whether to deploy a new VPC.Default: - false
- Parameters:
deployVpc- Whether to deploy a new VPC. This parameter is required.- Returns:
this
-
enableEncryptionWithCustomerManagedKey
public LambdaToSns.Builder enableEncryptionWithCustomerManagedKey(Boolean 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 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.
- Parameters:
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.- Returns:
this
-
encryptionKey
An optional, imported encryption key to encrypt the SNS Topic with.Default: - None
- Parameters:
encryptionKey- An optional, imported encryption key to encrypt the SNS Topic with. This parameter is required.- Returns:
this
-
encryptionKeyProps
public LambdaToSns.Builder encryptionKeyProps(software.amazon.awscdk.services.kms.KeyProps encryptionKeyProps) Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SNS Topic with.Default: - None
- Parameters:
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.- Returns:
this
-
existingLambdaObj
public LambdaToSns.Builder existingLambdaObj(software.amazon.awscdk.services.lambda.Function existingLambdaObj) Existing instance of Lambda Function object, providing both this andlambdaFunctionPropswill cause an error.Default: - None
- Parameters:
existingLambdaObj- Existing instance of Lambda Function object, providing both this andlambdaFunctionPropswill cause an error. This parameter is required.- Returns:
this
-
existingTopicObj
public LambdaToSns.Builder existingTopicObj(software.amazon.awscdk.services.sns.Topic existingTopicObj) Existing instance of SNS Topic object, providing both this and topicProps will cause an error..Default: - Default props are used
- Parameters:
existingTopicObj- Existing instance of SNS Topic object, providing both this and topicProps will cause an error.. This parameter is required.- Returns:
this
-
existingVpc
An existing VPC for the construct to use (construct will NOT create a new VPC in this case).- Parameters:
existingVpc- An existing VPC for the construct to use (construct will NOT create a new VPC in this case). This parameter is required.- Returns:
this
-
lambdaFunctionProps
public LambdaToSns.Builder lambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps) User provided props to override the default props for the Lambda function.Default: - Default properties are used.
- Parameters:
lambdaFunctionProps- User provided props to override the default props for the Lambda function. This parameter is required.- Returns:
this
-
topicArnEnvironmentVariableName
Optional Name for the Lambda function environment variable set to the arn of the Topic.Default: - SNS_TOPIC_ARN
- Parameters:
topicArnEnvironmentVariableName- Optional Name for the Lambda function environment variable set to the arn of the Topic. This parameter is required.- Returns:
this
-
topicNameEnvironmentVariableName
public LambdaToSns.Builder topicNameEnvironmentVariableName(String topicNameEnvironmentVariableName) Optional Name for the Lambda function environment variable set to the name of the Topic.Default: - SNS_TOPIC_NAME
- Parameters:
topicNameEnvironmentVariableName- Optional Name for the Lambda function environment variable set to the name of the Topic. This parameter is required.- Returns:
this
-
topicProps
Optional user provided properties to override the default properties for the SNS topic.Default: - Default properties are used.
- Parameters:
topicProps- Optional user provided properties to override the default properties for the SNS topic. This parameter is required.- Returns:
this
-
vpcProps
Properties to override default properties if deployVpc is true.- Parameters:
vpcProps- Properties to override default properties if deployVpc is true. This parameter is required.- Returns:
this
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LambdaToSns>- Returns:
- a newly built instance of
LambdaToSns.
-