• Elastic Load Balancing

elb
  1. Help Center
  2. Elastic Load Balancing
  3. API Reference
  4. Enhanced Load Balancer APIs
  5. Whitelist
  6. Querying Whitelists

Querying Whitelists

Function

This API is used to query all the whitelists. Filter query and pagination query are supported.

URI

GET /v2.0/lbaas/whitelists

Constraints

Parameters marker, limit, and page_reverse are used for pagination query. Parameters marker and page_reverse take effect only when they are used together with parameter limit.

Request

  • Request parameters
    Table 1 Parameter description

    Parameter

    Type

    Mandatory

    Description

    marker

    string

    No

    Specifies the ID of the whitelist from which pagination query starts, that is, the ID of the last whitelist on the previous page.

    This parameter must be used together with limit.

    limit

    int

    No

    Specifies the number of whitelists on each page.

    The value ranges from 0 to intmax.

    page_reverse

    bool

    No

    Specifies the page direction. The value can be true or false, and the default value is false. The last page in the list requested with page_reverse set to false will not contain the "next" link, and the last page in the list requested with page_reverse set to true will not contain the "previous" link.

    This parameter must be used together with limit.

    id

    Uuid

    No

    Specifies the whitelist ID.

    tenant_id

    String (255)

    No

    Specifies the ID of the project where the whitelist is used.

    listener_id

    Uuid

    No

    Specifies the ID of the listener to which the whitelist is added.

    enable_whitelist

    Bool

    No

    Specifies whether to enable access control.

    true: Access control is enabled.

    false: Access control is disabled.

    whitelist

    String

    No

    Specifies the IP addresses in the whitelist.

  • Example request
    GET https://{Endpoint}/v2.0/lbaas/whitelists

Response

  • Response parameters
    Table 2 Parameter description

    Parameter

    Type

    Description

    whitelists

    List

    Lists the whitelists. For details, see Table 3.

    Table 3 whitelist field description

    Parameter

    Type

    Description

    id

    Uuid

    Specifies the whitelist ID.

    tenant_id

    String (255)

    Specifies the ID of the project where the whitelist is used.

    listener_id

    Uuid

    Specifies the ID of the listener to which the whitelist is added.

    enable_whitelist

    Bool

    Specifies whether to enable access control.

    true: Access control is enabled.

    false: Access control is disabled.

    whitelist

    String

    Specifies the IP addresses in the whitelist.

    whitelists_links

    List

    Provides links to the previous or next page during pagination query, respectively.

    This parameter exists only in the response body of pagination query.

    For details, see Table 4.

    Table 4 whitelists_links field description

    Parameter

    Type

    Description

    href

    string

    Provides links to the previous or next page during pagination query, respectively.

    rel

    String (255)

    Specifies the prompt of the previous or next page.

    The value can be next or previous. The value next indicates the href containing the URL of the next page, and previous indicates the href containing the URL of the previous page.

  • Example response
    { 
        "whitelists": [ 
            { 
                "id": "eabfefa3fd1740a88a47ad98e132d238",  
                "listener_id": "eabfefa3fd1740a88a47ad98e132d238",  
                "tenant_id": "eabfefa3fd1740a88a47ad98e132d238",  
                "enable_whitelist": true,  
                "whitelist": "192.168.11.1,192.168.0.1/24,192.168.201.18/8,100.164.0.1/24" 
            },  
            { 
                "id": "eabfefa3fd1740a88a47ad98e132d326",  
                "listener_id": "eabfefa3fd1740a88a47ad98e132d327",  
                "tenant_id": "eabfefa3fd1740a88a47ad98e132d436",  
                "enable_whitelist": true,  
                "whiltelist": "192.168.12.1,192.168.1.1/24,192.168.203.18/8,100.164.5.1/24" 
            } 
        ] 
    }

Response Codes

For details, see HTTP Status Codes for Enhanced Load Balancers.