List of usage examples for com.amazonaws.services.redshift.model DeleteClusterRequest setClusterIdentifier
public void setClusterIdentifier(String clusterIdentifier)
The identifier of the cluster to be deleted.
From source file:com.amazon.services.awsrum.utils.RedshiftUtils.java
License:Open Source License
/** * Delete the Redshift cluster if it exists * /*from ww 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 * /*www . j ava 2 s .c o 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"); } }