Package com.amazonaws.services.sns

Examples of com.amazonaws.services.sns.AmazonSNSClient.createTopic()


    public void createTopicAndSubscribe(AwsCredential awsCredential, Regions region) {
        MDCBuilder.buildMdcContext(awsCredential);
        AmazonSNSClient amazonSNSClient = awsStackUtil.createSnsClient(region, awsCredential);
        LOGGER.info("Amazon SNS client successfully created.");

        CreateTopicResult createTopicResult = amazonSNSClient.createTopic(CB_TOPIC_NAME);
        LOGGER.info("Amazon SNS topic successfully created. [topic ARN: '{}']", createTopicResult.getTopicArn());

        SnsTopic snsTopic = new SnsTopic();
        snsTopic.setName(CB_TOPIC_NAME);
        snsTopic.setRegion(region);
View Full Code Here


          // create topic
         
          String topicName = "TSTT" + randomGenerator.nextLong();
           
      CreateTopicRequest createTopicRequest = new CreateTopicRequest(topicName);
      CreateTopicResult createTopicResult = sns.createTopic(createTopicRequest);
      String topicArn = createTopicResult.getTopicArn();
     
      // subscribe and confirm cqs endpoint
     
      SubscribeRequest subscribeRequest = new SubscribeRequest();
View Full Code Here

     
        // set up topics
       
        CreateTopicRequest createTopicRequest = new CreateTopicRequest(TOPIC_NAME_PREFIX + k);
 
        CreateTopicResult createTopicResult = sns.createTopic(createTopicRequest);
 
        String topicArn = createTopicResult.getTopicArn();
       
        topics.add(topicArn);
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.