List and filter on VPC Subnets.
- name: List all of the subnets under a VPC
linode.cloud.vpc_subnet_list:
vpc_id: 12345
- name: List all of the subnets with a given label under a VPC
linode.cloud.vpc_subnet_list:
vpc_id: 12345
filters:
- name: label
values: my-subnet
Field |
Type |
Required |
Description |
vpc_id |
int |
Required |
The parent VPC for this VPC Subnet. |
order |
str |
Optional |
The order to list VPC Subnets in. (Choices: desc , asc ; Default: asc ) |
order_by |
str |
Optional |
The attribute to order VPC Subnets by. |
filters (sub-options) |
list |
Optional |
A list of filters to apply to the resulting VPC Subnets. |
count |
int |
Optional |
The number of VPC Subnets to return. If undefined, all results will be returned. |
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. |