Skip to main content

caches

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

Overview

Namecaches
TypeResource
Idazure.api_management.caches

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
cacheIdtextfield from the properties object
connection_stringtextfield from the properties object
resourceGroupNametextfield from the properties object
resource_idtextfield from the properties object
serviceNametextfield from the properties object
subscriptionIdtextfield from the properties object
use_from_locationtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTcacheId, resourceGroupName, serviceName, subscriptionIdGets the details of the Cache specified by its identifier.
list_by_serviceSELECTresourceGroupName, serviceName, subscriptionIdLists a collection of all external Caches in the specified service instance.
create_or_updateINSERTcacheId, resourceGroupName, serviceName, subscriptionIdCreates or updates an External Cache to be used in Api Management instance.
deleteDELETEIf-Match, cacheId, resourceGroupName, serviceName, subscriptionIdDeletes specific Cache.
updateUPDATEIf-Match, cacheId, resourceGroupName, serviceName, subscriptionIdUpdates the details of the cache specified by its identifier.

SELECT examples

Lists a collection of all external Caches in the specified service instance.

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 }}';

INSERT example

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

/*+ create */
INSERT INTO azure.api_management.caches (
cacheId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ cacheId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

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 }}';