Set represents an nftables set object. Sets are efficient data structures that store collections of elements (like IP addresses, ports) and can be used to quickly check for membership or map keys to values within rules.
Fields
| Field Name | Description |
|---|---|
id - Uint32!
|
The internal numeric ID of the set, unique within the current transaction. |
name - String!
|
The human-readable name of the set. |
isMap - Boolean!
|
If true, this set functions as a map, storing key-value pairs instead of just keys. |
timeout - Duration!
|
The default timeout duration for elements added to this set. |
dataType - SetDatatype!
|
The data type of the elements stored in this set (e.g., IPV4_ADDR, INTEGER, STRING). |
comment - String!
|
An optional descriptive comment for the set. |
size - Uint32!
|
The maximum size (number of elements) the set can hold. |
flags - [SetFlags!]
|
Flags that define the behavior and properties of the set. |
Used by
Tabletype: Table is a container for chains and rules.
Example
Example
{
"id": "1073741824",
"name": "xyz789",
"isMap": true,
"timeout": "600000000",
"dataType": "INVALID",
"comment": "abc123",
"size": "1073741824",
"flags": ["CONSTANT"]
}