policies
Creates, updates, deletes, gets or lists a policies
resource.
Overview
Name | policies |
Type | Resource |
Id | azure.data_replication.policies |
Fields
- vw_policies
- policies
Name | Datatype | Description |
---|---|---|
id | text | Gets or sets the Id of the resource. |
name | text | Gets or sets the name of the resource. |
custom_properties | text | field from the properties object |
policyName | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
type | text | Gets or sets the type of the resource. |
vaultName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | Gets or sets the Id of the resource. |
name | string | Gets or sets the name of the resource. |
properties | object | Policy model properties. |
systemData | object | System data required to be defined for Azure resources. |
type | string | Gets or sets the type of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | policyName, resourceGroupName, subscriptionId, vaultName | Gets the details of the policy. |
list | SELECT | resourceGroupName, subscriptionId, vaultName | Gets the list of policies in the given vault. |
create | INSERT | policyName, resourceGroupName, subscriptionId, vaultName, data__properties | Creates the policy. |
delete | DELETE | policyName, resourceGroupName, subscriptionId, vaultName | Removes the policy. |
SELECT
examples
Gets the list of policies in the given vault.
- vw_policies
- policies
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 }}';
SELECT
id,
name,
properties,
systemData,
type
FROM azure.data_replication.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.data_replication.policies (
policyName,
resourceGroupName,
subscriptionId,
vaultName,
data__properties,
properties
)
SELECT
'{{ policyName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ vaultName }}',
'{{ data__properties }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: provisioningState
value: string
- name: customProperties
value:
- name: instanceType
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: systemData
value: string
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 }}';