# Managed Object - SrmProtection

Property of
  SrmServiceInstanceContent
See also
  SrmCreateProtectionGroupTask, SrmFolder, SrmProtectionGroup, SrmProtectionGroupFolder, SrmProtectionInventoryMappingInfo, SrmRemoveProtectionGroupTask
Since
  SRM API 2.0

## Managed Object Description

Protection API.

Properties

Name | Type | Description
--- | --- | ---
None

Methods

Methods defined in this Managed Object
CreateAbrProtectionGroup, CreateHbrProtectionGroup, CreateHbrProtectionGroup2, CreateVvolProtectionGroup, GetProtectionGroupRootFolder, ListInventoryMappings, ListProtectionGroups, ListReplicatedDatastores, ListUnassignedReplicatedDatastores, ListUnassignedReplicatedVms, ProtectionListProtectedDatastores, ProtectionListProtectedVms, RemoveProtectionGroup

# CreateAbrProtectionGroup

Create a new storage array based SrmProtectionGroup using the provided datastores.

This method does not automatically protect VMs stored on the storage array. ProtectVms must be separately called for the VMs on the the storage array that are to be protected.

The following exceptions are presented by the SrmCreateProtectionGroupTask instance that is returned by this method:

- ConnectionDownFault: If the other site involved in the operation could not be contacted.
- DuplicateName: If a group with this name already exists.
- StringArgumentTooLong: If the size of either name or description property of the settings parameter is too long.

Required Privileges
  VcDr.ProtectionProfile.com.vmware.vcDr.Create
Since
  SRM API 3.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtection used to make the method call.
location P | ManagedObjectReference to a SrmFolder | Folder in which to create the protection group Since SRM API 3.0
name P | xsd:string | The name of the protection group Since SRM API 3.0
description* P | xsd:string | An optional description of the protection group Since SRM API 3.0
datastores P | vim.Datastore[] | Datastores to add to the new protection group Since SRM API 3.0

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a SrmCreateProtectionGroupTask | A task instance to monitor the asynchronous operation of this method.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
vmodl.fault.InvalidType | Thrown if the parent folder isn't meant to hold child-types of type SrmProtectionGroup
SrmFaultInvalidArgument | Thrown if the name of the protection group is empry or the datastores are not stored on replicated storage arrays that have been configured in SRM.
SrmFaultReplicationProviderFault | Thrown if either {@code ReplicationProvider} rejected the operation

Events

Type
None

# CreateHbrProtectionGroup

Deprecated.

Create a new host based (i.e. vSphere replication) SrmProtectionGroup using the provided virtual machines.

The following exceptions are presented by the SrmCreateProtectionGroupTask instance that is returned by this method:

- ConnectionDownFault: If the other site involved in the operation could not be contacted.
- DuplicateName: If a group with this name already exists.
- StringArgumentTooLong: If the size of either name or description property of the settings parameter is too long.

Required Privileges
  VcDr.ProtectionProfile.com.vmware.vcDr.Create
Since
  SRM API 3.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtection used to make the method call.
location P | ManagedObjectReference to a SrmFolder | Folder in which to create the protection group Since SRM API 3.0
name P | xsd:string | The name of the protection group Since SRM API 3.0
description* P | xsd:string | An optional description of the protection group Since SRM API 3.0
vms P | vim.VirtualMachine[] | VirtualMachines to associate with the new protection group. ProtectVms must be called for these VMs to be protected. Since SRM API 3.0

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a SrmCreateProtectionGroupTask | A task instance to monitor the asynchronous operation of this method.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
vmodl.fault.InvalidType | Thrown if the parent folder isn't meant to hold child-types of type SrmProtectionGroup
SrmFaultInternalError | Thrown if we cannot find the hbr provider (null reference)
SrmFaultInvalidArgument | Thrown if the name of the protection group is empry or the list of virtual machines is empty or null.
SrmFaultReplicationProviderFault | Thrown if either {@code ReplicationProvider} rejected the operation

Events

Type
None

# CreateHbrProtectionGroup2

Create a new host based (i.e. vSphere replication) SrmProtectionGroup using the provided virtual machines. The list of virtual machines can be empty.

The following exceptions are presented by the SrmCreateProtectionGroupTask instance that is returned by this method:

- ConnectionDownFault: If the other site involved in the operation could not be contacted.
- DuplicateName: If a group with this name already exists.
- StringArgumentTooLong: If the size of either name or description property of the settings parameter is too long.

Required Privileges
  VcDr.ProtectionProfile.com.vmware.vcDr.Create
Since
  SRM API 11.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtection used to make the method call.
location P | ManagedObjectReference to a SrmFolder | Folder in which to create the protection group Since SRM API 11.0
name P | xsd:string | The name of the protection group Since SRM API 11.0
description* P | xsd:string | An optional description of the protection group Since SRM API 11.0
vms* P | vim.VirtualMachine[] | VirtualMachines to associate with the new protection group. ProtectVms must be called for these VMs to be protected. Since SRM API 11.0

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a SrmCreateProtectionGroupTask | A task instance to monitor the asynchronous operation of this method.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
vmodl.fault.InvalidType | Thrown if the parent folder isn't meant to hold child-types of type SrmProtectionGroup
SrmFaultInternalError | Thrown if we cannot find the hbr provider (null reference)
SrmFaultInvalidArgument | Thrown if the name of the protection group is empry.
SrmFaultReplicationProviderFault | Thrown if either {@code ReplicationProvider} rejected the operation

Events

Type
None

# CreateVvolProtectionGroup

