From 28ee655ba2ca14e0ff4f1ba8c60ab6375c036ade Mon Sep 17 00:00:00 2001 From: Sudharsan Sripadham Date: Wed, 23 Sep 2020 18:15:24 -0700 Subject: [PATCH 1/6] azureWebCategories --- .../stable/2020-06-01/azureWebCategory.json | 144 ++++++++++++++++++ .../AzureWebCategoriesListBySubscription.json | 28 ++++ .../network/resource-manager/readme.md | 1 + 3 files changed, 173 insertions(+) create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json new file mode 100644 index 000000000000..f4ba3163bc4f --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json @@ -0,0 +1,144 @@ +{ + "swagger": "2.0", + "info": { + "title": "NetworkManagementClient", + "description": "The Microsoft Azure Network management API provides a RESTful set of web services that interact with Microsoft Azure Networks service to manage your network resources. The API has entities that capture the relationship between an end user and the Microsoft Azure Networks service.", + "version": "2020-06-01" + }, + "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": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/AzureWebCategories": { + "get": { + "tags": [ + "AzureWebCategories" + ], + "operationId": "AzureWebCategories_ListAll", + "description": "Gets all the Azure Web Categorys in a subscription.", + "parameters": [ + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Success. The operation returns a list of Azure Web Category resources.", + "schema": { + "$ref": "#/definitions/AzureWebCategoryListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "List all Azure Web Categorys for a given subscription": { + "$ref": "./examples/AzureWebCategoriesListBySubscription.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "AzureWebCategoryPropertiesFormat": { + "properties": { + "provisioningState": { + "readOnly": true, + "$ref": "./network.json#/definitions/ProvisioningState", + "description": "The provisioning state of the Azure Web Category resource." + }, + "group": { + "type": "string", + "readOnly": true, + "description": "The name of the group that the category belongs to." + } + }, + "description": "Azure Web Category Properties." + }, + "AzureWebCategory": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/AzureWebCategoryPropertiesFormat", + "description": "Properties of the Azure Web Category." + }, + "name": { + "type": "string", + "description": "Name of the Azure Web Category." + }, + "id": { + "type": "string", + "readOnly": true, + "description": "The ID of the Azure Web Category." + }, + "etag": { + "readOnly": true, + "type": "string", + "description": "A unique read-only string that changes whenever the resource is updated." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Type of the resource." + } + }, + "allOf": [ + { + "$ref": "./network.json#/definitions/Resource" + } + ], + "description": "Azure Web Category Resource." + }, + "AzureWebCategoryListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/AzureWebCategory" + }, + "description": "List of Azure Web Categorys for a given Subscription." + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of results." + } + }, + "description": "Response for ListAzureWebCategories API service call." + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json new file mode 100644 index 000000000000..e51f4662231e --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2020-08-01", + "subscriptionId": "4de8428a-4a92-4cea-90ff-b47128b8cab8" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Arts", + "id": "/subscriptions/4de8428a-4a92-4cea-90ff-b47128b8cab8/resourceGroups/rg1/providers/Microsoft.Network/azureWebCategories/Arts", + "type": "Microsoft.Network/azureWebCategories", + "etag": "w/\\00000000-0000-0000-0000-000000000000\\", + "location": "West US", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded", + "group": "General" + } + } + ] + } + } + } +} diff --git a/specification/network/resource-manager/readme.md b/specification/network/resource-manager/readme.md index f0097e2c0d0e..4c2437244cdf 100644 --- a/specification/network/resource-manager/readme.md +++ b/specification/network/resource-manager/readme.md @@ -44,6 +44,7 @@ input-file: - Microsoft.Network/stable/2020-06-01/availableServiceAliases.json - Microsoft.Network/stable/2020-06-01/azureFirewall.json - Microsoft.Network/stable/2020-06-01/azureFirewallFqdnTag.json + - Microsoft.Network/stable/2020-06-01/azureWebCategory.json - Microsoft.Network/stable/2020-06-01/bastionHost.json - Microsoft.Network/stable/2020-06-01/checkDnsAvailability.json - Microsoft.Network/stable/2020-06-01/customIpPrefix.json From 194c5099620c41ab9d9f8d2db7f865a1596ee1d3 Mon Sep 17 00:00:00 2001 From: Sudharsan Sripadham Date: Thu, 24 Sep 2020 14:43:04 -0700 Subject: [PATCH 2/6] Code review fixes --- .../stable/2020-06-01/azureWebCategory.json | 19 ------------------- .../AzureWebCategoriesListBySubscription.json | 1 - 2 files changed, 20 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json index f4ba3163bc4f..df1c1fa2e713 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json @@ -77,11 +77,6 @@ "definitions": { "AzureWebCategoryPropertiesFormat": { "properties": { - "provisioningState": { - "readOnly": true, - "$ref": "./network.json#/definitions/ProvisioningState", - "description": "The provisioning state of the Azure Web Category resource." - }, "group": { "type": "string", "readOnly": true, @@ -97,24 +92,10 @@ "$ref": "#/definitions/AzureWebCategoryPropertiesFormat", "description": "Properties of the Azure Web Category." }, - "name": { - "type": "string", - "description": "Name of the Azure Web Category." - }, - "id": { - "type": "string", - "readOnly": true, - "description": "The ID of the Azure Web Category." - }, "etag": { "readOnly": true, "type": "string", "description": "A unique read-only string that changes whenever the resource is updated." - }, - "type": { - "readOnly": true, - "type": "string", - "description": "Type of the resource." } }, "allOf": [ diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json index e51f4662231e..e157df51b949 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json @@ -17,7 +17,6 @@ "key1": "value1" }, "properties": { - "provisioningState": "Succeeded", "group": "General" } } From 8be6bfa21b1d48d5cc55a798c6ba6789af99b6ab Mon Sep 17 00:00:00 2001 From: Sudharsan Sripadham Date: Thu, 24 Sep 2020 15:07:50 -0700 Subject: [PATCH 3/6] Get Operation --- .../stable/2020-06-01/azureWebCategory.json | 59 ++++++++++++++++++- .../examples/AzureWebCategoryGet.json | 28 +++++++++ 2 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json index df1c1fa2e713..aa6085a1f82b 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json @@ -34,7 +34,64 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.Network/AzureWebCategories": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureWebCategories/{azureWebCategoryName}": { + "get": { + "tags": [ + "AzureWebCategories" + ], + "operationId": "AzureWebCategories_Get", + "description": "Gets the specified Azure Web Category.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "azureWebCategoryName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the azureWebCategory." + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "description": "Expands resourceIds back referenced by the azureWebCategory resource." + } + ], + "responses": { + "200": { + "description": "Request successful. The operation returns the resulting azureWebCategory resource.", + "schema": { + "$ref": "#/definitions/AzureWebCategory" + } + }, + "default": { + "description": "Unexpected error.", + "schema": { + "$ref": "./network.json#/definitions/Error" + } + } + }, + "x-ms-examples": { + "Get_azureWebCategory": { + "$ref": "./examples/azureWebCategoryGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories": { "get": { "tags": [ "AzureWebCategories" diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json new file mode 100644 index 000000000000..87a7ef8324c5 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2020-08-01", + "subscriptionId": "4de8428a-4a92-4cea-90ff-b47128b8cab8", + "resourceGroupName": "myResourceGroup", + "name": "Arts" + }, + "responses": { + "200": { + "body": { + "value": + { + "name": "Arts", + "id": "/subscriptions/4de8428a-4a92-4cea-90ff-b47128b8cab8/resourceGroups/myResourceGroup/providers/Microsoft.Network/azureWebCategories/Arts", + "type": "Microsoft.Network/azureWebCategories", + "etag": "w/\\00000000-0000-0000-0000-000000000000\\", + "location": "West US", + "tags": { + "key1": "value1" + }, + "properties": { + "group": "General" + } + } + } + } + } +} From 2d4d7bb86ed8db0a769f32b37ba8f628e1181be0 Mon Sep 17 00:00:00 2001 From: Sudharsan Sripadham Date: Thu, 24 Sep 2020 15:27:23 -0700 Subject: [PATCH 4/6] Fixed example --- .../stable/2020-06-01/azureWebCategory.json | 4 ++-- .../examples/AzureWebCategoryGet.json | 23 ++++++++----------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json index aa6085a1f82b..6ebbae012f0a 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json @@ -34,7 +34,7 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureWebCategories/{azureWebCategoryName}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureWebCategories/{name}": { "get": { "tags": [ "AzureWebCategories" @@ -50,7 +50,7 @@ "description": "The name of the resource group." }, { - "name": "azureWebCategoryName", + "name": "name", "in": "path", "required": true, "type": "string", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json index 87a7ef8324c5..b9b07a93a987 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json @@ -8,19 +8,16 @@ "responses": { "200": { "body": { - "value": - { - "name": "Arts", - "id": "/subscriptions/4de8428a-4a92-4cea-90ff-b47128b8cab8/resourceGroups/myResourceGroup/providers/Microsoft.Network/azureWebCategories/Arts", - "type": "Microsoft.Network/azureWebCategories", - "etag": "w/\\00000000-0000-0000-0000-000000000000\\", - "location": "West US", - "tags": { - "key1": "value1" - }, - "properties": { - "group": "General" - } + "name": "Arts", + "id": "/subscriptions/4de8428a-4a92-4cea-90ff-b47128b8cab8/resourceGroups/myResourceGroup/providers/Microsoft.Network/azureWebCategories/Arts", + "type": "Microsoft.Network/azureWebCategories", + "etag": "w/\\00000000-0000-0000-0000-000000000000\\", + "location": "West US", + "tags": { + "key1": "value1" + }, + "properties": { + "group": "General" } } } From 2aa110ebb55e0b4da31406daa6ed0a7b23cac47d Mon Sep 17 00:00:00 2001 From: Sudharsan Sripadham Date: Thu, 24 Sep 2020 15:35:42 -0700 Subject: [PATCH 5/6] Remove ResourceGroup --- .../stable/2020-06-01/azureWebCategory.json | 9 +-------- .../examples/AzureWebCategoriesListBySubscription.json | 2 +- .../stable/2020-06-01/examples/AzureWebCategoryGet.json | 3 +-- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json index 6ebbae012f0a..1a99658f0f14 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json @@ -34,7 +34,7 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureWebCategories/{name}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories/{name}": { "get": { "tags": [ "AzureWebCategories" @@ -42,13 +42,6 @@ "operationId": "AzureWebCategories_Get", "description": "Gets the specified Azure Web Category.", "parameters": [ - { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group." - }, { "name": "name", "in": "path", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json index e157df51b949..7b89a53409be 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json @@ -9,7 +9,7 @@ "value": [ { "name": "Arts", - "id": "/subscriptions/4de8428a-4a92-4cea-90ff-b47128b8cab8/resourceGroups/rg1/providers/Microsoft.Network/azureWebCategories/Arts", + "id": "/subscriptions/4de8428a-4a92-4cea-90ff-b47128b8cab8/providers/Microsoft.Network/azureWebCategories/Arts", "type": "Microsoft.Network/azureWebCategories", "etag": "w/\\00000000-0000-0000-0000-000000000000\\", "location": "West US", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json index b9b07a93a987..960e9f08e31d 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json @@ -2,14 +2,13 @@ "parameters": { "api-version": "2020-08-01", "subscriptionId": "4de8428a-4a92-4cea-90ff-b47128b8cab8", - "resourceGroupName": "myResourceGroup", "name": "Arts" }, "responses": { "200": { "body": { "name": "Arts", - "id": "/subscriptions/4de8428a-4a92-4cea-90ff-b47128b8cab8/resourceGroups/myResourceGroup/providers/Microsoft.Network/azureWebCategories/Arts", + "id": "/subscriptions/4de8428a-4a92-4cea-90ff-b47128b8cab8/providers/Microsoft.Network/azureWebCategories/Arts", "type": "Microsoft.Network/azureWebCategories", "etag": "w/\\00000000-0000-0000-0000-000000000000\\", "location": "West US", From b5e1f0980a07af3eb0e386bbfc41a69110856d6c Mon Sep 17 00:00:00 2001 From: Sudharsan Sripadham Date: Thu, 24 Sep 2020 15:39:28 -0700 Subject: [PATCH 6/6] Removed tag & location --- .../stable/2020-06-01/azureWebCategory.json | 19 ++++++++++++++----- .../AzureWebCategoriesListBySubscription.json | 4 ---- .../examples/AzureWebCategoryGet.json | 6 +----- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json index 1a99658f0f14..6fa3c2aba4fd 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/azureWebCategory.json @@ -142,17 +142,26 @@ "$ref": "#/definitions/AzureWebCategoryPropertiesFormat", "description": "Properties of the Azure Web Category." }, + "id": { + "type": "string", + "description": "Resource ID." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + }, "etag": { "readOnly": true, "type": "string", "description": "A unique read-only string that changes whenever the resource is updated." } }, - "allOf": [ - { - "$ref": "./network.json#/definitions/Resource" - } - ], "description": "Azure Web Category Resource." }, "AzureWebCategoryListResult": { diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json index 7b89a53409be..95144e5a96e5 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoriesListBySubscription.json @@ -12,10 +12,6 @@ "id": "/subscriptions/4de8428a-4a92-4cea-90ff-b47128b8cab8/providers/Microsoft.Network/azureWebCategories/Arts", "type": "Microsoft.Network/azureWebCategories", "etag": "w/\\00000000-0000-0000-0000-000000000000\\", - "location": "West US", - "tags": { - "key1": "value1" - }, "properties": { "group": "General" } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json index 960e9f08e31d..c9767cbe070b 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/examples/AzureWebCategoryGet.json @@ -11,12 +11,8 @@ "id": "/subscriptions/4de8428a-4a92-4cea-90ff-b47128b8cab8/providers/Microsoft.Network/azureWebCategories/Arts", "type": "Microsoft.Network/azureWebCategories", "etag": "w/\\00000000-0000-0000-0000-000000000000\\", - "location": "West US", - "tags": { - "key1": "value1" - }, "properties": { - "group": "General" + "group": "General" } } }