cache_rules
Creates, updates, deletes, gets or lists a cache_rules
resource.
Overview
Name | cache_rules |
Type | Resource |
Id | azure.container_registry.cache_rules |
Fields
- vw_cache_rules
- cache_rules
Name | Datatype | Description |
---|---|---|
cacheRuleName | text | field from the properties object |
creation_date | text | field from the properties object |
credential_set_resource_id | text | field from the properties object |
provisioning_state | text | field from the properties object |
registryName | text | field from the properties object |
resourceGroupName | text | field from the properties object |
source_repository | text | field from the properties object |
subscriptionId | text | field from the properties object |
target_repository | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | The properties of a cache rule. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | cacheRuleName, registryName, resourceGroupName, subscriptionId | Gets the properties of the specified cache rule resource. |
list | SELECT | registryName, resourceGroupName, subscriptionId | Lists all cache rule resources for the specified container registry. |
create | INSERT | cacheRuleName, registryName, resourceGroupName, subscriptionId | Creates a cache rule for a container registry with the specified parameters. |
delete | DELETE | cacheRuleName, registryName, resourceGroupName, subscriptionId | Deletes a cache rule resource from a container registry. |
update | UPDATE | cacheRuleName, registryName, resourceGroupName, subscriptionId | Updates a cache rule for a container registry with the specified parameters. |
SELECT
examples
Lists all cache rule resources for the specified container registry.
- vw_cache_rules
- cache_rules
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 }}';
SELECT
properties
FROM azure.container_registry.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.container_registry.cache_rules (
cacheRuleName,
registryName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ cacheRuleName }}',
'{{ registryName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: credentialSetResourceId
value: string
- name: sourceRepository
value: string
- name: targetRepository
value: string
- name: creationDate
value: string
- name: provisioningState
value: string
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 }}';