Create a new VVol SrmProtectionGroup.

The following exceptions are presented by the SrmCreateProtectionGroupTask instance that is returned by this method:

- ConnectionDownFault: If the other site involved in the operation could not be contacted.
- DuplicateName: If a group with this name already exists.
- StringArgumentTooLong: If the size of either name or description property of the settings parameter is too long.

Required Privileges
  VcDr.ProtectionProfile.com.vmware.vcDr.Create
Since
  SRM API 10.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtection used to make the method call.
location P | ManagedObjectReference to a SrmFolder | Folder in which to create the protection group Since SRM API 10.0
name P | xsd:string | The name of the protection group Since SRM API 10.0
description* P | xsd:string | An optional description of the protection group Since SRM API 10.0
replicationGroups* P | vim.vm.replication.ReplicationGroupId[] | Optional list of replication groups to configure for the protection group. Only virtual machines replicated by these replication groups can be protected in the created protection group. Since SRM API 10.0

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a SrmCreateProtectionGroupTask | A task instance to monitor the asynchronous operation of this method.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultInternalError | Thrown if the VVol provider was not found (null reference)
SrmFaultInvalidArgument | Thrown if the name of the protection group is empty
SrmFaultReplicationProviderFault | Thrown if either {@code ReplicationProvider} rejected the operation

Events

Type
None

# GetProtectionGroupRootFolder

Get a reference to the top-level container for protection groups.

Required Privileges
  System.View
Since
  SRM API 3.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtection used to make the method call.

Return Value

Type | Description
--- | ---
ManagedObjectReference to a SrmProtectionGroupFolder | The top-level folder for protection groups.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# ListInventoryMappings

Get a list of the configured inventory mappings on the protection site.

The destination of each of the resources (network, resource pool, folder) are not available in the data structure that is returned. If needed use: drextapi.InventoryMapping.networkMappings drextapi.InventoryMapping.resourcePoolMappings drextapi.InventoryMapping.folderMappings

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtection used to make the method call.

Return Value

Type | Description
--- | ---
SrmProtectionInventoryMappingInfo | A list of the configured inventory mappings on the protection site.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# ListProtectionGroups

Get a list of the protection groups that are currently configured.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtection used to make the method call.

Return Value

Type | Description
--- | ---
ManagedObjectReference[] to a SrmProtectionGroup[] | A list of all the protection groups that are currently configured.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# ListReplicatedDatastores

Deprecated. {@code listUnassignedReplicatedDatastores} and ListReplicatedDatastores provide the same functionality, but {@code listUnassignedReplicatedDatastores} is the preferred method name.

Get a list of replicated datastores that can be used to create new protection groups.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtection used to make the method call.

Return Value

Type | Description
--- | ---
vim.Datastore[] | A list of all datastores on this site that are replicated but not currently protected by SRM.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# ListUnassignedReplicatedDatastores

Get a list of replicated datastores that can be used to create new protection groups.

Required Privileges
  System.View
Since
  SRM API 3.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtection used to make the method call.

Return Value

Type | Description
--- | ---
vim.Datastore[] | A list of all datastores on this site that are replicated but not currently protected by SRM.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# ListUnassignedReplicatedVms

Get a list of replicated VMs which are currently not assigned to a SRM protection group.

Required Privileges
  System.View
Since
  SRM API 3.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtection used to make the method call.
replicationType P | xsd:string | The type of VMs to find. Valid values are defined in SrmProtectionGroupReplicationType Since SRM API 3.0

P Required privilege: replicationType

Return Value

Type | Description
--- | ---
vim.VirtualMachine[] | A list of replicated VMs that are suitable for protection by SRM.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultInvalidArgument | Thrown if the replicationType parameter does not match a supported replication type.

Events

Type
None

# ProtectionListProtectedDatastores

Get a list of the replicated datastores that are protected by SRM.

Required Privileges
  System.View
Since
  SRM API 3.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtection used to make the method call.

Return Value

Type | Description
--- | ---
vim.Datastore[] | A list of all datastores on this site that are replicated and protected by SRM.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# ProtectionListProtectedVms

Get a list of protected virtual machines.

Required Privileges
  System.View
Since
  SRM API 3.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtection used to make the method call.

Return Value

Type | Description
--- | ---
vim.VirtualMachine[] | A list of replicated VMs that are protected by SRM.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# RemoveProtectionGroup

Attempts to unprotect all SrmProtectionGroupProtectedVm objects in the group and then remove the SrmProtectionGroup itself.

Note: The SrmProtectionGroup removal step still requires the protection group to be empty. It is possible for another operation to occur on this group while the protected VMs are being unprotected. Thus, if a VM is protected into the SrmProtectionGroup during the unprotect step then the SrmProtectionGroup removal step may still fail.

Required Privileges
  VcDr.ProtectionProfile.com.vmware.vcDr.Delete
Since
  SRM API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmProtection used to make the method call.
group P | ManagedObjectReference to a SrmProtectionGroup | The SrmProtectionGroup to be removed after unprotecting all SrmProtectionGroupProtectedVms. Since SRM API 3.0

P Required privilege: group

Return Value

Type | Description
--- | ---
ManagedObjectReference to a SrmRemoveProtectionGroupTask | A task instance to monitor the asynchronous operation of this method.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultConnectionDownFault | Thrown if the other site involved in the operation could not be contacted
SrmFaultProtectionGroupNotEmpty | Thrown if this group still contains protected VMs
SrmFaultReplicationProviderFault |

Events

Type
None