Skip to content

Commit

Permalink
PR for new api-version: Microsoft.Cache/redis/stable/2020-12-01 [reba…
Browse files Browse the repository at this point in the history
…sed + refactored] (Azure#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 (Azure#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 (Azure#13005)

* Adding new properties isPrimary and replicasPerPrimary

* Addressing PR feedback

Co-authored-by: Lavanya Singampalli <[email protected]>

* 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 c0e3051.

* 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 <[email protected]>
Co-authored-by: lasingam <[email protected]>
Co-authored-by: Lavanya Singampalli <[email protected]>
  • Loading branch information
4 people authored May 11, 2021
1 parent 8b6e1bf commit fc32868
Show file tree
Hide file tree
Showing 32 changed files with 3,780 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"api-version": "2020-12-01",
"subscriptionId": "subid",
"parameters": {
"type": "Microsoft.Cache/Redis",
"name": "cacheName"
}
},
"responses": {
"200": {}
}
}
Original file line number Diff line number Diff line change
@@ -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": "<primaryKey>",
"secondaryKey": "<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": "<primaryKey>",
"secondaryKey": "<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
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"subscriptionId": "{subscriptionId}",
"resourceGroupName": "rgtest01",
"cacheName": "cachetest01",
"privateEndpointConnectionName": "pectest01",
"api-version": "2020-12-01"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"ruleName": "rule1",
"cacheName": "cache1",
"resourceGroupName": "rg1",
"api-version": "2020-12-01",
"subscriptionId": "subid"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
}
}
}
}
Loading

0 comments on commit fc32868

Please sign in to comment.