Class SnsToLambda.Builder

java.lang.Object
software.amazon.awsconstructs.services.snslambda.SnsToLambda.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<SnsToLambda>
Enclosing class:
SnsToLambda

public static final class SnsToLambda.Builder extends Object implements software.amazon.jsii.Builder<SnsToLambda>
A fluent builder for SnsToLambda.
  • Method Details

    • create

      public static SnsToLambda.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope -
      • represents the scope for all the resources.
      This parameter is required.
      id -
      • this is a a scope-unique id.
      This parameter is required.
      Returns:
      a new instance of SnsToLambda.Builder.
    • enableEncryptionWithCustomerManagedKey

      public SnsToLambda.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

      public SnsToLambda.Builder encryptionKey(software.amazon.awscdk.services.kms.Key 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 SnsToLambda.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 SnsToLambda.Builder existingLambdaObj(software.amazon.awscdk.services.lambda.Function existingLambdaObj)
      Optional - instance of an existing Lambda Function object, providing both this and lambdaFunctionProps will cause an error.

      Default: - None

      Parameters:
      existingLambdaObj - Optional - instance of an existing Lambda Function object, providing both this and lambdaFunctionProps will cause an error. This parameter is required.
      Returns:
      this
    • existingTopicObj

      public SnsToLambda.Builder existingTopicObj(software.amazon.awscdk.services.sns.Topic existingTopicObj)
      Optional - existing instance of SNS topic object, providing both this and topicProps will cause an error.

      Default: - Default props are used

      Parameters:
      existingTopicObj - Optional - existing instance of SNS topic object, providing both this and topicProps will cause an error. This parameter is required.
      Returns:
      this
    • lambdaFunctionProps

      public SnsToLambda.Builder lambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps)
      Optional - user provided props to override the default props for the Lambda function.

      Providing both this and existingLambdaObj causes an error.

      Default: - Default properties are used.

      Parameters:
      lambdaFunctionProps - Optional - user provided props to override the default props for the Lambda function. This parameter is required.
      Returns:
      this
    • topicProps

      public SnsToLambda.Builder topicProps(software.amazon.awscdk.services.sns.TopicProps topicProps)
      Optional - user provided properties to override the default properties for the SNS topic.

      Providing both this and existingTopicObj causes an error.

      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
    • build

      public SnsToLambda build()
      Specified by:
      build in interface software.amazon.jsii.Builder<SnsToLambda>
      Returns:
      a newly built instance of SnsToLambda.