Overview

CLI command
update-autoscaling-policy
DescriptionUpdate an auto-scaling policy.
Command format
update-autoscaling-policy -p <JSON_FILE_PATH>

The path to the JSON file that defines the auto-scaling policy needs to be defined as the <JSON_FILE_PATH> value.

Parameter definitions

Short option
Long option
Description
Required
Example value
-p--resource-pathFolder path of the JSON file where the auto-scaling policy definition is defined.Yes

<STRATOS_SOURCE_HOME>/samples/autoscaling-policies/autoscaling-policy-1.json

Sample auto-scaling policy JSON

{
  "id": "autoscaling-policy-1",
  "loadThresholds": {
    "requestsInFlight": {
      "threshold": 50
    },
    "memoryConsumption": {
      "threshold": 40
    },
    "loadAverage": {
      "threshold": 40
    }
  }
}

For information on all the properties that can be used in a auto-scaling policy definition, see the Auto-scaling Policy Resource Definition.

Example

Use case: Update the auto-scaling policy defined in the <STRATOS_SOURCE_HOME>/samples/autoscaling-policies/autoscaling-policy-1.json  file.

update-autoscaling-policy -p <STRATOS_SOURCE_HOME>/samples/autoscaling-policies/autoscaling-policy-1.json

Sample output

Successfully updated the autoscaling policy.
  • No labels