Skip to content

Commit 5d117a8

Browse files
tjegbejimbamsyyc
andauthored
Add Check zone peers to Subscription.json (#17050)
* remove name validation from client side * remove name check from deploymentScripts swagger * remove name check from previous swagger versions * remove pattern from resourcegroupname parameter * add checkZonePeers to subscription.json * fix linter and prettier errors * fix spelling errors * fix spelling and descriptions * add descriptions * fix linter issues * fix error responses * fix syntax errors * add description * add reponse body * revert changes to package-lock * Update readme.python.md Co-authored-by: Yuchao Yan <[email protected]>
1 parent e6a2296 commit 5d117a8

File tree

15 files changed

+1182
-0
lines changed

15 files changed

+1182
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-0000-0000-0000-00000000000000",
4+
"api-version": "2021-01-01",
5+
"parameters": {
6+
"location": "eastus",
7+
"subscriptionIds": [
8+
"subscriptions/11111111-1111-1111-1111-111111111111"
9+
]
10+
}
11+
},
12+
"responses": {
13+
"200": {
14+
"body": {
15+
"subscriptionId": "00000000-0000-0000-0000-00000000000000",
16+
"location": "eastus2",
17+
"availabilityZonePeers": [
18+
{
19+
"availabilityZone": "1",
20+
"peers": [
21+
{
22+
"subscriptionId": "11111111-1111-1111-1111-111111111111",
23+
"availabilityZone": "3"
24+
}
25+
]
26+
},
27+
{
28+
"availabilityZone": "2",
29+
"peers": [
30+
{
31+
"subscriptionId": "11111111-1111-1111-1111-111111111111",
32+
"availabilityZone": "2"
33+
}
34+
]
35+
},
36+
{
37+
"availabilityZone": "3",
38+
"peers": [
39+
{
40+
"subscriptionId": "11111111-1111-1111-1111-111111111111",
41+
"availabilityZone": "1"
42+
}
43+
]
44+
}
45+
]
46+
}
47+
}
48+
}
49+
}

