psm jcs start

Use this command to start an Oracle Java Cloud Service instance, managed server or load balancer and its associated virtual machines (VMs).

If your Oracle Java Cloud Service instance is based on an HOURLY metering frequency, you will not be charged for the time that the service instance is in a stopped state. .

For complete information about what happens when an instance is started, see About Stopping and Starting an Oracle Java Cloud Service Instance and Individual VMs in Administering Oracle Java Cloud Service

Syntax

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

psm jcs start -s|--service-name serviceName 
  -c|--config-payload pathToJson
      [-of|-–output-format json|html|short]
      [-wc|--wait-until-complete true|false] 

Parameters

All parameters are required unless otherwise noted.

Parameter Description
-s|--service-name serviceName Name of the Oracle Java Cloud Service instance.
-c|--config-payload pathToJson Specifies the path to the JSON file containing the information necessary to start a Java Cloud Service instance. The format of this file, as shown in Sample Payload, is the same as the request body you provide when starting a Java Cloud Service instance by using the REST API. For information about this format, see the Request/Body (stopstart-postrequestm) section of Stop and Start a Service Instance and Individual VMs in the REST API for Oracle Java Cloud Service.
-of|-–output-format json|html|short (Optional) Output format of the command’s response:

Accepted values: json, html, short

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

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

(Optional) A boolean value that, when set to true, makes the command behave 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)
Default: false

Sample Payload

Note:

For descriptions of the payload parameters, see the Request/Body (stopstart-postrequestm) section of Stop and Start a Service Instance and Individual VMs in the REST API for Oracle Java Cloud Service.

This payload starts an entire service instance.

{
   "allServiceHosts" : true
} 
This payload starts a single WLS host.
{
   "components": {
      "WLS": {
         "hosts": ["exampleinstance-wls-2"]
      }
   }
}

Examples

$ psm jcs start -s Example1Instance -c c://home/templates/start-service-payload.json -of json  
"Accepted"
Job ID : 34346

Note that this command returned a job ID. To see the status of your start operation, use this ID with the psm jcs operation-status command:

$ psm jcs operation-status -j 34346 -of json

When you see the message:

    "operationId":364,
    "operationType":"START_SERVICE",
    "serviceId":364,
    "serviceName":"Example1Instance",
    "serviceType":"jaas",
    "startDate":"2016-04-28T21:01:28.080+0000",
    "status":"SUCCEED",
    "summaryMessage":"START_SERVICE"

the service was successfully started.