From 04696420cb337f9b7168555197ba76975bd363c5 Mon Sep 17 00:00:00 2001 From: Sandeep Bansal Date: Mon, 26 Aug 2019 14:17:42 -0700 Subject: [PATCH 1/2] Added documentation for patch api call used to update tags --- .../stable/2019-06-01/bastionHost.json | 67 ++++++++++++++- .../examples/BastionHostUpdateTags.json | 86 +++++++++++++++++++ 2 files changed, 151 insertions(+), 2 deletions(-) create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2019-06-01/examples/BastionHostUpdateTags.json diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-06-01/bastionHost.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-06-01/bastionHost.json index 8da661f085d9..5a9772b19aa3 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-06-01/bastionHost.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-06-01/bastionHost.json @@ -186,8 +186,71 @@ "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" } - } - }, + }, + "patch": { + "tags": [ + "BastionHosts" + ], + "operationId": "BastionHosts_UpdateTags", + "x-ms-examples": { + "BastionHostUpdate": { + "$ref": "./examples/BastionHostUpdateTags.json" + } + }, + "description": "Updates bastion host tags.", + "parameters": [ + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The resource group name of the BastionHost." + }, + { + "name": "bastionHostName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the bastionHost." + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "name": "bastionHostParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "./network.json#/definitions/TagsObject" + }, + "description": "Parameters supplied to update a bastion host tags." + } + ], + "responses": { + "200": { + "description": "Request successful. Returns the details of the updated bastion host.", + "schema": { + "$ref": "#/definitions/BastionHost" + } + }, + "201": { + "description": "Request received successfully. Returns the details of the updated bastion host.", + "schema": { + "$ref": "#/definitions/BastionHost" + } + }, + "default": { + "description": "Error.", + "schema": { + "$ref": "./network.json#/definitions/Error" + } + } + }, + "x-ms-long-running-operation": true + }, "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts": { "get": { "tags": [ diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-06-01/examples/BastionHostUpdateTags.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-06-01/examples/BastionHostUpdateTags.json new file mode 100644 index 000000000000..1843f8b94a8f --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-06-01/examples/BastionHostUpdateTags.json @@ -0,0 +1,86 @@ +{ + "parameters": { + "api-version": "2019-06-01", + "subscriptionId": "subid", + "resourceGroupName": "rg1", + "bastionHostName": "bastionhosttenant'", + "bastionHostParameters": { + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "responses": { + "200": { + "body": { + "name": "bastionhost'", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhosttenant'", + "type": "Microsoft.Network/bastionHosts", + "etag": "w/\\00000000-0000-0000-0000-000000000000\\", + "location": "West US", + "tags": { + "tag1": "value1", + "tag2": "value2" + }, + "properties": { + "provisioningState": "Succeeded", + "dnsName": "bst-9d89d361-100e-4c01-b92d-466548c476dc.bastion.azure.com", + "ipConfigurations": [ + { + "name": "bastionHostIpConfiguration", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhosttenant/bastionHostIpConfigurations/bastionHostIpConfiguration", + "etag": "w/\\00000000-0000-0000-0000-000000000000\\", + "type": "Microsoft.Network/bastionHosts/bastionHostIpConfigurations", + "properties": { + "provisioningState": "Succeeded", + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet" + }, + "publicIPAddress": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName" + } + } + } + ] + } + } + }, + "201": { + "body": { + "name": "bastionhost'", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhosttenant'", + "type": "Microsoft.Network/bastionHosts", + "etag": "w/\\00000000-0000-0000-0000-000000000000\\", + "location": "West US", + "tags": { + "tag1": "value1", + "tag2": "value2" + }, + "properties": { + "provisioningState": "Succeeded", + "dnsName": "bst-9d89d361-100e-4c01-b92d-466548c476dc.bastion.azure.com", + "ipConfigurations": [ + { + "name": "bastionHostIpConfiguration", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/bastionHosts/bastionhosttenant/bastionHostIpConfigurations/bastionHostIpConfiguration", + "etag": "w/\\00000000-0000-0000-0000-000000000000\\", + "type": "Microsoft.Network/bastionHosts/bastionHostIpConfigurations", + "properties": { + "provisioningState": "Succeeded", + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet" + }, + "publicIPAddress": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName" + } + } + } + ] + } + } + } + } +} From 526b783dfb9da0ccd3fb7d606b37a0f4be484a4b Mon Sep 17 00:00:00 2001 From: Sandeep Bansal Date: Tue, 27 Aug 2019 13:20:37 -0700 Subject: [PATCH 2/2] Fixing missing } --- .../Microsoft.Network/stable/2019-06-01/bastionHost.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-06-01/bastionHost.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-06-01/bastionHost.json index 5a9772b19aa3..1b05be297eae 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-06-01/bastionHost.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-06-01/bastionHost.json @@ -250,7 +250,8 @@ } }, "x-ms-long-running-operation": true - }, + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts": { "get": { "tags": [