Class SnsDestinationImpl
- All Implemented Interfaces:
Destination
,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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Field Summary
Fields inherited from interface com.commercetools.api.models.subscription.SnsDestination
SNS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Only present ifauthenticationMode
is set toCredentials
.Only present ifauthenticationMode
is set toCredentials
.Defines the method of authentication for the SNS topic.Amazon Resource Name (ARN) of the topic.getType()
int
hashCode()
void
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 SNS topic.void
setTopicArn
(String topicArn) Amazon Resource Name (ARN) of the topic.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.subscription.Destination
withDestination
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.subscription.SnsDestination
withSnsDestination
-
Constructor Details
-
SnsDestinationImpl
public SnsDestinationImpl()create empty instance
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceDestination
- Returns:
- type
-
getAccessKey
Only present if
authenticationMode
is set toCredentials
.- Specified by:
getAccessKey
in interfaceSnsDestination
- Returns:
- accessKey
-
getAccessSecret
Only present if
authenticationMode
is set toCredentials
.- Specified by:
getAccessSecret
in interfaceSnsDestination
- Returns:
- accessSecret
-
getTopicArn
Amazon Resource Name (ARN) of the topic.
- Specified by:
getTopicArn
in interfaceSnsDestination
- Returns:
- topicArn
-
getAuthenticationMode
Defines the method of authentication for the SNS topic.
- Specified by:
getAuthenticationMode
in interfaceSnsDestination
- Returns:
- authenticationMode
-
setAccessKey
Description copied from interface:SnsDestination
Only present if
authenticationMode
is set toCredentials
.- Specified by:
setAccessKey
in interfaceSnsDestination
- Parameters:
accessKey
- value to be set
-
setAccessSecret
Description copied from interface:SnsDestination
Only present if
authenticationMode
is set toCredentials
.- Specified by:
setAccessSecret
in interfaceSnsDestination
- Parameters:
accessSecret
- value to be set
-
setTopicArn
Description copied from interface:SnsDestination
Amazon Resource Name (ARN) of the topic.
- Specified by:
setTopicArn
in interfaceSnsDestination
- Parameters:
topicArn
- value to be set
-
setAuthenticationMode
Description copied from interface:SnsDestination
Defines the method of authentication for the SNS topic.
- Specified by:
setAuthenticationMode
in interfaceSnsDestination
- Parameters:
authenticationMode
- value to be set
-
equals
-
hashCode
-