specification/resources/resource-manager/Microsoft.Resources/stable/2015-11-01/subscriptions.json

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,51 @@
146146
}
147147
}
148148
},
149+
"/subscriptions/{subscriptionId}/providers/Microsoft.Resources/checkZonePeers/": {
150+
"post": {
151+
"tags": [
152+
"Subscriptions"
153+
],
154+
"operationId": "Subscriptions_CheckZonePeers",
155+
"description": "Compares a subscriptions logical zone mapping",
156+
"parameters": [
157+
{
158+
"$ref": "#/parameters/SubscriptionIdParameter"
159+
},
160+
{
161+
"$ref": "#/parameters/ApiVersionParameter"
162+
},
163+
{
164+
"name": "parameters",
165+
"in": "body",
166+
"required": true,
167+
"schema": {
168+
"$ref": "#/definitions/CheckZonePeersRequest"
169+
},
170+
"description": "Parameters for checking zone peers."
171+
}
172+
],
173+
"responses": {
174+
"200": {
175+
"description": "OK - Returns information about the logical availability zone mapping between subscriptions.",
176+
"schema": {
177+
"$ref": "#/definitions/CheckZonePeersResult"
178+
}
179+
},
180+
"default": {
181+
"description": "Error response describing why the operation failed.",
182+
"schema": {
183+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
184+
}
185+
}
186+
},
187+
"x-ms-examples": {
188+
"GetLogicalZoneMapping": {
189+
"$ref": "./examples/PostCheckZonePeers.json"
190+
}
191+
}
192+
}
193+
},
149194
"/providers/Microsoft.Resources/checkResourceName": {
150195
"post": {
151196
"tags": [
@@ -381,6 +426,79 @@
381426
}
382427
},
383428
"description": "Resource Name valid if not a reserved word, does not contain a reserved word and does not start with a reserved word"
429+
},
430+
"CheckZonePeersRequest": {
431+
"type": "object",
432+
"properties": {
433+
"location": {
434+
"type": "string",
435+
"description": "The Microsoft location."
436+
},
437+
"subscriptionIds": {
438+
"type": "array",
439+
"items": {
440+
"type": "string"
441+
},
442+
"description": "The peer Microsoft Azure subscription ID."
443+
}
444+
},
445+
"description": "Check zone peers request parameters."
446+
},
447+
"CheckZonePeersResult": {
448+
"type": "object",
449+
"description": "Result of the Check zone peers operation.",
450+
"properties": {
451+
"subscriptionId": {
452+
"readOnly": true,
453+
"type": "string",
454+
"description": "The subscription ID."
455+
},
456+
"location": {
457+
"type": "string",
458+
"description": "the location of the subscription."
459+
},
460+
"availabilityZonePeers": {
461+
"type": "array",
462+
"items": {
463+
"$ref": "#/definitions/AvailabilityZonePeers"
464+
},
465+
"description": "The Availability Zones shared by the subscriptions."
466+
}
467+
}
468+
},
469+
"AvailabilityZonePeers": {
470+
"type": "object",
471+
"properties": {
472+
"availabilityZone": {
473+
"readOnly": true,
474+
"type": "string",
475+
"description": "The availabilityZone."
476+
},
477+
"peers": {
478+
"type": "array",
479+
"items": {
480+
"$ref": "#/definitions/Peers"
481+
},
482+
"description": "Details of shared availability zone."
483+
}
484+
},
485+
"description": "List of availability zones shared by the subscriptions."
486+
},
487+
"Peers": {
488+
"type": "object",
489+
"properties": {
490+
"subscriptionId": {
491+
"readOnly": true,
492+
"type": "string",
493+
"description": "The subscription ID."
494+
},
495+
"availabilityZone": {
496+
"readOnly": true,
497+
"type": "string",
498+
"description": "The availabilityZone."
499+
}
500+
},
501+
"description": "Information about shared availability zone."
384502
}
385503
},
386504
"parameters": {
@@ -393,6 +511,14 @@
393511
},
394512
"x-ms-parameter-location": "method"
395513
},
514+
"SubscriptionIdParameter": {
515+
"name": "subscriptionId",
516+
"in": "path",
517+
"required": true,
518+
"type": "string",
519+
"description": "The ID of the target subscription.",
520+
"x-ms-parameter-location": "method"
521+
},
396522
"ApiVersionParameter": {
397523
"name": "api-version",
398524
"in": "query",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-0000-0000-0000-00000000000000",
4+
"api-version": "2021-01-01",
5+
"parameters": {
6+
"location": "eastus",
7+
"subscriptionIds": [
8+
"subscriptions/11111111-1111-1111-1111-111111111111"
9+
]
10+
}
11+
},
12+
"responses": {
13+
"200": {
14+
"body": {
15+
"subscriptionId": "00000000-0000-0000-0000-00000000000000",
16+
"location": "eastus2",
17+
"availabilityZonePeers": [
18+
{
19+
"availabilityZone": "1",
20+
"peers": [
21+
{
22+
"subscriptionId": "11111111-1111-1111-1111-111111111111",
23+
"availabilityZone": "3"
24+
}
25+
]
26+
},
27+
{
28+
"availabilityZone": "2",
29+
"peers": [
30+
{
31+
"subscriptionId": "11111111-1111-1111-1111-111111111111",
32+
"availabilityZone": "2"
33+
}
34+
]
35+
},
36+
{
37+
"availabilityZone": "3",
38+
"peers": [
39+
{
40+
"subscriptionId": "11111111-1111-1111-1111-111111111111",
41+
"availabilityZone": "1"
42+
}
43+
]
44+
}
45+
]
46+
}
47+
}
48+
}
49+
}

