Updated on 2023-12-18 GMT+08:00

Adding a Whitelist

API Format

Method

URI

Description

POST

/v2.0/lbaas/whitelists

Adds a whitelist.

Procedure

  1. Set the request header. Set the header in Postman and place the obtained token in the header.

  2. Under Body, set the request body.

  3. Enter the URL.

    https://elb.cn-east-2.myhuaweicloud.com/v2.0/lbaas/whitelists

  4. Send the request.

    Set the POST request method and click Send to wait for response from the server.

    {
        "whitelist": {
            "tenant_id": "0d0bf0e8fb564cc9abbe526dbdca9248",
            "whitelist": "192.168.11.1,192.168.0.1/24,192.168.201.18/8,100.164.0.1/24",
            "enable_whitelist": true,
            "id": "317a0ea1-e47b-4e8b-996f-0556270245c3",
            "listener_id": "a7b996cf-23ec-4c0b-b310-45495d29f80c"
        }
    }

Sample Code

Request body in 2

{
    "whitelist": {
        "listener_id": "a7b996cf-23ec-4c0b-b310-45495d29f80c",
        "enable_whitelist": true,
        "whitelist": "192.168.11.1,192.168.0.1/24,192.168.201.18/8,100.164.0.1/24"
    }
}