psm MySQLCS add-storage

Extend storage volumes of a MySQL Cloud Service instance.

Syntax

In the following syntax, line breaks have been added for clarity. Do not include them when entering the command.

psm MySQLCS add-storage -s|--service-name instance-name 
    -c|--config-payload path-to-json-payload
    [-wc|--wait-until-complete true|false]
    [-of|--output-format json|html|short]

Parameters

Parameter Description

-s|--service-name instance-name

Specifies the name of the MySQL Cloud Service instance.

-c|—config-payload

Specifies the path to the JSON payload file.

–wc|--wait-until-complete true|false

(Optional) If set to true, the command behaves synchronously. That is, it does not return until the submitted job is complete. The following message is displayed until the job is complete:

Waiting for the job to complete... (it cannot be cancelled)

The default value is false.

-of|--output-format json|html|short

(Optional) Specifies the output format of the command’s response:

  • json—output is formatted as a JSON array.

  • html—output is formatted as HTML

  • short—output is formatted as a brief summary.

The default output format is the one you specified when using the psm setup command to configure the psm CLI.

JSON Payload

The json payload has the following syntax:

{
    "allServiceHosts":"",
    "components":{
        "mysql":{
         "dataStorage":"",
         "backupStorage":"",
         "MySQLLogStorage":"", 
         "hosts":"[]"
        }
    }
}
Parameter Description

allServiceHosts

(Optional) set to True to apply the command to all host names associated with the service name.

components

Container for the MySQL component and host information.

mysql

The service type.

dataStorage

Increased storage for data. Specify a value in GB up to 1024 GB.

backupStorage

Increased storage for local backup. Specify a value in GB up to 2000 GB.

Note:

This value should be set only if backup was defined when the service was created.

MySQLLogStorage

Increased storage for MySQL Logs. Specify a value in GB up to 1024 GB.

hosts

The host name of the service. The host name is the fully qualified name of the Virtual Machine. For example, in a service named MySQL57–aas, the host name takes the format mysql57–aas-mysql-1.

Examples

The following example extends each storage volume by 100GB in the MySQL57–aas instance.

$ psm MySQLCS add-storage -s MySQL57–aas -c /tmp/add-storage-payload.json

The payload for this command is similar to the following:

{
    "components":{
        "mysql":{
            "dataStorage":"100",
            "backupStorage":"100",
            "MySQLLogStorage":"100",
            "hosts":"[mysql57–aas-mysql-1]"
        }
    }
}