Example usage for com.amazonaws.services.sns AmazonSNSClient setTopicAttributes

List of usage examples for com.amazonaws.services.sns AmazonSNSClient setTopicAttributes

Introduction

In this page you can find the example usage for com.amazonaws.services.sns AmazonSNSClient setTopicAttributes.

Prototype

@Override
    public SetTopicAttributesResult setTopicAttributes(String topicArn, String attributeName,
            String attributeValue) 

Source Link

Usage

From source file:shnakkydoodle.notifying.provider.aws.AwsProvider.java

License:Open Source License

/**
 * Create a notification topic/*  w ww.  jav a 2 s  .  c om*/
 * 
 * @param name
 * @paramd escription
 */
@Override
public void insertNotificationTopic(String name, String description) {
    AmazonSNSClient snsClient = getSNSClient();
    CreateTopicRequest createTopicRequest = new CreateTopicRequest(awsName(name));
    CreateTopicResult createTopicResult = snsClient.createTopic(createTopicRequest);
    snsClient.setTopicAttributes(createTopicResult.getTopicArn(), "DisplayName", name);
}

From source file:shnakkydoodle.notifying.provider.aws.AwsProvider.java

License:Open Source License

/**
 * Update a notification topic//from   w  ww .  j a v a 2  s .  co  m
 * 
 * @param name
 * @paramd escription
 */
@Override
public void updateNotificationTopic(String topicId, String name, String description) {
    AmazonSNSClient snsClient = getSNSClient();
    snsClient.setTopicAttributes(topicId, "DisplayName", name);
}