EasyManuals Logo

Amazon Redshift User Manual

Amazon Redshift
131 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #92 background imageLoading...
Page #92 background image
}
private static void purchaseReservedNodeOffer() throws IOException {
if (matchingNodes.size() == 0) {
return;
} else {
System.out.println("\nPurchasing nodes.");
for (ReservedNodeOffering offering : matchingNodes) {
printOfferingDetails(offering);
System.out.println("WARNING: purchasing this offering will incur
costs.");
System.out.println("Purchase this offering [Y or N]?");
DataInput in = new DataInputStream(System.in);
String purchaseOpt = in.readLine();
if (purchaseOpt.equalsIgnoreCase("y")){
try {
PurchaseReservedNodeOfferingRequest request = new Pur
chaseReservedNodeOfferingRequest()
.withReservedNodeOfferingId(offering.getReserved
NodeOfferingId());
ReservedNode reservedNode = client.purchaseReserved
NodeOffering(request);
printReservedNodeDetails(reservedNode);
}
catch (ReservedNodeAlreadyExistsException ex1){
}
catch (ReservedNodeOfferingNotFoundException ex2){
}
catch (ReservedNodeQuotaExceededException ex3){
}
catch (Exception ex4){
}
}
}
System.out.println("Finished.");
}
}
private static void printOfferingDetails(
ReservedNodeOffering offering) {
System.out.println("\nOffering Match:");
System.out.format("Id: %s\n", offering.getReservedNodeOfferingId());
System.out.format("Node Type: %s\n", offering.getNodeType());
System.out.format("Fixed Price: %s\n", offering.getFixedPrice());
System.out.format("Offering Type: %s\n", offering.getOfferingType());
System.out.format("Duration: %s\n", offering.getDuration());
}
private static void printReservedNodeDetails(ReservedNode node) {
System.out.println("\nPurchased Node Details:");
System.out.format("Id: %s\n", node.getReservedNodeOfferingId());
System.out.format("State: %s\n", node.getState());
System.out.format("Node Type: %s\n", node.getNodeType());
System.out.format("Start Time: %s\n", node.getStartTime());
System.out.format("Fixed Price: %s\n", node.getFixedPrice());
API Version 2012-12-01
88
Amazon Redshift Management Guide
Purchasing a Reserved Node Offering Using Java

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Amazon Redshift and is the answer not in the manual?

Amazon Redshift Specifications

General IconGeneral
ProviderAmazon Web Services (AWS)
Query LanguageSQL
Data StorageColumnar storage
SecurityEncryption at rest and in transit, VPC, IAM
BackupAutomated and manual snapshots
DeploymentCloud-based
TypeCloud-based data warehouse service
Primary UseData warehousing, analytics
IntegrationIntegrates with AWS services, BI tools, and ETL tools
Pricing ModelOn-demand and reserved instance pricing
Data CompressionColumnar storage with data compression
Performance OptimizationQuery optimization

Related product manuals