Add the deployment policy that is defined in the <PRIVATE_PAAS_SAMPLES>/commonCARTRIDGES>/wso2am/1.9.0/samples/deployment-policies/mock/deployment-policy-1.json file.
The path to the JSON file that defines the deployment policy needs to be defined as the <JSON_PAYLOAD> value.
By default, <USERNAME>:<PASSWORD> is admin:admin.
By default, <PRIVATE_PAAS_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified.
By default, <PRIVATE_PAAS_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n, the default port value needs to be incremented by n.
Example
Add the deployment policy that is defined in the <PRIVATE_PAAS_SAMPLES>/commonCARTRIDGES>/wso2am/1.9.0/samples/deployment-policies/mock/deployment-policy-1.json file.
Code Block
cd <PRIVATE_PAAS_SAMPLES>/common/samples
curl -X POST -H "Content-Type: application/json" -d @'deployment-policies/deployment-policy-1.json' -k -v -u admin:admin https://localhost:9443/api/deploymentPolicies
Follow the instructions below to add a deployment policy:
Click Configurations on the home page.
Click Deployment Policies.
Click ADD DEPLOYMENT POLICY.
Click on the editor control to switch to the JSON editor. The JSON code format to add a deployment policy will appear.
Optionally, check the Auto correct with schema option to ensure that you do not accidentally delete any mandatory fields from the deployment policy definition JSON code.