caches
Creates, updates, deletes, gets or lists a caches
resource.
Overview
Name | caches |
Type | Resource |
Id | azure.api_management.caches |
Fields
- vw_caches
- caches
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
cacheId | text | field from the properties object |
connection_string | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resource_id | text | field from the properties object |
serviceName | text | field from the properties object |
subscriptionId | text | field from the properties object |
use_from_location | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Properties of the Cache contract. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | cacheId, resourceGroupName, serviceName, subscriptionId | Gets the details of the Cache specified by its identifier. |
list_by_service | SELECT | resourceGroupName, serviceName, subscriptionId | Lists a collection of all external Caches in the specified service instance. |
create_or_update | INSERT | cacheId, resourceGroupName, serviceName, subscriptionId | Creates or updates an External Cache to be used in Api Management instance. |
delete | DELETE | If-Match, cacheId, resourceGroupName, serviceName, subscriptionId | Deletes specific Cache. |
update | UPDATE | If-Match, cacheId, resourceGroupName, serviceName, subscriptionId | Updates the details of the cache specified by its identifier. |
SELECT
examples
Lists a collection of all external Caches in the specified service instance.
- vw_caches
- caches
SELECT
description,
cacheId,
connection_string,
resourceGroupName,
resource_id,
serviceName,
subscriptionId,
use_from_location
FROM azure.api_management.vw_caches
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.api_management.caches
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new caches
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.caches (
cacheId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ cacheId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: description
value: string
- name: connectionString
value: string
- name: useFromLocation
value: string
- name: resourceId
value: string
UPDATE
example
Updates a caches
resource.
/*+ update */
UPDATE azure.api_management.caches
SET
properties = '{{ properties }}'
WHERE
If-Match = '{{ If-Match }}'
AND cacheId = '{{ cacheId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified caches
resource.
/*+ delete */
DELETE FROM azure.api_management.caches
WHERE If-Match = '{{ If-Match }}'
AND cacheId = '{{ cacheId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';