VPCs

This section details VPC-related Linode CLI commands.

list

Aliases: ls

Display all VPCs on your account.

Usage

The format accepted by this command.

linode-cli vpcs list [-h] [--updated updated]
    [--subnets.updated subnets.updated]
    [--subnets.created subnets.created] [--subnets.id subnets.id]
    [--subnets.label subnets.label] [--label label]
    [--region region] [--created created] [--id id]
    [--order-by {updated,subnets.updated,subnets.created,subnets.id,subnets.label,label,region,created,id}]
    [--order {asc,desc}]

Sample

Examples of how this command might be used.

linode-cli vpcs list

Filterable Attributes

Arguments used to define a filter for response entries.

Name

Type

Description

--created

str

The date-time of VPC creation.

--id

int

The unique ID of the VPC.

--label

str

The VPC’s label, for display purposes only.

--region

str

The Region for the VPC.

--subnets.created

str

The date-time of VPC Subnet creation.

--subnets.id

int

The unique ID of the VPC Subnet.

--subnets.label

str

The VPC Subnet’s label, for display purposes only.

--subnets.updated

str

The date-time of the most recent VPC Subnet update.

--updated

str

The date-time of the most recent VPC update.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2023-07-11T00:00:00

The date-time of VPC creation.

description

str

A description of my VPC.

A written description to help distinguish the VPC.

id

int

123

The unique ID of the VPC.

label

str

cool-vpc

The VPC’s label, for display purposes only.

region

str

us-east

The Region for the VPC.

updated

str

2023-09-11T00:00:00

The date-time of the most recent VPC update.

subnets

Name

Type

Example

Description

subnets.created

str

2023-07-11T00:00:00

The date-time of VPC Subnet creation.

subnets.id

int

456

The unique ID of the VPC Subnet.

subnets.ipv4

str

10.0.1.0/24

IPv4 range in CIDR canonical form.

subnets.label

str

cool-vpc-subnet

The VPC Subnet’s label, for display purposes only.

subnets.linodes.id

int

111

ID of a Linode assigned to the VPC Subnet.

subnets.linodes.interfaces.active

bool

true

Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs.

subnets.linodes.interfaces.id

int

421

ID of the interface.

subnets.updated

str

2023-09-11T00:00:00

The date-time of the most recent VPC Subnet update.


view

Get information about a single VPC.

Usage

The format accepted by this command.

linode-cli vpcs view [-h] [--updated updated] [--label label]
    [--subnets.id subnets.id] [--subnets.created subnets.created]
    [--subnets.label subnets.label]
    [--subnets.updated subnets.updated] [--created created]
    [--region region] [--id id]
    [--order-by {updated,label,subnets.id,subnets.created,subnets.label,subnets.updated,created,region,id}]
    [--order {asc,desc}] vpcId

Sample

Examples of how this command might be used.

linode-cli vpcs view $vpcId

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

vpcId

int

The id of the VPC.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2023-07-11T00:00:00

The date-time of VPC creation.

description

str

A description of my VPC.

A written description to help distinguish the VPC.

id

int

123

The unique ID of the VPC.

label

str

cool-vpc

The VPC’s label, for display purposes only.

region

str

us-east

The Region for the VPC.

updated

str

2023-09-11T00:00:00

The date-time of the most recent VPC update.

subnets

Name

Type

Example

Description

subnets.created

str

2023-07-11T00:00:00

The date-time of VPC Subnet creation.

subnets.id

int

456

The unique ID of the VPC Subnet.

subnets.ipv4

str

10.0.1.0/24

IPv4 range in CIDR canonical form.

subnets.label

str

cool-vpc-subnet

The VPC Subnet’s label, for display purposes only.

subnets.linodes.id

int

111

ID of a Linode assigned to the VPC Subnet.

subnets.linodes.interfaces.active

bool

true

Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs.

subnets.linodes.interfaces.id

int

421

ID of the interface.

subnets.updated

str

2023-09-11T00:00:00

The date-time of the most recent VPC Subnet update.


create

Create a new VPC and optionally associated VPC Subnets.

Usage

The format accepted by this command.

linode-cli vpcs create [-h] [--subnets subnets]
    [--subnets.ipv4 ipv4] [--subnets.linodes linodes]
    [--subnets.linodes.interfaces interfaces]
    [--subnets.linodes.interfaces.active active]
    [--subnets.linodes.interfaces.id id]
    [--subnets.linodes.id id] [--subnets.label label]
    [--region region] [--description description] [--label label]

Sample

Examples of how this command might be used.

