Skip to content

Latest commit

 

History

History
158 lines (141 loc) · 6.08 KB

File metadata and controls

158 lines (141 loc) · 6.08 KB

firewall_template_list

List and filter on Firewall Templates.

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 firewall templates
  linode.cloud.firewall_template_list: {}

Parameters

Field Type Required Description
order str Optional The order to list Firewall Templates in. (Choices: desc, asc; Default: asc)
order_by str Optional The attribute to order Firewall Templates by.
filters (sub-options) list Optional A list of filters to apply to the resulting Firewall Templates.
count int Optional The number of Firewall Templates 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 fields can be found here.
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

  • firewall_templates - The returned Firewall Templates.

    • Sample Response:
      [
        {
          "rules": {
            "inbound": [
              {
                "action": "ACCEPT",
                "addresses": {
                  "ipv4": [
                    "0.0.0.0/0"
                  ],
                  "ipv6": [
                    "::/0"
                  ]
                },
                "description": "Accept inbound SSH",
                "label": "accept-inbound-ssh",
                "ports": "22",
                "protocol": "TCP"
              },
              {
                "action": "ACCEPT",
                "addresses": {
                  "ipv4": [
                    "0.0.0.0/0"
                  ],
                  "ipv6": [
                    "::/0"
                  ]
                },
                "description": "Accept inbound ICMP",
                "label": "accept-inbound-icmp",
                "protocol": "ICMP"
              },
              {
                "action": "ACCEPT",
                "addresses": {
                  "ipv4": [
                    "10.0.0.0/8",
                    "192.168.0.0/17",
                    "172.16.0.0/12"
                  ]
                },
                "description": "Accept inbound RFC-1918",
                "label": "accept-inbound-rfc1918",
                "ports": "1-65535",
                "protocol": "TCP"
              },
              {
                "action": "ACCEPT",
                "addresses": {
                  "ipv4": [
                    "10.0.0.0/8",
                    "192.168.0.0/17",
                    "172.16.0.0/12"
                  ]
                },
                "description": "Accept inbound RFC-1918",
                "label": "accept-inbound-rfc1918",
                "ports": "1-65535",
                "protocol": "UDP"
              }
            ],
            "inbound_policy": "DROP",
            "outbound": [],
            "outbound_policy": "ACCEPT"
          },
          "slug": "vpc"
        },
        {
          "rules": {
            "inbound": [
              {
                "action": "ACCEPT",
                "addresses": {
                  "ipv4": [
                    "0.0.0.0/0"
                  ],
                  "ipv6": [
                    "::/0"
                  ]
                },
                "description": "Accept inbound SSH",
                "label": "accept-inbound-ssh",
                "ports": "22",
                "protocol": "TCP"
              },
              {
                "action": "ACCEPT",
                "addresses": {
                  "ipv4": [
                    "0.0.0.0/0"
                  ],
                  "ipv6": [
                    "::/0"
                  ]
                },
                "description": "Accept inbound ICMP",
                "label": "accept-inbound-icmp",
                "protocol": "ICMP"
              }
            ],
            "inbound_policy": "DROP",
            "outbound": [],
            "outbound_policy": "ACCEPT"
          },
          "slug": "public"
        }
      ]
      
    • See the Linode API response documentation for a list of returned fields