Skip to content

Latest commit

 

History

History
107 lines (91 loc) · 4.59 KB

firewall_list.md

File metadata and controls

107 lines (91 loc) · 4.59 KB

firewall_list

List and filter on Firewalls.

Minimum Required Fields

Field Type Required Description
api_token str Required The Linode account personal access token. It is necessary to run the module.
It can be exposed by the environment variable LINODE_API_TOKEN instead.
See details in Usage.

Examples

- name: List all of the accessible firewalls for the current Linode Account
  linode.cloud.firewall_list: {}
- name: Resolve all accessible firewall for the current Linode Account
  linode.cloud.firewall_list:
    filters:
      - name: label
        values: myFirewallLabel

Parameters

Field Type Required Description
order str Optional The order to list firewalls in. (Choices: desc, asc; Default: asc)
order_by str Optional The attribute to order firewalls by.
filters (sub-options) list Optional A list of filters to apply to the resulting firewalls.
count int Optional The number of results to return. If undefined, all results will be returned.

filters

Field Type Required Description
name str Required The name of the field to filter on. Valid filterable attributes can be found here: https://www.linode.com/docs/api/networking/#firewalls-list__responses
values list Required A list of values to allow for this field. Fields will pass this filter if at least one of these values matches.

Return Values

  • firewalls - The returned firewalls.

    • Sample Response:
      [
          {
            "created": "2018-01-01T00:01:01",
            "id": 123,
            "label": "firewall123",
            "rules": {
              "inbound": [
                {
                  "action": "ACCEPT",
                  "addresses": {
                    "ipv4": [
                      "192.0.2.0/24"
                    ],
                    "ipv6": [
                      "2001:DB8::/32"
                    ]
                  },
                  "description": "An example firewall rule description.",
                  "label": "firewallrule123",
                  "ports": "22-24, 80, 443",
                  "protocol": "TCP"
                }
              ],
              "inbound_policy": "DROP",
              "outbound": [
                {
                  "action": "ACCEPT",
                  "addresses": {
                    "ipv4": [
                      "192.0.2.0/24"
                    ],
                    "ipv6": [
                      "2001:DB8::/32"
                    ]
                  },
                  "description": "An example firewall rule description.",
                  "label": "firewallrule123",
                  "ports": "22-24, 80, 443",
                  "protocol": "TCP"
                }
              ],
              "outbound_policy": "DROP"
            },
            "status": "enabled",
            "tags": [
              "example tag",
              "another example"
            ],
            "updated": "2018-01-02T00:01:01"
          }
      ]
    • See the Linode API response documentation for a list of returned fields