Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APIM - Network Watcher Connectivity Check integration specs #15056

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use this REST APIs to perform connectivity troubleshoot operations in API Management deployments.",
"version": "2021-04-01-preview"
},
"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}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck": {
"post": {
"tags": [
"PerformConnectivityCheck"
],
"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": {
"$ref": "./examples/ApiManagementPerformConnectivityCheck.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"name": "connectivityCheckRequestParams",
"in": "body",
"required": true,
"schema": {
"$ref": "./definitions.json#/definitions/ConnectivityCheckRequest"
}
}
],
"responses": {
"202": {
"description": "Request was accepted and is currently running. Location header contains the URL where the status of the long running operation can be checked and the result eventually retrieved."
},
"200": {
"description": "Connectivity Check Request was completed.",
"schema": {
"$ref": "./definitions.json#/definitions/ConnectivityCheckResponse"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6492,6 +6492,237 @@
"description": "Last updated date and time."
}
}
},
"ConnectivityCheckRequest": {
"description": "A request to perform the connectivity check operation on a API Management service.",
"type": "object",
"required": [
"source",
"destination",
"preferredIPVersion"
],
"properties": {
"source": {
"description": "Definitions about the connectivity check origin.",
"type": "object",
"required": [
"region"
],
"properties": {
"region": {
"description": "The API Management service region from where to start the connectivity check operation.",
"type": "string",
"example": "westus"
},
"instance": {
"description": "The particular VMSS instance from which to fire the request.",
"type": "integer",
"format": "int64"
}
}
},
"destination": {
"description": "The connectivity check operation destination.",
"type": "object",
"required": [
"address",
"port"
],
"properties": {
"address": {
"description": "Destination address. Can either be an IP address or a FQDN.",
"type": "string",
"example": "microsoft.com"
},
"port": {
"description": "Destination port.",
"type": "integer",
"format": "int64"
}
}
},
"preferredIPVersion": {
"description": "The IP version to be used. Can either be IPv4 or IPv6.",
"type": "string",
"enum": [
"IPv4",
"IPv6"
],
"x-ms-enum": {
"name": "PreferredIPVersion",
"modelAsString": true
}
}
}
},
"ConnectivityCheckResponse": {
"description": "Information on the connectivity status.",
"type": "object",
"properties": {
"hops": {
"readOnly": true,
"type": "array",
"description": "List of hops between the source and the destination.",
"items": {
"$ref": "#/definitions/ConnectivityHop"
}
},
"connectionStatus": {
"readOnly": true,
"type": "string",
"enum": [
"Unknown",
"Connected",
"Disconnected",
"Degraded"
],
"x-ms-enum": {
"name": "ConnectionStatus",
"modelAsString": true
},
"description": "The connection status."
},
"avgLatencyInMs": {
"description": "Average latency in milliseconds.",
"readOnly": true,
"type": "integer",
"format": "int64"
},
"minLatencyInMs": {
"description": "Minimum latency in milliseconds.",
"readOnly": true,
"type": "integer",
"format": "int64"
},
"maxLatencyInMs": {
"description": "Maximum latency in milliseconds.",
"readOnly": true,
"type": "integer",
"format": "int64"
},
"probesSent": {
"description": "Total number of probes sent.",
"readOnly": true,
"type": "integer",
"format": "int64"
},
"probesFailed": {
"description": "Number of failed probes.",
"readOnly": true,
"type": "integer",
"format": "int64"
}
}
},
"ConnectivityHop": {
"description": "Information about a hop between the source and the destination.",
"type": "object",
"properties": {
"type": {
"description": "The type of the hop.",
"readOnly": true,
"type": "string"
},
"id": {
"description": "The ID of the hop.",
"readOnly": true,
"type": "string"
},
"address": {
"description": "The IP address of the hop.",
"readOnly": true,
"type": "string"
},
"resourceId": {
"description": "The ID of the resource corresponding to this hop.",
"readOnly": true,
"type": "string"
},
"nextHopIds": {
"readOnly": true,
"type": "array",
"description": "List of next hop identifiers.",
"items": {
"type": "string"
}
},
"issues": {
"readOnly": true,
"type": "array",
"description": "List of issues.",
"items": {
"$ref": "#/definitions/ConnectivityIssue"
}
}
}
},
"ConnectivityIssue": {
"description": "Information about an issue encountered in the process of checking for connectivity.",
"type": "object",
"properties": {
"origin": {
"readOnly": true,
"type": "string",
"enum": [
"Local",
"Inbound",
"Outbound"
],
"x-ms-enum": {
"name": "Origin",
"modelAsString": true
},
"description": "The origin of the issue."
},
"severity": {
"readOnly": true,
"type": "string",
"enum": [
"Error",
"Warning"
],
"x-ms-enum": {
"name": "Severity",
"modelAsString": true
},
"description": "The severity of the issue."
},
"type": {
"readOnly": true,
"type": "string",
"enum": [
"Unknown",
"AgentStopped",
"GuestFirewall",
"DnsResolution",
"SocketBind",
"NetworkSecurityRule",
"UserDefinedRoute",
"PortThrottled",
"Platform"
],
"x-ms-enum": {
"name": "IssueType",
"modelAsString": true
},
"description": "The type of issue."
},
"context": {
"readOnly": true,
"type": "array",
"description": "Provides additional context on the issue.",
"items": {
"$ref": "#/definitions/IssueContext"
}
}
}
},
"IssueContext": {
"description": "A key-value pair that provides additional context on the issue.",
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"parameters": {}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2021-04-01-preview",
"subscriptionId": "subid",
"connectivityCheckRequestParams": {
"source": {
"region": "northeurope"
},
"destination": {
"address": "8.8.8.8",
"port": 53
},
"preferredIPVersion": "IPv4"
}
},
"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": "7dbbe7aa-60ba-4650-831e-63d775d38e9e",
"address": "10.1.1.4",
"resourceId": "subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"nextHopIds": [
"75c8d819-b208-4584-a311-1aa45ce753f9"
],
"issues": []
},
{
"type": "Internet",
"id": "75c8d819-b208-4584-a311-1aa45ce753f9",
"address": "8.8.8.8",
"nextHopIds": [],
"issues": []
}
],
"connectionStatus": "Connected",
"avgLatencyInMs": 1,
"minLatencyInMs": 1,
"maxLatencyInMs": 4,
"probesSent": 100,
"probesFailed": 0
}
}
}
}
1 change: 1 addition & 0 deletions specification/apimanagement/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ input-file:
- Microsoft.ApiManagement/preview/2021-04-01-preview/apimtags.json
- Microsoft.ApiManagement/preview/2021-04-01-preview/apimtenant.json
- Microsoft.ApiManagement/preview/2021-04-01-preview/apimusers.json
- Microsoft.ApiManagement/preview/2021-04-01-preview/apimconnectivitycheck.json
- Microsoft.ApiManagement/preview/2021-04-01-preview/definitions.json
```
### Tag: package-preview-2021-01
Expand Down