Check Virtual Network IP Address Availability

 

The Check Virtual Network IP Address Availability operation checks for the availability of an IP address in the specified Virtual Network.

Request

The Check Virtual Network IP Address Availability request may be specified as follows. Replace <subscription-id> with the subscription ID and <virtual-network-name> with the name of the Virtual Network.

Method

Request URI

GET

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

URI Parameters

URI Parameter

Description

op=checkavailability

Required. Specifies that the availability of the IP address should be checked.

address=<address>

Required. Specifies the address that should be checked. Replace <address> with the IP address that you want to use.

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. This header should be set to 2013-11-01 or higher.

Request Body

None.

Response

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

Status Code

A successful operation returns status code 200 (OK).

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"?>
<AddressAvailabilityResponse xmlns=”https://schemas.microsoft.com/windowsazure”>
  <IsAvailable>indicator-of-availability</IsAvailable>
  <AvailableAddresses>
    <AvailableAddress>ip-address-1</AvailableAddress>
    <AvailableAddress>ip-address-2</AvailableAddress>
    <AvailableAddress>ip-address-3</AvailableAddress>
    <AvailableAddress>ip-address-4</AvailableAddress>
    <AvailableAddress>ip-address-5</AvailableAddress>
  </AvailableAddresses>
</AddressAvailabilityResponse>

The following table describes the elements in the response body.

Element name

Description

IsAvailable

Indicates whether the specified IP address is available for use in the Virtual Network.

Possible values are:

  • true

  • false

AvailableAddresses

If the IP address is not available, AvailableAddresses is returned with a maximum of five IP addresses that are available in the same subnet as the specified IP address.