psm MySQLCS scale

Scale the shape (OCPUs and memory) 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 scale -s|--service-name instance-name
    -c|--config-payload path-to-json-file
    [-wc|--wait-until-complete true|false]
    [-of|--output-format json|html|short]

where the json file contains the following:


{"components":
	{"mysql":
		{"shape":"shape-name",             
      "hosts":["host-name"]
		}
	}
}

Parameters

Parameter Description

-s|--service-name instance-name

Specifies the name of the MySQL Cloud Service instance.

-c|--config-payload path-to-json-file

Specifies the shape to scale to.

–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:

{     "components":
   {         "mysql":
    {             "shape":"shape-name",             
            "hosts":["host-name"]
         }
     }
 }
Parameter Description

components

Container for the MySQL component (mysql), host, and shape information.

mysql

The service type. For MySQL Cloud Service, this is always mysql.

shape

The required shape.

Valid values for shape are as follows:

  • oc3 — 1 OCPU with 7.5 GB RAM

  • oc4 — 2 OCPUs with 15 GB RAM

  • oc5 — 4 OCPUs with 30 GB RAM

  • oc6 — 8 OCPUs with 60 GB RAM

  • oc7 — 16 OCPUs with 120 GB RAM

  • oc1m — 1 OCPU with 15 GB RAM

  • oc2m — 2 OCPUs with 30 GB RAM

  • oc3m — 4 OCPUs with 60 GB RAM

  • oc4m — 8 OCPUs with 120 GB RAM

  • oc5m — 16 OCPUs with 240 GB RAM

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.

Valid values for hosts are the host name as listed in the service’s Overview page, and the contents of the adminHostName output by the service command.

Examples

The following example scales the MySQL57-aas service to the oc5 shape.

Note:

$ psm MySQLCS scale -s MySQL57-aas -c ~/opc-json-files/scale-to-oc5.json

where the json file contains the following:


{     "components":
   {         "mysql":
    {             "shape":"oc5",             
            "hosts":["mysql57aas-mysql-1"]
         }
     }
 }