linode-cli vpcs create \
    --description "A description of my VPC." \
    --label cool-vpc \
    --region us-east \
    --subnets.label cool-vpc-subnet \
    --subnets.ipv4 10.0.1.0/24

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--label *

str

cool-vpc

The VPC’s label, for display purposes only.

--region *

str

us-east

The Region for the VPC.

--description

str

A description of my VPC.

A written description to help distinguish the VPC.

--subnets (section)

json

N/A

An object describing a VPC Subnet.

subnets

Name

Type

Example

Description

--subnets.ipv4

str

10.0.1.0/24

IPv4 range in CIDR canonical form.

--subnets.label

str

cool-vpc-subnet

The VPC Subnet’s label, for display purposes only.

--subnets.linodes (section)

json

N/A

N/A

subnets.linodes

Name

Type

Example

Description

--subnets.linodes.id

int

111

ID of a Linode assigned to the VPC Subnet.

--subnets.linodes.interfaces (section)

json

N/A

N/A

subnets.linodes.interfaces

Name

Type

Example

Description

--subnets.linodes.interfaces.active

bool

true

Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs.

--subnets.linodes.interfaces.id

int

421

ID of the interface.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2023-07-11T00:00:00

The date-time of VPC creation.

description

str

A description of my VPC.

A written description to help distinguish the VPC.

id

int

123

The unique ID of the VPC.

label

str

cool-vpc

The VPC’s label, for display purposes only.

region

str

us-east

The Region for the VPC.

updated

str

2023-09-11T00:00:00

The date-time of the most recent VPC update.

subnets

Name

Type

Example

Description

subnets.created

str

2023-07-11T00:00:00

The date-time of VPC Subnet creation.

subnets.id

int

456

The unique ID of the VPC Subnet.

subnets.ipv4

str

10.0.1.0/24

IPv4 range in CIDR canonical form.

subnets.label

str

cool-vpc-subnet

The VPC Subnet’s label, for display purposes only.

subnets.linodes.id

int

111

ID of a Linode assigned to the VPC Subnet.

subnets.linodes.interfaces.active

bool

true

Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs.

subnets.linodes.interfaces.id

int

421

ID of the interface.

subnets.updated

str

2023-09-11T00:00:00

The date-time of the most recent VPC Subnet update.


update

Update an existing VPC.

Usage

The format accepted by this command.

linode-cli vpcs update [-h] [--label label]
    [--description description] vpcId

Sample

Examples of how this command might be used.

linode-cli vpcs update $vpcId \
    --description "A description of my VPC."
    --label cool-vpc

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

vpcId

int

The id of the VPC.

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--description

str

A description of my VPC.

A written description to help distinguish the VPC.

--label

str

cool-vpc

The VPC’s label, for display purposes only.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2023-07-11T00:00:00

The date-time of VPC creation.

description

str

A description of my VPC.

A written description to help distinguish the VPC.

id

int

123

The unique ID of the VPC.

label

str

cool-vpc

The VPC’s label, for display purposes only.

region

str

us-east

The Region for the VPC.

updated

str

2023-09-11T00:00:00

The date-time of the most recent VPC update.

subnets

Name

Type

Example

Description

subnets.created

str

2023-07-11T00:00:00

The date-time of VPC Subnet creation.

subnets.id

int

456

The unique ID of the VPC Subnet.

subnets.ipv4

str

10.0.1.0/24

IPv4 range in CIDR canonical form.

subnets.label

str

cool-vpc-subnet

The VPC Subnet’s label, for display purposes only.

subnets.linodes.id

int

111

ID of a Linode assigned to the VPC Subnet.

subnets.linodes.interfaces.active

bool

true

Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs.

subnets.linodes.interfaces.id

int

421

ID of the interface.

subnets.updated

str

2023-09-11T00:00:00

The date-time of the most recent VPC Subnet update.


delete

Delete a single VPC and all of its Subnets.

Usage

The format accepted by this command.

linode-cli vpcs delete [-h] vpcId

Sample

Examples of how this command might be used.

linode-cli vpcs delete $vpcId

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

vpcId

int

The id of the VPC.


subnet-view

Get information about a single VPC Subnet.

Usage

The format accepted by this command.

linode-cli vpcs subnet-view [-h] [--label label] [--id id]
    [--created created] [--updated updated]
    [--order-by {label,id,created,updated}] [--order {asc,desc}]
    vpcId vpcSubnetId

Sample

Examples of how this command might be used.

linode-cli vpcs subnet-view $vpcId $vpcSubnetId

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

vpcId

int

The id of the VPC.

vpcSubnetId

int

The id of the VPC Subnet.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2023-07-11T00:00:00

The date-time of VPC Subnet creation.

id

int

456

The unique ID of the VPC Subnet.

