This section describes how to create a customer gateway by calling APIs.
You have obtained a user token if you need to use token authentication. In addition, you need to add X-Auth-Token to the request header when calling an API. For details about token authentication, see "Authentication" in the Virtual Private Cloud API Reference.
The token obtained through IAM is valid for only 24 hours. When using a token for authentication, cache it to avoid frequent calling.
Parameter |
Description |
Example Value |
|---|---|---|
name |
Specifies a customer gateway name. |
stub-customer-gateway-id-1 |
id_value |
Specifies the identifier of a customer gateway. |
10.12.13.21 |
{
"customer_gateway": {
"name": "cgw-3ebf",
"id_type": "ip",
"id_value": "10.***.***.21"
}
}
1 2 3 4 5 6 7 8 9 10 11 | { "customer_gateway": { "id": "03c0aa3d-demo-a8df-va86-9d82473765d4", "name": "cgw-3ebf", "id_type": "ip", "id_value": "10.***.***.21", "created_at": "2025-07-17T16:49:28.108+08:00", "updated_at": "2025-07-17T16:49:28.108+08:00" }, "request_id": "e55783ba-5cc8-40c1-ad81-12cce6f773d2" } |
1 2 3 4 5 6 7 8 9 10 11 | { "customer_gateway": { "id": "03c0aa3d-demo-a8df-va86-9d82473765d4", "name": "cgw-3ebf", "id_type": "ip", "id_value": "10.***.***.21", "created_at": "2025-07-17T16:49:28.108+08:00", "updated_at": "2025-07-17T16:49:28.108+08:00" }, "request_id": "8cf476c4-c3d4-4516-bfbc-01e2473e549b" } |