specification/resources/resource-manager/Microsoft.Resources/stable/2016-06-01/subscriptions.json

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,51 @@
163163
}
164164
}
165165
},
166+
"/subscriptions/{subscriptionId}/providers/Microsoft.Resources/checkZonePeers/": {
167+
"post": {
168+
"tags": [
169+
"Subscriptions"
170+
],
171+
"operationId": "Subscriptions_CheckZonePeers",
172+
"description": "Compares a subscriptions logical zone mapping",
173+
"parameters": [
174+
{
175+
"$ref": "#/parameters/SubscriptionIdParameter"
176+
},
177+
{
178+
"$ref": "#/parameters/ApiVersionParameter"
179+
},
180+
{
181+
"name": "parameters",
182+
"in": "body",
183+
"required": true,
184+
"schema": {
185+
"$ref": "#/definitions/CheckZonePeersRequest"
186+
},
187+
"description": "Parameters for checking zone peers."
188+
}
189+
],
190+
"responses": {
191+
"200": {
192+
"description": "OK - Returns information about the logical availability zone mapping between subscriptions.",
193+
"schema": {
194+
"$ref": "#/definitions/CheckZonePeersResult"
195+
}
196+
},
197+
"default": {
198+
"description": "Error response describing why the operation failed.",
199+
"schema": {
200+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
201+
}
202+
}
203+
},
204+
"x-ms-examples": {
205+
"GetLogicalZoneMapping": {
206+
"$ref": "./examples/PostCheckZonePeers.json"
207+
}
208+
}
209+
}
210+
},
166211
"/providers/Microsoft.Resources/checkResourceName": {
167212
"post": {
168213
"tags": [
@@ -488,6 +533,79 @@
488533
"description": "URL to get the next set of operation list results if there are any."
489534
}
490535
}
536+
},
537+
"CheckZonePeersRequest": {
538+
"type": "object",
539+
"properties": {
540+
"location": {
541+
"type": "string",
542+
"description": "The Microsoft location."
543+
},
544+
"subscriptionIds": {
545+
"type": "array",
546+
"items": {
547+
"type": "string"
548+
},
549+
"description": "The peer Microsoft Azure subscription ID."
550+
}
551+
},
552+
"description": "Check zone peers request parameters."
553+
},
554+
"CheckZonePeersResult": {
555+
"type": "object",
556+
"description": "Result of the Check zone peers operation.",
557+
"properties": {
558+
"subscriptionId": {
559+
"readOnly": true,
560+
"type": "string",
561+
"description": "The subscription ID."
562+
},
563+
"location": {
564+
"type": "string",
565+
"description": "the location of the subscription."
566+
},
567+
"availabilityZonePeers": {
568+
"type": "array",
569+
"items": {
570+
"$ref": "#/definitions/AvailabilityZonePeers"
571+
},
572+
"description": "The Availability Zones shared by the subscriptions."
573+
}
574+
}
575+
},
576+
"AvailabilityZonePeers": {
577+
"type": "object",
578+
"properties": {
579+
"availabilityZone": {
580+
"readOnly": true,
581+
"type": "string",
582+
"description": "The availabilityZone."
583+
},
584+
"peers": {
585+
"type": "array",
586+
"items": {
587+
"$ref": "#/definitions/Peers"
588+
},
589+
"description": "Details of shared availability zone."
590+
}
591+
},
592+
"description": "List of availability zones shared by the subscriptions."
593+
},
594+
"Peers": {
595+
"type": "object",
596+
"properties": {
597+
"subscriptionId": {
598+
"readOnly": true,
599+
"type": "string",
600+
"description": "The subscription ID."
601+
},
602+
"availabilityZone": {
603+
"readOnly": true,
604+
"type": "string",
605+
"description": "The availabilityZone."
606+
}
607+
},
608+
"description": "Information about shared availability zone."
491609
}
492610
},
493611
"parameters": {

0 commit comments

Comments
 (0)