Class LambdaToSnsProps.Builder
java.lang.Object
software.amazon.awsconstructs.services.lambdasns.LambdaToSnsProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LambdaToSnsProps>
- Enclosing interface:
LambdaToSnsProps
public static final class LambdaToSnsProps.Builder
extends Object
implements software.amazon.jsii.Builder<LambdaToSnsProps>
A builder for
LambdaToSnsProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofLambdaToSnsProps.getDeployVpc()enableEncryptionWithCustomerManagedKey(Boolean enableEncryptionWithCustomerManagedKey) Sets the value ofLambdaToSnsProps.getEnableEncryptionWithCustomerManagedKey()encryptionKey(software.amazon.awscdk.services.kms.Key encryptionKey) Sets the value ofLambdaToSnsProps.getEncryptionKey()encryptionKeyProps(software.amazon.awscdk.services.kms.KeyProps encryptionKeyProps) Sets the value ofLambdaToSnsProps.getEncryptionKeyProps()existingLambdaObj(software.amazon.awscdk.services.lambda.Function existingLambdaObj) Sets the value ofLambdaToSnsProps.getExistingLambdaObj()existingTopicObj(software.amazon.awscdk.services.sns.Topic existingTopicObj) Sets the value ofLambdaToSnsProps.getExistingTopicObj()existingVpc(software.amazon.awscdk.services.ec2.IVpc existingVpc) Sets the value ofLambdaToSnsProps.getExistingVpc()lambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps) Sets the value ofLambdaToSnsProps.getLambdaFunctionProps()topicArnEnvironmentVariableName(String topicArnEnvironmentVariableName) Sets the value ofLambdaToSnsProps.getTopicArnEnvironmentVariableName()topicNameEnvironmentVariableName(String topicNameEnvironmentVariableName) Sets the value ofLambdaToSnsProps.getTopicNameEnvironmentVariableName()topicProps(software.amazon.awscdk.services.sns.TopicProps topicProps) Sets the value ofLambdaToSnsProps.getTopicProps()vpcProps(software.amazon.awscdk.services.ec2.VpcProps vpcProps) Sets the value ofLambdaToSnsProps.getVpcProps()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
deployVpc
Sets the value ofLambdaToSnsProps.getDeployVpc()- Parameters:
deployVpc- Whether to deploy a new VPC.- Returns:
this
-
enableEncryptionWithCustomerManagedKey
public LambdaToSnsProps.Builder enableEncryptionWithCustomerManagedKey(Boolean enableEncryptionWithCustomerManagedKey) Sets the value ofLambdaToSnsProps.getEnableEncryptionWithCustomerManagedKey()- 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 flag is ignored if any of the following are defined: topicProps.masterKey, encryptionKey or encryptionKeyProps.- Returns:
this
-
encryptionKey
public LambdaToSnsProps.Builder encryptionKey(software.amazon.awscdk.services.kms.Key encryptionKey) Sets the value ofLambdaToSnsProps.getEncryptionKey()- Parameters:
encryptionKey- An optional, imported encryption key to encrypt the SNS Topic with.- Returns:
this
-
encryptionKeyProps
public LambdaToSnsProps.Builder encryptionKeyProps(software.amazon.awscdk.services.kms.KeyProps encryptionKeyProps) Sets the value ofLambdaToSnsProps.getEncryptionKeyProps()- Parameters:
encryptionKeyProps- Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SNS Topic with.- Returns:
this
-
existingLambdaObj
public LambdaToSnsProps.Builder existingLambdaObj(software.amazon.awscdk.services.lambda.Function existingLambdaObj) Sets the value ofLambdaToSnsProps.getExistingLambdaObj()- Parameters:
existingLambdaObj- Existing instance of Lambda Function object, providing both this andlambdaFunctionPropswill cause an error.- Returns:
this
-
existingTopicObj
public LambdaToSnsProps.Builder existingTopicObj(software.amazon.awscdk.services.sns.Topic existingTopicObj) Sets the value ofLambdaToSnsProps.getExistingTopicObj()- Parameters:
existingTopicObj- Existing instance of SNS Topic object, providing both this and topicProps will cause an error..- Returns:
this
-
existingVpc
Sets the value ofLambdaToSnsProps.getExistingVpc()- Parameters:
existingVpc- An existing VPC for the construct to use (construct will NOT create a new VPC in this case).- Returns:
this
-
lambdaFunctionProps
public LambdaToSnsProps.Builder lambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps) Sets the value ofLambdaToSnsProps.getLambdaFunctionProps()- Parameters:
lambdaFunctionProps- User provided props to override the default props for the Lambda function.- Returns:
this
-
topicArnEnvironmentVariableName
public LambdaToSnsProps.Builder topicArnEnvironmentVariableName(String topicArnEnvironmentVariableName) Sets the value ofLambdaToSnsProps.getTopicArnEnvironmentVariableName()- Parameters:
topicArnEnvironmentVariableName- Optional Name for the Lambda function environment variable set to the arn of the Topic.- Returns:
this
-
topicNameEnvironmentVariableName
public LambdaToSnsProps.Builder topicNameEnvironmentVariableName(String topicNameEnvironmentVariableName) Sets the value ofLambdaToSnsProps.getTopicNameEnvironmentVariableName()- Parameters:
topicNameEnvironmentVariableName- Optional Name for the Lambda function environment variable set to the name of the Topic.- Returns:
this
-
topicProps
public LambdaToSnsProps.Builder topicProps(software.amazon.awscdk.services.sns.TopicProps topicProps) Sets the value ofLambdaToSnsProps.getTopicProps()- Parameters:
topicProps- Optional user provided properties to override the default properties for the SNS topic.- Returns:
this
-
vpcProps
Sets the value ofLambdaToSnsProps.getVpcProps()- Parameters:
vpcProps- Properties to override default properties if deployVpc is true.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LambdaToSnsProps>- Returns:
- a new instance of
LambdaToSnsProps - Throws:
NullPointerException- if any required attribute was not provided
-