Interface SqsDestination
- All Superinterfaces:
Destination
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:iam::362576667341:user/subscriptions. 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.
Example to create an instance using the builder pattern
SqsDestination sqsDestination = SqsDestination.builder()
.queueUrl("{queueUrl}")
.region("{region}")
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SqsDestinationBuilderbuilder()builder factory method for SqsDestinationstatic SqsDestinationBuilderbuilder(SqsDestination template) create builder for SqsDestination instancecopyDeep()static SqsDestinationdeepCopy(SqsDestination template) factory method to create a deep copy of SqsDestinationOnly present ifauthenticationModeis set toCredentials.Only present ifauthenticationModeis set toCredentials.Defines the method of authentication for the SQS queue.@NotNull StringURL of the Amazon SQS queue.@NotNull StringAWS Region the message queue is located in.static SqsDestinationof()factory methodstatic SqsDestinationof(SqsDestination template) factory method to create a shallow copy SqsDestinationvoidsetAccessKey(String accessKey) Only present ifauthenticationModeis set toCredentials.voidsetAccessSecret(String accessSecret) Only present ifauthenticationModeis set toCredentials.voidsetAuthenticationMode(AwsAuthenticationMode authenticationMode) Defines the method of authentication for the SQS queue.voidsetQueueUrl(String queueUrl) URL of the Amazon SQS queue.voidAWS Region the message queue is located in.static com.fasterxml.jackson.core.type.TypeReference<SqsDestination>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithSqsDestination(Function<SqsDestination, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.subscription.Destination
getType, withDestination
-
Field Details
-
SQS
discriminator value for SqsDestination- See Also:
-
-
Method Details
-
getAccessKey
String getAccessKey()Only present if
authenticationModeis set toCredentials.- Returns:
- accessKey
-
getAccessSecret
String getAccessSecret()Only present if
authenticationModeis set toCredentials.- Returns:
- accessSecret
-
getQueueUrl
URL of the Amazon SQS queue.
- Returns:
- queueUrl
-
getRegion
AWS Region the message queue is located in.
- Returns:
- region
-
getAuthenticationMode
AwsAuthenticationMode getAuthenticationMode()Defines the method of authentication for the SQS queue.
- Returns:
- authenticationMode
-
setAccessKey
Only present if
authenticationModeis set toCredentials.- Parameters:
accessKey- value to be set
-
setAccessSecret
Only present if
authenticationModeis set toCredentials.- Parameters:
accessSecret- value to be set
-
setQueueUrl
URL of the Amazon SQS queue.
- Parameters:
queueUrl- value to be set
-
setRegion
AWS Region the message queue is located in.
- Parameters:
region- value to be set
-
setAuthenticationMode
Defines the method of authentication for the SQS queue.
- Parameters:
authenticationMode- value to be set
-
of
factory method- Returns:
- instance of SqsDestination
-
of
factory method to create a shallow copy SqsDestination- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
SqsDestination copyDeep()- Specified by:
copyDeepin interfaceDestination
-
deepCopy
factory method to create a deep copy of SqsDestination- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for SqsDestination- Returns:
- builder
-
builder
create builder for SqsDestination instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withSqsDestination
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-