From 4362846b73d6cabd4a700ac2cc63d177afd87e5f Mon Sep 17 00:00:00 2001 From: ezgambac <52840484+ezgambac@users.noreply.github.com> Date: Mon, 25 Nov 2019 13:22:40 -0800 Subject: [PATCH 01/10] Adds base for updating Microsoft.Resources from version stable/2019-06-01 to version 2019-11-01 --- .../2019-11-01/examples/GetSubscription.json | 28 ++ .../2019-11-01/examples/GetSubscriptions.json | 53 +++ .../stable/2019-11-01/subscriptions.json | 439 ++++++++++++++++++ 3 files changed, 520 insertions(+) create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscription.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscriptions.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscription.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscription.json new file mode 100644 index 000000000000..ce435f660b20 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscription.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "api-version": "2019-06-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "tenantId": "31c75423-32d6-4322-88b7-c478bdde4858", + "displayName": "Example Subscription", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + }, + "authorizationSource": "Bypassed", + "managedByTenants": [ + { + "tenantId": "8f70baf1-1f6e-46a2-a1ff-238dac1ebfb7" + } + ] + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscriptions.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscriptions.json new file mode 100644 index 000000000000..c09fdeb0d321 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscriptions.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2019-06-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "tenantId": "31c75423-32d6-4322-88b7-c478bdde4858", + "displayName": "Example Subscription", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + }, + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "8f70baf1-1f6e-46a2-a1ff-238dac1ebfb7" + } + ] + }, + { + "id": "/subscriptions/72ac930a-f34e-42d8-b06d-dc2a9e12ed71", + "subscriptionId": "72ac930a-f34e-42d8-b06d-dc2a9e12ed71", + "tenantId": "2a0ff0de-96b2-4859-bb7c-a430d07a3e0c", + "displayName": "Example Subscription2", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + }, + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "8f70baf1-1f6e-46a2-a1ff-238dac1ebfb7" + }, + { + "tenantId": "f7fb6af2-321d-47c8-9c0f-b0239eaad39a" + } + ] + } + ], + "nextLink": "..." + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json new file mode 100644 index 000000000000..628544a10093 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json @@ -0,0 +1,439 @@ +{ + "swagger": "2.0", + "info": { + "title": "SubscriptionClient", + "version": "2019-06-01", + "description": "All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization." + }, + "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.Resources/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available Microsoft.Resources REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/locations": { + "get": { + "tags": [ + "Subscriptions" + ], + "operationId": "Subscriptions_ListLocations", + "summary": "Gets all available geo-locations.", + "description": "This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of locations.", + "schema": { + "$ref": "#/definitions/LocationListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}": { + "get": { + "tags": [ + "Subscriptions" + ], + "operationId": "Subscriptions_Get", + "description": "Gets details about a specified subscription.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the subscription.", + "schema": { + "$ref": "#/definitions/Subscription" + } + } + }, + "x-ms-examples": { + "Get a single subscription.": { + "$ref": "./examples/GetSubscription.json" + } + } + } + }, + "/subscriptions": { + "get": { + "tags": [ + "Subscriptions" + ], + "operationId": "Subscriptions_List", + "description": "Gets all subscriptions for a tenant.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of subscriptions.", + "schema": { + "$ref": "#/definitions/SubscriptionListResult" + } + } + }, + "x-ms-examples": { + "Get all subscriptions.": { + "$ref": "./examples/GetSubscriptions.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/tenants": { + "get": { + "tags": [ + "Tenants" + ], + "operationId": "Tenants_List", + "description": "Gets the tenants for your account.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of tenants.", + "schema": { + "$ref": "#/definitions/TenantListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "Location": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus." + }, + "subscriptionId": { + "readOnly": true, + "type": "string", + "description": "The subscription ID." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The location name." + }, + "displayName": { + "readOnly": true, + "type": "string", + "description": "The display name of the location." + }, + "latitude": { + "readOnly": true, + "type": "string", + "description": "The latitude of the location." + }, + "longitude": { + "readOnly": true, + "type": "string", + "description": "The longitude of the location." + } + }, + "description": "Location information." + }, + "LocationListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Location" + }, + "description": "An array of locations." + } + }, + "description": "Location list operation response." + }, + "Subscription": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The fully qualified ID for the subscription. For example, /subscriptions/00000000-0000-0000-0000-000000000000." + }, + "subscriptionId": { + "readOnly": true, + "type": "string", + "description": "The subscription ID." + }, + "displayName": { + "readOnly": true, + "type": "string", + "description": "The subscription display name." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The subscription tenant ID." + }, + "state": { + "readOnly": true, + "type": "string", + "description": "The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted.", + "enum": [ + "Enabled", + "Warned", + "PastDue", + "Disabled", + "Deleted" + ], + "x-ms-enum": { + "name": "SubscriptionState", + "modelAsString": false + } + }, + "subscriptionPolicies": { + "$ref": "#/definitions/SubscriptionPolicies", + "description": "The subscription policies." + }, + "authorizationSource": { + "type": "string", + "description": "The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'." + }, + "managedByTenants": { + "type": "array", + "items": { + "$ref": "#/definitions/ManagedByTenant" + }, + "description": "An array containing the tenants managing the subscription." + } + }, + "description": "Subscription information." + }, + "SubscriptionPolicies": { + "properties": { + "locationPlacementId": { + "readOnly": true, + "type": "string", + "description": "The subscription location placement ID. The ID indicates which regions are visible for a subscription. For example, a subscription with a location placement Id of Public_2014-09-01 has access to Azure public regions." + }, + "quotaId": { + "readOnly": true, + "type": "string", + "description": "The subscription quota ID." + }, + "spendingLimit": { + "readOnly": true, + "type": "string", + "description": "The subscription spending limit.", + "enum": [ + "On", + "Off", + "CurrentPeriodOff" + ], + "x-ms-enum": { + "name": "spendingLimit", + "modelAsString": false + } + } + }, + "description": "Subscription policies." + }, + "ManagedByTenant": { + "properties": { + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of the managing tenant. This is a GUID." + } + }, + "description": "Information about a tenant managing the subscription." + }, + "SubscriptionListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Subscription" + }, + "description": "An array of subscriptions." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of results." + } + }, + "required": [ + "nextLink" + ], + "description": "Subscription list operation response." + }, + "TenantIdDescription": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The fully qualified ID of the tenant. For example, /tenants/00000000-0000-0000-0000-000000000000." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID. For example, 00000000-0000-0000-0000-000000000000." + } + }, + "description": "Tenant Id information." + }, + "TenantListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/TenantIdDescription" + }, + "description": "An array of tenants." + }, + "nextLink": { + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "required": [ + "nextLink" + ], + "description": "Tenant Ids information." + }, + "Operation": { + "description": "Microsoft.Resources operation", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Resources", + "type": "string" + }, + "resource": { + "description": "Resource on which the operation is performed: Profile, endpoint, etc.", + "type": "string" + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string" + }, + "description": { + "description": "Description of the operation.", + "type": "string" + } + } + } + } + }, + "OperationListResult": { + "description": "Result of the request to list Microsoft.Resources operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of Microsoft.Resources operations." + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of operation list results if there are any." + } + } + } + }, + "parameters": { + "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", + "required": true, + "type": "string", + "description": "The API version to use for the operation.", + "x-ms-parameter-location": "client" + } + } +} From dc40dbc3c072493d9fc5a70c7086400586a45d0d Mon Sep 17 00:00:00 2001 From: ezgambac <52840484+ezgambac@users.noreply.github.com> Date: Mon, 25 Nov 2019 13:23:01 -0800 Subject: [PATCH 02/10] Updates readme --- .../resources/resource-manager/readme.md | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/specification/resources/resource-manager/readme.md b/specification/resources/resource-manager/readme.md index 7d015cbc165d..2eb69d62d242 100644 --- a/specification/resources/resource-manager/readme.md +++ b/specification/resources/resource-manager/readme.md @@ -57,12 +57,22 @@ tag: package-managedapplications-2018-06 ``` ``` yaml $(package-deploymentscripts) -tag: package-deploymentscripts-2019-10-preview +tag: package-2019-11 ``` + +### Tag: package-2019-11 + +These settings apply only when `--tag=package-2019-11` is specified on the command line. + +```yaml $(tag) == 'package-2019-11' +input-file: + - Microsoft.Resources/stable/2019-11-01/subscriptions.json +``` ### Tag: package-resources-2019-10-preview + These settings apply only when `--tag=package-deploymentscripts-2019-10-preview` is specified on the command line. - + ``` yaml $(tag) == 'package-deploymentscripts-2019-10-preview' input-file: - Microsoft.Resources/preview/2019-10-01-preview/deploymentScripts.json @@ -394,6 +404,7 @@ input-file: ``` ### Tag: package-managedapplications-2019-07 + These settings apply only when `--tag=package-managedapplications-2019-07` is specified on the command line. ``` yaml $(tag) == 'package-managedapplications-2019-07' @@ -581,7 +592,7 @@ input-file: - Microsoft.Resources/stable/2018-05-01/resources.json ``` -## Multi-API/Profile support for AutoRest v3 generators +## Multi-API/Profile support for AutoRest v3 generators AutoRest V3 generators require the use of `--tag=all-api-versions` to select api files. @@ -643,11 +654,10 @@ input-file: ``` -If there are files that should not be in the `all-api-versions` set, +If there are files that should not be in the `all-api-versions` set, uncomment the `exclude-file` section below and add the file paths. ``` yaml $(tag) == 'all-api-versions' #exclude-file: # - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json ``` - From 37e0751605bd5a3745e7004074b4a8cf7ad50ed7 Mon Sep 17 00:00:00 2001 From: ezgambac <52840484+ezgambac@users.noreply.github.com> Date: Mon, 25 Nov 2019 13:23:03 -0800 Subject: [PATCH 03/10] Updates API version in new specs and examples --- .../stable/2019-11-01/examples/GetSubscription.json | 2 +- .../stable/2019-11-01/examples/GetSubscriptions.json | 2 +- .../Microsoft.Resources/stable/2019-11-01/subscriptions.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscription.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscription.json index ce435f660b20..087ec2b7b555 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscription.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscription.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", - "api-version": "2019-06-01" + "api-version": "2019-11-01" }, "responses": { "200": { diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscriptions.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscriptions.json index c09fdeb0d321..98c7aad42602 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscriptions.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetSubscriptions.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2019-06-01" + "api-version": "2019-11-01" }, "responses": { "200": { diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json index 628544a10093..05161d0ce73f 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "SubscriptionClient", - "version": "2019-06-01", + "version": "2019-11-01", "description": "All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization." }, "host": "management.azure.com", From 38349a56c796d82ee4ce711072ef713405c42e35 Mon Sep 17 00:00:00 2001 From: Ezequiel Gambaccini Date: Mon, 25 Nov 2019 13:42:47 -0800 Subject: [PATCH 04/10] Updated definition for locations --- .../stable/2019-11-01/subscriptions.json | 49 ++++++++++++++++--- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json index 05161d0ce73f..87166297c10c 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json @@ -175,6 +175,45 @@ } }, "definitions": { + "LocationMetadata": { + "properties": { + "regionType":{ + "readOnly": true, + "type":"string", + "description": "The type of the region (Physical|Logical)." + }, + "regionCategory": { + "readOnly": true, + "type": "string", + "description": "The category of the region (Recommended|Other)." + }, + "geographyGroup":{ + "readOnly": true, + "type": "string", + "description": "The geography group of the location." + }, + "longitude": { + "readOnly": true, + "type": "string", + "description": "The longitude of the location." + }, + "latitude": { + "readOnly": true, + "type": "string", + "description": "The latitude of the location." + }, + "physicalLocation": { + "readOnly": true, + "type": "string", + "description": "The physical location of the Azure location." + }, + "pairedRegion": { + "readOnly": true, + "type": "string", + "description": "The region paired to this region." + } + } + }, "Location": { "properties": { "id": { @@ -197,15 +236,13 @@ "type": "string", "description": "The display name of the location." }, - "latitude": { + "regionalDisplayName":{ "readOnly": true, "type": "string", - "description": "The latitude of the location." + "description": "The display name of the location and its region." }, - "longitude": { - "readOnly": true, - "type": "string", - "description": "The longitude of the location." + "metadata":{ + "$ref": "#/definitions/LocationMetadata" } }, "description": "Location information." From ebce3355a68d598609eb59c1cc15e27aa34b095b Mon Sep 17 00:00:00 2001 From: Ezequiel Gambaccini Date: Mon, 25 Nov 2019 13:51:58 -0800 Subject: [PATCH 05/10] Changed type to enums instead of just strings --- .../stable/2019-11-01/subscriptions.json | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json index 87166297c10c..d4f69322faef 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json @@ -180,12 +180,28 @@ "regionType":{ "readOnly": true, "type":"string", - "description": "The type of the region (Physical|Logical)." + "description": "The type of the region.", + "enum": [ + "Physical", + "Logical" + ], + "x-ms-enum": { + "name": "RegionType", + "modelAsString": true + } }, "regionCategory": { "readOnly": true, "type": "string", - "description": "The category of the region (Recommended|Other)." + "description": "The category of the region.", + "enum": [ + "Recommended", + "Other" + ], + "x-ms-enum": { + "name": "RegionCategory", + "modelAsString": true + } }, "geographyGroup":{ "readOnly": true, From 89687847a8584be3fd2af7bd718caf5613e6b5c5 Mon Sep 17 00:00:00 2001 From: Ezequiel Gambaccini Date: Mon, 25 Nov 2019 14:05:29 -0800 Subject: [PATCH 06/10] Added new examples for locations api --- .../2019-11-01/examples/GetLocations.json | 52 +++++++++++++++++++ .../stable/2019-11-01/subscriptions.json | 42 ++++++++++++--- 2 files changed, 86 insertions(+), 8 deletions(-) create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetLocations.json diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetLocations.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetLocations.json new file mode 100644 index 000000000000..8b624a044b0e --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetLocations.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "api-version": "2019-11-01" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/centralus", + "name": "centralus", + "displayName": "Central US", + "regionalDisplayName": "(US) Central US", + "metadata": { + "regionType": "Physical", + "regionCategory": "Recommended", + "geographyGroup": "US", + "longitude": "-93.6208", + "latitude": "41.5908", + "physicalLocation": "Iowa", + "pairedRegion": [ + { + "name": "eastus2", + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/eastus2" + } + ] + } + }, + { + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/eastasia", + "name": "eastasia", + "displayName": "East Asia", + "regionalDisplayName": "(Asia Pacific) East Asia", + "metadata": { + "regionType": "Physical", + "regionCategory": "Recommended", + "geographyGroup": "Asia Pacific", + "longitude": "114.188", + "latitude": "22.267", + "physicalLocation": "Hong Kong", + "pairedRegion": [ + { + "name": "southeastasia", + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/southeastasia" + } + ] + } + } + ] + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json index d4f69322faef..fea1f8371342 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json @@ -85,6 +85,11 @@ }, "x-ms-pageable": { "nextLinkName": null + }, + "x-ms-examples": { + "Get locations with a subscription id": { + "$ref": "./examples/GetLocations.json" + } } } }, @@ -175,11 +180,30 @@ } }, "definitions": { + "PairedRegion": { + "properties": { + "name": { + "type": "string", + "readOnly": true, + "description": "The name of the paired region." + }, + "id": { + "readOnly": true, + "type": "string", + "description": "The fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus." + }, + "subscriptionId": { + "readOnly": true, + "type": "string", + "description": "The subscription ID." + } + } + }, "LocationMetadata": { "properties": { - "regionType":{ + "regionType": { "readOnly": true, - "type":"string", + "type": "string", "description": "The type of the region.", "enum": [ "Physical", @@ -203,7 +227,7 @@ "modelAsString": true } }, - "geographyGroup":{ + "geographyGroup": { "readOnly": true, "type": "string", "description": "The geography group of the location." @@ -224,9 +248,11 @@ "description": "The physical location of the Azure location." }, "pairedRegion": { - "readOnly": true, - "type": "string", - "description": "The region paired to this region." + "type": "array", + "description": "The regions paired to this region.", + "items": { + "$ref": "#/definitions/PairedRegion" + } } } }, @@ -252,12 +278,12 @@ "type": "string", "description": "The display name of the location." }, - "regionalDisplayName":{ + "regionalDisplayName": { "readOnly": true, "type": "string", "description": "The display name of the location and its region." }, - "metadata":{ + "metadata": { "$ref": "#/definitions/LocationMetadata" } }, From ab8626862ee59436e17883c3abb95d61cf8157ac Mon Sep 17 00:00:00 2001 From: Ezequiel Gambaccini Date: Mon, 25 Nov 2019 14:09:14 -0800 Subject: [PATCH 07/10] Added missing descriptions --- .vscode/settings.json | 2 +- .../Microsoft.Resources/stable/2019-11-01/subscriptions.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 81c95f4d9519..a02494ed2ce9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,6 +22,6 @@ ], "typescript.tsdk": "node_modules\\typescript\\lib", "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "vscode.json-language-features" } } diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json index fea1f8371342..4e768737cb71 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json @@ -181,6 +181,7 @@ }, "definitions": { "PairedRegion": { + "description": "Information regarding paired region.", "properties": { "name": { "type": "string", @@ -200,6 +201,7 @@ } }, "LocationMetadata": { + "description": "Location metadata information", "properties": { "regionType": { "readOnly": true, @@ -284,6 +286,7 @@ "description": "The display name of the location and its region." }, "metadata": { + "description": "Metada of the location, such as lat/long, paired region, and others.", "$ref": "#/definitions/LocationMetadata" } }, From 3a9ddf641cebfe3906af5c4c8a69ae1e109b2ae1 Mon Sep 17 00:00:00 2001 From: Ezequiel Gambaccini Date: Mon, 25 Nov 2019 14:17:54 -0800 Subject: [PATCH 08/10] Removed .vscode folder --- .vscode/extensions.json | 7 ------- .vscode/launch.json | 27 --------------------------- .vscode/settings.json | 27 --------------------------- 3 files changed, 61 deletions(-) delete mode 100644 .vscode/extensions.json delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/settings.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index f23f12deef48..000000000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "recommendations": [ - "EditorConfig.EditorConfig", - "esbenp.prettier-vscode", - "docsmsft.docs-authoring-pack" - ] -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index fe6da0a7d616..000000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "launch", - "name": "Mocha Tests", - "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", - "args": [ - "--timeout", - "999999", - "--colors", - "${workspaceFolder}/test/syntax.js" - ], - "internalConsoleOptions": "openOnSessionStart" - }, - { - "type": "node", - "request": "launch", - "name": "Launch Program", - "program": "${file}" - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index a02494ed2ce9..000000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,27 +0,0 @@ -// Place your settings in this file to overwrite default and user settings. -{ - "json.schemas":[ - { - "fileMatch":[ - "/**/specification/*.json" - ], - "url":"https://raw.githubusercontent.com/Azure/autorest/master/schema/swagger-extensions.json" - }, - { - "fileMatch":[ - "/**/examples/*.json" - ], - "url":"https://raw.githubusercontent.com/Azure/autorest/master/schema/example-schema.json" - }, - { - "fileMatch":[ - "/**/composite*.json" - ], - "url":"https://raw.githubusercontent.com/Azure/autorest/master/schema/composite-swagger.json" - } - ], - "typescript.tsdk": "node_modules\\typescript\\lib", - "[json]": { - "editor.defaultFormatter": "vscode.json-language-features" - } -} From f32d1301b087b4c00d41f4d9cc5463f6224cc431 Mon Sep 17 00:00:00 2001 From: Ezequiel Gambaccini Date: Mon, 25 Nov 2019 15:14:13 -0800 Subject: [PATCH 09/10] Fixed spelling issue --- .../Microsoft.Resources/stable/2019-11-01/subscriptions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json index 4e768737cb71..e30a1b77d6fa 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/subscriptions.json @@ -286,7 +286,7 @@ "description": "The display name of the location and its region." }, "metadata": { - "description": "Metada of the location, such as lat/long, paired region, and others.", + "description": "Metadata of the location, such as lat/long, paired region, and others.", "$ref": "#/definitions/LocationMetadata" } }, From 8668e09bf93fd5a9cbaf00980a6cf50cdb6dee33 Mon Sep 17 00:00:00 2001 From: Ezequiel Gambaccini Date: Thu, 5 Dec 2019 15:40:12 -0800 Subject: [PATCH 10/10] Fixed GetLocations with prettier tool --- .../2019-11-01/examples/GetLocations.json | 94 +++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetLocations.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetLocations.json index 8b624a044b0e..2d23bcd8363e 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetLocations.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2019-11-01/examples/GetLocations.json @@ -1,52 +1,52 @@ { - "parameters": { - "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", - "api-version": "2019-11-01" - }, - "responses": { - "200": { - "body": [ - { - "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/centralus", - "name": "centralus", - "displayName": "Central US", - "regionalDisplayName": "(US) Central US", - "metadata": { - "regionType": "Physical", - "regionCategory": "Recommended", - "geographyGroup": "US", - "longitude": "-93.6208", - "latitude": "41.5908", - "physicalLocation": "Iowa", - "pairedRegion": [ - { - "name": "eastus2", - "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/eastus2" - } - ] - } - }, - { - "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/eastasia", - "name": "eastasia", - "displayName": "East Asia", - "regionalDisplayName": "(Asia Pacific) East Asia", - "metadata": { - "regionType": "Physical", - "regionCategory": "Recommended", - "geographyGroup": "Asia Pacific", - "longitude": "114.188", - "latitude": "22.267", - "physicalLocation": "Hong Kong", - "pairedRegion": [ - { - "name": "southeastasia", - "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/southeastasia" - } - ] - } - } + "parameters": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "api-version": "2019-11-01" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/centralus", + "name": "centralus", + "displayName": "Central US", + "regionalDisplayName": "(US) Central US", + "metadata": { + "regionType": "Physical", + "regionCategory": "Recommended", + "geographyGroup": "US", + "longitude": "-93.6208", + "latitude": "41.5908", + "physicalLocation": "Iowa", + "pairedRegion": [ + { + "name": "eastus2", + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/eastus2" + } ] + } + }, + { + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/eastasia", + "name": "eastasia", + "displayName": "East Asia", + "regionalDisplayName": "(Asia Pacific) East Asia", + "metadata": { + "regionType": "Physical", + "regionCategory": "Recommended", + "geographyGroup": "Asia Pacific", + "longitude": "114.188", + "latitude": "22.267", + "physicalLocation": "Hong Kong", + "pairedRegion": [ + { + "name": "southeastasia", + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/southeastasia" + } + ] + } } + ] } + } }