共用方式為


Web Apps - Create Or Update Vnet Connection

Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH).

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}?api-version=2024-04-01

URI Parameters

Name In Required Type Description
name
path True

string

Name of the app.

resourceGroupName
path True

string

Name of the resource group to which the resource belongs.

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

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 an existing Virtual Network.

api-version
query True

string

API Version

Request Body

Name Type Description
kind

string

Kind of resource.

properties.certBlob

string

A certificate file (.cer) blob containing the public key of the private key used to authenticate a Point-To-Site VPN connection.

properties.dnsServers

string

DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses.

properties.isSwift

boolean

Flag that is used to denote if this is VNET injection

properties.vnetResourceId

string

The Virtual Network's resource ID.

Responses

Name Type Description
200 OK

VnetInfoResource

OK

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.

VnetInfoResource

Virtual Network information ARM resource.

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

VnetInfoResource

Virtual Network information ARM resource.

Name Type Description
id

string

Resource Id.

kind

string

Kind of resource.

name

string

Resource Name.

properties.certBlob

string

A certificate file (.cer) blob containing the public key of the private key used to authenticate a Point-To-Site VPN connection.

properties.certThumbprint

string

The client certificate thumbprint.

properties.dnsServers

string

DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses.

properties.isSwift

boolean

Flag that is used to denote if this is VNET injection

properties.resyncRequired

boolean

true if a resync is required; otherwise, false.

properties.routes

VnetRoute[]

The routes that this Virtual Network connection uses.

properties.vnetResourceId

string

The Virtual Network's resource ID.

type

string

Resource type.

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.