App Service Plans - Create Or Update Vnet Route

Description for Create or update a Virtual Network route in an App Service plan.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}?api-version=2023-01-01

URI Parameters

Name In Required Type Description
name
path True

string

Name of the App Service plan.

resourceGroupName
path True

string

Name of the resource group to which the resource belongs.

Regex pattern: ^[-\w\._\(\)]+[^\.]$

routeName
path True

string

Name of the Virtual Network route.

subscriptionId
path True

string

Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).

vnetName
path True

string

Name of the Virtual Network.

api-version
query True

string

API Version

Request Body

Name Type Description
kind

string

Kind of resource.

properties.endAddress

string

The ending address for this route. If the start address is specified in CIDR notation, this must be omitted.

properties.routeType

RouteType

The type of route this is: DEFAULT - By default, every app has routes to the local address ranges specified by RFC1918 INHERITED - Routes inherited from the real Virtual Network routes STATIC - Static route set on the app only

These values will be used for syncing an app's routes with those from a Virtual Network.

properties.startAddress

string

The starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified.

Responses

Name Type Description
200 OK

VnetRoute

OK.

400 Bad Request

Invalid request. Ensure that required parameters are given, and that addresses and address spaces are valid.

404 Not Found

Route not found.

Other Status Codes

DefaultErrorResponse

App Service error response.

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

Definitions

Name Description
DefaultErrorResponse

App Service error response.

Details
Error

Error model.

RouteType

The type of route this is: DEFAULT - By default, every app has routes to the local address ranges specified by RFC1918 INHERITED - Routes inherited from the real Virtual Network routes STATIC - Static route set on the app only

These values will be used for syncing an app's routes with those from a Virtual Network.

VnetRoute

Virtual Network route contract used to pass routing information for a Virtual Network.

DefaultErrorResponse

App Service error response.

Name Type Description
error

Error

Error model.

Details

Name Type Description
code

string

Standardized string to programmatically identify the error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

Error

Error model.

Name Type Description
code

string

Standardized string to programmatically identify the error.

details

Details[]

Detailed errors.

innererror

string

More information to debug error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

RouteType

The type of route this is: DEFAULT - By default, every app has routes to the local address ranges specified by RFC1918 INHERITED - Routes inherited from the real Virtual Network routes STATIC - Static route set on the app only

These values will be used for syncing an app's routes with those from a Virtual Network.

Name Type Description
DEFAULT

string

INHERITED

string

STATIC

string

VnetRoute

Virtual Network route contract used to pass routing information for a Virtual Network.

Name Type Description
id

string

Resource Id.

kind

string

Kind of resource.

name

string

Resource Name.

properties.endAddress

string

The ending address for this route. If the start address is specified in CIDR notation, this must be omitted.

properties.routeType

RouteType

The type of route this is: DEFAULT - By default, every app has routes to the local address ranges specified by RFC1918 INHERITED - Routes inherited from the real Virtual Network routes STATIC - Static route set on the app only

These values will be used for syncing an app's routes with those from a Virtual Network.

properties.startAddress

string

The starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified.

type

string

Resource type.