Create vCAV Replication Policies via API

Few days back I wrote a post on how to create Replication policies in vCloud Availability via GUI. In this post I will walk through steps of creating the same via API.

Below are high level steps of API workflow.

1: Get Auth Token

2: Create a New Replication Policy

Response Output: Make a note of the id of the policy from the response output.

3: Get vCD Organization Detail

Note: In below API call, Cloud-Site is my site name in SP side. Replace this with yours.

Response Output

4: Get Existing Policy Mapping Associated with an Org

Response Output: From the response output we can see org ‘vStellar’ is associated with policy ‘default’. This is vCAV default policy and its not configured with any replication attributes.

5: Update Policy Mapping Associated with an org: In this step we are associating an org with the new policy which we created in Step 2

5: Verify Org-Policy Mapping

Response Output: Below output shows that org ‘vStellar’ is now associated to policy ‘Dr-Default’ (uuid=8f563197-1ab6-48a8-af5c-bae2412e5756)

And that’s it for this post.

I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing 🙂

Leave a Reply