Update Vm Protection Settings

Update Vm Protection Settings

Update the protection settings of a virtual machine. This endpoint must be called after the remove protection operation in order for the VM to be recovered during recovery.

Request
URI
PUT
https://{api_host}/pairings/{pairing_id}/protection-management/groups/{group_id}/vms/{vm_id}/protection-settings
COPY
Path Parameters
string
pairing_id
Required

The ID of a pairing between this Site Recovery Manager server and remote one.

string
group_id
Required

The ID of a protection group defined within current pairing.

string
vm_id
Required

The ID of a protected virtual machine.


Request Body

A spec describing the new VM protection settings.

VmProtectionSettings of type(s) application/json
Required
{
    "placeholder_needs_repair": false,
    "vsan_target_cluster": "string",
    "location": {
        "name": "string",
        "protected_site": "string",
        "production_vm_path": {
            "datastore": "string",
            "datastore_name": "local",
            "path": "vms/finance-vm",
            "filename": "finance-vm.vmdk",
            "friendly_path": "string"
        },
        "recovery_site": "string",
        "placeholder_vm_path": {
            "datastore": "string",
            "datastore_name": "local",
            "path": "vms/finance-vm",
            "filename": "finance-vm.vmdk",
            "friendly_path": "string"
        },
        "placeholder_vm": "string"
    },
    "devices": [
        {
            "key": 0,
            "type": "string",
            "backing": "string",
            "label": "string",
            "production_path": {
                "datastore": "string",
                "datastore_name": "local",
                "path": "vms/finance-vm",
                "filename": "finance-vm.vmdk",
                "friendly_path": "string"
            },
            "production_datastores": [
                {}
            ],
            "recovery_path": {
                "datastore": "string",
                "datastore_name": "local",
                "path": "vms/finance-vm",
                "filename": "finance-vm.vmdk",
                "friendly_path": "string"
            },
            "replicated": false,
            "detached": false
        }
    ],
    "networks": [
        {
            "editable": false,
            "source": "string",
            "source_name": "string",
            "target": "string",
            "target_name": "string",
            "is_inventory_mapped_target": false,
            "source_has_inventory_mapping": false,
            "index": 0,
            "key": 0,
            "source_network_nsx_backed": false,
            "target_network_nsx_backed": false
        }
    ],
    "folder": {
        "editable": false,
        "source": "string",
        "source_name": "string",
        "target": "string",
        "target_name": "string",
        "is_inventory_mapped_target": false,
        "source_has_inventory_mapping": false
    },
    "resource_pool": {
        "editable": false,
        "source": "string",
        "source_name": "string",
        "target": "string",
        "target_name": "string",
        "is_inventory_mapped_target": false,
        "source_has_inventory_mapping": false
    },
    "host": {
        "editable": false,
        "source": "string",
        "source_name": "string",
        "target": "string",
        "target_name": "string",
        "is_inventory_mapped_target": false,
        "source_has_inventory_mapping": false
    },
    "change_version": "string"
}
boolean
placeholder_needs_repair
Optional

Whether repair placeholder operation is required. If true, only repair placeholder is possible and not configure protection.

string
vsan_target_cluster
Optional

Target vSAN cluster used by vSAN cluster pair. You can use as a target resource pool only resource pools which are under the vSAN target cluster. Applicable if the containing protection group is vSAN-based.

object
location
Optional

Location details about a protected virtual machine.

array of object
devices
Optional

List of VM devices, including hard disks, optical disks and floppy disks

array of object
networks
Optional

List of VM networks

object
folder
Optional

Details about a protection resource of a VM. For example: folder, resource pool, host, network.

object
resource_pool
Optional

Details about a protection resource of a VM. For example: folder, resource pool, host, network.

object
host
Optional

Details about a protection resource of a VM. For example: folder, resource pool, host, network.

string
change_version
Optional

Version number of these settings. Keep this if need to update the VM protection settings. Applicable only if the VM is protected.

Authentication
This operation uses the following authentication methods.
Responses
202

A task to monitor the operation progress

Returns TaskDrResponseEntity of type(s) application/json
This response body class contains all of the following: InlineTaskDrResponseEntity0 , InlineTaskDrResponseEntity1
"TaskDrResponseEntity Object"

400

Bad request - the server cannot understand the request due to invalid syntax or invalid request body content

Returns ResponseError of type(s) application/json
"ResponseError Object"
string
error_code
Optional

The code of the error.

string
message
Optional

The message of the error.

string As uuid As uuid
op_id
Optional

The ID of the operation.


401

Unauthorized - the client must authenticate itself to get the requested response

Operation doesn't return any data structure

403

Forbidden - not sufficient access rights to fulfill the request

Returns ResponseError of type(s) application/json
"ResponseError Object"
string
error_code
Optional

The code of the error.

string
message
Optional

The message of the error.

string As uuid As uuid
op_id
Optional

The ID of the operation.


404

Not Found - server cannot find the requested in URL resource

Operation doesn't return any data structure

500

Internal server error - unexpected condition prevents fulfilling the request

Returns ResponseError of type(s) application/json
"ResponseError Object"
string
error_code
Optional

The code of the error.

string
message
Optional

The message of the error.

string As uuid As uuid
op_id
Optional

The ID of the operation.


Code Samples
COPY
                    curl -X PUT -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/pairings/{pairing_id}/protection-management/groups/{group_id}/vms/{vm_id}/protection-settings