...
Set up the integration
Amazon Route 53 SNS is an API-based integration. Setting it up involves the following steps:
...
Create an SNS topic.
For details, see Getting started with Amazon SNS.
Add an HTTPS subscription to your topic with the URL you copied while adding the integration in Jira Service Management as the endpoint. If the configuration is successful, a confirmation alert is created in Jira Service Management.
For details on how to add an HTTPS subscription, see Subscribing to an Amazon SNS topic - Amazon Simple Notification Service.
Specify the alert's alias, entity, tags, recipients, teams, and custom actions using message attributes.
For details, see Amazon SNS message attributes.
Expand |
---|
title | SNS message attributes |
---|
|
Code Block |
---|
AmazonSNSClient snsClient = new AmazonSNSClient(new BasicAWSCredentials("AWS_ACCESS_KEY","AWS_SECRET_KEY"));
String msg = "This is the description of Sns Integration test alert";
String subject = "Sns Integration Test alert";
PublishRequest publishRequest = new PublishRequest("arn:aws:sns:us-east-1:974xxxxxxx:JsmSns", msg, subject);publishRequest.addMessageAttributesEntry("eventType", new MessageAttributeValue()
.withDataType("String").withStringValue("create"));
publishRequest.addMessageAttributesEntry("alias", new MessageAttributeValue()
.withDataType("String").withStringValue("testalertalias"));
publishRequest.addMessageAttributesEntry("entity", new MessageAttributeValue()
.withDataType("String").withStringValue("Test alert entity"));
publishRequest.addMessageAttributesEntry("tags", new MessageAttributeValue()
.withDataType("String").withStringValue("trial"));
publishRequest.addMessageAttributesEntry("recipients", new MessageAttributeValue()
.withDataType("String").withStringValue("none"));
publishRequest.addMessageAttributesEntry("teams", new MessageAttributeValue()
.withDataType("String").withStringValue("team1,team2"));
publishRequest.addMessageAttributesEntry("actions", new MessageAttributeValue()
.withDataType("String").withStringValue("customAction"));
PublishResult publishResult = snsClient.publish(publishRequest); |
|
...