Get info about a Linode VPC Subnet.
| 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. |
- name: Get info about a VPC Subnet by label
linode.cloud.vpc_subnet_info:
vpc_id: 12345
label: my-subnet- name: Get info about a VPC Subnet by ID
linode.cloud.vpc_subnet_info:
vpc_id: 12345
id: 123| Field | Type | Required | Description |
|---|---|---|---|
vpc_id |
int |
Required | The ID of the VPC for this resource. |
id |
int |
Optional | The ID of the VPC Subnet to resolve. (Conflicts With: label) |
label |
str |
Optional | The label of the VPC Subnet to resolve. (Conflicts With: id) |
-
subnet- The returned VPC Subnet.- Sample Response:
{ "created": "2023-08-31T18:53:04", "id": 271, "ipv4": "10.0.0.0/24", "ipv6": [ { "range": "2001:db8:acad:300::/56" } ], "label": "test-subnet", "linodes": [ { "id": 1234567, "interfaces": [ { "active": true, "config_id": 123456, "id": 123456 } ] } ], "databases": [ { "id": 1234567, "ipv4_range": "10.0.0.16/28", "ipv6_range": "2001:db8:1234:1::/64" } ], "updated": "2023-08-31T18:53:04" } - See the Linode API response documentation for a list of returned fields
- Sample Response: