Reviewed-by: Kucerak, Kristian <kristian.kucerak@t-systems.com> Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com> Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
25 KiB
Creating a Virtual Gateway
Function
This API is used to create a virtual gateway.
URI
POST /v2.0/dcaas/virtual-gateways
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
virtual_gateway |
Dictionary data structure |
Yes |
Specifies the virtual_gateway object. |
Request
Table 2 lists the virtual_gateway parameters.
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
tenant_id |
String |
No |
Specifies the project ID. |
name |
String |
No |
Specifies the virtual gateway name. |
description |
String |
No |
Provides supplementary information about the virtual gateway. |
vpc_id |
String |
Yes |
Specifies the ID of the VPC to be accessed. |
local_ep_group_id |
String |
Yes |
Specifies the ID of the local endpoint group that records CIDR blocks of the VPC subnets. For details about how to obtain the ID, see section Creating an Endpoint Group. |
device_id |
String |
No |
Specifies the ID of the physical device used by the virtual gateway. |
redundant_device_id |
String |
No |
Specifies the ID of the redundant physical device used by the virtual gateway. |
type |
String |
No |
Specifies the virtual gateway type. The value can be default or double ipsec. |
ipsec_bandwidth |
Integer |
No |
Specifies the bandwidth provided for IPsec VPN in Mbit/s. |
bgp_asn |
Integer |
No |
Specifies the BGP ASN of the virtual gateway. |
admin_state_up |
Boolean |
No |
Specifies the administrative status of the virtual gateway. The value can be true or false. |
Response
Table 3 lists the response parameter.
Parameter |
Type |
Description |
---|---|---|
virtual_gateway |
Dictionary data structure |
Specifies the virtual_gateway object. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the virtual gateway ID. |
tenant_id |
String |
Specifies the project ID. |
name |
String |
Specifies the virtual gateway name. |
description |
String |
Provides supplementary information about the virtual gateway. |
vpc_id |
String |
Specifies the ID of the VPC to be accessed. |
local_ep_group_id |
String |
Specifies the ID of the local endpoint group that records CIDR blocks of the VPC subnets. |
device_id |
String |
Specifies the ID of the physical device used by the virtual gateway. |
redundant_device_id |
String |
Specifies the ID of the redundant physical device used by the virtual gateway. |
type |
String |
Specifies the virtual gateway type. The value can be default or double ipsec. |
ipsec_bandwidth |
Integer |
Specifies the bandwidth provided for IPsec VPN in Mbit/s. |
bgp_asn |
Integer |
Specifies the BGP ASN of the virtual gateway. |
admin_state_up |
Boolean |
Specifies the administrative status of the virtual gateway. The value can be true or false. |
status |
String |
Specifies the virtual gateway status. The value can be ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE. |
Examples
- Example request
POST /v2.0/dcaas/virtual-gateways { "virtual_gateway" : { "name" : "virtual gateway1", "vpc_id" : "908d9cf3-da64-4acb-393f-e5eb6b9e838a", "local_ep_group_id" : "f8834cf1-5468-87c7-223d-56e78b9699ab", "device_id" : "aaa_01" } }
- Example response
{ "virtual_gateway":{ "status": "PENDING_CREATE", "redundant_device_id": "", "description":"", "admin_state_up": true, "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f", "name": "virtual gateway1", "local_ep_group_id":"011856d0-e1b0-4d78-b83a-edd67801764b", "vpc_id":"908d9cf3-da64-4acb-393f-e5eb6b9e838a", "device_id":"70.202.5.206", "type": "default", "id":"97b87776-49e3-44a4-ac4c-8f9156a360cd", "ipsec_bandwidth":1 } }
Returned Value
For details, see section Common Returned Values.