Skip to main content

cache_rules

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

Overview

Namecache_rules
TypeResource
Idazure.container_registry.cache_rules

Fields

NameDatatypeDescription
cacheRuleNametextfield from the properties object
creation_datetextfield from the properties object
credential_set_resource_idtextfield from the properties object
provisioning_statetextfield from the properties object
registryNametextfield from the properties object
resourceGroupNametextfield from the properties object
source_repositorytextfield from the properties object
subscriptionIdtextfield from the properties object
target_repositorytextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTcacheRuleName, registryName, resourceGroupName, subscriptionIdGets the properties of the specified cache rule resource.
listSELECTregistryName, resourceGroupName, subscriptionIdLists all cache rule resources for the specified container registry.
createINSERTcacheRuleName, registryName, resourceGroupName, subscriptionIdCreates a cache rule for a container registry with the specified parameters.
deleteDELETEcacheRuleName, registryName, resourceGroupName, subscriptionIdDeletes a cache rule resource from a container registry.
updateUPDATEcacheRuleName, registryName, resourceGroupName, subscriptionIdUpdates a cache rule for a container registry with the specified parameters.

SELECT examples

Lists all cache rule resources for the specified container registry.

SELECT
cacheRuleName,
creation_date,
credential_set_resource_id,
provisioning_state,
registryName,
resourceGroupName,
source_repository,
subscriptionId,
target_repository
FROM azure.container_registry.vw_cache_rules
WHERE registryName = '{{ registryName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.container_registry.cache_rules (
cacheRuleName,
registryName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ cacheRuleName }}',
'{{ registryName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

UPDATE example

Updates a cache_rules resource.

/*+ update */
UPDATE azure.container_registry.cache_rules
SET
properties = '{{ properties }}'
WHERE
cacheRuleName = '{{ cacheRuleName }}'
AND registryName = '{{ registryName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified cache_rules resource.

/*+ delete */
DELETE FROM azure.container_registry.cache_rules
WHERE cacheRuleName = '{{ cacheRuleName }}'
AND registryName = '{{ registryName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';