Update a VPN Endpoint

put

/vpnendpoint/{name}

This endpoint is not available on Oracle Cloud Machine.

After you've configured your VPN connection, you can update the connection to enable or disable the VPN tunnel, or to change other connection details.

Required Role: To complete this task, you must have the Compute_Operations role. If this role isn't assigned to you or you're not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.

Request

Supported Media Types
Path Parameters
Header Parameters
Body ()
The request body contains details of the VPN endpoint that you want to update.
Root Schema : VPNEndpoint-put-request
Type: object
The request body contains details of the VPN endpoint that you want to update.
Show Source
  • The peer address of customers VPN device
  • Enables the VPN endpoint. To start a VPN connection, set to true. A connection is established immediately, if possible. If you do not specify this option, the VPN endpoint is disabled and the connection is not established.
  • Three-part name of the object (/Compute-acme/object).
  • Pre-shared VPN key. Enter the pre-shared key. This must be the same key that you provided when you requested the service. This secret key is shared between your network gateway and the Oracle Cloud network for authentication. Specify the full path and name of the text file that contains the pre-shared key. Ensure that the permission level of the text file is set to 400. The pre-shared VPN key must not exceed 256 characters.
  • reachable_routes
    Specify a list of customers subnets (CIDR prefixes) that are reachable through this VPN tunnel. You can specify a maximum of 20 IP subnet addresses. Specify IPv4 addresses in dot-decimal notation with or without mask.
Nested Schema : reachable_routes
Type: array
Specify a list of customers subnets (CIDR prefixes) that are reachable through this VPN tunnel. You can specify a maximum of 20 IP subnet addresses. Specify IPv4 addresses in dot-decimal notation with or without mask.
Show Source

Response

Supported Media Types

200 Response

OK. See Status Codes for information about other possible HTTP status codes.
Headers
Body ()
Root Schema : VPNEndpoint-response
Type: object
Show Source
Nested Schema : reachable_routes
Type: array
List of subnets (CIDR prefixes) that are reachable through this VPN tunnel.
Show Source
Nested Schema : vpn_statistics
Type: object
Additional Properties Allowed
Show Source
Statistics of VPN tunnels
Nested Schema : additionalProperties
Type: object

Examples

cURL Command

The following example shows how to update a VPN endpoint, /Compute-acme/vpn-to-LA, by submitting a PUT request on the REST resource using cURL. For more information about cURL, see Use cURL.

Enter the command on a single line. Line breaks are used in this example for readability.

curl -i -X PUT
     -H "Cookie: $COMPUTE_COOKIE"
     -H "Content-Type: application/oracle-compute-v3+json"
     -H "Accept: application/oracle-compute-v3+json"
     -d "@requestbody.json"
        https://api-z999.compute.us0.oraclecloud.com/vpnendpoint/Compute-acme/vpn-to-LA
  • COMPUTE_COOKIE is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authentication.

  • api-z999.compute.us0.oraclecloud.com is an example REST endpoint URL. Change this value to the REST endpoint URL of your Compute Classic site. For information about finding out REST endpoint URL for your site, see Send Requests.

  • acme is an example value. Replace acme with the identity domain ID of your Compute Classic account.

Example of Request Body

The following shows an example of the request body content in the requestbody.json file to update a VPN enpoint and enable it.

{
   "psk": "********",
   "name": "/Compute-acme/vpn-to-LA",
   "reachable_routes": "192.168.155.0/24",
   "enabled": true,
   "customer_vpn_gateway": "192.168.111.2"
}

Example of Response Body

The following example shows the response body in JSON format when you update a VPN endpoint.

Some lines may be truncated with ellipses (...) for readability.

{
   "status": "UP",
   "psk": "********",
   "name": "/Compute-acme/vpn-to-LA",
   "reachable_routes": "192.168.155.0/24",
   "enabled": true,
   "uri": "http://api.oc.example.com/vpnendpoint/Compute-acme/vpn-to-LA",
   "status_desc": "",
   "customer_vpn_gateway": "192.168.111.2"
}