|
| 1 | +# firewall_template_list |
| 2 | + |
| 3 | +List and filter on Firewall Templates. |
| 4 | + |
| 5 | +- [Minimum Required Fields](#minimum-required-fields) |
| 6 | +- [Examples](#examples) |
| 7 | +- [Parameters](#parameters) |
| 8 | +- [Return Values](#return-values) |
| 9 | + |
| 10 | +## Minimum Required Fields |
| 11 | +| Field | Type | Required | Description | |
| 12 | +|-------------|-------|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 13 | +| `api_token` | `str` | **Required** | The Linode account personal access token. It is necessary to run the module. <br/>It can be exposed by the environment variable `LINODE_API_TOKEN` instead. <br/>See details in [Usage](https://github.com/linode/ansible_linode?tab=readme-ov-file#usage). | |
| 14 | + |
| 15 | +## Examples |
| 16 | + |
| 17 | +```yaml |
| 18 | +- name: List all of the firewall templates |
| 19 | + linode.cloud.firewall_template_list: {} |
| 20 | +``` |
| 21 | +
|
| 22 | +
|
| 23 | +## Parameters |
| 24 | +
|
| 25 | +| Field | Type | Required | Description | |
| 26 | +|-----------|------|----------|------------------------------------------------------------------------------| |
| 27 | +| `order` | <center>`str`</center> | <center>Optional</center> | The order to list Firewall Templates in. **(Choices: `desc`, `asc`; Default: `asc`)** | |
| 28 | +| `order_by` | <center>`str`</center> | <center>Optional</center> | The attribute to order Firewall Templates by. | |
| 29 | +| [`filters` (sub-options)](#filters) | <center>`list`</center> | <center>Optional</center> | A list of filters to apply to the resulting Firewall Templates. | |
| 30 | +| `count` | <center>`int`</center> | <center>Optional</center> | The number of Firewall Templates to return. If undefined, all results will be returned. | |
| 31 | + |
| 32 | +### filters |
| 33 | + |
| 34 | +| Field | Type | Required | Description | |
| 35 | +|-----------|------|----------|------------------------------------------------------------------------------| |
| 36 | +| `name` | <center>`str`</center> | <center>**Required**</center> | The name of the field to filter on. Valid filterable fields can be found [here](https://techdocs.akamai.com/linode-api/reference/get-firewall-templates). | |
| 37 | +| `values` | <center>`list`</center> | <center>**Required**</center> | A list of values to allow for this field. Fields will pass this filter if at least one of these values matches. | |
| 38 | + |
| 39 | +## Return Values |
| 40 | + |
| 41 | +- `firewall_templates` - The returned Firewall Templates. |
| 42 | + |
| 43 | + - Sample Response: |
| 44 | + ```json |
| 45 | + |
| 46 | + [ |
| 47 | + { |
| 48 | + "rules": { |
| 49 | + "inbound": [ |
| 50 | + { |
| 51 | + "action": "ACCEPT", |
| 52 | + "addresses": { |
| 53 | + "ipv4": [ |
| 54 | + "0.0.0.0/0" |
| 55 | + ], |
| 56 | + "ipv6": [ |
| 57 | + "::/0" |
| 58 | + ] |
| 59 | + }, |
| 60 | + "description": "Accept inbound SSH", |
| 61 | + "label": "accept-inbound-ssh", |
| 62 | + "ports": "22", |
| 63 | + "protocol": "TCP" |
| 64 | + }, |
| 65 | + { |
| 66 | + "action": "ACCEPT", |
| 67 | + "addresses": { |
| 68 | + "ipv4": [ |
| 69 | + "0.0.0.0/0" |
| 70 | + ], |
| 71 | + "ipv6": [ |
| 72 | + "::/0" |
| 73 | + ] |
| 74 | + }, |
| 75 | + "description": "Accept inbound ICMP", |
| 76 | + "label": "accept-inbound-icmp", |
| 77 | + "protocol": "ICMP" |
| 78 | + }, |
| 79 | + { |
| 80 | + "action": "ACCEPT", |
| 81 | + "addresses": { |
| 82 | + "ipv4": [ |
| 83 | + "10.0.0.0/8", |
| 84 | + "192.168.0.0/17", |
| 85 | + "172.16.0.0/12" |
| 86 | + ] |
| 87 | + }, |
| 88 | + "description": "Accept inbound RFC-1918", |
| 89 | + "label": "accept-inbound-rfc1918", |
| 90 | + "ports": "1-65535", |
| 91 | + "protocol": "TCP" |
| 92 | + }, |
| 93 | + { |
| 94 | + "action": "ACCEPT", |
| 95 | + "addresses": { |
| 96 | + "ipv4": [ |
| 97 | + "10.0.0.0/8", |
| 98 | + "192.168.0.0/17", |
| 99 | + "172.16.0.0/12" |
| 100 | + ] |
| 101 | + }, |
| 102 | + "description": "Accept inbound RFC-1918", |
| 103 | + "label": "accept-inbound-rfc1918", |
| 104 | + "ports": "1-65535", |
| 105 | + "protocol": "UDP" |
| 106 | + } |
| 107 | + ], |
| 108 | + "inbound_policy": "DROP", |
| 109 | + "outbound": [], |
| 110 | + "outbound_policy": "ACCEPT" |
| 111 | + }, |
| 112 | + "slug": "vpc" |
| 113 | + }, |
| 114 | + { |
| 115 | + "rules": { |
| 116 | + "inbound": [ |
| 117 | + { |
| 118 | + "action": "ACCEPT", |
| 119 | + "addresses": { |
| 120 | + "ipv4": [ |
| 121 | + "0.0.0.0/0" |
| 122 | + ], |
| 123 | + "ipv6": [ |
| 124 | + "::/0" |
| 125 | + ] |
| 126 | + }, |
| 127 | + "description": "Accept inbound SSH", |
| 128 | + "label": "accept-inbound-ssh", |
| 129 | + "ports": "22", |
| 130 | + "protocol": "TCP" |
| 131 | + }, |
| 132 | + { |
| 133 | + "action": "ACCEPT", |
| 134 | + "addresses": { |
| 135 | + "ipv4": [ |
| 136 | + "0.0.0.0/0" |
| 137 | + ], |
| 138 | + "ipv6": [ |
| 139 | + "::/0" |
| 140 | + ] |
| 141 | + }, |
| 142 | + "description": "Accept inbound ICMP", |
| 143 | + "label": "accept-inbound-icmp", |
| 144 | + "protocol": "ICMP" |
| 145 | + } |
| 146 | + ], |
| 147 | + "inbound_policy": "DROP", |
| 148 | + "outbound": [], |
| 149 | + "outbound_policy": "ACCEPT" |
| 150 | + }, |
| 151 | + "slug": "public" |
| 152 | + } |
| 153 | + ] |
| 154 | + |
| 155 | + ``` |
| 156 | + - See the [Linode API response documentation](https://techdocs.akamai.com/linode-api/reference/get-firewall-templates) for a list of returned fields |
| 157 | + |
| 158 | + |
0 commit comments