psm dbcs create-service

Create an Oracle Database Classic Cloud Service instance.

Syntax

psm dbcs create-service -c|--config-payload json-file [-of|--output-format json|html|short]

Parameters

Parameter Description

-c|--config-payload json-file

Specifies the path to a JSON file containing the instance-creation information necessary to create aDatabase Classic Cloud Service instance. The format of this file is the same as the request body you provide when creating a Database Classic Cloud Service instance by using the REST API. For information about this format, see the “Body” section of Create a Service Instance in REST API for Oracle Database Classic Cloud Service.

-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.

Examples

The following example creates a Database Classic Cloud Service instance as specified by information provided in the create_db12c-ee.json file.

$ psm dbcs create-service --config-payload create_db12c-ee.json
"Accepted"
Job ID : 553993

Here is the information about job 553993 upon successful completion of the operation:

$ psm dbcs operation-status --job-id 553993
{
    "activityLogId":241360,
    "authDomain":"usexample",
    "authUser":"dbaasadmin",
    "endDate":"2016-05-03T05:05:14.192+0000",
    "identityDomain":"usexample",
    "initiatedBy":"USER",
    "jobId":553993,
    "messages":[
        {
            "activityDate":"2016-05-03T04:33:34.809+0000",
            "message":"Activity Submitted"
        },
        {
            "activityDate":"2016-05-03T04:33:38.379+0000",
            "message":"Activity Started"
        },
        {
            "activityDate":"2016-05-03T04:40:20.762+0000",
            "message":"Started all Compute resources..."
        },
        {
            "activityDate":"2016-05-03T04:40:21.639+0000",
            "message":"SSH access to VM [DB_1/vm-1] succeeded..."
        },
        {
            "activityDate":"2016-05-03T04:58:38.863+0000",
            "message":"Oracle Database Server Configuration completed..."
        },
        {
            "activityDate":"2016-05-03T05:04:43.178+0000",
            "message":"Service Reachabilty Check (SRC) of Oracle Database Server completed..."
        },
        {
            "activityDate":"2016-05-03T05:04:43.247+0000",
            "message":"Successfully provisioned Oracle Database Server..."
        },
        {
            "activityDate":"2016-05-03T05:05:14.192+0000",
            "message":"Activity Ended"
        }
    ],
    "operationId":23156,
    "operationType":"CREATE_SERVICE",
    "serviceId":23156,
    "serviceName":"db12c-ee",
    "serviceType":"dbaas",
    "startDate":"2016-05-03T04:33:34.809+0000",
    "status":"SUCCEED",
    "summaryMessage":"CREATE_SERVICE"
}

Listing of create_db12c-ee.json

Note that the value of vmPublicKeyText has been truncated in the following listing.

{
  "serviceName": "db12c-ee",
  "version": "12.1.0.2",
  "level": "PAAS",
  "edition": "EE",
  "subscriptionType": "MONTHLY",
  "shape": "oc3",
  "vmPublicKeyText": "ssh-rsa AAAAB3Nz...",
  "parameters": [
    {
      "type": "db",
      "usableStorage": "25",
      "adminPassword": "password",
      "sid": "ORCL",
      "backupDestination": "BOTH",
      "cloudStorageContainer": "Storage-usexample\/dbcsbackups",
      "cloudStorageUser": "dbaasadmin",
      "cloudStoragePwd": "password"
    }
  ]
}