Skip to main content

replication_protection_containers

Creates, updates, deletes, gets or lists a replication_protection_containers resource.

Overview

Namereplication_protection_containers
TypeResource
Idazure.recovery_services_site_recovery.replication_protection_containers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
fabricFriendlyNamestringFabric friendly name.
fabricSpecificDetailsobjectFabric specific details.
fabricTypestringThe fabric type.
friendlyNamestringThe name.
locationstringResource Location.
pairingStatusstringThe pairing status of this cloud.
protectedItemCountintegerNumber of protected PEs.
rolestringThe role of this cloud.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, resource_name, fabric_name, protection_container_name, subscription_idGets the protection container details. Gets the details of a protection container.
list_by_replication_fabricsselectresource_group_name, resource_name, fabric_name, subscription_idGets the list of protection container for a fabric. Lists the protection containers in the specified fabric.
listselectresource_group_name, resource_name, subscription_idGets the list of all protection containers in a vault. Lists the protection containers in a vault.
createinsertresource_group_name, resource_name, fabric_name, protection_container_name, subscription_idCreate a protection container. Operation to create a protection container.
deletedeleteresource_group_name, resource_name, fabric_name, protection_container_name, subscription_idRemoves a protection container. Operation to remove a protection container.
discover_protectable_itemexecresource_group_name, resource_name, fabric_name, protection_container_name, subscription_idAdds a protectable item to the replication protection container. The operation to a add a protectable item to a protection container(Add physical server).
switch_cluster_protectionexecresource_group_name, resource_name, fabric_name, protection_container_name, subscription_idSwitches protection from one container to another. Operation to switch protection from one container to another.
switch_protectionexecresource_group_name, resource_name, fabric_name, protection_container_name, subscription_idSwitches protection from one container to another or one replication provider to another. Operation to switch protection from one container to another or one replication provider to another.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
fabric_namestringFabric name. Required.
protection_container_namestringProtection container name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_namestringThe name of the Vault. Required.
subscription_idstring

SELECT examples

Gets the protection container details. Gets the details of a protection container.

SELECT
id,
name,
fabricFriendlyName,
fabricSpecificDetails,
fabricType,
friendlyName,
location,
pairingStatus,
protectedItemCount,
role,
systemData,
type
FROM azure.recovery_services_site_recovery.replication_protection_containers
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND fabric_name = '{{ fabric_name }}' -- required
AND protection_container_name = '{{ protection_container_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a protection container. Operation to create a protection container.

INSERT INTO azure.recovery_services_site_recovery.replication_protection_containers (
properties,
resource_group_name,
resource_name,
fabric_name,
protection_container_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ resource_name }}',
'{{ fabric_name }}',
'{{ protection_container_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
type
;

DELETE examples

Removes a protection container. Operation to remove a protection container.

DELETE FROM azure.recovery_services_site_recovery.replication_protection_containers
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND fabric_name = '{{ fabric_name }}' --required
AND protection_container_name = '{{ protection_container_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Adds a protectable item to the replication protection container. The operation to a add a protectable item to a protection container(Add physical server).

EXEC azure.recovery_services_site_recovery.replication_protection_containers.discover_protectable_item 
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@fabric_name='{{ fabric_name }}' --required,
@protection_container_name='{{ protection_container_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;