Skip to content

Commit fc32868

Browse files
TimLovellSmithMECHANDRlasingamLavanya Singampalli
authored
PR for new api-version: Microsoft.Cache/redis/stable/2020-12-01 [rebased + 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 <lasingam@microsoft.com> * 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 <30642185+MECHANDR@users.noreply.github.com> Co-authored-by: lasingam <68033674+lasingam@users.noreply.github.com> Co-authored-by: Lavanya Singampalli <lasingam@microsoft.com>
1 parent 8b6e1bf commit fc32868

32 files changed

+3780
-1
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-12-01",
4+
"subscriptionId": "subid",
5+
"parameters": {
6+
"type": "Microsoft.Cache/Redis",
7+
"name": "cacheName"
8+
}
9+
},
10+
"responses": {
11+
"200": {}
12+
}
13+
}
Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
{
2+
"parameters": {
3+
"name": "cache1",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2020-12-01",
6+
"subscriptionId": "subid",
7+
"parameters": {
8+
"location": "West US",
9+
"zones": [
10+
"1"
11+
],
12+
"properties": {
13+
"sku": {
14+
"name": "Premium",
15+
"family": "P",
16+
"capacity": 1
17+
},
18+
"redisVersion": "4",
19+
"enableNonSslPort": true,
20+
"shardCount": 2,
21+
"replicasPerPrimary": 2,
22+
"redisConfiguration": {
23+
"maxmemory-policy": "allkeys-lru"
24+
},
25+
"subnetId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1",
26+
"staticIP": "192.168.0.5",
27+
"minimumTlsVersion": "1.2"
28+
}
29+
}
30+
},
31+
"responses": {
32+
"201": {
33+
"body": {
34+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1",
35+
"location": "West US",
36+
"zones": [
37+
"1"
38+
],
39+
"name": "cache1",
40+
"type": "Microsoft.Cache/Redis",
41+
"tags": {},
42+
"properties": {
43+
"accessKeys": {
44+
"primaryKey": "<primaryKey>",
45+
"secondaryKey": "<secondaryKey>"
46+
},
47+
"provisioningState": "Succeeded",
48+
"redisVersion": "4.0.14",
49+
"sku": {
50+
"name": "Premium",
51+
"family": "P",
52+
"capacity": 1
53+
},
54+
"enableNonSslPort": false,
55+
"replicasPerMaster": 2,
56+
"replicasPerPrimary": 2,
57+
"redisConfiguration": {
58+
"maxmemory-policy": "allkeys-lru"
59+
},
60+
"hostName": "cache1.redis.cache.windows.net",
61+
"port": 6379,
62+
"sslPort": 6380,
63+
"minimumTlsVersion": "1.2",
64+
"instances": [
65+
{
66+
"sslPort": 15000,
67+
"nonSslPort": 13000,
68+
"zone": "1",
69+
"shardId": 0,
70+
"isMaster": true,
71+
"isPrimary": true
72+
},
73+
{
74+
"sslPort": 15001,
75+
"nonSslPort": 13001,
76+
"zone": "1",
77+
"shardId": 0,
78+
"isMaster": false,
79+
"isPrimary": false
80+
},
81+
{
82+
"sslPort": 15002,
83+
"nonSslPort": 13002,
84+
"zone": "1",
85+
"shardId": 0,
86+
"isMaster": false,
87+
"isPrimary": false
88+
},
89+
{
90+
"sslPort": 15003,
91+
"nonSslPort": 13003,
92+
"zone": "1",
93+
"shardId": 1,
94+
"isMaster": true,
95+
"isPrimary": true
96+
},
97+
{
98+
"sslPort": 15004,
99+
"nonSslPort": 13004,
100+
"zone": "1",
101+
"shardId": 1,
102+
"isMaster": false,
103+
"isPrimary": false
104+
},
105+
{
106+
"sslPort": 15005,
107+
"nonSslPort": 13005,
108+
"zone": "1",
109+
"shardId": 1,
110+
"isMaster": false,
111+
"isPrimary": false
112+
}
113+
]
114+
}
115+
}
116+
},
117+
"200": {
118+
"body": {
119+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1",
120+
"location": "West US",
121+
"zones": [
122+
"1"
123+
],
124+
"name": "cache1",
125+
"type": "Microsoft.Cache/Redis",
126+
"tags": {},
127+
"properties": {
128+
"accessKeys": {
129+
"primaryKey": "<primaryKey>",
130+
"secondaryKey": "<secondaryKey>"
131+
},
132+
"provisioningState": "Succeeded",
133+
"redisVersion": "3.0",
134+
"sku": {
135+
"name": "Premium",
136+
"family": "P",
137+
"capacity": 1
138+
},
139+
"enableNonSslPort": false,
140+
"replicasPerMaster": 2,
141+
"replicasPerPrimary": 2,
142+
"redisConfiguration": {
143+
"maxclients": "1000",
144+
"maxmemory-reserved": "50",
145+
"maxmemory-delta": "50"
146+
},
147+
"hostName": "cache1.redis.cache.windows.net",
148+
"port": 6379,
149+
"sslPort": 6380,
150+
"minimumTlsVersion": "1.2",
151+
"instances": [
152+
{
153+
"sslPort": 15000,
154+
"nonSslPort": 13000,
155+
"zone": "1",
156+
"shardId": 0,
157+
"isMaster": true,
158+
"isPrimary": true
159+
},
160+
{
161+
"sslPort": 15001,
162+
"nonSslPort": 13001,
163+
"zone": "1",
164+
"shardId": 0,
165+
"isMaster": false,
166+
"isPrimary": false
167+
},
168+
{
169+
"sslPort": 15002,
170+
"nonSslPort": 13002,
171+
"zone": "1",
172+
"shardId": 0,
173+
"isMaster": false,
174+
"isPrimary": false
175+
},
176+
{
177+
"sslPort": 15003,
178+
"nonSslPort": 13003,
179+
"zone": "1",
180+
"shardId": 1,
181+
"isMaster": true,
182+
"isPrimary": true
183+
},
184+
{
185+
"sslPort": 15004,
186+
"nonSslPort": 13004,
187+
"zone": "1",
188+
"shardId": 1,
189+
"isMaster": false,
190+
"isPrimary": false
191+
},
192+
{
193+
"sslPort": 15005,
194+
"nonSslPort": 13005,
195+
"zone": "1",
196+
"shardId": 1,
197+
"isMaster": false,
198+
"isPrimary": false
199+
}
200+
]
201+
}
202+
}
203+
}
204+
}
205+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"parameters": {
3+
"name": "cache1",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2020-12-01",
6+
"subscriptionId": "subid"
7+
},
8+
"responses": {
9+
"200": {},
10+
"202": {
11+
"headers": {
12+
"location": "https://management.azure.com/subscriptions/subid/providers/Microsoft.Cache/...pathToOperationResult..."
13+
}
14+
},
15+
"204": {}
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscriptionId}",
4+
"resourceGroupName": "rgtest01",
5+
"cacheName": "cachetest01",
6+
"privateEndpointConnectionName": "pectest01",
7+
"api-version": "2020-12-01"
8+
},
9+
"responses": {
10+
"200": {},
11+
"204": {}
12+
}
13+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"parameters": {
3+
"name": "cache1",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2020-12-01",
6+
"subscriptionId": "subid",
7+
"parameters": {
8+
"format": "RDB",
9+
"prefix": "datadump1",
10+
"container": "https://contosostorage.blob.core.window.net/urltoBlobContainer?sasKeyParameters"
11+
}
12+
},
13+
"responses": {
14+
"200": {},
15+
"202": {
16+
"headers": {
17+
"location": "https://management.azure.com/subscriptions/subid/providers/Microsoft.Cache/...pathToOperationResult..."
18+
}
19+
},
20+
"204": {}
21+
}
22+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"parameters": {
3+
"ruleName": "rule1",
4+
"cacheName": "cache1",
5+
"resourceGroupName": "rg1",
6+
"api-version": "2020-12-01",
7+
"subscriptionId": "subid",
8+
"parameters": {
9+
"properties": {
10+
"startIP": "192.168.1.1",
11+
"endIP": "192.168.1.4"
12+
}
13+
}
14+
},
15+
"responses": {
16+
"200": {
17+
"body": {
18+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1",
19+
"name": "cache1/rule1",
20+
"type": "Microsoft.Cache/Redis/firewallRules",
21+
"properties": {
22+
"startIP": "192.168.1.1",
23+
"endIP": "192.168.1.4"
24+
}
25+
}
26+
},
27+
"201": {
28+
"body": {
29+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1",
30+
"name": "cache1/rule1",
31+
"type": "Microsoft.Cache/Redis/firewallRules",
32+
"properties": {
33+
"startIP": "192.168.1.1",
34+
"endIP": "192.168.1.4"
35+
}
36+
}
37+
}
38+
}
39+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters": {
3+
"ruleName": "rule1",
4+
"cacheName": "cache1",
5+
"resourceGroupName": "rg1",
6+
"api-version": "2020-12-01",
7+
"subscriptionId": "subid"
8+
},
9+
"responses": {
10+
"200": {},
11+
"204": {}
12+
}
13+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"parameters": {
3+
"ruleName": "rule1",
4+
"cacheName": "cache1",
5+
"resourceGroupName": "rg1",
6+
"api-version": "2020-12-01",
7+
"subscriptionId": "subid"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1",
13+
"name": "cache1/rule1",
14+
"type": "Microsoft.Cache/Redis/firewallRules",
15+
"properties": {
16+
"startIP": "192.168.1.1",
17+
"endIP": "192.168.1.4"
18+
}
19+
}
20+
}
21+
}
22+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"parameters": {
3+
"cacheName": "cache1",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2020-12-01",
6+
"subscriptionId": "subid"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"value": [
12+
{
13+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1",
14+
"name": "rule1",
15+
"type": "Microsoft.Cache/Redis/firewallRules",
16+
"properties": {
17+
"startIP": "192.168.1.1",
18+
"endIP": "192.168.1.4"
19+
}
20+
},
21+
{
22+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule2",
23+
"name": "rule2",
24+
"type": "Microsoft.Cache/Redis/firewallRules",
25+
"properties": {
26+
"startIP": "192.169.1.0",
27+
"endIP": "192.169.1.255"
28+
}
29+
}
30+
]
31+
}
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)