From fc32868d898ec14420bcdad85116c0c1f875c490 Mon Sep 17 00:00:00 2001 From: Tim Lovell-Smith Date: Mon, 10 May 2021 19:27:59 -0700 Subject: [PATCH] PR for new api-version: Microsoft.Cache/redis/stable/2020-12-01 [rebased + refactored] (#14023) * Adds base for updating Microsoft.Cache from version stable/2020-06-01 to version 2020-12-01 * Updates readme * Updates API version in new specs and examples * Adding Redis Version to PUT request (#12675) * Adding Redis Version to PUT request * Include RedisVersion in PUT and PATCH, and update description to clarify major version * Adding new properties isPrimary and replicasPerPrimary (#13005) * Adding new properties isPrimary and replicasPerPrimary * Addressing PR feedback Co-authored-by: Lavanya Singampalli * Refactor the latest redis.json API spec proposal to use the definitions ProxyResource, TrackedResource and OperationListResult from common-types/resource-management/v2. (I hope CI likes this!) * Cleanup now-unreferenced #definitions which were still flagged as duplicate definitions. * Fix linter errors for camelCasing of API names and formatting of integer types. * Fix more linter errors by adding pagable, refactoring LinkedServers and FirewallRules. These will be between-versions breaking changes for the SDK, in the name of more API consistency. * Fix linter error 'PUT' operation 'PrivateEndpointConnections_Put' should use method name 'Create'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. * Fix some duplicate example names. * Revert "Fix linter error 'PUT' operation 'PrivateEndpointConnections_Put' should use method name 'Create'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change." -- because it introduces new linter errors. * Revert "Fix more linter errors by adding pagable, refactoring LinkedServers and FirewallRules. These will be between-versions breaking changes for the SDK, in the name of more API consistency." This reverts commit c0e305128834947066bb59de2c4247b29feef5ee. * Fix the example name for CheckNameAvailability. * Add x-ms-pageable suggested by the linter. * Revert the linter fix for CheckNameAvailabiltiy camelCasing to avoid introducing new linter errors. * Use same FirewallRule response schema for PUT and GET, addressing linter errors, and have RedisFirewallRuleCreateParameters inherit it in hopes that helps with SDK backcompat. * Fix indenting. * Fix broken $ref reference syntax. * Add back the description for RedisFirewallRuleCreateParameters. * Actually run prettier. * With print width 20 * Suppress the warnings that booleans are not descriptive, since to change them would be a breaking change. * Delete unintended extra character * Revert enum type-hinting and refactors to common-types that are getting flagged as breaking changes. * Add back the refactorings to use Resource/ProxyResource/TrackedResource from common-types. Since otherwise we get "Duplicate Schema named Resource -- properties.id.description: undefined => "Fully qualified resource ID for the resource. Ex - /subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/resourceProviderNamespace/resourceType/resourceName", properties.name.description: undefined => "The name of the resource"," Co-authored-by: MECHANDR <30642185+MECHANDR@users.noreply.github.com> Co-authored-by: lasingam <68033674+lasingam@users.noreply.github.com> Co-authored-by: Lavanya Singampalli --- .../RedisCacheCheckNameAvailability.json | 13 + .../2020-12-01/examples/RedisCacheCreate.json | 205 ++ .../2020-12-01/examples/RedisCacheDelete.json | 17 + ...sCacheDeletePrivateEndpointConnection.json | 13 + .../2020-12-01/examples/RedisCacheExport.json | 22 + .../RedisCacheFirewallRuleCreate.json | 39 + .../RedisCacheFirewallRuleDelete.json | 13 + .../examples/RedisCacheFirewallRuleGet.json | 22 + .../examples/RedisCacheFirewallRulesList.json | 34 + .../examples/RedisCacheForceReboot.json | 23 + .../2020-12-01/examples/RedisCacheGet.json | 76 + ...edisCacheGetPrivateEndpointConnection.json | 29 + .../2020-12-01/examples/RedisCacheImport.json | 23 + .../RedisCacheLinkedServer_Create.json | 44 + .../RedisCacheLinkedServer_Delete.json | 13 + .../examples/RedisCacheLinkedServer_Get.json | 24 + .../examples/RedisCacheLinkedServer_List.json | 36 + .../2020-12-01/examples/RedisCacheList.json | 57 + .../RedisCacheListByResourceGroup.json | 36 + .../examples/RedisCacheListKeys.json | 16 + ...isCacheListPrivateEndpointConnections.json | 47 + .../RedisCacheListPrivateLinkResources.json | 30 + .../RedisCacheListUpgradeNotifications.json | 22 + ...edisCachePatchSchedulesCreateOrUpdate.json | 66 + .../RedisCachePatchSchedulesDelete.json | 13 + .../examples/RedisCachePatchSchedulesGet.json | 31 + .../RedisCachePatchSchedulesList.json | 34 + ...edisCachePutPrivateEndpointConnection.json | 37 + .../examples/RedisCacheRegenerateKey.json | 19 + .../2020-12-01/examples/RedisCacheUpdate.json | 69 + .../stable/2020-12-01/redis.json | 2632 +++++++++++++++++ .../redis/resource-manager/readme.md | 26 +- 32 files changed, 3780 insertions(+), 1 deletion(-) create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheCheckNameAvailability.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheCreate.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheDelete.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheDeletePrivateEndpointConnection.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheExport.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRuleCreate.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRuleDelete.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRuleGet.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRulesList.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheForceReboot.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheGet.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheGetPrivateEndpointConnection.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheImport.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_Create.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_Delete.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_Get.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_List.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheList.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListByResourceGroup.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListKeys.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListPrivateEndpointConnections.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListPrivateLinkResources.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListUpgradeNotifications.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesCreateOrUpdate.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesDelete.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesGet.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesList.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePutPrivateEndpointConnection.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheRegenerateKey.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheUpdate.json create mode 100644 specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/redis.json diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheCheckNameAvailability.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheCheckNameAvailability.json new file mode 100644 index 000000000000..396c7c845879 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheCheckNameAvailability.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2020-12-01", + "subscriptionId": "subid", + "parameters": { + "type": "Microsoft.Cache/Redis", + "name": "cacheName" + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheCreate.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheCreate.json new file mode 100644 index 000000000000..b40dae98d390 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheCreate.json @@ -0,0 +1,205 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid", + "parameters": { + "location": "West US", + "zones": [ + "1" + ], + "properties": { + "sku": { + "name": "Premium", + "family": "P", + "capacity": 1 + }, + "redisVersion": "4", + "enableNonSslPort": true, + "shardCount": 2, + "replicasPerPrimary": 2, + "redisConfiguration": { + "maxmemory-policy": "allkeys-lru" + }, + "subnetId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1", + "staticIP": "192.168.0.5", + "minimumTlsVersion": "1.2" + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1", + "location": "West US", + "zones": [ + "1" + ], + "name": "cache1", + "type": "Microsoft.Cache/Redis", + "tags": {}, + "properties": { + "accessKeys": { + "primaryKey": "", + "secondaryKey": "" + }, + "provisioningState": "Succeeded", + "redisVersion": "4.0.14", + "sku": { + "name": "Premium", + "family": "P", + "capacity": 1 + }, + "enableNonSslPort": false, + "replicasPerMaster": 2, + "replicasPerPrimary": 2, + "redisConfiguration": { + "maxmemory-policy": "allkeys-lru" + }, + "hostName": "cache1.redis.cache.windows.net", + "port": 6379, + "sslPort": 6380, + "minimumTlsVersion": "1.2", + "instances": [ + { + "sslPort": 15000, + "nonSslPort": 13000, + "zone": "1", + "shardId": 0, + "isMaster": true, + "isPrimary": true + }, + { + "sslPort": 15001, + "nonSslPort": 13001, + "zone": "1", + "shardId": 0, + "isMaster": false, + "isPrimary": false + }, + { + "sslPort": 15002, + "nonSslPort": 13002, + "zone": "1", + "shardId": 0, + "isMaster": false, + "isPrimary": false + }, + { + "sslPort": 15003, + "nonSslPort": 13003, + "zone": "1", + "shardId": 1, + "isMaster": true, + "isPrimary": true + }, + { + "sslPort": 15004, + "nonSslPort": 13004, + "zone": "1", + "shardId": 1, + "isMaster": false, + "isPrimary": false + }, + { + "sslPort": 15005, + "nonSslPort": 13005, + "zone": "1", + "shardId": 1, + "isMaster": false, + "isPrimary": false + } + ] + } + } + }, + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1", + "location": "West US", + "zones": [ + "1" + ], + "name": "cache1", + "type": "Microsoft.Cache/Redis", + "tags": {}, + "properties": { + "accessKeys": { + "primaryKey": "", + "secondaryKey": "" + }, + "provisioningState": "Succeeded", + "redisVersion": "3.0", + "sku": { + "name": "Premium", + "family": "P", + "capacity": 1 + }, + "enableNonSslPort": false, + "replicasPerMaster": 2, + "replicasPerPrimary": 2, + "redisConfiguration": { + "maxclients": "1000", + "maxmemory-reserved": "50", + "maxmemory-delta": "50" + }, + "hostName": "cache1.redis.cache.windows.net", + "port": 6379, + "sslPort": 6380, + "minimumTlsVersion": "1.2", + "instances": [ + { + "sslPort": 15000, + "nonSslPort": 13000, + "zone": "1", + "shardId": 0, + "isMaster": true, + "isPrimary": true + }, + { + "sslPort": 15001, + "nonSslPort": 13001, + "zone": "1", + "shardId": 0, + "isMaster": false, + "isPrimary": false + }, + { + "sslPort": 15002, + "nonSslPort": 13002, + "zone": "1", + "shardId": 0, + "isMaster": false, + "isPrimary": false + }, + { + "sslPort": 15003, + "nonSslPort": 13003, + "zone": "1", + "shardId": 1, + "isMaster": true, + "isPrimary": true + }, + { + "sslPort": 15004, + "nonSslPort": 13004, + "zone": "1", + "shardId": 1, + "isMaster": false, + "isPrimary": false + }, + { + "sslPort": 15005, + "nonSslPort": 13005, + "zone": "1", + "shardId": 1, + "isMaster": false, + "isPrimary": false + } + ] + } + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheDelete.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheDelete.json new file mode 100644 index 000000000000..ce5ddf5f95ba --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheDelete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/providers/Microsoft.Cache/...pathToOperationResult..." + } + }, + "204": {} + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheDeletePrivateEndpointConnection.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheDeletePrivateEndpointConnection.json new file mode 100644 index 000000000000..2f74640197ca --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheDeletePrivateEndpointConnection.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "rgtest01", + "cacheName": "cachetest01", + "privateEndpointConnectionName": "pectest01", + "api-version": "2020-12-01" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheExport.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheExport.json new file mode 100644 index 000000000000..53cf078496d2 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheExport.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid", + "parameters": { + "format": "RDB", + "prefix": "datadump1", + "container": "https://contosostorage.blob.core.window.net/urltoBlobContainer?sasKeyParameters" + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/providers/Microsoft.Cache/...pathToOperationResult..." + } + }, + "204": {} + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRuleCreate.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRuleCreate.json new file mode 100644 index 000000000000..10d1d4931f01 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRuleCreate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "ruleName": "rule1", + "cacheName": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid", + "parameters": { + "properties": { + "startIP": "192.168.1.1", + "endIP": "192.168.1.4" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1", + "name": "cache1/rule1", + "type": "Microsoft.Cache/Redis/firewallRules", + "properties": { + "startIP": "192.168.1.1", + "endIP": "192.168.1.4" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1", + "name": "cache1/rule1", + "type": "Microsoft.Cache/Redis/firewallRules", + "properties": { + "startIP": "192.168.1.1", + "endIP": "192.168.1.4" + } + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRuleDelete.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRuleDelete.json new file mode 100644 index 000000000000..9919c4e42f42 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRuleDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "ruleName": "rule1", + "cacheName": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRuleGet.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRuleGet.json new file mode 100644 index 000000000000..0cf8f861a99d --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRuleGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "ruleName": "rule1", + "cacheName": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1", + "name": "cache1/rule1", + "type": "Microsoft.Cache/Redis/firewallRules", + "properties": { + "startIP": "192.168.1.1", + "endIP": "192.168.1.4" + } + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRulesList.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRulesList.json new file mode 100644 index 000000000000..8ba66f557a93 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheFirewallRulesList.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "cacheName": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1", + "name": "rule1", + "type": "Microsoft.Cache/Redis/firewallRules", + "properties": { + "startIP": "192.168.1.1", + "endIP": "192.168.1.4" + } + }, + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule2", + "name": "rule2", + "type": "Microsoft.Cache/Redis/firewallRules", + "properties": { + "startIP": "192.169.1.0", + "endIP": "192.169.1.255" + } + } + ] + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheForceReboot.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheForceReboot.json new file mode 100644 index 000000000000..053bd48750e7 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheForceReboot.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid", + "parameters": { + "shardId": 0, + "rebootType": "AllNodes", + "ports": [ + 13000, + 15001 + ] + } + }, + "responses": { + "200": { + "body": { + "message": "reboot operation enqueued" + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheGet.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheGet.json new file mode 100644 index 000000000000..12879be27160 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheGet.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1", + "location": "West US", + "name": "cache1", + "type": "Microsoft.Cache/Redis", + "tags": {}, + "properties": { + "provisioningState": "Creating", + "redisVersion": "3.2", + "sku": { + "name": "Premium", + "family": "P", + "capacity": 3 + }, + "enableNonSslPort": true, + "replicasPerMaster": 2, + "replicasPerPrimary": 2, + "redisConfiguration": {}, + "hostName": "cache1.redis.cache.windows.net", + "port": 6379, + "sslPort": 6380, + "linkedServers": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/linkedServers/cache2" + } + ], + "instances": [ + { + "sslPort": 15000, + "nonSslPort": 13000, + "isMaster": true, + "isPrimary": true + }, + { + "sslPort": 15001, + "nonSslPort": 13001, + "isMaster": false, + "isPrimary": false + }, + { + "sslPort": 15002, + "nonSslPort": 13002, + "isMaster": false, + "isPrimary": false + } + ], + "publicNetworkAccess": "Enabled", + "privateEndpointConnections": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/privateEndpointConnections/cachePec", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/cachePe" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Please approve my connection", + "actionsRequired": "None" + } + } + } + ] + } + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheGetPrivateEndpointConnection.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheGetPrivateEndpointConnection.json new file mode 100644 index 000000000000..ee988a9fd2e0 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheGetPrivateEndpointConnection.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "rgtest01", + "cacheName": "cachetest01", + "privateEndpointConnectionName": "pectest01", + "api-version": "2020-12-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Cache/Redis/cachetest01/privateEndpointConnections/pectest01", + "name": "pectest01", + "type": "Microsoft.Cache/Redis/privateEndpointConnections", + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved", + "actionsRequired": "None" + } + } + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheImport.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheImport.json new file mode 100644 index 000000000000..54cafd18b4ea --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheImport.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid", + "parameters": { + "format": "RDB", + "files": [ + "http://fileuris.contoso.com/pathtofile1" + ] + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/providers/Microsoft.Cache/...pathToOperationResult..." + } + }, + "204": {} + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_Create.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_Create.json new file mode 100644 index 000000000000..0e3836d97fda --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_Create.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "linkedServerName": "cache2", + "api-version": "2020-12-01", + "subscriptionId": "subid", + "parameters": { + "properties": { + "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2", + "linkedRedisCacheLocation": "West US", + "serverRole": "Secondary" + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/linkedServers/cache2", + "name": "cache2", + "type": "Microsoft.Cache/Redis/linkedServers", + "properties": { + "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2", + "linkedRedisCacheLocation": "West US", + "provisioningState": "Creating", + "serverRole": "Secondary" + } + } + }, + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/linkedServers/cache2", + "name": "cache2", + "type": "Microsoft.Cache/Redis/linkedServers", + "properties": { + "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2", + "linkedRedisCacheLocation": "West US", + "provisioningState": "Creating", + "serverRole": "Secondary" + } + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_Delete.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_Delete.json new file mode 100644 index 000000000000..5342d6c78f9f --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_Delete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "linkedServerName": "cache2", + "api-version": "2020-12-01", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_Get.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_Get.json new file mode 100644 index 000000000000..673cb0b2d440 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_Get.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid", + "linkedServerName": "cache2" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/linkedServers/cache2", + "name": "cache2", + "type": "Microsoft.Cache/Redis/linkedServers", + "properties": { + "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2", + "linkedRedisCacheLocation": "West US", + "provisioningState": "Succeeded", + "serverRole": "Secondary" + } + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_List.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_List.json new file mode 100644 index 000000000000..a47988256af4 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheLinkedServer_List.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/linkedServers/cache2", + "name": "cache2", + "type": "Microsoft.Cache/Redis/linkedServers", + "properties": { + "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2", + "linkedRedisCacheLocation": "West US", + "provisioningState": "Succeeded", + "serverRole": "Secondary" + } + }, + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/linkedServers/cache3", + "name": "cache3", + "type": "Microsoft.Cache/Redis/linkedServers", + "properties": { + "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache3", + "linkedRedisCacheLocation": "West US", + "provisioningState": "Succeeded", + "serverRole": "Secondary" + } + } + ] + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheList.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheList.json new file mode 100644 index 000000000000..2814791b123b --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheList.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2020-12-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1", + "location": "West US", + "name": "cache1", + "type": "Microsoft.Cache/Redis", + "tags": {}, + "properties": { + "provisioningState": "Creating", + "redisVersion": "3.2", + "sku": { + "name": "Standard", + "family": "C", + "capacity": 6 + }, + "enableNonSslPort": true, + "replicasPerMaster": 2, + "replicasPerPrimary": 2, + "redisConfiguration": {}, + "hostName": "cache1.redis.cache.windows.net", + "port": 6379, + "sslPort": 6380, + "instances": [ + { + "sslPort": 15000, + "nonSslPort": 13000, + "isMaster": true, + "isPrimary": true + }, + { + "sslPort": 15001, + "nonSslPort": 13001, + "isMaster": false, + "isPrimary": false + }, + { + "sslPort": 15002, + "nonSslPort": 13002, + "isMaster": false, + "isPrimary": false + } + ] + } + } + ] + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListByResourceGroup.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListByResourceGroup.json new file mode 100644 index 000000000000..3415cd76c3c8 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListByResourceGroup.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2020-12-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1", + "location": "West US", + "name": "cache1", + "type": "Microsoft.Cache/Redis", + "tags": {}, + "properties": { + "provisioningState": "Creating", + "redisVersion": "3.2", + "sku": { + "name": "Standard", + "family": "C", + "capacity": 6 + }, + "enableNonSslPort": true, + "redisConfiguration": {}, + "hostName": "cache1.redis.cache.windows.net", + "port": 6379, + "sslPort": 6380 + } + } + ] + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListKeys.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListKeys.json new file mode 100644 index 000000000000..666fe85becb2 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListKeys.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "primaryKey": "", + "secondaryKey": "" + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListPrivateEndpointConnections.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListPrivateEndpointConnections.json new file mode 100644 index 000000000000..a3b8e07f421f --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListPrivateEndpointConnections.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "rgtest01", + "cacheName": "cachetest01", + "privateEndpointConnectionName": "pectest01", + "api-version": "2020-12-01" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Cache/Redis/cachetest01/privateEndpointConnections/pectest01", + "name": "pectest01", + "type": "Microsoft.Cache/Redis/privateEndpointConnections", + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved", + "actionsRequired": "None" + } + } + }, + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Cache/Redis/cachetest01/privateEndpointConnections/pectest01", + "name": "pectest01", + "type": "Microsoft.Cache/Redis/privateEndpointConnections", + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved", + "actionsRequired": "None" + } + } + } + ] + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListPrivateLinkResources.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListPrivateLinkResources.json new file mode 100644 index 000000000000..ace531e906b0 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListPrivateLinkResources.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "rgtest01", + "cacheName": "cacheTest01", + "api-version": "2020-12-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgtest01/providers/Microsoft.Cache/Redis/cacheTest01/privateLinkResources/redisCache", + "name": "redisCache", + "type": "Microsoft.Cache/Redis/privateLinkResources", + "properties": { + "groupId": "redisCache", + "requiredMembers": [ + "redisCache" + ], + "requiredZoneNames": [ + "privatelink.redis.cache.windows.net" + ] + } + } + ] + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListUpgradeNotifications.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListUpgradeNotifications.json new file mode 100644 index 000000000000..f996e12ae4a5 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheListUpgradeNotifications.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid", + "history": "5000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "notification1", + "timestamp": "2017-02-16T23:20:50.52Z", + "upsellNotification": {} + } + ] + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesCreateOrUpdate.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesCreateOrUpdate.json new file mode 100644 index 000000000000..498656370051 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesCreateOrUpdate.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "default": "default", + "api-version": "2020-12-01", + "subscriptionId": "subid", + "parameters": { + "properties": { + "scheduleEntries": [ + { + "dayOfWeek": "Monday", + "startHourUtc": 12, + "maintenanceWindow": "PT5H" + }, + { + "dayOfWeek": "Tuesday", + "startHourUtc": 12 + } + ] + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/patchSchedules/default", + "name": "default", + "type": "Microsoft.Cache/Redis/patchSchedules", + "properties": { + "scheduleEntries": [ + { + "dayOfWeek": "Monday", + "startHourUtc": 12, + "maintenanceWindow": "PT5H" + }, + { + "dayOfWeek": "Tuesday", + "startHourUtc": 12 + } + ] + } + } + }, + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/patchSchedules/default", + "name": "default", + "type": "Microsoft.Cache/Redis/patchSchedules", + "properties": { + "scheduleEntries": [ + { + "dayOfWeek": "Monday", + "startHourUtc": 12, + "maintenanceWindow": "PT5H" + }, + { + "dayOfWeek": "Tuesday", + "startHourUtc": 12 + } + ] + } + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesDelete.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesDelete.json new file mode 100644 index 000000000000..60afa74b4aea --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "default": "default", + "api-version": "2020-12-01", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesGet.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesGet.json new file mode 100644 index 000000000000..c27d0c4a938f --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesGet.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "default": "default", + "api-version": "2020-12-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/patchSchedules/default", + "name": "default", + "type": "Microsoft.Cache/Redis/patchSchedules", + "properties": { + "scheduleEntries": [ + { + "dayOfWeek": "Monday", + "startHourUtc": 12, + "maintenanceWindow": "PT5H" + }, + { + "dayOfWeek": "Tuesday", + "startHourUtc": 12 + } + ] + } + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesList.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesList.json new file mode 100644 index 000000000000..ce8749d17e25 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePatchSchedulesList.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "cacheName": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/patchSchedules/default", + "name": "default", + "type": "Microsoft.Cache/Redis/patchSchedules", + "properties": { + "scheduleEntries": [ + { + "dayOfWeek": "Monday", + "startHourUtc": 12, + "maintenanceWindow": "PT5H" + }, + { + "dayOfWeek": "Tuesday", + "startHourUtc": 12 + } + ] + } + } + ] + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePutPrivateEndpointConnection.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePutPrivateEndpointConnection.json new file mode 100644 index 000000000000..c8d51c4c8e53 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCachePutPrivateEndpointConnection.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "rgtest01", + "cacheName": "cachetest01", + "privateEndpointConnectionName": "pectest01", + "api-version": "2020-12-01", + "properties": { + "properties": { + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved" + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Cache/Redis/cachetest01/privateEndpointConnections/pectest01", + "name": "pectest01", + "type": "Microsoft.Cache/Redis/privateEndpointConnections", + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/rgtest01/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved", + "actionsRequired": "None" + } + } + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheRegenerateKey.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheRegenerateKey.json new file mode 100644 index 000000000000..5822efb37501 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheRegenerateKey.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid", + "parameters": { + "keyType": "Primary" + } + }, + "responses": { + "200": { + "body": { + "primaryKey": "", + "secondaryKey": "" + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheUpdate.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheUpdate.json new file mode 100644 index 000000000000..cd0f639c111f --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/examples/RedisCacheUpdate.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "name": "cache1", + "resourceGroupName": "rg1", + "api-version": "2020-12-01", + "subscriptionId": "subid", + "parameters": { + "properties": { + "enableNonSslPort": true, + "replicasPerPrimary": 2 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1", + "location": "West US", + "name": "cache1", + "type": "Microsoft.Cache/Redis", + "tags": {}, + "properties": { + "accessKeys": { + "primaryKey": "", + "secondaryKey": "" + }, + "provisioningState": "Succeeded", + "redisVersion": "3.0", + "sku": { + "name": "Premium", + "family": "P", + "capacity": 1 + }, + "enableNonSslPort": true, + "replicasPerMaster": 2, + "replicasPerPrimary": 2, + "redisConfiguration": { + "maxclients": "1000", + "maxmemory-reserved": "50", + "maxmemory-delta": "50" + }, + "hostName": "cache1.redis.cache.windows.net", + "port": 6379, + "sslPort": 6380, + "instances": [ + { + "sslPort": 15000, + "nonSslPort": 13000, + "isMaster": true, + "isPrimary": true + }, + { + "sslPort": 15001, + "nonSslPort": 13001, + "isMaster": false, + "isPrimary": false + }, + { + "sslPort": 15002, + "nonSslPort": 13002, + "isMaster": false, + "isPrimary": false + } + ] + } + } + } + } +} diff --git a/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/redis.json b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/redis.json new file mode 100644 index 000000000000..55ed658f4fe9 --- /dev/null +++ b/specification/redis/resource-manager/Microsoft.Cache/stable/2020-12-01/redis.json @@ -0,0 +1,2632 @@ +{ + "swagger": "2.0", + "info": { + "title": "RedisManagementClient", + "description": "REST API for Azure Redis Cache Service.", + "version": "2020-12-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.Cache/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all of the available REST API operations of the Microsoft.Cache provider.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success. The response describes the list of operations.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Cache/CheckNameAvailability": { + "post": { + "tags": [ + "Redis" + ], + "operationId": "Redis_CheckNameAvailability", + "x-ms-examples": { + "RedisCacheCheckNameAvailability": { + "$ref": "./examples/RedisCacheCheckNameAvailability.json" + } + }, + "description": "Checks that the redis cache name is valid and is not already in use.", + "parameters": [ + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityParameters" + }, + "description": "Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redis'" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Name is available" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/listUpgradeNotifications": { + "get": { + "tags": [ + "Redis" + ], + "operationId": "Redis_ListUpgradeNotifications", + "x-ms-examples": { + "RedisCacheListUpgradeNotifications": { + "$ref": "./examples/RedisCacheListUpgradeNotifications.json" + } + }, + "description": "Gets any upgrade notifications for a Redis cache.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "name": "history", + "in": "query", + "required": true, + "type": "number", + "format": "double", + "description": "how many minutes in past to look for upgrade notifications" + } + ], + "responses": { + "200": { + "description": "All upgrade notifications in given time range", + "schema": { + "$ref": "#/definitions/NotificationListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}": { + "put": { + "tags": [ + "Redis" + ], + "operationId": "Redis_Create", + "x-ms-examples": { + "RedisCacheCreate": { + "$ref": "./examples/RedisCacheCreate.json" + } + }, + "description": "Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.", + "x-ms-long-running-operation": true, + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RedisCreateParameters" + }, + "description": "Parameters supplied to the Create Redis operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "201": { + "description": "The new redis cache was successfully created. Check provisioningState to see detailed status.", + "schema": { + "$ref": "#/definitions/RedisResource" + } + }, + "200": { + "description": "The existing redis cache was successfully updated. Check provisioningState to see detailed status.", + "schema": { + "$ref": "#/definitions/RedisResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Redis" + ], + "operationId": "Redis_Update", + "x-ms-examples": { + "RedisCacheUpdate": { + "$ref": "./examples/RedisCacheUpdate.json" + } + }, + "description": "Update an existing Redis cache.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RedisUpdateParameters" + }, + "description": "Parameters supplied to the Update Redis operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The existing redis cache was successfully updated. Check provisioningState to see detailed status.", + "schema": { + "$ref": "#/definitions/RedisResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Redis" + ], + "operationId": "Redis_Delete", + "x-ms-examples": { + "RedisCacheDelete": { + "$ref": "./examples/RedisCacheDelete.json" + } + }, + "description": "Deletes a Redis cache.", + "x-ms-long-running-operation": true, + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The redis cache was successfully deleted." + }, + "202": { + "description": "The redis cache 'delete' operation was successfully enqueued; follow the Location header to poll for final outcome." + }, + "204": { + "description": "The redis cache was successfully deleted." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Redis" + ], + "operationId": "Redis_Get", + "x-ms-examples": { + "RedisCacheGet": { + "$ref": "./examples/RedisCacheGet.json" + } + }, + "description": "Gets a Redis cache (resource description).", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The redis cache was successfully found.", + "schema": { + "$ref": "#/definitions/RedisResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis": { + "get": { + "tags": [ + "Redis" + ], + "operationId": "Redis_ListByResourceGroup", + "x-ms-examples": { + "RedisCacheListByResourceGroup": { + "$ref": "./examples/RedisCacheListByResourceGroup.json" + } + }, + "description": "Lists all Redis caches in a resource group.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RedisListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Cache/redis": { + "get": { + "tags": [ + "Redis" + ], + "operationId": "Redis_ListBySubscription", + "x-ms-examples": { + "RedisCacheList": { + "$ref": "./examples/RedisCacheList.json" + } + }, + "description": "Gets all Redis caches in the specified subscription.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RedisListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/listKeys": { + "post": { + "tags": [ + "Redis" + ], + "operationId": "Redis_ListKeys", + "x-ms-examples": { + "RedisCacheListKeys": { + "$ref": "./examples/RedisCacheListKeys.json" + } + }, + "description": "Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Lists the keys for the specified Redis cache.", + "schema": { + "$ref": "#/definitions/RedisAccessKeys" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/regenerateKey": { + "post": { + "tags": [ + "Redis" + ], + "operationId": "Redis_RegenerateKey", + "x-ms-examples": { + "RedisCacheRegenerateKey": { + "$ref": "./examples/RedisCacheRegenerateKey.json" + } + }, + "description": "Regenerate Redis cache's access keys. This operation requires write permission to the cache resource.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RedisRegenerateKeyParameters" + }, + "description": "Specifies which key to regenerate." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Lists the regenerated keys for Redis Cache", + "schema": { + "$ref": "#/definitions/RedisAccessKeys" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/forceReboot": { + "post": { + "tags": [ + "Redis" + ], + "operationId": "Redis_ForceReboot", + "x-ms-examples": { + "RedisCacheForceReboot": { + "$ref": "./examples/RedisCacheForceReboot.json" + } + }, + "description": "Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RedisRebootParameters" + }, + "description": "Specifies which Redis node(s) to reboot." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Reboot operation successfully enqueued", + "schema": { + "$ref": "#/definitions/RedisForceRebootResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/import": { + "post": { + "tags": [ + "Redis" + ], + "operationId": "Redis_ImportData", + "x-ms-examples": { + "RedisCacheImport": { + "$ref": "./examples/RedisCacheImport.json" + } + }, + "x-ms-long-running-operation": true, + "description": "Import data into Redis cache.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ImportRDBParameters" + }, + "description": "Parameters for Redis import operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "202": { + "description": "Import operation successfully enqueued; follow the Location header to poll for final outcome." + }, + "200": { + "description": "Import operation succeeded." + }, + "204": { + "description": "Import operation succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/export": { + "post": { + "tags": [ + "Redis" + ], + "operationId": "Redis_ExportData", + "x-ms-examples": { + "RedisCacheExport": { + "$ref": "./examples/RedisCacheExport.json" + } + }, + "x-ms-long-running-operation": true, + "description": "Export data from the redis cache to blobs in a container.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ExportRDBParameters" + }, + "description": "Parameters for Redis export operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "202": { + "description": "Export operation successfully enqueued; follow the Location header to poll for final outcome." + }, + "200": { + "description": "Export operation succeeded." + }, + "204": { + "description": "Export operation succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules": { + "get": { + "tags": [ + "Redis", + "FirewallRules" + ], + "operationId": "FirewallRules_List", + "description": "Gets all firewall rules in the specified redis cache.", + "x-ms-examples": { + "RedisCacheFirewallRulesList": { + "$ref": "./examples/RedisCacheFirewallRulesList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "cacheName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + } + ], + "responses": { + "200": { + "description": "Successfully got the current rules", + "schema": { + "$ref": "#/definitions/RedisFirewallRuleListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}": { + "put": { + "tags": [ + "Redis", + "FirewallRules" + ], + "operationId": "FirewallRules_CreateOrUpdate", + "description": "Create or update a redis cache firewall rule", + "x-ms-examples": { + "RedisCacheFirewallRuleCreate": { + "$ref": "./examples/RedisCacheFirewallRuleCreate.json" + } + }, + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "cacheName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "name": "ruleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the firewall rule." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RedisFirewallRule" + }, + "description": "Parameters supplied to the create or update redis firewall rule operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Resource was successfully updated", + "schema": { + "$ref": "#/definitions/RedisFirewallRule" + } + }, + "201": { + "description": "Resource was successfully created", + "schema": { + "$ref": "#/definitions/RedisFirewallRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Redis", + "FirewallRules" + ], + "operationId": "FirewallRules_Get", + "description": "Gets a single firewall rule in a specified redis cache.", + "x-ms-examples": { + "RedisCacheFirewallRuleGet": { + "$ref": "./examples/RedisCacheFirewallRuleGet.json" + } + }, + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "cacheName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "name": "ruleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the firewall rule." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Successfully found the rule", + "schema": { + "$ref": "#/definitions/RedisFirewallRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Redis", + "FirewallRules" + ], + "operationId": "FirewallRules_Delete", + "description": "Deletes a single firewall rule in a specified redis cache.", + "x-ms-examples": { + "RedisCacheFirewallRuleDelete": { + "$ref": "./examples/RedisCacheFirewallRuleDelete.json" + } + }, + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "cacheName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "name": "ruleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the firewall rule." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the rule" + }, + "204": { + "description": "Successfully deleted the rule" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/patchSchedules": { + "get": { + "tags": [ + "Redis", + "PatchSchedules" + ], + "operationId": "PatchSchedules_ListByRedisResource", + "description": "Gets all patch schedules in the specified redis cache (there is only one).", + "x-ms-examples": { + "RedisCachePatchSchedulesList": { + "$ref": "./examples/RedisCachePatchSchedulesList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "cacheName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + } + ], + "responses": { + "200": { + "description": "Successfully got the current patch schedules", + "schema": { + "$ref": "#/definitions/RedisPatchScheduleListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/patchSchedules/{default}": { + "put": { + "tags": [ + "Redis", + "PatchSchedules" + ], + "operationId": "PatchSchedules_CreateOrUpdate", + "x-ms-examples": { + "RedisCachePatchSchedulesCreateOrUpdate": { + "$ref": "./examples/RedisCachePatchSchedulesCreateOrUpdate.json" + } + }, + "description": "Create or replace the patching schedule for Redis cache.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "name": "default", + "in": "path", + "required": true, + "type": "string", + "description": "Default string modeled as parameter for auto generation to work correctly.", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "defaultName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RedisPatchSchedule" + }, + "description": "Parameters to set the patching schedule for Redis cache." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The patch schedule was successfully updated.", + "schema": { + "$ref": "#/definitions/RedisPatchSchedule" + } + }, + "201": { + "description": "The patch schedule was successfully created.", + "schema": { + "$ref": "#/definitions/RedisPatchSchedule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Redis", + "PatchSchedules" + ], + "operationId": "PatchSchedules_Delete", + "x-ms-examples": { + "RedisCachePatchSchedulesDelete": { + "$ref": "./examples/RedisCachePatchSchedulesDelete.json" + } + }, + "description": "Deletes the patching schedule of a redis cache.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the redis cache." + }, + { + "name": "default", + "in": "path", + "required": true, + "type": "string", + "description": "Default string modeled as parameter for auto generation to work correctly.", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "defaultName", + "modelAsString": true + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Success." + }, + "204": { + "description": "Success." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Redis", + "PatchSchedules" + ], + "operationId": "PatchSchedules_Get", + "x-ms-examples": { + "RedisCachePatchSchedulesGet": { + "$ref": "./examples/RedisCachePatchSchedulesGet.json" + } + }, + "description": "Gets the patching schedule of a redis cache.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the redis cache." + }, + { + "name": "default", + "in": "path", + "required": true, + "type": "string", + "description": "Default string modeled as parameter for auto generation to work correctly.", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "defaultName", + "modelAsString": true + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Response of get patch schedules.", + "schema": { + "$ref": "#/definitions/RedisPatchSchedule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers/{linkedServerName}": { + "put": { + "tags": [ + "Redis" + ], + "operationId": "LinkedServer_Create", + "x-ms-long-running-operation": true, + "x-ms-examples": { + "LinkedServer_Create": { + "$ref": "./examples/RedisCacheLinkedServer_Create.json" + } + }, + "description": "Adds a linked server to the Redis cache (requires Premium SKU).", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "name": "linkedServerName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the linked server that is being added to the Redis cache." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RedisLinkedServerCreateParameters" + }, + "description": "Parameters supplied to the Create Linked server operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The linked server was successfully added.", + "schema": { + "$ref": "#/definitions/RedisLinkedServerWithProperties" + } + }, + "201": { + "description": "The linked server was successfully added.", + "schema": { + "$ref": "#/definitions/RedisLinkedServerWithProperties" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Redis" + ], + "operationId": "LinkedServer_Delete", + "x-ms-examples": { + "LinkedServerDelete": { + "$ref": "./examples/RedisCacheLinkedServer_Delete.json" + } + }, + "description": "Deletes the linked server from a redis cache (requires Premium SKU).", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the redis cache." + }, + { + "name": "linkedServerName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the linked server that is being added to the Redis cache." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The redis cache was successfully deleted." + }, + "204": { + "description": "Linked server was successfully deleted." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Redis" + ], + "operationId": "LinkedServer_Get", + "x-ms-examples": { + "LinkedServer_Get": { + "$ref": "./examples/RedisCacheLinkedServer_Get.json" + } + }, + "description": "Gets the detailed information about a linked server of a redis cache (requires Premium SKU).", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the redis cache." + }, + { + "name": "linkedServerName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the linked server." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Response of get linked server.", + "schema": { + "$ref": "#/definitions/RedisLinkedServerWithProperties" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers": { + "get": { + "tags": [ + "Redis" + ], + "operationId": "LinkedServer_List", + "x-ms-examples": { + "LinkedServer_List": { + "$ref": "./examples/RedisCacheLinkedServer_List.json" + } + }, + "description": "Gets the list of linked servers associated with this redis cache (requires Premium SKU).", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the redis cache." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Response of get linked servers.", + "schema": { + "$ref": "#/definitions/RedisLinkedServerWithPropertiesList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateEndpointConnections": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "operationId": "PrivateEndpointConnections_List", + "description": "List all the private endpoint connections associated with the redis cache.", + "x-ms-examples": { + "RedisCacheListPrivateEndpointConnection": { + "$ref": "./examples/RedisCacheListPrivateEndpointConnections.json" + } + }, + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "cacheName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK -- Successfully retrieved private endpoint connections.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/definitions/PrivateEndpointConnectionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateEndpointConnections/{privateEndpointConnectionName}": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "operationId": "PrivateEndpointConnections_Get", + "description": "Gets the specified private endpoint connection associated with the redis cache.", + "x-ms-examples": { + "RedisCacheGetPrivateEndpointConnection": { + "$ref": "./examples/RedisCacheGetPrivateEndpointConnection.json" + } + }, + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "cacheName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/parameters/PrivateEndpointConnectionName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK -- Get the private endpoint connection properties successfully.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "PrivateEndpointConnections" + ], + "operationId": "PrivateEndpointConnections_Put", + "description": "Update the state of specified private endpoint connection associated with the redis cache.", + "x-ms-examples": { + "RedisCachePutPrivateEndpointConnection": { + "$ref": "./examples/RedisCachePutPrivateEndpointConnection.json" + } + }, + "x-ms-long-running-operation": true, + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "cacheName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/parameters/PrivateEndpointConnectionName" + }, + { + "name": "properties", + "in": "body", + "required": true, + "schema": { + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/definitions/PrivateEndpointConnection" + }, + "description": "The private endpoint connection properties." + } + ], + "responses": { + "201": { + "description": "OK -- Update the private endpoint connection properties successfully.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "PrivateEndpointConnections" + ], + "operationId": "PrivateEndpointConnections_Delete", + "description": "Deletes the specified private endpoint connection associated with the redis cache.", + "x-ms-examples": { + "RedisCacheDeletePrivateEndpointConnection": { + "$ref": "./examples/RedisCacheDeletePrivateEndpointConnection.json" + } + }, + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "cacheName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/parameters/PrivateEndpointConnectionName" + } + ], + "responses": { + "200": { + "description": "OK -- Delete the private endpoint connection successfully." + }, + "204": { + "description": "No Content -- The private endpoint connection does not exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateLinkResources": { + "get": { + "tags": [ + "PrivateLinkResources" + ], + "operationId": "PrivateLinkResources_ListByRedisCache", + "description": "Gets the private link resources that need to be created for a redis cache.", + "x-ms-examples": { + "StorageAccountListPrivateLinkResources": { + "$ref": "./examples/RedisCacheListPrivateLinkResources.json" + } + }, + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "cacheName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Redis cache." + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private link resources.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/definitions/PrivateLinkResourceListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + } + }, + "definitions": { + "Sku": { + "properties": { + "name": { + "type": "string", + "description": "The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium)", + "enum": [ + "Basic", + "Standard", + "Premium" + ], + "x-ms-enum": { + "name": "SkuName", + "modelAsString": true + } + }, + "family": { + "type": "string", + "description": "The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium).", + "enum": [ + "C", + "P" + ], + "x-ms-enum": { + "name": "SkuFamily", + "modelAsString": true + } + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4)." + } + }, + "required": [ + "name", + "family", + "capacity" + ], + "description": "SKU parameters supplied to the create Redis operation." + }, + "RedisCommonProperties": { + "properties": { + "redisConfiguration": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc." + }, + "redisVersion": { + "type": "string", + "description": "Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6)" + }, + "enableNonSslPort": { + "type": "boolean", + "description": "Specifies whether the non-ssl Redis server port (6379) is enabled." + }, + "replicasPerMaster": { + "type": "integer", + "format": "int32", + "description": "The number of replicas to be created per primary." + }, + "replicasPerPrimary": { + "type": "integer", + "format": "int32", + "description": "The number of replicas to be created per primary." + }, + "tenantSettings": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "A dictionary of tenant settings" + }, + "shardCount": { + "type": "integer", + "format": "int32", + "description": "The number of shards to be created on a Premium Cluster Cache." + }, + "minimumTlsVersion": { + "type": "string", + "description": "Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2')", + "enum": [ + "1.0", + "1.1", + "1.2" + ], + "x-ms-enum": { + "name": "TlsVersion", + "modelAsString": true + } + }, + "publicNetworkAccess": { + "description": "Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "PublicNetworkAccess", + "modelAsString": true + } + } + }, + "description": "Create/Update/Get common properties of the redis cache.", + "x-ms-external": true + }, + "RedisCreateProperties": { + "properties": { + "sku": { + "$ref": "#/definitions/Sku", + "description": "The SKU of the Redis cache to deploy." + }, + "subnetId": { + "type": "string", + "pattern": "^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$", + "description": "The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1" + }, + "staticIP": { + "type": "string", + "pattern": "^\\d+\\.\\d+\\.\\d+\\.\\d+$", + "description": "Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network." + } + }, + "required": [ + "sku" + ], + "allOf": [ + { + "$ref": "#/definitions/RedisCommonProperties" + } + ], + "description": "Properties supplied to Create Redis operation.", + "x-ms-external": true + }, + "RedisUpdateProperties": { + "properties": { + "sku": { + "$ref": "#/definitions/Sku", + "description": "The SKU of the Redis cache to deploy." + } + }, + "allOf": [ + { + "$ref": "#/definitions/RedisCommonProperties" + } + ], + "description": "Patchable properties of the redis cache.", + "x-ms-external": true + }, + "RedisProperties": { + "properties": { + "provisioningState": { + "readOnly": true, + "type": "string", + "description": "Redis instance provisioning status.", + "enum": [ + "Creating", + "Deleting", + "Disabled", + "Failed", + "Linking", + "Provisioning", + "RecoveringScaleFailure", + "Scaling", + "Succeeded", + "Unlinking", + "Unprovisioning", + "Updating" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "hostName": { + "readOnly": true, + "type": "string", + "description": "Redis host name." + }, + "port": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "Redis non-SSL port." + }, + "sslPort": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "Redis SSL port." + }, + "accessKeys": { + "readOnly": true, + "$ref": "#/definitions/RedisAccessKeys", + "description": "The keys of the Redis cache - not set if this object is not the response to Create or Update redis cache" + }, + "linkedServers": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/RedisLinkedServer" + }, + "description": "List of the linked servers associated with the cache" + }, + "instances": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/RedisInstanceDetails" + }, + "description": "List of the Redis instances associated with the cache" + }, + "privateEndpointConnections": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "../../../../../common-types/resource-management/v1/privatelinks.json#/definitions/PrivateEndpointConnection" + }, + "description": "List of private endpoint connection associated with the specified redis cache" + } + }, + "allOf": [ + { + "$ref": "#/definitions/RedisCreateProperties" + } + ], + "description": "Properties of the redis cache.", + "x-ms-external": true + }, + "RedisCreateParameters": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/RedisCreateProperties", + "description": "Redis cache properties." + }, + "zones": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of availability zones denoting where the resource needs to come from." + }, + "location": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "The geo-location where the resource lives" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags." + } + }, + "required": [ + "properties", + "location" + ], + "description": "Parameters supplied to the Create Redis operation." + }, + "RedisUpdateParameters": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/RedisUpdateProperties", + "description": "Redis cache properties." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags." + } + }, + "description": "Parameters supplied to the Update Redis operation." + }, + "RedisAccessKeys": { + "properties": { + "primaryKey": { + "readOnly": true, + "type": "string", + "description": "The current primary key that clients can use to authenticate with Redis cache." + }, + "secondaryKey": { + "readOnly": true, + "type": "string", + "description": "The current secondary key that clients can use to authenticate with Redis cache." + } + }, + "description": "Redis cache access keys." + }, + "RedisFirewallRule": { + "description": "A firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted to connect", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/RedisFirewallRuleProperties", + "description": "redis cache firewall rule properties" + } + }, + "required": [ + "properties" + ], + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ] + }, + "RedisFirewallRuleCreateParameters": { + "allOf": [ + { + "$ref": "#/definitions/RedisFirewallRule" + } + ], + "description": "Parameters required for creating a firewall rule on redis cache. (Note, you can just use the FirewallRule type instead now.)" + }, + "RedisFirewallRuleProperties": { + "description": "Specifies a range of IP addresses permitted to connect to the cache", + "properties": { + "startIP": { + "type": "string", + "description": "lowest IP address included in the range" + }, + "endIP": { + "type": "string", + "description": "highest IP address included in the range" + } + }, + "required": [ + "startIP", + "endIP" + ] + }, + "RedisFirewallRuleListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/RedisFirewallRule" + }, + "description": "Results of the list firewall rules operation." + }, + "nextLink": { + "type": "string", + "readOnly": true, + "description": "Link for next page of results." + } + }, + "description": "The response of list firewall rules Redis operation." + }, + "RedisResource": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/RedisProperties", + "description": "Redis cache properties." + }, + "zones": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of availability zones denoting where the resource needs to come from." + } + }, + "required": [ + "properties" + ], + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/TrackedResource" + } + ], + "description": "A single Redis item in List or Get Operation." + }, + "RedisInstanceDetails": { + "properties": { + "sslPort": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "Redis instance SSL port." + }, + "nonSslPort": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "If enableNonSslPort is true, provides Redis instance Non-SSL port." + }, + "zone": { + "readOnly": true, + "type": "string", + "description": "If the Cache uses availability zones, specifies availability zone where this instance is located." + }, + "shardId": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "If clustering is enabled, the Shard ID of Redis Instance" + }, + "isMaster": { + "readOnly": true, + "type": "boolean", + "description": "Specifies whether the instance is a primary node." + }, + "isPrimary": { + "readOnly": true, + "type": "boolean", + "description": "Specifies whether the instance is a primary node." + } + }, + "description": "Details of single instance of redis." + }, + "RedisListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/RedisResource" + }, + "description": "List of Redis cache instances." + }, + "nextLink": { + "type": "string", + "readOnly": true, + "description": "Link for next page of results." + } + }, + "description": "The response of list Redis operation." + }, + "RedisRegenerateKeyParameters": { + "properties": { + "keyType": { + "type": "string", + "description": "The Redis access key to regenerate.", + "enum": [ + "Primary", + "Secondary" + ], + "x-ms-enum": { + "name": "RedisKeyType", + "modelAsString": false + } + } + }, + "required": [ + "keyType" + ], + "description": "Specifies which Redis access keys to reset." + }, + "RedisRebootParameters": { + "properties": { + "rebootType": { + "type": "string", + "description": "Which Redis node(s) to reboot. Depending on this value data loss is possible.", + "enum": [ + "PrimaryNode", + "SecondaryNode", + "AllNodes" + ], + "x-ms-enum": { + "name": "RebootType", + "modelAsString": true + } + }, + "shardId": { + "type": "integer", + "format": "int32", + "description": "If clustering is enabled, the ID of the shard to be rebooted." + }, + "ports": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "A list of redis instances to reboot, specified by per-instance SSL ports or non-SSL ports." + } + }, + "description": "Specifies which Redis node(s) to reboot." + }, + "ExportRDBParameters": { + "properties": { + "format": { + "type": "string", + "description": "File format." + }, + "prefix": { + "type": "string", + "description": "Prefix to use for exported files." + }, + "container": { + "type": "string", + "description": "Container name to export to." + } + }, + "required": [ + "container", + "prefix" + ], + "description": "Parameters for Redis export operation." + }, + "ImportRDBParameters": { + "properties": { + "format": { + "type": "string", + "description": "File format." + }, + "files": { + "type": "array", + "description": "files to import.", + "items": { + "type": "string" + } + } + }, + "required": [ + "files" + ], + "description": "Parameters for Redis import operation." + }, + "ScheduleEntry": { + "properties": { + "dayOfWeek": { + "type": "string", + "description": "Day of the week when a cache can be patched.", + "enum": [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday", + "Everyday", + "Weekend" + ], + "x-ms-enum": { + "name": "DayOfWeek", + "modelAsString": false + } + }, + "startHourUtc": { + "type": "integer", + "format": "int32", + "description": "Start hour after which cache patching can start." + }, + "maintenanceWindow": { + "type": "string", + "format": "duration", + "description": "ISO8601 timespan specifying how much time cache patching can take. " + } + }, + "required": [ + "dayOfWeek", + "startHourUtc" + ], + "description": "Patch schedule entry for a Premium Redis Cache." + }, + "ScheduleEntries": { + "properties": { + "scheduleEntries": { + "x-ms-client-name": "ScheduleEntries", + "type": "array", + "items": { + "$ref": "#/definitions/ScheduleEntry" + }, + "description": "List of patch schedules for a Redis cache." + } + }, + "required": [ + "scheduleEntries" + ], + "description": "List of patch schedules for a Redis cache." + }, + "RedisPatchSchedule": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ScheduleEntries", + "description": "List of patch schedules for a Redis cache." + } + }, + "required": [ + "properties" + ], + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "description": "Response to put/get patch schedules for Redis cache." + }, + "RedisPatchScheduleListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/RedisPatchSchedule" + }, + "description": "Results of the list patch schedules operation." + }, + "nextLink": { + "type": "string", + "readOnly": true, + "description": "Link for next page of results." + } + }, + "description": "The response of list patch schedules Redis operation." + }, + "RedisForceRebootResponse": { + "properties": { + "message": { + "readOnly": true, + "type": "string", + "description": "Status message" + } + }, + "description": "Response to force reboot for Redis cache." + }, + "RedisLinkedServer": { + "description": "Linked server Id", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Linked server Id." + } + } + }, + "RedisLinkedServerWithProperties": { + "description": "Response to put/get linked server (with properties) for Redis cache.", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/RedisLinkedServerProperties", + "description": "Properties of the linked server." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ] + }, + "RedisLinkedServerProperties": { + "description": "Properties of a linked server to be returned in get/put response", + "properties": { + "provisioningState": { + "readOnly": true, + "type": "string", + "description": "Terminal state of the link between primary and secondary redis cache." + } + }, + "allOf": [ + { + "$ref": "#/definitions/RedisLinkedServerCreateProperties" + } + ] + }, + "RedisLinkedServerWithPropertiesList": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/RedisLinkedServerWithProperties" + }, + "description": "List of linked servers (with properties) of a Redis cache." + }, + "nextLink": { + "type": "string", + "readOnly": true, + "description": "Link for next set." + } + }, + "description": "List of linked servers (with properties) of a Redis cache." + }, + "RedisLinkedServerCreateProperties": { + "description": "Create properties for a linked server", + "properties": { + "linkedRedisCacheId": { + "type": "string", + "description": "Fully qualified resourceId of the linked redis cache." + }, + "linkedRedisCacheLocation": { + "type": "string", + "description": "Location of the linked redis cache." + }, + "serverRole": { + "type": "string", + "description": "Role of the linked server.", + "enum": [ + "Primary", + "Secondary" + ], + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } + } + }, + "required": [ + "linkedRedisCacheId", + "linkedRedisCacheLocation", + "serverRole" + ] + }, + "RedisLinkedServerCreateParameters": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/RedisLinkedServerCreateProperties", + "description": "Properties required to create a linked server." + } + }, + "required": [ + "properties" + ], + "description": "Parameter required for creating a linked server to redis cache." + }, + "Operation": { + "description": "REST API operation", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "description": "The object that describes the operation.", + "properties": { + "provider": { + "description": "Friendly name of the resource provider", + "type": "string" + }, + "operation": { + "description": "Operation type: read, write, delete, listKeys/action, etc.", + "type": "string" + }, + "resource": { + "description": "Resource type on which the operation is performed.", + "type": "string" + }, + "description": { + "description": "Friendly name of the operation", + "type": "string" + } + } + } + } + }, + "OperationListResult": { + "description": "Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of operations supported by the resource provider." + }, + "nextLink": { + "type": "string", + "readOnly": true, + "description": "URL to get the next set of operation list results if there are any." + } + } + }, + "CheckNameAvailabilityParameters": { + "description": "Parameters body to pass for resource name availability check.", + "properties": { + "name": { + "type": "string", + "description": "Resource name." + }, + "type": { + "type": "string", + "description": "Resource type. The only legal value of this property for checking redis cache name availability is 'Microsoft.Cache/redis'." + } + }, + "required": [ + "name", + "type" + ] + }, + "UpgradeNotification": { + "properties": { + "name": { + "readOnly": true, + "type": "string", + "description": "Name of upgrade notification." + }, + "timestamp": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "Timestamp when upgrade notification occurred." + }, + "upsellNotification": { + "readOnly": true, + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Details about this upgrade notification" + } + }, + "description": "Properties of upgrade notification." + }, + "NotificationListResponse": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/UpgradeNotification" + }, + "description": "List of all notifications." + }, + "nextLink": { + "type": "string", + "readOnly": true, + "description": "Link for next set of notifications." + } + }, + "description": "The response of listUpgradeNotifications." + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + } +} diff --git a/specification/redis/resource-manager/readme.md b/specification/redis/resource-manager/readme.md index 6c9fadd91e2d..320429f7b641 100644 --- a/specification/redis/resource-manager/readme.md +++ b/specification/redis/resource-manager/readme.md @@ -26,10 +26,18 @@ These are the global settings for the Redis API. ``` yaml openapi-type: arm -tag: package-2020-06 +tag: package-2020-12 ``` +### Tag: package-2020-12 + +These settings apply only when `--tag=package-2020-12` is specified on the command line. + +```yaml $(tag) == 'package-2020-12' +input-file: + - Microsoft.Cache/stable/2020-12-01/redis.json +``` ### Tag: package-2020-06 These settings apply only when `--tag=package-2020-06` is specified on the command line. @@ -38,6 +46,7 @@ These settings apply only when `--tag=package-2020-06` is specified on the comma input-file: - Microsoft.Cache/stable/2020-06-01/redis.json ``` + ### Tag: package-2019-07-preview These settings apply only when `--tag=package-2019-07-preview` is specified on the command line. @@ -242,6 +251,21 @@ directive: - $.definitions.RedisCommonProperties.properties.enableNonSslPort from: redis.json reason: this will result in breaking change + - suppress: R3018 # Booleans are not descriptive and make them hard to use. Consider using string enums with allowed set of values defined. Property: isMaster." + where: + - $.definitions.RedisInstanceDetails.properties.isMaster + from: redis.json + reason: this will result in breaking change + - suppress: R3018 # Booleans are not descriptive and make them hard to use. Consider using string enums with allowed set of values defined. Property: isPrimary" + where: + - $.definitions.RedisInstanceDetails.properties.isPrimary + from: redis.json + reason: this will result in breaking change + - suppress: R3018 # Booleans are not descriptive and make them hard to use. Consider using string enums with allowed set of values defined. Property: isDataAction" + where: + - $.definitions.Operation.properties.isDataAction + from: types.json + reason: its per the RPC specification - suppress: R2017 # PUT request and response should be of same type " where: - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers/{linkedServerName}"].put