Set Route

 

The Set Route operation adds or updates a route within the specified route table.

Request

The Set Route request is specified as follows. Replace <subscription-id> with your subscription ID, <network-security-group-name> with the name of the route table, and <route-name> with the name of the route that will be added/updated.

Method

Request URI

PUT

https://management.core.windows.net/<subscription-id>/ services/routetables/<route-table-name>/routes/<route-name>

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 of this header must be set to 2015-04-01 or higher.

Request Body

<Route xmlns="https://schemas.microsoft.com/windowsazure">
   <Name>route-name</Name>  
   <AddressPrefix>route-address-prefix</AddressPrefix>  
   <Priority>rule-priority</Priority>  
   <NextHopType>    
      <Type>route-next-hop-type</Type>    
      <IpAddress>route-next-hop-ipaddress</IpAddress>  
   </NextHopType>
</Route>

Element name

Description

Name

Specifies the name of the route.

AddressPrefix

Specifies the address prefix of the route in CIDR notation.

Type

Specifies the type of the next hop of the route. Possible Values are:

  • VPNGateway

  • VNETLocal

  • Internet

  • VirtualAppliance

Null

IpAddress

Specifies the IP address of the next hop of the route.

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 202 (Accepted).

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-version

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

Response Body

None.