Internet Connectivity¶
List Internet Service¶
$ curl -sS \
-H "Content-Type: application/json" \
-H "X-Auth-Token: {TOKEN}" \
-X GET {api_endpoint}/v2.0/internet_services
Sample Response Body
{
"internet_services": [
{
"zone": "jp1-zone1",
"name": "Internet-Service-01",
"minimal_submask_length": 26,
"id": "6861948b-7fc0-4310-83e6-7f038717e9c9",
"description": ""
}
]
}
The id parameter in Response is the uuid of Internet Service and is used as the internet_service_id parameter in Create Internet Gateway.
List QoS Options of Internet Service¶
$ curl -sS \
-H "Content-Type: application/json" \
-H "X-Auth-Token: {TOKEN}" \
-X GET {api_endpoint}/v2.0/qos_options?service_type=internet
Sample Response Body(Excerpt)
{
"qos_options": [
{
"vpn_service_id": null,
"status": "ACTIVE",
"service_type": "internet",
"qos_type": "guarantee",
"name": "50Mbps-Guaranteed",
"internet_service_id": "6861948b-7fc0-4310-83e6-7f038717e9c9",
"aws_service_id": null,
"azure_service_id": null,
"bandwidth": "50",
"description": "",
"fic_service_id": null,
"gcp_service_id": null,
"id": "40265698-6f8c-412a-b948-710dd4b8ecad",
"interdc_service_id": null
},
{
"vpn_service_id": null,
"status": "ACTIVE",
"service_type": "internet",
"qos_type": "besteffort",
"name": "100Mbps-BestEffort",
"internet_service_id": "6861948b-7fc0-4310-83e6-7f038717e9c9",
"aws_service_id": null,
"azure_service_id": null,
"bandwidth": "100",
"description": "",
"fic_service_id": null,
"gcp_service_id": null,
"id": "4861fe30-d941-4199-8a20-eef1b2625a92",
"interdc_service_id": null
},
]
}
The id parameter of the bandwidth plan used in the Response is the uuid of the QoS Option and is used as the qos_option_id parameter in the Create Internet Gateway.
Create Internet Gateway¶
$ curl -sS \
-H "Content-Type: application/json" \
-H "X-Auth-Token: {TOKEN}" \
-X POST -d @inet_gw.json {api_endpoint}/v2.0/internet_gateways
Sample Request Body (inet_gw.json)
{
"internet_gateway": {
"internet_service_id": "6861948b-7fc0-4310-83e6-7f038717e9c9",
"name": "Example internet gateway 1",
"qos_option_id": "4861fe30-d941-4199-8a20-eef1b2625a92"
}
}
Sample Response Body
{
"internet_gateway": {
"description": "",
"id": "baaed23d-a731-4ecc-b079-56fea18e80bd",
"internet_service_id": "6861948b-7fc0-4310-83e6-7f038717e9c9",
"name": "Example internet gateway 1",
"qos_option_id": "4861fe30-d941-4199-8a20-eef1b2625a92",
"status": "PENDING_CREATE",
"tenant_id": "6c0bdafab1914ab2b2b6c415477defc7"
}
}
The id parameter in the Response is the uuid of the newly created Internet Gateway and is used as the internet_gw_id parameter in Create Public IP, Create Gateway Interface, and Create Static Route.
Create Public IP¶
$ curl -sS \
-H "Content-Type: application/json" \
-H "X-Auth-Token: {TOKEN}" \
-X POST -d @public_ip.json {api_endpoint}/v2.0/public_ips
Sample Request Body (public_ip.json)
{
"public_ip": {
"internet_gw_id": "baaed23d-a731-4ecc-b079-56fea18e80bd",
"name": "Example public ip 1",
"submask_length": 28
}
}
Sample Response Body
{
"public_ip": {
"cidr": "100.127.251.160",
"description": "",
"id": "1cf0352a-8300-4ed2-b19c-32ea184807d4",
"internet_gw_id": "baaed23d-a731-4ecc-b079-56fea18e80bd",
"name": "Example public ip 1",
"status": "PENDING_CREATE",
"submask_length": 28,
"tenant_id": "6c0bdafab1914ab2b2b6c415477defc7"
}
}
Create Gateway Interface¶
$ curl -sS \
-H "Content-Type: application/json" \
-H "X-Auth-Token: {TOKEN}" \
-X POST -d @gw_if.json {api_endpoint}/v2.0/gw_interfaces
Sample Request Body(gw_if.json)
{
"gw_interface": {
"gw_vipv4": "192.168.1.1",
"internet_gw_id": "baaed23d-a731-4ecc-b079-56fea18e80bd",
"name": "Example gateway interface 1",
"netmask": 24,
"network_id": "8bd9afc9-6d7f-496f-a2e2-7e50a9340292",
"primary_ipv4": "192.168.1.4",
"secondary_ipv4": "192.168.1.5",
"service_type": "internet",
"vrid": 2
}
}
network_id is the ID of the L2 Network Service that connects the Internet Gateway
Sample Response Body
{
"gw_interface": {
"description": "",
"gw_vipv4": "192.168.1.1",
"id": "55b6ea31-41d0-4f98-9b22-81173c9eb9c7",
"internet_gw_id": "baaed23d-a731-4ecc-b079-56fea18e80bd",
"name": "Example gateway interface 1",
"netmask": 24,
"network_id": "8bd9afc9-6d7f-496f-a2e2-7e50a9340292",
"primary_ipv4": "192.168.1.4",
"secondary_ipv4": "192.168.1.5",
"service_type": "internet",
"status": "PENDING_CREATE",
"tenant_id": "6c0bdafab1914ab2b2b6c415477defc7",
"vrid": 2
}
}
Create Static Route¶
$ curl -sS \
-H "Content-Type: application/json" \
-H "X-Auth-Token: {TOKEN}" \
-X POST -d @static_route.json {api_endpoint}/v2.0/static_routes
Sample Request Body (static_route.json)
{
"static_route": {
"destination": "100.127.251.160/28",
"internet_gw_id": "baaed23d-a731-4ecc-b079-56fea18e80bd",
"name": "Example static route 1",
"nexthop": "192.168.1.3",
"service_type": "internet"
}
}
Sample Response Body
{
"static_route": {
"description": "",
"destination": "100.127.251.160/28",
"id": "a1d8c47e-d6bf-4414-bbf5-7b1fe500627f",
"internet_gw_id": "baaed23d-a731-4ecc-b079-56fea18e80bd",
"name": "Example static route 1",
"nexthop": "192.168.1.3",
"service_type": "internet",
"status": "PENDING_CREATE",
"tenant_id": "6c0bdafab1914ab2b2b6c415477defc7"
}
}