Using API calls, how do I set VDB snapshot policy to NONE when provisioning?

  • 0
  • 1
  • Question
  • Updated 2 weeks ago
  • Answered
The engine GUI allows the suser to set the VDB snapshot policy to None.  Which API call(s)  allow to do that when provisioning a VDB from a dSource or from another VDB? 
Photo of Pierre Morel

Pierre Morel

  • 110 Points 100 badge 2x thumb

Posted 3 weeks ago

  • 0
  • 1
Photo of Alan Bitterman

Alan Bitterman, Employee

  • 110 Points 100 badge 2x thumb
Hello Pierre,

The provisioning API does not include a parameter to set the VDB snapshot policy.  The GUI first calls the provision API then immediately calls the policy API to set the snapshot policy to the selected value, i.e.

#
http://172.16.160.195/resources/json/delphix/policy/POLICY_SNAPSHOT-2/apply
{"target":"ORACLE_DB_CONTAINER-2","type":"PolicyApplyTargetParameters"}

Where the "POLICY_SNAPSHOT-2" reference is the "None: SnapshotPolicy" and the
"ORACLE_DB_CONTAINER-2" is the VDB database reference.  

HTH

Regards,
Bitt...

=== GET /resources/json/delphix/policy ===
=== RESPONSE ===
{
    "type": "ListResult",
    "status": "OK",
    "result": [
        {
            "type": "SyncPolicy",
            "reference": "POLICY_SYNC-1",
            "namespace": null,
            "name": "None:SyncPolicy",
            "customized": false,
            "effectiveType": "DIRECT_APPLIED",
            "scheduleList": [],
            "timezone": {
                "type": "TimeZone",
                "id": "US/Pacific",
                "offset": 420,
                "offsetString": "UTC -07:00"
            },
            "default": false
        },
        {
            "type": "SnapshotPolicy",
            "reference": "POLICY_SNAPSHOT-2",
            "namespace": null,
            "name": "None:SnapshotPolicy",
            "customized": false,
            "effectiveType": "DIRECT_APPLIED",
            "scheduleList": [],
            "timezone": {
                "type": "TimeZone",
                "id": "US/Pacific",
                "offset": 420,
                "offsetString": "UTC -07:00"
            },
            "default": false
        },
... ... ... Etc ... ... ...

(Edited)