[{"label":"Latest (v1.0)","version":"latest"}]
nsx-vmc-policy

Create L2VPN Session From Peer Code

Description

Create or patch an L2VPN session from Peer Codes. In addition to the L2VPN Session, the IPSec VPN Session, along with the IKE, Tunnel, and DPD Profiles are created and owned by the system. IPSec VPN Service and Local Endpoint are created only when required, i.e., an IPSec VPN Service does not already exist, or an IPSec VPN Local Endpoint with same local address does not already exist. Updating the L2VPN Session can be performed only through this API by specifying new peer codes. Use of specific APIs to update the L2VPN Session and the different resources associated with it is not allowed, except for IPSec VPN Service and Local Endpoint, resources that are not system owned. API supported only when L2VPN Service is in Client Mode.

Request

Request

URL

URL


post
https://nsxmanager.your.domain/policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id}?action=create_with_peer_code
Copy

Path Parameters

Path Parameters

string
tier-0-id Required

string
locale-service-id Required

string
service-id Required

string
session-id Required

Request Body

Request Body

L2VPNSessionData of type(s) application/json Required
{
	"description": "string",
	"display_name": "string",
	"enabled": false,
	"transport_tunnels": [
		{
			"local_address": "string",
			"peer_address": "string",
			"peer_code": "string"
		}
	]
}
string
description Optional

Description of L2VPN Session


string
display_name Optional

Defaults to id if not set.


boolean
enabled Optional

Enable to extend all the associated segments.


transport_tunnels Optional

List of L2VPN transport tunnel data.

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

200 OK

OK

Errors

Errors

400

Bad Request


403

Forbidden


404

Not Found


412

Precondition Failed


500

Internal Server Error


503

Service Unavailable

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"description":"string","display_name":"string","enabled":false,"transport_tunnels":[{"local_address":"string","peer_address":"string","peer_code":"string"}]}' https://nsxmanager.your.domain/policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id}?action=create_with_peer_code
Vendor Extensions

Vendor Extensions

This operation contains the following vendor extensions defined in the spec:
x-vmw-doc-operation: create-l2vpn-session-from-peer-code
x-vmw-nsx-module: PolicyLayer2VPN


Feedback

Was this page helpful?