From 778949496002464e67585cc23e1969beee76c014 Mon Sep 17 00:00:00 2001 From: anpatodi Date: Thu, 4 Apr 2019 20:52:40 +0530 Subject: [PATCH] Add application gateway backendheathondemand operation Add backendhealthondemand operation for application gateway. It is an additive change, hence can go with existing API version. --- .../stable/2018-12-01/applicationGateway.json | 125 +++++++++++++++++- .../ApplicationGatewayBackendHealthTest.json | 41 ++++++ 2 files changed, 165 insertions(+), 1 deletion(-) create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2018-12-01/examples/ApplicationGatewayBackendHealthTest.json diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-12-01/applicationGateway.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-12-01/applicationGateway.json index 8546cc9aa0af..0a3d572a8938 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-12-01/applicationGateway.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-12-01/applicationGateway.json @@ -452,7 +452,71 @@ "x-ms-long-running-operation": true } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendHealthOnDemand": { + "post": { + "tags": [ + "ApplicationGateways" + ], + "operationId": "ApplicationGateways_BackendHealthOnDemand", + "description": "Gets the backend health for given combination of backend pool and http setting of the specified application gateway in a resource group.", + "x-ms-examples": { + "Test Backend Health": { + "$ref": "./examples/ApplicationGatewayBackendHealthTest.json" + } + }, + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "applicationGatewayName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the application gateway." + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "description": "Expands BackendAddressPool and BackendHttpSettings referenced in backend health." + }, + { + "name": "probeRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ApplicationGatewayOnDemandProbe" + }, + "description": "Request body for on-demand test probe operation." + } + ], + "responses": { + "200": { + "description": "Request successful.", + "schema": { + "$ref": "#/definitions/ApplicationGatewayBackendHealthOnDemand" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously." + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables": { "get": { "tags": [ "ApplicationGateways" @@ -692,6 +756,65 @@ } }, "definitions": { + "ApplicationGatewayOnDemandProbe": { + "properties": { + "protocol": { + "type": "string", + "description": "The protocol used for the probe. Possible values are 'Http' and 'Https'.", + "enum": [ + "Http", + "Https" + ], + "x-ms-enum": { + "name": "ApplicationGatewayProtocol", + "modelAsString": true + } + }, + "host": { + "type": "string", + "description": "Host name to send the probe to." + }, + "path": { + "type": "string", + "description": "Relative path of probe. Valid path starts from '/'. Probe is sent to ://:" + }, + "timeout": { + "type": "integer", + "format": "int32", + "description": "The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds." + }, + "pickHostNameFromBackendHttpSettings": { + "type": "boolean", + "description": "Whether the host header should be picked from the backend http settings. Default value is false." + }, + "match": { + "$ref": "#/definitions/ApplicationGatewayProbeHealthResponseMatch", + "description": "Criterion for classifying a healthy probe response." + }, + "backendPoolName": { + "type": "string", + "description": "Name of backend pool of application gateway to which probe request will be sent." + }, + "backendHttpSettingName": { + "type": "string", + "description": "Name of backend http setting of application gateway to be used for test probe" + } + }, + "description": "Details of on demand test probe request" + }, + "ApplicationGatewayBackendHealthOnDemand": { + "properties": { + "backendAddressPool": { + "$ref": "#/definitions/ApplicationGatewayBackendAddressPool", + "description": "Reference of an ApplicationGatewayBackendAddressPool resource." + }, + "backendHealthHttpSettings": { + "$ref": "#/definitions/ApplicationGatewayBackendHealthHttpSettings", + "description": "Application gateway BackendHealthHttp settings." + } + }, + "description": "Result of on demand test probe" + }, "ApplicationGatewayBackendHealth": { "properties": { "backendAddressPools": { diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-12-01/examples/ApplicationGatewayBackendHealthTest.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-12-01/examples/ApplicationGatewayBackendHealthTest.json new file mode 100644 index 000000000000..4c0ef8112a41 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-12-01/examples/ApplicationGatewayBackendHealthTest.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2018-12-01", + "subscriptionId": "subid", + "resourceGroupName": "appgw", + "applicationGatewayName": "appgw", + "probeRequest": { + "protocol": "Http", + "pickHostNameFromBackendHttpSettings": true, + "path": "/", + "timeout": 30, + "backendPoolName": "MFAnalyticsPool", + "backendHttpSettingName": "MFPoolSettings" + } + }, + "responses": { + "200": { + "body": { + "backendAddressPool": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendaddressPools/MFAnalyticsPool" + }, + "backendHealthHttpSettings": { + "backendHttpSettings": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/MFPoolSettings" + }, + "servers": [ + { + "address": "10.220.1.4", + "health": "Up" + }, + { + "address": "10.220.1.5", + "health": "Up" + } + ] + } + } + }, + "202": {} + } +}