The following is the basic workflow you need to follow when creating a new Cloudlet policy.
If you are using Conditional Origins or are setting up the Application Load Balancer Cloudlet, see API workflow for conditional origins. Application Load Balancer always uses Cloudlets Origins.
-
Run a GET request on the
/cloudlets/api/v2/cloudlet-info
endpoint to retrieve the ID (cloudletId
) for the Cloudlet you are working with. You need thecloudletId
when creating a new policy. -
Run a GET request on the
/cloudlets/api/v2/group-info
endpoint to retrieve information about which Cloudlets are associated with the groups you have edit privileges for. You will need the group IDs (groupId
) returned when creating a Cloudlet policy. -
Using the
/cloudlets/api/v2/policies
endpoint, run a POST to create a Cloudlet policy using thecloudletId
andgroupId
you retrieved from the previous steps.
The policy created is version 1. This new version does not have a description and does not include match rules (matchRules
) attributes.
You have the option of using query parameters to clone an existing policy.
-
Update the new policy version 1 by running a PUT request on the
/cloudlets/api/v2/policies/{policyId}/versions/{version}
endpoint that includes a version description and match rules. ThepolicyId
is returned in the response when the Cloudlet policy is created. -
If you need to review the current property associations for the policy version before activating, run a GET request on the
/cloudlets/api/v2/policies/{policyId}/properties
endpoint.
This operation also returns information about any Conditional Origins configured on an associated property. If you are using a Cloudlet that supports Conditional Origins, you may want to verify that the information returned about these origins is accurate.
-
Activate the policy by running a POST request to the
/cloudlets/api/v2/policies/{policyId}/versions/{version}/activations
endpoint. -
Using the Property Manager API (PAPI) set up the behavior for each Cloudlet you are configuring:
- Application Load Balancer
- API Prioritization
- Audience Segmentation
- Edge Redirector
- Forward Rewrite
- Request Control
- Phased Release
- Visitor Prioritization
- Using PAPI, activate the property version that includes your Cloudlets behavior changes.