Skip to main content

caches

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

Overview

Namecaches
TypeResource
Idazure.api_management.caches

Fields

The following fields are returned by SELECT queries:

The response body contains the specified Cache entity.

NameDatatypeDescription
propertiesobjectCache properties details.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, serviceName, cacheId, subscriptionIdGets the details of the Cache specified by its identifier.
list_by_serviceselectresourceGroupName, serviceName, subscriptionId$top, $skipLists a collection of all external Caches in the specified service instance.
create_or_updateinsertresourceGroupName, serviceName, cacheId, subscriptionIdIf-MatchCreates or updates an External Cache to be used in Api Management instance.
updateupdateresourceGroupName, serviceName, cacheId, If-Match, subscriptionIdUpdates the details of the cache specified by its identifier.
deletedeleteresourceGroupName, serviceName, cacheId, If-Match, subscriptionIdDeletes specific Cache.

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
If-MatchstringETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
cacheIdstringIdentifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier).
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of the API Management service.
subscriptionIdstringThe ID of the target subscription.
$skipinteger (int32)Number of records to skip.
$topinteger (int32)Number of records to return.
If-MatchstringETag of the Entity. Not required when creating an entity, but required when updating an entity.

SELECT examples

Gets the details of the Cache specified by its identifier.

SELECT
properties
FROM azure.api_management.caches
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND cacheId = '{{ cacheId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates or updates an External Cache to be used in Api Management instance.

INSERT INTO azure.api_management.caches (
data__properties,
resourceGroupName,
serviceName,
cacheId,
subscriptionId,
If-Match
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ cacheId }}',
'{{ subscriptionId }}',
'{{ If-Match }}'
RETURNING
properties
;

UPDATE examples

Updates the details of the cache specified by its identifier.

UPDATE azure.api_management.caches
SET
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND cacheId = '{{ cacheId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
properties;

DELETE examples

Deletes specific Cache.

DELETE FROM azure.api_management.caches
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND cacheId = '{{ cacheId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;