From 40efe7e8ee14367e862cd7236908fbffdb571f4c Mon Sep 17 00:00:00 2001 From: Samir Solanki Date: Thu, 8 Oct 2020 18:40:33 -0700 Subject: [PATCH] cache entity --- .../2020-06-01-preview/definitions.json | 13 +++++++++- .../examples/ApiManagementCreateCache.json | 25 +++++++++++-------- .../examples/ApiManagementGetCache.json | 11 ++++---- .../examples/ApiManagementListCaches.json | 9 ++++--- .../examples/ApiManagementUpdateCache.json | 15 +++++------ 5 files changed, 45 insertions(+), 28 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/definitions.json index 3c1de3016855..0c427a9290a3 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/definitions.json @@ -1595,6 +1595,11 @@ "description": "Runtime connection string to cache", "maxLength": 300 }, + "useFromLocation": { + "type": "string", + "description": "Location identifier to use cache from (should be either 'default' or valid Azure region identifier)", + "maxLength": 256 + }, "resourceId": { "type": "string", "description": "Original uri of entity in external system cache points to", @@ -1602,7 +1607,8 @@ } }, "required": [ - "connectionString" + "connectionString", + "useFromLocation" ], "description": "Properties of the Cache contract." }, @@ -1628,6 +1634,11 @@ "description": "Runtime connection string to cache", "maxLength": 300 }, + "useFromLocation": { + "type": "string", + "description": "Location identifier to use cache from (should be either 'default' or valid Azure region identifier)", + "maxLength": 256 + }, "resourceId": { "type": "string", "description": "Original uri of entity in external system cache points to", diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateCache.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateCache.json index 0c68ef437778..ec7994160ed9 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateCache.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateCache.json @@ -4,37 +4,40 @@ "resourceGroupName": "rg1", "api-version": "2020-06-01-preview", "subscriptionId": "subid", - "cacheId": "westindia", + "cacheId": "c1", "parameters": { "properties": { - "connectionString": "contoso5.redis.cache.windows.net,ssl=true,password=...", + "connectionString": "apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False", "description": "Redis cache instances in West India", - "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/contoso5" + "useFromLocation": "default", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1" } } }, "responses": { "201": { "body": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/westindia", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", "type": "Microsoft.ApiManagement/service/caches", - "name": "westindia", + "name": "c1", "properties": { - "connectionString": "{{5c68d535a40f7e61103cd285}}}", + "useFromLocation": "default", "description": "Redis cache instances in West India", - "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/contoso5" + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1" } } }, "200": { "body": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/westindia", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", "type": "Microsoft.ApiManagement/service/caches", - "name": "westindia", + "name": "c1", "properties": { - "connectionString": "{{5c68d535a40f7e61103cd285}}}", + "useFromLocation": "default", "description": "Redis cache instances in West India", - "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/contoso5" + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1" } } } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetCache.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetCache.json index 67ba96fff72a..4726f660414b 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetCache.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetCache.json @@ -4,18 +4,19 @@ "resourceGroupName": "rg1", "api-version": "2020-06-01-preview", "subscriptionId": "subid", - "cacheId": "westindia" + "cacheId": "c1" }, "responses": { "200": { "body": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/westindia", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", "type": "Microsoft.ApiManagement/service/caches", - "name": "westindia", + "name": "c1", "properties": { - "connectionString": "{{5c68d535a40f7e61103cd285}}}", + "useFromLocation": "default", "description": "Redis cache instances in West India", - "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/contoso5" + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1" } } } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListCaches.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListCaches.json index 08c9d044b2b8..8e1e5ca24b5e 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListCaches.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListCaches.json @@ -10,13 +10,14 @@ "body": { "value": [ { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/westindia", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", "type": "Microsoft.ApiManagement/service/caches", - "name": "westindia", + "name": "c1", "properties": { - "connectionString": "{{5c68d535a40f7e61103cd285}}}", + "useFromLocation": "default", "description": "Redis cache instances in West India", - "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/contoso5" + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1" } } ] diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementUpdateCache.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementUpdateCache.json index e6f3599ea62f..40d8440bb57c 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementUpdateCache.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementUpdateCache.json @@ -4,24 +4,25 @@ "resourceGroupName": "rg1", "api-version": "2020-06-01-preview", "subscriptionId": "subid", - "cacheId": "westindia", + "cacheId": "c1", "If-Match": "*", "parameters": { "properties": { - "description": "Update Cache in west India" + "useFromLocation": "westindia" } } }, "responses": { "200": { "body": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/westindia", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", "type": "Microsoft.ApiManagement/service/caches", - "name": "westindia", + "name": "c1", "properties": { - "connectionString": "{{5c68d535a40f7e61103cd285}}}", - "description": "Update Cache in west India", - "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/contoso5" + "useFromLocation": "westindia", + "description": "Redis cache instances in West India", + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1" } } }