Class SqsDestinationImpl

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

public class SqsDestinationImpl extends Object implements SqsDestination, io.vrap.rmf.base.client.ModelBase

AWS SQS is a pull-queue on AWS. The queue must be a Standard queue type with a MaximumMessageSize of 256 KB.

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 sqs:SendMessage permission on this queue.

  • Constructor Details

    • SqsDestinationImpl

      public SqsDestinationImpl()
      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 SqsDestination
      Returns:
      accessKey
    • getAccessSecret

      public String getAccessSecret()

      Only present if authenticationMode is set to Credentials.

      Specified by:
      getAccessSecret in interface SqsDestination
      Returns:
      accessSecret
    • getQueueUrl

      public String getQueueUrl()

      URL of the Amazon SQS queue.

      Specified by:
      getQueueUrl in interface SqsDestination
      Returns:
      queueUrl
    • getRegion

      public String getRegion()

      AWS Region the message queue is located in.

      Specified by:
      getRegion in interface SqsDestination
      Returns:
      region
    • getAuthenticationMode

      public AwsAuthenticationMode getAuthenticationMode()

      Defines the method of authentication for the SQS queue.

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

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

      Only present if authenticationMode is set to Credentials.

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

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

      Only present if authenticationMode is set to Credentials.

      Specified by:
      setAccessSecret in interface SqsDestination
      Parameters:
      accessSecret - value to be set
    • setQueueUrl

      public void setQueueUrl(String queueUrl)
      Description copied from interface: SqsDestination

      URL of the Amazon SQS queue.

      Specified by:
      setQueueUrl in interface SqsDestination
      Parameters:
      queueUrl - value to be set
    • setRegion

      public void setRegion(String region)
      Description copied from interface: SqsDestination

      AWS Region the message queue is located in.

      Specified by:
      setRegion in interface SqsDestination
      Parameters:
      region - value to be set
    • setAuthenticationMode

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

      Defines the method of authentication for the SQS queue.

      Specified by:
      setAuthenticationMode in interface SqsDestination
      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