Skip to main content

resource_sync_rules

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

Overview

Nameresource_sync_rules
TypeResource
Idazure.custom_locations.resource_sync_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
locationstringThe geo-location where the resource lives
propertiesobjectThe set of properties specific to a Resource Sync Rule
systemDataobjectMetadata pertaining to creation and last modification of the resource
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, resourceName, childResourceNameGets the details of the resourceSyncRule with a specified resource group, subscription id Custom Location resource name and Resource Sync Rule name.
list_by_custom_location_idselectsubscriptionId, resourceGroupName, resourceNameGets a list of Resource Sync Rules in the specified subscription. The operation returns properties of each Resource Sync Rule
create_or_updateinsertsubscriptionId, resourceGroupName, resourceName, childResourceNameCreates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource Group
updateupdatesubscriptionId, resourceGroupName, resourceName, childResourceNameUpdates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource Group, Subscription and Custom Location name.
deletedeletesubscriptionId, resourceGroupName, resourceName, childResourceNameDeletes the Resource Sync Rule with the specified Resource Sync Rule Name, Custom Location Resource Name, Resource Group, and Subscription Id.

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
childResourceNamestringResource Sync Rule name.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
resourceNamestringCustom Locations name.
subscriptionIdstringThe ID of the target subscription.

SELECT examples

Gets the details of the resourceSyncRule with a specified resource group, subscription id Custom Location resource name and Resource Sync Rule name.

SELECT
location,
properties,
systemData,
tags
FROM azure.custom_locations.resource_sync_rules
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND resourceName = '{{ resourceName }}' -- required
AND childResourceName = '{{ childResourceName }}' -- required
;

INSERT examples

Creates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource Group

INSERT INTO azure.custom_locations.resource_sync_rules (
data__properties,
data__tags,
data__location,
subscriptionId,
resourceGroupName,
resourceName,
childResourceName
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ location }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ resourceName }}',
'{{ childResourceName }}'
RETURNING
location,
properties,
systemData,
tags
;

UPDATE examples

Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource Group, Subscription and Custom Location name.

UPDATE azure.custom_locations.resource_sync_rules
SET
data__properties = '{{ properties }}',
data__tags = '{{ tags }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND resourceName = '{{ resourceName }}' --required
AND childResourceName = '{{ childResourceName }}' --required
RETURNING
location,
properties,
systemData,
tags;

DELETE examples

Deletes the Resource Sync Rule with the specified Resource Sync Rule Name, Custom Location Resource Name, Resource Group, and Subscription Id.

DELETE FROM azure.custom_locations.resource_sync_rules
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND resourceName = '{{ resourceName }}' --required
AND childResourceName = '{{ childResourceName }}' --required
;