use of software.amazon.awssdk.services.dynamodb.model.DeleteTableRequest in project aws-doc-sdk-examples by awsdocs.
the class DeleteTable method deleteDynamoDBTable.
// snippet-start:[dynamodb.java2.delete_table.main]
public static void deleteDynamoDBTable(DynamoDbClient ddb, String tableName) {
DeleteTableRequest request = DeleteTableRequest.builder().tableName(tableName).build();
try {
ddb.deleteTable(request);
} catch (DynamoDbException e) {
System.err.println(e.getMessage());
System.exit(1);
}
System.out.println(tableName + " was successfully deleted!");
}
use of software.amazon.awssdk.services.dynamodb.model.DeleteTableRequest in project aws-doc-sdk-examples by awsdocs.
the class Scenario method deleteDynamoDBTable.
public static void deleteDynamoDBTable(DynamoDbClient ddb, String tableName) {
DeleteTableRequest request = DeleteTableRequest.builder().tableName(tableName).build();
try {
ddb.deleteTable(request);
} catch (DynamoDbException e) {
System.err.println(e.getMessage());
System.exit(1);
}
System.out.println(tableName + " was successfully deleted!");
}
Aggregations