psm MySQLCS start

Start a stopped 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 start -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:

{
    "force":"",
    "allServiceHosts":"",
    "components":{
        "mysql":{
            "hosts":""
        }
    }
}
Parameter Description

force

(Optional) Set to True to force the operation, even if blocking errors are generated.

allServiceHosts

(Optional) set to True to apply the command to all host names associated with the service name. This parameter can be the only parameter in the payload.

components

Container for the MySQL component and host information.

mysql

The service type.

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 starts the MySQL57–aas instance.

$ psm MySQLCS start -s MySQL57–aas -c /tmp/restart-service-payload.json

The payload for this command can be one of the following:

{
    "components":{
        "mysql":{
            "hosts":"[mysql57–aas-mysql-1]"
        }
    }
}

or

{
    "allServiceHosts":"true"
}