ipv4

str

10.0.1.0/24

IPv4 range in CIDR canonical form.

label

str

cool-vpc-subnet

The VPC Subnet’s label, for display purposes only.

updated

str

2023-09-11T00:00:00

The date-time of the most recent VPC Subnet update.

linodes

Name

Type

Example

Description

linodes.id

int

111

ID of a Linode assigned to the VPC Subnet.

linodes.interfaces.active

bool

true

Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs.

linodes.interfaces.id

int

421

ID of the interface.


subnet-create

Create a VPC Subnet.

Usage

The format accepted by this command.

linode-cli vpcs subnet-create [-h] [--label label] [--ipv4 ipv4]
    vpcId

Sample

Examples of how this command might be used.

linode-cli vpcs subnet-create $vpcId \
    --label cool-vpc-subnet \
    --ipv4 10.0.1.0/24

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

vpcId

int

The id of the VPC.

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--ipv4 *

str

10.0.1.0/24

IPv4 range in CIDR canonical form.

--label *

str

cool-vpc-subnet

The VPC Subnet’s label, for display purposes only.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2023-07-11T00:00:00

The date-time of VPC Subnet creation.

id

int

456

The unique ID of the VPC Subnet.

ipv4

str

10.0.1.0/24

IPv4 range in CIDR canonical form.

label

str

cool-vpc-subnet

The VPC Subnet’s label, for display purposes only.

updated

str

2023-09-11T00:00:00

The date-time of the most recent VPC Subnet update.

linodes

Name

Type

Example

Description

linodes.id

int

111

ID of a Linode assigned to the VPC Subnet.

linodes.interfaces.active

bool

true

Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs.

linodes.interfaces.id

int

421

ID of the interface.


subnet-update

Update a VPC Subnet.

Usage

The format accepted by this command.

linode-cli vpcs subnet-update [-h] [--label label] vpcId
    vpcSubnetId

Sample

Examples of how this command might be used.

linode-cli vpcs subnet-update $vpcId \
    --label cool-vpc-subnet

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

vpcId

int

The id of the VPC.

vpcSubnetId

int

The id of the VPC Subnet.

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--label

str

cool-vpc-subnet

The VPC Subnet’s label, for display purposes only.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2023-07-11T00:00:00

The date-time of VPC Subnet creation.

id

int

456

The unique ID of the VPC Subnet.

ipv4

str

10.0.1.0/24

IPv4 range in CIDR canonical form.

label

str

cool-vpc-subnet

The VPC Subnet’s label, for display purposes only.

updated

str

2023-09-11T00:00:00

The date-time of the most recent VPC Subnet update.

linodes

Name

Type

Example

Description

linodes.id

int

111

ID of a Linode assigned to the VPC Subnet.

linodes.interfaces.active

bool

true

Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs.

linodes.interfaces.id

int

421

ID of the interface.


subnet-delete

Delete a single VPC Subnet.

Usage

The format accepted by this command.

linode-cli vpcs subnet-delete [-h] vpcId vpcSubnetId

Sample

Examples of how this command might be used.

linode-cli vpcs subnet-delete $vpcId $vpcSubnetId

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

vpcId

int

The id of the VPC.

vpcSubnetId

int

The id of the VPC Subnet.

subnets-list

Aliases: subnets-ls

Get information about all VPC Subnets associated with a VPC.

Usage

The format accepted by this command.

linode-cli vpcs subnets-list [-h] [--updated updated]
    [--created created] [--label label] [--id id]
    [--order-by {updated,created,label,id}] [--order {asc,desc}]
    vpcId

Sample

Examples of how this command might be used.

linode-cli vpcs subnets-list $vpcId

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

vpcId

int

The id of the VPC.

Filterable Attributes

Arguments used to define a filter for response entries.

Name

Type

Description

--created

str

The date-time of VPC Subnet creation.

--id

int

The unique ID of the VPC Subnet.

--label

str

The VPC Subnet’s label, for display purposes only.

--updated

str

The date-time of the most recent VPC Subnet update.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2023-07-11T00:00:00

The date-time of VPC Subnet creation.

id

int

456

The unique ID of the VPC Subnet.

ipv4

str

10.0.1.0/24

IPv4 range in CIDR canonical form.

label

str

cool-vpc-subnet

The VPC Subnet’s label, for display purposes only.

updated

str

2023-09-11T00:00:00

The date-time of the most recent VPC Subnet update.

linodes

Name

Type

Example

Description

linodes.id

int

111

ID of a Linode assigned to the VPC Subnet.

linodes.interfaces.active

bool

true

Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs.

linodes.interfaces.id

int

421

ID of the interface.