共用方式為


Perform Connectivity Check Async - Perform Connectivity Check Async

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.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck?api-version=2024-05-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

serviceName
path True

string

The name of the API Management service.

Regex pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

subscriptionId
path True

string

uuid

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Required Type Description
destination True

Destination

The connectivity check operation destination.

source True

Source

Definitions about the connectivity check origin.

preferredIPVersion

PreferredIPVersion

The IP version to be used. Only IPv4 is supported for now.

protocol

ConnectivityCheckProtocol

The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value.

protocolConfiguration

ProtocolConfiguration

Protocol-specific configuration.

Responses

Name Type Description
200 OK

ConnectivityCheckResponse

Connectivity Check Request was completed.

202 Accepted

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.

Headers

location: string

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

HTTP Connectivity Check
TCP Connectivity Check

HTTP Connectivity Check

Sample request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/connectivityCheck?api-version=2024-05-01

{
  "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"
        }
      ]
    }
  }
}

Sample response

location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/connectivityCheck/operationresults/bmljb2xhLW5ldHdvcmt3YXRjaGVyNF9Db25uZWN0aXRpdml0eUNoZWNrXzE2MmExNmZl?api-version=2024-05-01
{
  "hops": [
    {
      "type": "Source",
      "id": "c60e2296-5ebc-48cc-80e8-7e6d2981e7b2",
      "address": "20.82.216.48",
      "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/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
}

TCP Connectivity Check

Sample request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/connectivityCheck?api-version=2024-05-01

{
  "source": {
    "region": "northeurope"
  },
  "destination": {
    "address": "8.8.8.8",
    "port": 53
  },
  "preferredIPVersion": "IPv4"
}

Sample response

location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/connectivityCheck/operationresults/bmljb2xhLW5ldHdvcmt3YXRjaGVyNF9Db25uZWN0aXRpdml0eUNoZWNrXzE2MmExNmZl?api-version=2024-05-01
{
  "hops": [
    {
      "type": "Source",
      "id": "7dbbe7aa-60ba-4650-831e-63d775d38e9e",
      "address": "10.1.1.4",
      "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/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
}

Definitions

Name Description
ConnectionStatus

The connection status.

ConnectivityCheckProtocol

The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value.

ConnectivityCheckRequest

A request to perform the connectivity check operation on a API Management service.

ConnectivityCheckResponse

Information on the connectivity status.

ConnectivityHop

Information about a hop between the source and the destination.

ConnectivityIssue

Information about an issue encountered in the process of checking for connectivity.

Destination

The connectivity check operation destination.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

HTTPConfiguration

Configuration for HTTP or HTTPS requests.

HTTPHeader

HTTP header and it's value.

IssueType

The type of issue.

Method

The HTTP method to be used.

Origin

The origin of the issue.

PreferredIPVersion

The IP version to be used. Only IPv4 is supported for now.

ProtocolConfiguration

Protocol-specific configuration.

Severity

The severity of the issue.

Source

Definitions about the connectivity check origin.

ConnectionStatus

The connection status.

Name Type Description
Connected

string

Degraded

string

Disconnected

string

Unknown

string

ConnectivityCheckProtocol

The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value.

Name Type Description
HTTP

string

HTTPS

string

TCP

string

ConnectivityCheckRequest

A request to perform the connectivity check operation on a API Management service.

Name Type Description
destination

Destination

The connectivity check operation destination.

preferredIPVersion

PreferredIPVersion

The IP version to be used. Only IPv4 is supported for now.

protocol

ConnectivityCheckProtocol

The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value.

protocolConfiguration

ProtocolConfiguration

Protocol-specific configuration.

source

Source

Definitions about the connectivity check origin.

ConnectivityCheckResponse

Information on the connectivity status.

Name Type Description
avgLatencyInMs

integer

Average latency in milliseconds.

connectionStatus

ConnectionStatus

The connection status.

hops

ConnectivityHop[]

List of hops between the source and the destination.

maxLatencyInMs

integer

Maximum latency in milliseconds.

minLatencyInMs

integer

Minimum latency in milliseconds.

probesFailed

integer

Number of failed probes.

probesSent

integer

Total number of probes sent.

ConnectivityHop

Information about a hop between the source and the destination.

Name Type Description
address

string

The IP address of the hop.

id

string

The ID of the hop.

issues

ConnectivityIssue[]

List of issues.

nextHopIds

string[]

List of next hop identifiers.

resourceId

string

The ID of the resource corresponding to this hop.

type

string

The type of the hop.

ConnectivityIssue

Information about an issue encountered in the process of checking for connectivity.

Name Type Description
context

object[]

Provides additional context on the issue.

origin

Origin

The origin of the issue.

severity

Severity

The severity of the issue.

type

IssueType

The type of issue.

Destination

The connectivity check operation destination.

Name Type Description
address

string

Destination address. Can either be an IP address or a FQDN.

port

integer

Destination port.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

HTTPConfiguration

Configuration for HTTP or HTTPS requests.

Name Type Description
headers

HTTPHeader[]

List of headers to be included in the request.

method

Method

The HTTP method to be used.

validStatusCodes

integer[]

List of HTTP status codes considered valid for the request response.

HTTPHeader

HTTP header and it's value.

Name Type Description
name

string

Header name.

value

string

Header value.

IssueType

The type of issue.

Name Type Description
AgentStopped

string

DnsResolution

string

GuestFirewall

string

NetworkSecurityRule

string

Platform

string

PortThrottled

string

SocketBind

string

Unknown

string

UserDefinedRoute

string

Method

The HTTP method to be used.

Name Type Description
GET

string

POST

string

Origin

The origin of the issue.

Name Type Description
Inbound

string

Local

string

Outbound

string

PreferredIPVersion

The IP version to be used. Only IPv4 is supported for now.

Name Type Description
IPv4

string

ProtocolConfiguration

Protocol-specific configuration.

Name Type Description
HTTPConfiguration

HTTPConfiguration

Configuration for HTTP or HTTPS requests.

Severity

The severity of the issue.

Name Type Description
Error

string

Warning

string

Source

Definitions about the connectivity check origin.

Name Type Description
instance

integer

The particular VMSS instance from which to fire the request.

region

string

The API Management service region from where to start the connectivity check operation.