Updated on 2024-10-11 GMT+08:00

Querying Network ACLs

Function

This API is used to query network ACLs.

Debugging

You can debug this API through automatic authentication in API Explorer.

URI

GET /v3/{project_id}/vpc/firewalls

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

For details about how to obtain a project ID, see Obtaining a Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

  • Number of records returned on each page.

  • Value range: 0 to 2000.

marker

No

String

Start resource ID of pagination query. If the parameter is left blank, only resources on the first page are queried.

id

No

Array of strings

  • Unique ID of a network ACL, which is used to filter the network ACL. Multiple IDs can be specified for filtering.

name

No

Array of strings

  • Network ACL name, which is used to filter the network ACL. Multiple names can be specified for filtering.

status

No

String

  • Network ACL status, which is used to filter the network ACL.

admin_state_up

No

Boolean

  • Admin state of a network ACL, which is used to filter the network ACL.

enterprise_project_id

No

Array of strings

  • Enterprise project ID. This parameter is used to filter the network ACLs of an enterprise project.

  • The project ID can be 0 or a string that contains a maximum of 36 characters in UUID format with hyphens (-). 0 indicates the default enterprise project. To obtain network ACLs of all enterprise projects, set this parameter to all_granted_eps.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

firewalls

Array of ListFirewallDetail objects

Response body for querying network ACLs.

page_info

PageInfo object

Pagination information.

request_id

String

Request ID.

Table 4 ListFirewallDetail

Parameter

Type

Description

id

String

  • The unique ID of a network ACL.

  • The value is a string in UUID format.

name

String

  • Network ACL name.

  • The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.).

description

String

  • Description about the network ACL.

  • The value can contain no more than 255 characters.

  • The value cannot contain angle brackets (< or >).

project_id

String

  • ID of the project that is associated with the network ACL.

created_at

String

  • Time when a network ACL is created.

  • The value is a UTC time in the format of yyyy-MM-ddTHH:mm:ssZ, which is automatically generated by the system.

updated_at

String

  • Time when the network ACL was last updated.

  • The value is a UTC time in the format of yyyy-MM-ddTHH:mm:ssZ, which is automatically generated by the system.

admin_state_up

Boolean

  • Whether a network ACL is enabled.

  • The value can be true (enabled) or false (disabled).

status

String

  • Network ACL status.

enterprise_project_id

String

  • ID of the enterprise project that is associated with the network ACL.

  • The project ID can be 0 or a string that contains a maximum of 36 characters in UUID format with hyphens (-). 0 indicates the default enterprise project.

tags

Array of ResourceTag objects

  • Network ACL tags.

associations

Array of FirewallAssociation objects

  • Subnets that are associated with a network ACL.

Table 5 ResourceTag

Parameter

Type

Description

key

String

  • Tag key

  • Tag keys must be unique for each resource.

Minimum: 1

Maximum: 128

value

String

  • Tag value.

Maximum: 255

Table 6 FirewallAssociation

Parameter

Type

Description

virsubnet_id

String

  • IDs of subnets that are associated with a network ACL.

Table 7 PageInfo

Parameter

Type

Description

previous_marker

String

First record on the current page.

current_count

Integer

Total number of records on the current page.

next_marker

String

Last record on the current page. This parameter does not exist if the page is the last one.

Example Requests

Querying network ACLs.

GET https://{Endpoint}/v3/{project_id}/vpc/firewalls

Example Responses

Status code: 200

Normal response to the GET operation. For more status codes, see Status Codes.

  • {
      "firewalls" : [ {
        "id" : "e9a7731d-5bd9-4250-a524-b9a076fd5629",
        "name" : "network_acl_test1",
        "description" : "network_acl_test1",
        "project_id" : "9476ea5a8a9849c38358e43c0c3a9e12",
        "created_at" : "2022-04-07T07:30:46.000+00:00",
        "updated_at" : "2022-04-07T07:30:46.000+00:00",
        "admin_state_up" : true,
        "enterprise_project_id" : "158ad39a-dab7-45a3-9b5a-2836b3cf93f9",
        "status" : "ACTIVE",
        "tags" : [ ],
        "associations" : [ {
          "virsubnet_id" : "8359e5b0-353f-4ef3-a071-98e67a34a143"
        } ]
      } ]
    }

Status Codes

Status Code

Description

200

Normal response to the GET operation. For more status codes, see Status Codes.

Error Codes

See Error Codes.