This API is used to update a VPN gateway with a specified gateway ID.
For details, see Calling APIs.
PUT /v5/{project_id}/vpn-gateways/{vgw_id}
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID. |
vgw_id |
String |
Yes |
Specifies the ID of a VPN gateway instance. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
vpn_gateway |
UpdateVgwRequestBodyContent object |
Yes |
Specifies the VPN gateway object. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
name |
String |
No |
|
local_subnets |
Array of String |
No |
|
eip_id_1 |
String |
No |
|
eip_id_2 |
String |
No |
|
policy_template |
PolicyTemplate object |
No |
|
Parameter |
Type |
Description |
---|---|---|
ike_policy |
IkePolicy object |
Specifies the IKE policy object. |
ipsec_policy |
IpsecPolicy object |
Specifies the IPsec policy object. |
Parameter |
Type |
Description |
---|---|---|
encryption_algorithm |
String |
|
dh_group |
String |
|
authentication_algorithm |
String |
|
lifetime_seconds |
Integer |
|
Parameter |
Type |
Description |
---|---|---|
authentication_algorithm |
String |
|
encryption_algorithm |
String |
|
pfs |
String |
|
lifetime_seconds |
Integer |
|
PUT https://{Endpoint}/v5/{project_id}/vpn-gateways/{vgw_id} { "vpn_gateway": { "name": "vpngw-4321", "local_subnets": [ "192.168.0.0/24" ], "eip_id_1": "f1469b4a-demo-a8df-va86-bb7de91cf493", "eip_id_2": "6ad8e297-demo-a8df-va86-da0f885ccb98" } }
PUT https://{Endpoint}/v5/{project_id}/vpn-gateways/{vgw_id} { "vpn_gateway":{ "policy_template":{ "ike_policy":{ "authentication_algorithm":"sha2-256", "encryption_algorithm":"aes-128-gcm-16", "dh_group":"group21", "lifetime_seconds":86400 }, "ipsec_policy":{ "authentication_algorithm":"sha2-256", "encryption_algorithm":"aes-128-gcm-16", "pfs":"disable", "lifetime_seconds":3600 } } } }
Returned status code 200: successful operation
Parameter |
Type |
Description |
---|---|---|
vpn_gateway |
ResponseVpnGateway object |
Specifies the VPN gateway object. |
request_id |
String |
Specifies a request ID. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
|
name |
String |
|
network_type |
String |
|
attachment_type |
String |
|
er_id |
String |
Specifies the ID of the enterprise router instance to which the VPN gateway connects. This parameter is available only when attachment_type is set to er. |
vpc_id |
String |
When attachment_type is set to vpc, vpc_id specifies the ID of the service VPC associated with the VPN gateway. This parameter is not returned when attachment_type is set to er. To view the ID of the access VPC used by the VPN gateway, check the access_vpc_id field. |
local_subnets |
Array of String |
Specifies a local subnet. This subnet is a cloud-side subnet that needs to communicate with an on-premises network through a VPN. For example, a local subnet can be 192.168.52.0/24. This parameter is available only when attachment_type is set to vpc. |
connect_subnet |
String |
Specifies the ID of the VPC subnet used by the VPN gateway. |
bgp_asn |
Long |
Specifies the BGP AS number of the VPN gateway. |
flavor |
String |
|
availability_zone_ids |
Array of String |
Specifies the AZ where the VPN gateway is deployed. This parameter is available when an AZ is specified. If no AZ is specified, this parameter is available only when the VPN gateway is in ACTIVE state. |
connection_number |
Integer |
Specifies the maximum number of VPN connections supported for the VPN gateway. |
used_connection_number |
Integer |
Specifies the number of VPN connections that have been used by the VPN gateway. |
used_connection_group |
Integer |
Specifies the number of VPN connection groups that have been used by the VPN gateway. A connection group consists of two connections between a customer gateway and a VPN gateway. By default, 10 VPN connection groups are included free of charge with the purchase of a VPN gateway. |
enterprise_project_id |
String |
|
eip1 |
ResponseEip object |
Specifies the first EIP of the VPN gateway in the active-active mode or the active EIP of the VPN gateway in the active-standby mode. This parameter is available when the VPN gateway is in ACTIVE state. |
eip2 |
ResponseEip object |
Specifies the second EIP of the VPN gateway in the active-active mode or the standby EIP of the VPN gateway in the active-standby mode. This parameter is available when the VPN gateway is in ACTIVE state. |
created_at |
String |
|
updated_at |
String |
|
master_eip |
master_eip |
Specifies the first EIP used by the VPN gateway. This parameter is available when the VPN gateway is in ACTIVE state. This parameter has been deprecated, but is retained for compatibility purposes. Using this parameter is not recommended. |
slave_eip |
slave_eip |
Specifies the second EIP used by the VPN gateway. This parameter is available when the VPN gateway is in ACTIVE state. This parameter has been deprecated, but is retained for compatibility purposes. Using this parameter is not recommended. |
access_vpc_id |
String |
|
access_subnet_id |
String |
|
access_private_ip_1 |
String |
Specifies a private IP address used by the VPN gateway to connect to a customer gateway when the network type is private network. This address is the first private IP address of the VPN gateway in active-active mode or the active private IP address of the VPN gateway in the active-standby mode. An example is 192.168.52.9. This parameter is available only when network_type is set to private. |
access_private_ip_2 |
String |
Specifies a private IP address used by the VPN gateway to connect to a customer gateway when the network type is private network. This address is the second private IP address of the VPN gateway in active-active mode or the standby private IP address of the VPN gateway in the active-standby mode. An example is 192.168.52.9. This parameter is available only when network_type is set to private. |
ha_mode |
String |
|
policy_template |
PolicyTemplate object |
Indicates a policy template. This parameter is returned only for a VPN gateway that supports access via non-fixed IP addresses. |
tags |
Array of VpnResourceTag objects |
Specifies a tag list. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
|
ip_version |
Integer |
|
type |
String |
|
ip_address |
String |
|
charge_mode |
String |
|
bandwidth_id |
String |
|
bandwidth_size |
Integer |
|
bandwidth_name |
String |
|
share_type |
String |
|
network_type |
String |
|
Parameter |
Type |
Description |
---|---|---|
ike_policy |
IkePolicy object |
Specifies the IKE policy object. |
ipsec_policy |
IpsecPolicy object |
Specifies the IPsec policy object. |
Parameter |
Type |
Description |
---|---|---|
encryption_algorithm |
String |
|
dh_group |
String |
|
authentication_algorithm |
String |
|
lifetime_seconds |
Integer |
|
Parameter |
Type |
Description |
---|---|---|
authentication_algorithm |
String |
|
encryption_algorithm |
String |
|
pfs |
String |
|
lifetime_seconds |
Integer |
|
Parameter |
Type |
Description |
---|---|---|
key |
String |
|
value |
String |
|
{ "vpn_gateway": { "id": "620d99b8-demo-a8df-va86-200b868f2d7d", "name": "vpngw-4321", "attachment_type": "vpc", "network_type": "public", "vpc_id": "cb4a631d-demo-a8df-va86-ca3fa348c36c", "local_subnets": [ "192.168.0.0/24" ], "connect_subnet": "f5741286-demo-a8df-va86-2c82bd9ee114", "bgp_asn": 64512, "flavor": "Professional1", "availability_zone_ids": ["eu-de-01", "eu-de-02"], "connection_number": 200, "used_connection_number": 0, "used_connection_group": 0, "enterprise_project_id": "0", "eip1": { "id": "f1469b4a-demo-a8df-va86-bb7de91cf493", "ip_version": 4, "type": "5_bgp", "ip_address": "88.***.***.102", "charge_mode": "traffic", "bandwidth_id": "cff40e5e-demo-a8df-va86-7366077bf097", "bandwidth_size": 300, "bandwidth_name": "vpngw-bandwidth-1391" }, "eip2": { "id": "6ad8e297-demo-a8df-va86-da0f885ccb98", "ip_version": 4, "type": "5_bgp", "ip_address": "88.***.***.188", "charge_mode": "traffic", "bandwidth_id": "d290f1ee-demo-a8df-va86-d701748f0851", "bandwidth_size": 300, "bandwidth_name": "vpngw-bandwidth-1392" }, "created_at": "2024-06-28T09:41:11.445Z", "updated_at": "2024-06-28T11:13:13.677Z", "access_vpc_id": "0cf79a3f-demo-a8df-va86-d7ace626b0fa", "access_subnet_id": "f5741286-demo-a8df-va86-2c82bd9ee114", "ha_mode": "active-active" }, "request_id": "33a2b77a-65f9-4fa0-90bd-4bd42038eb41" }
{ "error_code":"VPN.0003", "error_msg":"resource (type=GATEWAY, ID=ff9bdca6-demo-a8df-va86-e4bcc1ea52bc) is not ready, currently CREATING", "request_id": "abafe41c-7744-41af-bf3d-4452872af799" }
For details, see Status Codes.