System.out.println("Cluster property:");
System.out.format("Preferred Maintenance Window: %s\n", res
ult.getClusters().get(0).getPreferredMaintenanceWindow());
}
private static void waitForClusterReady() throws InterruptedException {
Boolean clusterReady = false;
System.out.println("Wating for cluster to become available.");
while (!clusterReady) {
DescribeClustersResult result = client.describeClusters(new Describe
ClustersRequest()
.withClusterIdentifier(clusterIdentifier));
String status = (result.getClusters()).get(0).getClusterStatus();
if (status.equalsIgnoreCase("available")) {
clusterReady = true;
}
else {
System.out.print(".");
Thread.sleep(sleepTime*1000);
}
}
}
}
Manage Clusters Using Amazon Redshift CLI
and API
You can use the following Amazon Redshift CLI operations to manage clusters.
•
create-cluster
•
delete-cluster
•
describe-clusters
•
describe-cluster-versions
•
describe-orderable-cluster-options
•
reboot-cluster
You can use the following Amazon Redshift APIs to manage clusters.
•
CreateCluster
•
DeleteCluster
•
DescribeClusters
•
DescribeClusterVersions
•
DescribeOrderableClusterOptions
•
RebootCluster
Managing Clusters in Virtual Private Cloud (VPC)
Topics
API Version 2012-12-01
23
Amazon Redshift Management Guide
Manage Clusters Using Amazon Redshift CLI and API