Udostępnij za pośrednictwem


Get Virtual Network Gateway

 

The Get Virtual Network Gateway operation returns information about the virtual network gateway, such as its IP address and provisioning state.

Request

The Get Virtual Network Gateway request may be specified as follows. Replace <subscription-id> with the subscription ID and <virtual-network-name> with the name of the virtual network associated with the gateway.

Method

Request URI

GET

https://management.core.windows.net/<subscription-id>/services/networking/<virtual-network-name>/gateway

URI Parameters

None.

Request Headers

The following table describes the request headers.

Request Header

Description

x-ms-version

Required. Specifies the version of the operation to use for this request. The value for this header should be set to 2012-03-01 or higher.

Request Body

None.

Response

The response includes an HTTP status code, response body, and a set of response headers.

Status Code

A successful operation returns status code 200 (OK). If the virtual network gateway cannot be found, returns status code 404 (NotFound).

Response Headers

The response for this operation includes the following headers. The response may also include additional standard HTTP headers.

Response header

Description

x-ms-request-id

A value that uniquely identifies a request made against the management service.

Response Body

The format of the response body is as follows:

<?xml version="1.0" encoding="utf-8"?>
<Gateway xmlns="https://schemas.microsoft.com/windowsazure">
  <State>provisioning-state</State>
  <VIPAddress>gateway-ip-address</VIPAddress>
  <LastEvent>
    <Timestamp>prov-event-time</Timestamp>
    <Id>prov-event-id</Id>
    <Message>prov-event-message</Message>
    <Data>prov-event-data</Data>
  </LastEvent>
  <gatewayType>gateway-type</gatewayType>
</Gateway>

The following table describes the elements in the response body.

Element

Description

State

Specifies the provisioning state of the virtual network gateway.

Possible values are:

  • NotProvisioned

  • Deprovisioning

  • Provisioning

  • Provisioned

VIPAddress

Specifies the IP address of the gateway. This property is only available when the gateway is in a Provisioned state.

LastEvent

Specifies the time, in Coordinated Universal Time (UTC) format at which the provisioning event occurred.

gatewayType

Specifies the type of gateway.

Possible values are:

  • StaticRouting

  • DynamicRouting

This element is not used if State is NotProvisioned.

LastEvent

Specifies the time, in Coordinated Universal Time (UTC) format at which the provisioning event occurred.

Element

Description

Timestamp

Specifies that the event occurred.

Id

Specifies the ID that represents the event.

Message

Specifies a message that describes the event.

Data

Specifies data related to the event.