Skip to main content

policies

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

Overview

Namepolicies
TypeResource
Idazure.data_replication.policies

Fields

NameDatatypeDescription
idtextGets or sets the Id of the resource.
nametextGets or sets the name of the resource.
custom_propertiestextfield from the properties object
policyNametextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
typetextGets or sets the type of the resource.
vaultNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTpolicyName, resourceGroupName, subscriptionId, vaultNameGets the details of the policy.
listSELECTresourceGroupName, subscriptionId, vaultNameGets the list of policies in the given vault.
createINSERTpolicyName, resourceGroupName, subscriptionId, vaultName, data__propertiesCreates the policy.
deleteDELETEpolicyName, resourceGroupName, subscriptionId, vaultNameRemoves the policy.

SELECT examples

Gets the list of policies in the given vault.

SELECT
id,
name,
custom_properties,
policyName,
provisioning_state,
resourceGroupName,
subscriptionId,
system_data,
type,
vaultName
FROM azure.data_replication.vw_policies
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vaultName = '{{ vaultName }}';

INSERT example

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

/*+ create */
INSERT INTO azure.data_replication.policies (
policyName,
resourceGroupName,
subscriptionId,
vaultName,
data__properties,
properties
)
SELECT
'{{ policyName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ vaultName }}',
'{{ data__properties }}',
'{{ properties }}'
;

DELETE example

Deletes the specified policies resource.

/*+ delete */
DELETE FROM azure.data_replication.policies
WHERE policyName = '{{ policyName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vaultName = '{{ vaultName }}';