Example usage for com.amazonaws.services.rds.model ModifyDBInstanceRequest setAllocatedStorage

List of usage examples for com.amazonaws.services.rds.model ModifyDBInstanceRequest setAllocatedStorage

Introduction

In this page you can find the example usage for com.amazonaws.services.rds.model ModifyDBInstanceRequest setAllocatedStorage.

Prototype


public void setAllocatedStorage(Integer allocatedStorage) 

Source Link

Document

The new amount of storage (in gibibytes) to allocate for the DB instance.

Usage

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;
}