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
idstringResource Id
namestringResource Name
locationstringResource Location
propertiesobjectThe custom data.
typestringResource Type

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceName, resourceGroupName, subscriptionId, fabricName, protectionContainerNameapi-versionGets the details of a protection container.
list_by_replication_fabricsselectresourceName, resourceGroupName, subscriptionId, fabricNameapi-versionLists the protection containers in the specified fabric.
listselectresourceName, resourceGroupName, subscriptionIdapi-versionLists the protection containers in a vault.
createinsertresourceName, resourceGroupName, subscriptionId, fabricName, protectionContainerNameapi-versionOperation to create a protection container.
discover_protectable_itemexecresourceName, resourceGroupName, subscriptionId, fabricName, protectionContainerNameapi-versionThe operation to a add a protectable item to a protection container(Add physical server).
deleteexecresourceName, resourceGroupName, subscriptionId, fabricName, protectionContainerNameapi-versionOperation to remove a protection container.
switch_cluster_protectionexecresourceName, resourceGroupName, subscriptionId, fabricName, protectionContainerNameapi-versionOperation to switch protection from one container to another.
switch_protectionexecresourceName, resourceGroupName, subscriptionId, fabricName, protectionContainerNameapi-versionOperation 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
fabricNamestringUnique fabric name.
protectionContainerNamestringProtection container name.
resourceGroupNamestringThe name of the resource group where the recovery services vault is present.
resourceNamestringThe name of the recovery services vault.
subscriptionIdstringThe subscription Id.
api-versionstringClient Api Version.

SELECT examples

Gets the details of a protection container.

SELECT
id,
name,
location,
properties,
type
FROM azure.recovery_services_site_recovery.replication_protection_containers
WHERE resourceName = '{{ resourceName }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND fabricName = '{{ fabricName }}' -- required
AND protectionContainerName = '{{ protectionContainerName }}' -- required
AND api-version = '{{ api-version }}'
;

INSERT examples

Operation to create a protection container.

INSERT INTO azure.recovery_services_site_recovery.replication_protection_containers (
data__properties,
resourceName,
resourceGroupName,
subscriptionId,
fabricName,
protectionContainerName,
api-version
)
SELECT
'{{ properties }}',
'{{ resourceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ fabricName }}',
'{{ protectionContainerName }}',
'{{ api-version }}'
RETURNING
id,
name,
location,
properties,
type
;

Lifecycle Methods

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 
@resourceName='{{ resourceName }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@fabricName='{{ fabricName }}' --required,
@protectionContainerName='{{ protectionContainerName }}' --required,
@api-version='{{ api-version }}'
@@json=
'{
"properties": "{{ properties }}"
}'
;