Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 3 KB

vpc_list.md

File metadata and controls

66 lines (50 loc) · 3 KB

vpc_list

List and filter on VPCs.

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 VPCs for the current user
  linode.cloud.vpc_list: {}
- name: List all of the VPCS for the current user with the given label
  linode.cloud.vpc_list:
    filters:
      - name: label
        values: my-vpc

Parameters

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

  • vpcs - The returned VPCs.

    • Sample Response:
      [
          {
              "created": "2023-08-31T18:35:01",
              "description": "A description of this VPC",
              "id": 344,
              "label": "my-vpc",
              "region": "us-east",
              "subnets": [],
              "updated": "2023-08-31T18:35:03"
          }
      ]