Skip to content

Commit

Permalink
HttpConnect example (#15493)
Browse files Browse the repository at this point in the history
* HttpConnect example

* Prettifier fix

Co-authored-by: Nicolás Barrera <t-nbarrera@microsoft.com>
  • Loading branch information
atharos1 and Nicolás Barrera authored Aug 4, 2021
1 parent b9e497e commit ff76d20
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@
"operationId": "PerformConnectivityCheckAsync",
"description": "Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it.",
"x-ms-examples": {
"ApiManagementPerformConnectivityCheck": {
"TCP Connectivity Check": {
"$ref": "./examples/ApiManagementPerformConnectivityCheck.json"
},
"HTTP Connectivity Check": {
"$ref": "./examples/ApiManagementPerformConnectivityCheckHttpConnect.json"
}
},
"parameters": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"responses": {
"202": {
"headers": {
"location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1//connectivityCheck/operationresults/bmljb2xhLW5ldHdvcmt3YXRjaGVyNF9Db25uZWN0aXRpdml0eUNoZWNrXzE2MmExNmZl?api-version=2021-04-01-preview"
"location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/connectivityCheck/operationresults/bmljb2xhLW5ldHdvcmt3YXRjaGVyNF9Db25uZWN0aXRpdml0eUNoZWNrXzE2MmExNmZl?api-version=2021-04-01-preview"
}
},
"200": {
Expand All @@ -28,7 +28,7 @@
"type": "Source",
"id": "7dbbe7aa-60ba-4650-831e-63d775d38e9e",
"address": "10.1.1.4",
"resourceId": "subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"nextHopIds": [
"75c8d819-b208-4584-a311-1aa45ce753f9"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2021-04-01-preview",
"subscriptionId": "subid",
"connectivityCheckRequestParams": {
"source": {
"region": "northeurope"
},
"destination": {
"address": "https://microsoft.com",
"port": 3306
},
"protocol": "HTTPS",
"protocolConfiguration": {
"HTTPConfiguration": {
"method": "GET",
"validStatusCodes": [
200,
204
],
"headers": [
{
"name": "Authorization",
"value": "Bearer myPreciousToken"
}
]
}
}
}
},
"responses": {
"202": {
"headers": {
"location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/connectivityCheck/operationresults/bmljb2xhLW5ldHdvcmt3YXRjaGVyNF9Db25uZWN0aXRpdml0eUNoZWNrXzE2MmExNmZl?api-version=2021-04-01-preview"
}
},
"200": {
"body": {
"hops": [
{
"type": "Source",
"id": "c60e2296-5ebc-48cc-80e8-7e6d2981e7b2",
"address": "20.82.216.48",
"resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"nextHopIds": [
"26aa44e7-04f1-462f-aa5d-5951957b5650"
],
"issues": []
},
{
"type": "Internet",
"id": "26aa44e7-04f1-462f-aa5d-5951957b5650",
"address": "40.113.200.201",
"nextHopIds": [],
"issues": []
}
],
"connectionStatus": "Reachable",
"avgLatencyInMs": 260,
"minLatencyInMs": 250,
"maxLatencyInMs": 281,
"probesSent": 3,
"probesFailed": 0
}
}
}
}

0 comments on commit ff76d20

Please sign in to comment.