Skip to content

Latest commit

 

History

History
116 lines (99 loc) · 3.92 KB

firewall_info.md

File metadata and controls

116 lines (99 loc) · 3.92 KB

firewall_info

Get info about a Linode Firewall.

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: Get info about a Firewall by label
  linode.cloud.firewall_info:
    label: 'my-firewall' 
- name: Get info about a Firewall by id
  linode.cloud.firewall_info:
    id: 12345

Parameters

Field Type Required Description
id int Optional The ID of the Firewall to resolve. (Conflicts With: label)
label str Optional The label of the Firewall to resolve. (Conflicts With: id)

Return Values

  • firewall - The returned Firewall.

    • 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
  • devices - The returned devices.

    • Sample Response:
      [
        {
          "created": "2018-01-01T00:01:01",
          "entity": {
            "id": 123,
            "label": "my-linode",
            "type": "linode",
            "url": "/v4/linode/instances/123"
          },
          "id": 123,
          "updated": "2018-01-02T00:01:01"
        }
      ]
    • See the Linode API response documentation for a list of returned fields