Class SnsDestinationImpl

java.lang.Object
com.commercetools.api.models.subscription.SnsDestinationImpl
All Implemented Interfaces:
Destination, SnsDestination, io.vrap.rmf.base.client.ModelBase

public class SnsDestinationImpl extends Object implements SnsDestination, io.vrap.rmf.base.client.ModelBase

AWS SNS can be used to push messages to AWS Lambda, HTTP endpoints (webhooks), or fan-out messages to SQS queues. The SQS queue must be a Standard queue type.

We recommend setting authenticationMode to IAM, to avoid unnecessary key management. For IAM authentication and before creating the Subscription, give permissions to the following user account: arn:aws-cn:iam::417094354346:user/subscriptions if the Project is hosted in the China (AWS, Ningxia) Region; arn:aws:iam::362576667341:user/subscriptions for all other Regions. Otherwise, a test message will not be sent.

If you prefer to use Credentials for authentication, we recommend creating an IAM user with an accessKey and accessSecret pair specifically for each Subscription.

The IAM user should only have the sns:Publish permission on this topic.

  • Constructor Details

    • SnsDestinationImpl

      public SnsDestinationImpl()
      create empty instance
  • Method Details

    • getType

      public String getType()
      Specified by:
      getType in interface Destination
      Returns:
      type
    • getAccessKey

      public String getAccessKey()

      Only present if authenticationMode is set to Credentials.

      Specified by:
      getAccessKey in interface SnsDestination
      Returns:
      accessKey
    • getAccessSecret

      public String getAccessSecret()

      Only present if authenticationMode is set to Credentials.

      Specified by:
      getAccessSecret in interface SnsDestination
      Returns:
      accessSecret
    • getTopicArn

      public String getTopicArn()

      Amazon Resource Name (ARN) of the topic.

      Specified by:
      getTopicArn in interface SnsDestination
      Returns:
      topicArn
    • getAuthenticationMode

      public AwsAuthenticationMode getAuthenticationMode()

      Defines the method of authentication for the SNS topic.

      Specified by:
      getAuthenticationMode in interface SnsDestination
      Returns:
      authenticationMode
    • setAccessKey

      public void setAccessKey(String accessKey)
      Description copied from interface: SnsDestination

      Only present if authenticationMode is set to Credentials.

      Specified by:
      setAccessKey in interface SnsDestination
      Parameters:
      accessKey - value to be set
    • setAccessSecret

      public void setAccessSecret(String accessSecret)
      Description copied from interface: SnsDestination

      Only present if authenticationMode is set to Credentials.

      Specified by:
      setAccessSecret in interface SnsDestination
      Parameters:
      accessSecret - value to be set
    • setTopicArn

      public void setTopicArn(String topicArn)
      Description copied from interface: SnsDestination

      Amazon Resource Name (ARN) of the topic.

      Specified by:
      setTopicArn in interface SnsDestination
      Parameters:
      topicArn - value to be set
    • setAuthenticationMode

      public void setAuthenticationMode(AwsAuthenticationMode authenticationMode)
      Description copied from interface: SnsDestination

      Defines the method of authentication for the SNS topic.

      Specified by:
      setAuthenticationMode in interface SnsDestination
      Parameters:
      authenticationMode - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object