Overview

CLI command
add-application-policy      
DescriptionAdd an application policy.
Command format
add-application-policy -p <JSON_FILE_PATH>

The path to the JSON file that defines the application 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 where the JSON file that defines the application policy is stored.yes
<STRATOS_SOURCE_HOME>/samples/application-policies
/application-policy-1.json

Sample application policy JSON

{
  "id": "application-policy-1",
  "algorithm": "one-after-another",
  "networkPartitions": [
    "network-partition-1"
  ],
  "properties": [
    {
      "name": "key-1",
      "value": "value-1"
    },
    {
      "name": "key-2",
      "value": "value-2"
    }
  ]
}

For information on all the properties that can be used in an application policy definition, see the Application Policy Resource Definition.

Example

Use case: Add the application policy defined in the <STRATOS_SOURCE_HOME>/samples/application-policies/application-policy-1.json file.

add-application-policy -p <STRATOS_SOURCE_HOME>/samples/application-policies/application-policy-1.json

Sample output

Successfully added application policy
  • No labels