List of usage examples for com.amazonaws.services.kinesis AmazonKinesis setEndpoint
@Deprecated
void setEndpoint(String endpoint);
From source file:awskinesis.AmazonKinesisApplicationSample.java
License:Apache License
public static void deleteResources() { AWSCredentials credentials = credentialsProvider.getCredentials(); // Delete the stream AmazonKinesis kinesis = new AmazonKinesisClient(credentials); kinesis.setEndpoint("kinesis.cn-north-1.amazonaws.com.cn"); System.out.printf("Deleting the Amazon Kinesis stream used by the sample. Stream Name = %s.\n", SAMPLE_APPLICATION_STREAM_NAME); try {/*from w w w . jav a 2 s. co m*/ kinesis.deleteStream(SAMPLE_APPLICATION_STREAM_NAME); } catch (ResourceNotFoundException ex) { // The stream doesn't exist. } // Delete the table AmazonDynamoDBClient dynamoDB = new AmazonDynamoDBClient(credentialsProvider.getCredentials()); dynamoDB.setEndpoint("dynamodb.cn-north-1.amazonaws.com.cn"); System.out.printf( "Deleting the Amazon DynamoDB table used by the Amazon Kinesis Client Library. Table Name = %s.\n", SAMPLE_APPLICATION_NAME); try { dynamoDB.deleteTable(SAMPLE_APPLICATION_NAME); } catch (com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException ex) { // The table doesn't exist. } }