View an Auto Scaling Policy

get

/paas/api/v1.1/instancemgmt/{identityDomainId}/services/JaaS/instances/{serviceId}/autoscaling/policies

This endpoint is not applicable to service instances created on Oracle Cloud Infrastructure.

Returns the latest automatic (auto) scaling policy for an Oracle Java Cloud Service instance.

Request

Path Parameters
Header Parameters
Back to Top

Response

Supported Media Types

200 Response

OK.

Policy details are returned in the response body.

Body ()
Root Schema : autoscalingpolicy-response
Type: object
Show Source
Nested Schema : policies
Type: array
Groups details about the auto scaling policy.
Show Source
Nested Schema : policy-details
Type: object
Show Source
Nested Schema : alarm
Type: object
Groups the conditions for a rule to trigger an alarm.
Show Source

404 Response

Not found. This means no auto scaling policy has been defined for this service instance. It could also mean auto scaling has not been enabled in Oracle Java Cloud Service.
Back to Top

Examples

The following example shows how to view the auto scaling policy defined for an Oracle Java Cloud Service instance, by submitting a GET request on the REST resource using cURL.

Note:

  • The command in this example uses the URL structure https://rest_server_url/resource-path, where rest_server_url is the REST server to contact for your identity domain (or Cloud Account). See Send Requests.

  • In the resource path, the service type ../JaaS/.. is case-sensitive.

cURL Command

curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/JaaS/instances/ExampleInstance/autoscaling/policies

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Date: Thu, 19 May 2016 02:23:06 GMT
Transfer-Encoding: chunked
Content-Type: application/json

Example of Response Body

The following is an example of the response returned in JSON format.

{
    "name": "JCSPolicy",
    "description": "JCS1 Auto Scaling Policy",
    "policies": [
    {
        "operation": "scaleOut",
        "alarm": {
            "metricName": "CPUUtilization",
            "metricUnit": "percent",
            "statistic": "AVG",
            "comparisonOperator": "GreaterThanOrEqualToThreshold",
            "threshold": "80",
            "sampleCount": "3",
            "sampleFrequency": "10",
            "breachedOnInstance": "ALL"
        },
        "coolDownPeriod": "30",
        "maxClusterSize": "4"
    },
    {
        "operation": "scaleIn",
        "alarm": {
            "metricName": "CPUUtilization",
            "metricUnit": "percent",
            "statistic": "AVG",
            "comparisonOperator": "LessThanOrEqualToThreshold",
            "threshold": "40",
            "sampleCount": "3",
            "sampleFrequency": "10",
            "breachedOnInstance": "ANY"
        },
        "coolDownPeriod": "30",
        "minClusterSize": "2"
    }
    ],
    "version": 1,
    "status": "Active",
    "startTime": "2016-05-19T07:33:46.252+0000"
}

Example of Response Body (no policy defined)

The following shows the response returned in JSON format when no policy has been defined for the service instance.

{
    "status": "Not Found",
    "errors": [
    {
        "detail": "Policy not found."
    }]
}
Back to Top