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
-
Method Summary
Modifier and TypeMethodDescriptionstatic SqsDestinationBuilder
builder()
builder factory method for SqsDestinationstatic SqsDestinationBuilder
builder
(SqsDestination template) create builder for SqsDestination instancestatic SqsDestination
deepCopy
(SqsDestination template) factory method to create a deep copy of SqsDestinationOnly present ifauthenticationMode
is set toCredentials
.Only present ifauthenticationMode
is set toCredentials
.Defines the method of authentication for the SQS queue.@NotNull String
URL of the Amazon SQS queue.@NotNull String
AWS Region the message queue is located in.static SqsDestination
of()
factory methodstatic SqsDestination
of
(SqsDestination template) factory method to create a shallow copy SqsDestinationvoid
setAccessKey
(String accessKey) Only present ifauthenticationMode
is set toCredentials
.void
setAccessSecret
(String accessSecret) Only present ifauthenticationMode
is set toCredentials
.void
setAuthenticationMode
(AwsAuthenticationMode authenticationMode) Defines the method of authentication for the SQS queue.void
setQueueUrl
(String queueUrl) URL of the Amazon SQS queue.void
AWS Region the message queue is located in.static com.fasterxml.jackson.core.type.TypeReference<SqsDestination>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withSqsDestination
(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
authenticationMode
is set toCredentials
.- Returns:
- accessKey
-
getAccessSecret
String getAccessSecret()Only present if
authenticationMode
is 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
authenticationMode
is set toCredentials
.- Parameters:
accessKey
- value to be set
-
setAccessSecret
Only present if
authenticationMode
is 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
-
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
-