Monitor the Stack

After the stack is created, view its status and details with the Oracle Cloud Stack REST API.

Note: All of the examples in this guide use the URL prefix and context path for the United States region in Oracle Cloud. For information about the context path and the URL prefixes for other regions of the world, see Send Requests.

To view the details for a cloud stack, provide the following information on the cURL command line.

  • Use the -X option to set the request method to GET.

  • Use the -u option to send the user name and password for your Oracle Cloud account.

  • Use the -H option to set the X-ID-TENANT-NAME custom request header to the identity domain ID for your Oracle Cloud account.

  • Specify the name of an existing cloud stack at the end of the URL path.

For example:

curl -i -X GET \
-u yourUserName:yourPassword \
-H "X-ID-TENANT-NAME:yourIdentityDomain" \
https://psm.us.oraclecloud.com/paas/api/v1.1/instancemgmt/yourIdentityDomain/services/stack/instances/yourStackName

The response includes a JSON document with the following information:

  • Stack name, description and state

  • Name and URL of the template from which the stack was created

  • Configuration details and runtime metrics about each resource in the stack (varies by resource type)

  • Overall usage statistics for the stack (OCPUs, memory, storage)

  • The values of any template parameters that were provided when this stack was created

For example:

{
     "serviceName": "MyStack",
     "description": "My first stack",
     "state": "READY",
     "stateDetail": "Ready",
     "identityDomain": "MyIdentityDomain",
     "createdBy": "myuser",
     "creationJobId": "80161",
     "createdOn": "2016-07-26T15:48:18.366+0000",
     "modifiedOn": "2016-07-26T15:48:18.365+0000",
     "links": [
          {
               "rel": "canonical",
               "href": "https://psm.us.oraclecloud.com/paas/api/v1.1/instancemgmt/MyIdentityDomain/services/stack/instances/MyStack"
          },
          {
               "rel": "self",
               "href": "https://psm.us.oraclecloud.com/paas/api/v1.1/instancemgmt/MyIdentityDomain/services/stack/instances/MyStack"
          }
     ],
     "serviceURI": "https://psm.us.oraclecloud.com/paas/api/v1.1/instancemgmt/MyIdentityDomain/services/stack/instances/MyStack",
     "template": {
          "templateName": "MyTemplate",
          "templateVersion": "1.0.0",
          "templateURI": "https://psm.us.oraclecloud.com/paas/api/v1.1/instancemgmt/MyIdentityDomain/templates/cst/instances/MyTemplate?version=1.0.0"
     },
     "resources": {
          "mysql": {
               "serviceId": 1707,
               "serviceName": "MyStack-mysql",
               "serviceType": "MySQLCS",
               "domainName": "MyIdentityDomain",
               "serviceVersion": "5.7",
               "releaseVersion": "5.7.13",
               "metaVersion": "1.0.0-160706",
               "serviceDescription": "DB used with ACCS",
               "serviceLevel": "PAAS",
               "subscription": "HOURLY",
               "meteringFrequency": "HOURLY",
               "edition": "EE",
               "storageContainer": "Storage-MyIdentityDomain/MyContainer",
               "state": "READY",
               "creator": "myuser",
               "creationDate": "2016-07-26T15:48:25.006+0000",
               "attributes": {
                    "MYSQL_PORT": {
                         "displayName": "MySQL Port",
                         "type": "INTEGER",
                         "value": "3306",
                         "displayValue": "3306",
                         "isKeyBinding": true
                    },
                    "LOCAL_BACKUP_VOLUME_SIZE": {
                         "displayName": "Backup Volume Size",
                         "type": "STRING",
                         "value": "50G",
                         "displayValue": "50G",
                         "isKeyBinding": false
                    },
                    "CLOUD_STORAGE_CONTAINER": {
                         "displayName": "Cloud Storage Container",
                         "type": "STRING",
                         "value": "Storage-MyIdentityDomain/MyContainer",
                         "displayValue": "Storage-MyIdentityDomain/MyContainer",
                         "isKeyBinding": false
                    },
                    "BACKUP_DESTINATION": {
                         "displayName": "Backup Destination",
                         "type": "STRING",
                         "value": "BOTH",
                         "displayValue": "Both Cloud and Disk Storage",
                         "isKeyBinding": false
                    },
                    "LOCAL_BACKUP_VOLUME_MOUNT": {
                         "displayName": "Backup Volume Location",
                         "type": "STRING",
                         "value": "/u01/backup",
                         "displayValue": "/u01/backup",
                         "isKeyBinding": false
                    },
                    "DATA_VOLUME_SIZE": {
                         "displayName": "Usable Database Storage (GB)",
                         "type": "STRING",
                         "value": "25G",
                         "displayValue": "25G",
                         "isKeyBinding": false
                    }
               }
          },
          "app": {
               "serviceName": "MyStack-App",
               "serviceType": "apaas",
               "state": "RUNNING",
               "stateDetail": "RUNNING",
               "serviceStateDisplayName": "RUNNING",
               "attributes": {"webURL": "http://someurlhere"},
               "statistics": {
                    "ocpus": "",
                    "memory": 1,
                    "storage": "",
                    "publicIpAddressCount": ""
               }
          }
     },
     "statistics": {
          "ocpus": 1,
          "memory": 8.5,
          "storage": 135,
          "publicIpAddressCount": 1,
          "resourceId": "MyStack"
     },
     "parameterValues": {
          "Public key text": "**********",
          "Backup container": "Storage-MyIdentityDomain/MyContainer",
          "Mysql access password": "**********",
          "Cloud Storage password": "**********",
          "Cloud Storage user name": "MyIdentityDomain.myuser"
     }
}