Example usage for com.amazonaws.services.sns AmazonSNS getCachedResponseMetadata

List of usage examples for com.amazonaws.services.sns AmazonSNS getCachedResponseMetadata

Introduction

In this page you can find the example usage for com.amazonaws.services.sns AmazonSNS getCachedResponseMetadata.

Prototype

ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request);

Source Link

Document

Returns additional metadata for a previously executed successful request, typically used for debugging issues where a service isn't acting as expected.

Usage

From source file:com.dev.appx.sns.SNSMobilePush.java

License:Open Source License

public void deleteTopic(String topicArn) throws IOException {

    //AmazonSNSClient snsClient = new AmazonSNSClient(new ClasspathPropertiesFileCredentialsProvider());   

    AmazonSNS snsClient = new AmazonSNSClient(
            new PropertiesCredentials(SNSMobilePush.class.getResourceAsStream("AwsCredentials.properties")));
    //delete an SNS topic
    DeleteTopicRequest deleteTopicRequest = new DeleteTopicRequest(topicArn);
    snsClient.deleteTopic(deleteTopicRequest);
    //get request id for DeleteTopicRequest from SNS metadata
    System.out.println("DeleteTopicRequest - " + snsClient.getCachedResponseMetadata(deleteTopicRequest));

}