cache
Creates, updates, deletes, gets or lists a cache resource.
Overview
| Name | cache |
| Type | Resource |
| Id | azure.api_management.cache |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_service
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
connectionString | string | Runtime connection string to cache. Required. |
description | string | Cache description. |
resourceId | string | Original uri of entity in external system cache points to. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
useFromLocation | string | Location identifier to use cache from (should be either 'default' or valid Azure region identifier). Required. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
connectionString | string | Runtime connection string to cache. Required. |
description | string | Cache description. |
resourceId | string | Original uri of entity in external system cache points to. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
useFromLocation | string | Location identifier to use cache from (should be either 'default' or valid Azure region identifier). Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, service_name, cache_id, subscription_id | Gets the details of the Cache specified by its identifier. | |
list_by_service | select | resource_group_name, service_name, subscription_id | $top, $skip | Lists a collection of all external Caches in the specified service instance. |
create_or_update | insert | resource_group_name, service_name, cache_id, subscription_id | Creates or updates an External Cache to be used in Api Management instance. | |
update | update | resource_group_name, service_name, cache_id, subscription_id | Updates the details of the cache specified by its identifier. | |
create_or_update | replace | resource_group_name, service_name, cache_id, subscription_id | Creates or updates an External Cache to be used in Api Management instance. | |
delete | delete | resource_group_name, service_name, cache_id, subscription_id | Deletes specific Cache. | |
get_entity_tag | exec | resource_group_name, service_name, cache_id, subscription_id | Gets the entity state (Etag) version of the Cache specified by its identifier. |
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.
| Name | Datatype | Description |
|---|---|---|
cache_id | string | Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
service_name | string | The name of the API Management service. Required. |
subscription_id | string | |
$skip | integer | Number of records to skip. Default value is None. |
$top | integer | Number of records to return. Default value is None. |
SELECT examples
- get
- list_by_service
Gets the details of the Cache specified by its identifier.
SELECT
id,
name,
connectionString,
description,
resourceId,
systemData,
type,
useFromLocation
FROM azure.api_management.cache
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND cache_id = '{{ cache_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists a collection of all external Caches in the specified service instance.
SELECT
id,
name,
connectionString,
description,
resourceId,
systemData,
type,
useFromLocation
FROM azure.api_management.cache
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
;
INSERT examples
- create_or_update
- Manifest
Creates or updates an External Cache to be used in Api Management instance.
INSERT INTO azure.api_management.cache (
properties,
resource_group_name,
service_name,
cache_id,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ cache_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: cache
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the cache resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the cache resource.
- name: cache_id
value: "{{ cache_id }}"
description: Required parameter for the cache resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the cache resource.
- name: properties
description: |
Cache properties details.
value:
description: "{{ description }}"
connectionString: "{{ connectionString }}"
useFromLocation: "{{ useFromLocation }}"
resourceId: "{{ resourceId }}"
UPDATE examples
- update
Updates the details of the cache specified by its identifier.
UPDATE azure.api_management.cache
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND cache_id = '{{ cache_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
REPLACE examples
- create_or_update
Creates or updates an External Cache to be used in Api Management instance.
REPLACE azure.api_management.cache
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND cache_id = '{{ cache_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Deletes specific Cache.
DELETE FROM azure.api_management.cache
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND cache_id = '{{ cache_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- get_entity_tag
Gets the entity state (Etag) version of the Cache specified by its identifier.
EXEC azure.api_management.cache.get_entity_tag
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@cache_id='{{ cache_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;