Skip to main content

replication_policies

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

Overview

Namereplication_policies
TypeResource
Idazure.recovery_services_site_recovery.replication_policies

Fields

NameDatatypeDescription
idtextResource Id
nametextResource Name
friendly_nametextfield from the properties object
locationtextResource Location
policyNametextfield from the properties object
provider_specific_detailstextfield from the properties object
resourceGroupNametextfield from the properties object
resourceNametextfield from the properties object
subscriptionIdtextfield from the properties object
typetextResource Type

Methods

NameAccessible byRequired ParamsDescription
getSELECTpolicyName, resourceGroupName, resourceName, subscriptionIdGets the details of a replication policy.
listSELECTresourceGroupName, resourceName, subscriptionIdLists the replication policies for a vault.
createINSERTpolicyName, resourceGroupName, resourceName, subscriptionIdThe operation to create a replication policy.
deleteDELETEpolicyName, resourceGroupName, resourceName, subscriptionIdThe operation to delete a replication policy.
updateUPDATEpolicyName, resourceGroupName, resourceName, subscriptionIdThe operation to update a replication policy.

SELECT examples

Lists the replication policies for a vault.

SELECT
id,
name,
friendly_name,
location,
policyName,
provider_specific_details,
resourceGroupName,
resourceName,
subscriptionId,
type
FROM azure.recovery_services_site_recovery.vw_replication_policies
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new replication_policies resource.

/*+ create */
INSERT INTO azure.recovery_services_site_recovery.replication_policies (
policyName,
resourceGroupName,
resourceName,
subscriptionId,
properties
)
SELECT
'{{ policyName }}',
'{{ resourceGroupName }}',
'{{ resourceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

UPDATE example

Updates a replication_policies resource.

/*+ update */
UPDATE azure.recovery_services_site_recovery.replication_policies
SET
properties = '{{ properties }}'
WHERE
policyName = '{{ policyName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified replication_policies resource.

/*+ delete */
DELETE FROM azure.recovery_services_site_recovery.replication_policies
WHERE policyName = '{{ policyName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';