Skip to content

Commit

Permalink
Add Check zone peers to Subscription.json (#17050)
Browse files Browse the repository at this point in the history
* 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 <yuchaoyan@microsoft.com>
  • Loading branch information
tjegbejimba and msyyc authored Jan 12, 2022
1 parent e6a2296 commit 5d117a8
Show file tree
Hide file tree
Showing 15 changed files with 1,182 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-00000000000000",
"api-version": "2021-01-01",
"parameters": {
"location": "eastus",
"subscriptionIds": [
"subscriptions/11111111-1111-1111-1111-111111111111"
]
}
},
"responses": {
"200": {
"body": {
"subscriptionId": "00000000-0000-0000-0000-00000000000000",
"location": "eastus2",
"availabilityZonePeers": [
{
"availabilityZone": "1",
"peers": [
{
"subscriptionId": "11111111-1111-1111-1111-111111111111",
"availabilityZone": "3"
}
]
},
{
"availabilityZone": "2",
"peers": [
{
"subscriptionId": "11111111-1111-1111-1111-111111111111",
"availabilityZone": "2"
}
]
},
{
"availabilityZone": "3",
"peers": [
{
"subscriptionId": "11111111-1111-1111-1111-111111111111",
"availabilityZone": "1"
}
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,51 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Resources/checkZonePeers/": {
"post": {
"tags": [
"Subscriptions"
],
"operationId": "Subscriptions_CheckZonePeers",
"description": "Compares a subscriptions logical zone mapping",
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CheckZonePeersRequest"
},
"description": "Parameters for checking zone peers."
}
],
"responses": {
"200": {
"description": "OK - Returns information about the logical availability zone mapping between subscriptions.",
"schema": {
"$ref": "#/definitions/CheckZonePeersResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"GetLogicalZoneMapping": {
"$ref": "./examples/PostCheckZonePeers.json"
}
}
}
},
"/providers/Microsoft.Resources/checkResourceName": {
"post": {
"tags": [
Expand Down Expand Up @@ -381,6 +426,79 @@
}
},
"description": "Resource Name valid if not a reserved word, does not contain a reserved word and does not start with a reserved word"
},
"CheckZonePeersRequest": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The Microsoft location."
},
"subscriptionIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "The peer Microsoft Azure subscription ID."
}
},
"description": "Check zone peers request parameters."
},
"CheckZonePeersResult": {
"type": "object",
"description": "Result of the Check zone peers operation.",
"properties": {
"subscriptionId": {
"readOnly": true,
"type": "string",
"description": "The subscription ID."
},
"location": {
"type": "string",
"description": "the location of the subscription."
},
"availabilityZonePeers": {
"type": "array",
"items": {
"$ref": "#/definitions/AvailabilityZonePeers"
},
"description": "The Availability Zones shared by the subscriptions."
}
}
},
"AvailabilityZonePeers": {
"type": "object",
"properties": {
"availabilityZone": {
"readOnly": true,
"type": "string",
"description": "The availabilityZone."
},
"peers": {
"type": "array",
"items": {
"$ref": "#/definitions/Peers"
},
"description": "Details of shared availability zone."
}
},
"description": "List of availability zones shared by the subscriptions."
},
"Peers": {
"type": "object",
"properties": {
"subscriptionId": {
"readOnly": true,
"type": "string",
"description": "The subscription ID."
},
"availabilityZone": {
"readOnly": true,
"type": "string",
"description": "The availabilityZone."
}
},
"description": "Information about shared availability zone."
}
},
"parameters": {
Expand All @@ -393,6 +511,14 @@
},
"x-ms-parameter-location": "method"
},
"SubscriptionIdParameter": {
"name": "subscriptionId",
"in": "path",
"required": true,
"type": "string",
"description": "The ID of the target subscription.",
"x-ms-parameter-location": "method"
},
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-00000000000000",
"api-version": "2021-01-01",
"parameters": {
"location": "eastus",
"subscriptionIds": [
"subscriptions/11111111-1111-1111-1111-111111111111"
]
}
},
"responses": {
"200": {
"body": {
"subscriptionId": "00000000-0000-0000-0000-00000000000000",
"location": "eastus2",
"availabilityZonePeers": [
{
"availabilityZone": "1",
"peers": [
{
"subscriptionId": "11111111-1111-1111-1111-111111111111",
"availabilityZone": "3"
}
]
},
{
"availabilityZone": "2",
"peers": [
{
"subscriptionId": "11111111-1111-1111-1111-111111111111",
"availabilityZone": "2"
}
]
},
{
"availabilityZone": "3",
"peers": [
{
"subscriptionId": "11111111-1111-1111-1111-111111111111",
"availabilityZone": "1"
}
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,51 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Resources/checkZonePeers/": {
"post": {
"tags": [
"Subscriptions"
],
"operationId": "Subscriptions_CheckZonePeers",
"description": "Compares a subscriptions logical zone mapping",
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CheckZonePeersRequest"
},
"description": "Parameters for checking zone peers."
}
],
"responses": {
"200": {
"description": "OK - Returns information about the logical availability zone mapping between subscriptions.",
"schema": {
"$ref": "#/definitions/CheckZonePeersResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"GetLogicalZoneMapping": {
"$ref": "./examples/PostCheckZonePeers.json"
}
}
}
},
"/providers/Microsoft.Resources/checkResourceName": {
"post": {
"tags": [
Expand Down Expand Up @@ -488,6 +533,79 @@
"description": "URL to get the next set of operation list results if there are any."
}
}
},
"CheckZonePeersRequest": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The Microsoft location."
},
"subscriptionIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "The peer Microsoft Azure subscription ID."
}
},
"description": "Check zone peers request parameters."
},
"CheckZonePeersResult": {
"type": "object",
"description": "Result of the Check zone peers operation.",
"properties": {
"subscriptionId": {
"readOnly": true,
"type": "string",
"description": "The subscription ID."
},
"location": {
"type": "string",
"description": "the location of the subscription."
},
"availabilityZonePeers": {
"type": "array",
"items": {
"$ref": "#/definitions/AvailabilityZonePeers"
},
"description": "The Availability Zones shared by the subscriptions."
}
}
},
"AvailabilityZonePeers": {
"type": "object",
"properties": {
"availabilityZone": {
"readOnly": true,
"type": "string",
"description": "The availabilityZone."
},
"peers": {
"type": "array",
"items": {
"$ref": "#/definitions/Peers"
},
"description": "Details of shared availability zone."
}
},
"description": "List of availability zones shared by the subscriptions."
},
"Peers": {
"type": "object",
"properties": {
"subscriptionId": {
"readOnly": true,
"type": "string",
"description": "The subscription ID."
},
"availabilityZone": {
"readOnly": true,
"type": "string",
"description": "The availabilityZone."
}
},
"description": "Information about shared availability zone."
}
},
"parameters": {
Expand Down
Loading

0 comments on commit 5d117a8

Please sign in to comment.