List of usage examples for com.amazonaws.services.redshift AmazonRedshiftClient deleteCluster
@Override
public Cluster deleteCluster(DeleteClusterRequest request)
Deletes a previously provisioned cluster.
From source file:com.amazon.services.awsrum.utils.RedshiftUtils.java
License:Open Source License
/** * Delete the Redshift cluster if it exists * /*w w w . j av a 2 s . co m*/ * @param client * The {@link AmazonRedshiftClient} with read and write permissions * @param clusterIdentifier * The Redshift cluster delete * @param skipFinalClusterSnapshot * Should Redshift skip the final cluster snapshot? */ public static void deleteCluster(AmazonRedshiftClient client, String clusterIdentifier, boolean skipFinalClusterSnapshot) { if (clusterExists(client, clusterIdentifier)) { DeleteClusterRequest deleteClusterRequest = new DeleteClusterRequest(); deleteClusterRequest.setClusterIdentifier(clusterIdentifier); deleteClusterRequest.setSkipFinalClusterSnapshot(skipFinalClusterSnapshot); client.deleteCluster(deleteClusterRequest); } else { LOG.warn("Redshift cluster " + clusterIdentifier + " does not exist"); } }
From source file:com.kinesisboard.amazonaws.utils.RedshiftUtils.java
License:Open Source License
/** * Delete the Amazon Redshift cluster if it exists * /*from ww w . ja v a 2 s.co m*/ * @param client * The {@link AmazonRedshiftClient} with read and write permissions * @param clusterIdentifier * The Amazon Redshift cluster delete * @param skipFinalClusterSnapshot * Should Amazon Redshift skip the final cluster snapshot? */ public static void deleteCluster(AmazonRedshiftClient client, String clusterIdentifier, boolean skipFinalClusterSnapshot) { if (clusterExists(client, clusterIdentifier)) { DeleteClusterRequest deleteClusterRequest = new DeleteClusterRequest(); deleteClusterRequest.setClusterIdentifier(clusterIdentifier); deleteClusterRequest.setSkipFinalClusterSnapshot(skipFinalClusterSnapshot); client.deleteCluster(deleteClusterRequest); } else { LOG.warn("Amazon Redshift cluster " + clusterIdentifier + " does not exist"); } }