List of usage examples for com.amazonaws.services.rds.model ModifyDBInstanceRequest setAllocatedStorage
public void setAllocatedStorage(Integer allocatedStorage)
The new amount of storage (in gibibytes) to allocate for the DB instance.
From source file:beanstalk.BeansDatabase.java
License:Apache License
public String getDBEndpoint(String AWSKeyId, String AWSSecretKey, String dbname) {//throws Exception { String endpoint_str = ""; BasicAWSCredentials basic_credentials = new BasicAWSCredentials(AWSKeyId, AWSSecretKey); AmazonRDSClient rDSClient = new AmazonRDSClient(basic_credentials); ModifyDBInstanceRequest mod_db = new ModifyDBInstanceRequest(dbname + "cloud4soaid"); DBInstance dbInstance = new DBInstance(); ////CHECK THIS. in order to make correct ModifyDBInstanceRequest an attribute must be sent for modification. ///5 (GB) is the minimum mod_db.setAllocatedStorage(6); dbInstance = rDSClient.modifyDBInstance(mod_db); Endpoint endpoint = new Endpoint(); endpoint = dbInstance.getEndpoint(); if (endpoint != null) { endpoint_str = endpoint.getAddress(); System.out.println("endpoint to string:" + endpoint_str);/////{Address: cloud4soadbid.coaodqyxxykq.us-east-1.rds.amazonaws.com, Port: 3306, } System.out.println("endpoint get address:" + endpoint.getAddress());/////cloud4soadbid.coaodqyxxykq.us-east-1.rds.amazonaws.com }/*from ww w .j a v a2 s. c om*/ return endpoint_str; }