Help Center/ Virtual Private Cloud/ CLI Reference/ CLI Command Reference (V2)
Updated on 2026-09-07 GMT+08:00

CLI Command Reference (V2)

VPC

API Name

Command

Description

Operation

Querying VPCs

hcloud VPC ListVpcs/v2

This API is used to query VPCs.

Go debug

Creating a VPC

hcloud VPC CreateVpc/v2

This API is used to create a VPC.

Go debug

Querying VPC Details

hcloud VPC ShowVpc/v2

This API is used to query details about a VPC.

Go debug

Updating VPC Information

hcloud VPC UpdateVpc/v2

This API is used to update information about a VPC.

Go debug

Deleting a VPC

hcloud VPC DeleteVpc/v2

This API is used to delete a VPC.

Go debug

Private IP Address

API Name

Command

Description

Operation

Assigning a Private IP Address

hcloud VPC CreatePrivateip/v2

This API is used to assign a private IP address.

Go debug

Querying a Private IP Address

hcloud VPC ShowPrivateip/v2

This API is used to query a private IP address using a specified ID.

Go debug

Deleting a Private IP Address

hcloud VPC DeletePrivateip/v2

This API is used to delete a private IP address.

Go debug

Querying Private IP Addresses

hcloud VPC ListPrivateips/v2

This API is used to query private IP addresses.

Go debug

Quota

API Name

Command

Description

Operation

Querying Quotas

hcloud VPC ShowQuota/v2

Query network resource quotas of a tenant. The network resources include VPCs, subnets, security groups, security group rules, EIPs, and VPNs.

Go debug

Subnet

API Name

Command

Description

Operation

Querying Subnets

hcloud VPC ListSubnets/v2

This API is used to query subnets.

Go debug

Creating a Subnet

hcloud VPC CreateSubnet/v2

This API is used to create a subnet.

Go debug

Querying Subnet Details

hcloud VPC ShowSubnet/v2

This API is used to query details about a subnet.

Go debug

Updating a Subnet

hcloud VPC UpdateSubnet/v2

This API is used to update a subnet.

Go debug

Deleting a Subnet

hcloud VPC DeleteSubnet/v2

This API is used to delete a subnet.

Go debug

Port

API Name

Command

Description

Operation

Querying Ports

hcloud VPC ListPorts/v2

This API can be used to query all ports accessible to the tenant submitting the request. A maximum of 2000 records can be returned for each query.

Go debug

Creating a Port

hcloud VPC CreatePort/v2

This API is used to create a port.

Go debug

Querying Port Details

hcloud VPC ShowPort/v2

This API is used to query details about a port.

Go debug

Updating a Port

hcloud VPC UpdatePort/v2

This API is used to update a port.

Go debug

Deleting a Port

hcloud VPC DeletePort/v2

This API is used to delete a port.

Go debug

Security Group

API Name

Command

Description

Operation

Querying Security Groups

hcloud VPC ListSecurityGroups/v2

This API is used to query security groups.

Go debug

Creating a Security Group

hcloud VPC CreateSecurityGroup/v2

This API is used to create a security group.

Go debug

Querying Security Group Details

hcloud VPC ShowSecurityGroup/v2

This API is used to query details about a security group.

Go debug

Deleting a Security Group

hcloud VPC DeleteSecurityGroup/v2

This API is used to delete a security group.

Go debug

Querying Security Group Rules

hcloud VPC ListSecurityGroupRules/v2

This API is used to query security group rules.

Go debug

Creating a Security Group Rule

hcloud VPC CreateSecurityGroupRule/v2

This API is used to create a security group rule.

Go debug

Querying Security Group Rule Details

hcloud VPC ShowSecurityGroupRule/v2

This API is used to query details about a security group rule.

Go debug

Deleting a Security Group Rule

hcloud VPC DeleteSecurityGroupRule/v2

This API is used to delete a security group rule.

Go debug

Querying IP Address Usage

API Name

Command

Description

Operation

Querying IP Address Usage

hcloud VPC ShowNetworkIpAvailabilities/v2

This API is used to query the IPv4 address usage on a specified network.

Go debug

VPC Tag Management

API Name

Command

Description

Operation

Querying VPCs by Tag

hcloud VPC ListVpcsByTags/v2

This API is used to query VPCs by tag.

Go debug

Querying VPC Tags in a Specified Project

hcloud VPC ListVpcTags/v2

This API is used to query all VPC tags of a tenant in a specified region.

Go debug

Querying VPC Tags

hcloud VPC ShowVpcTags/v2

This API is used to query tags of a specified VPC.

Go debug

Creating a Tag for a VPC

hcloud VPC CreateVpcResourceTag/v2

This API is used to create a tag for a VPC.

Go debug

Batch Creating Tags for a VPC

hcloud VPC BatchCreateVpcTags/v2

This API is used to add multiple tags to a VPC at a time.

Go debug

Batch Deleting Tags for a VPC

hcloud VPC BatchDeleteVpcTags/v2

This API is used to delete multiple tags from a VPC at a time.

Go debug

Deleting a VPC Tag

hcloud VPC DeleteVpcTag/v2

This API is used to delete a VPC tag.

Go debug

Subnet Tag Management

API Name

Command

Description

Operation

Querying Subnets by Tag

hcloud VPC ListSubnetsByTags/v2

This API is used to query subnets by tag.

Go debug

Querying Subnet Tags in a Specified Project

hcloud VPC ListSubnetTags/v2

This API is used to query all subnet tags of a tenant in a specified region.

Go debug

Querying Subnet Tags

hcloud VPC ShowSubnetTags/v2

This API is used to query tags of a specified subnet.

Go debug

Creating a Tag for a Subnet

hcloud VPC CreateSubnetTag/v2

This API is used to create a tag for a subnet.

Go debug

Batch Deleting Tags for a Subnet

hcloud VPC BatchDeleteSubnetTags/v2

This API is used to delete multiple tags from a subnet at a time.

Go debug

Batch Creating Tags for a Subnet

hcloud VPC BatchCreateSubnetTags/v2

This API is used to add multiple tags to a subnet at a time.

Go debug

Deleting a Subnet Tag

hcloud VPC DeleteSubnetTag/v2

This API is used to delete a subnet tag.

Go debug

Security Group Tag Management

API Name

Command

Description

Operation

Querying Security Groups by Tag

hcloud VPC ListSecurityGroupsByTags/v2

This API is used to query security group by tag.

Go debug

Querying Security Group Tags in a Specified Project

hcloud VPC ListSecurityGroupTags/v2

This API is used to query all security group tags of a tenant in a specified region.

Go debug

Querying SecurityGroup Tags

hcloud VPC ShowSecurityGroupTags/v2

This API is used to query tags of a specified security group.

Go debug

Creating a Tag for a Security Group

hcloud VPC CreateSecurityGroupTag/v2

This API is used to create a tag for a security group.

Go debug

Batch Deleting Tags for a Security Group

hcloud VPC BatchDeleteSecurityGroupTags/v2

This API is used to delete multiple tags from a security group at a time.

Go debug

Batch Creating Tags for a Security Group

hcloud VPC BatchCreateSecurityGroupTags/v2

This API is used to add multiple tags to a security group at a time.

Go debug

Deleting a Security Group Tag

hcloud VPC DeleteSecurityGroupTag/v2

This API is used to delete a security group tag.

Go debug

Route Table

API Name

Command

Description

Operation

Querying Route Tables

hcloud VPC ListRouteTables/v2

This API is used to query all route tables of the tenant submitting the request. The route tables are filtered based on the filtering condition.

Go debug

Creating a Route Table

hcloud VPC CreateRouteTable/v2

This API is used to create a route table.

Go debug

Querying Route Table Details

hcloud VPC ShowRouteTable/v2

This API is used to query details about a route table.

Go debug

Updating a Route Table

hcloud VPC UpdateRouteTable/v2

This API is used to update a route table, including its name, description, and adding, updating, and deleting routes.

Go debug

Deleting a Route Table

hcloud VPC DeleteRouteTable/v2

This API is used to delete a custom route table.

Go debug

Associating a Subnet with a Route Table

hcloud VPC AssociateRouteTable/v2

This API is used to associate a subnet with a route table. If a subnet has already been associated with route table A, you can associate the subnet with route table B directly without disassociating it from route table A first.

Go debug

Disassociating a Subnet from a Route Table

hcloud VPC DisassociateRouteTable/v2

This API is used to disassociate subnets from a route table.

Go debug

VPC Flow Log

API Name

Command

Description

Operation

Querying VPC Flow Logs

hcloud VPC ListFlowLogs/v2

This API is used to query all VPC flow logs of the tenant submitting the request. The VPC flow logs are filtered based on the filtering condition.

Go debug

Creating a VPC Flow Log

hcloud VPC CreateFlowLog/v2

This API is used to create a flow log.

Go debug

Querying VPC Flow Log Details

hcloud VPC ShowFlowLog/v2

This API is used to query details about a VPC flow log.

Go debug

Updating a VPC Flow Log

hcloud VPC UpdateFlowLog/v2

This API is used to update a VPC flow log.

Go debug

Deleting a VPC Flow Log

hcloud VPC DeleteFlowLog/v2

This API is used to delete a VPC flow log.

Go debug

OpenStack - API Version

API Name

Command

Description

Operation

Querying All API Versions

hcloud VPC ListApiVersion/v2

This API is used to query all available versions of a native OpenStack API.

Go debug

OpenStack - Router

API Name

Command

Description

Operation

Querying Routers

hcloud VPC NeutronListRouters/v2

This API is used to query all routers accessible to the tenant submitting the request. A maximum of 2000 records can be returned for each query operation. If the number of records exceeds 2000, the pagination marker will be returned.

Go debug

Creating a Router

hcloud VPC NeutronCreateRouter/v2

This API is used to create a router.

Go debug

Querying Router Details

hcloud VPC NeutronShowRouter/v2

This API is used to query details about a router.

Go debug

Updating a Router

hcloud VPC NeutronUpdateRouter/v2

This API is used to update a router.

Go debug

Deleting a Router

hcloud VPC NeutronDeleteRouter/v2

This API is used to delete a router.

Go debug

Adding an Interface to a Router

hcloud VPC NeutronAddRouterInterface/v2

This API is used to add an interface to a router.

Go debug

Removing an Interface from a Router

hcloud VPC NeutronRemoveRouterInterface/v2

This API is used to remove an interface from a router.

Go debug

OpenStack - Security Group

API Name

Command

Description

Operation

Querying Security Groups

hcloud VPC NeutronListSecurityGroups/v2

This API is used to query all security groups accessible to the tenant submitting the request. A maximum of 2000 records can be returned for each query operation. If the number of records exceeds 2000, the pagination marker will be returned. For details, see section Pagination.

Go debug

Creating a Security Group

hcloud VPC NeutronCreateSecurityGroup/v2

This API is used to create a security group.

Go debug

Querying Security Group Details

hcloud VPC NeutronShowSecurityGroup/v2

This API is used to query details about a security group.

Go debug

Updating a Security Group

hcloud VPC NeutronUpdateSecurityGroup/v2

This API is used to update a security group.

Go debug

Deleting a Security Group

hcloud VPC NeutronDeleteSecurityGroup/v2

This API is used to delete a security group.

Go debug

Querying Security Group Rules

hcloud VPC NeutronListSecurityGroupRules/v2

This API is used to query all security group rules accessible to the tenant submitting the request. A maximum of 2000 records can be returned for each query. If the number of records exceeds 2000, the pagination marker will be returned. For details, see section Pagination.

Go debug

Creating a Security Group Rule

hcloud VPC NeutronCreateSecurityGroupRule/v2

This API is used to create a security group rule.

Go debug

Querying Security Group Rule Details

hcloud VPC NeutronShowSecurityGroupRule/v2

This API is used to query details about a security group rule.

Go debug

Deleting a Security Group Rule

hcloud VPC NeutronDeleteSecurityGroupRule/v2

This API is used to delete a security group rule.

Go debug

VPC Route

API Name

Command

Description

Operation

Querying VPC Routes

hcloud VPC ListVpcRoutes/v2

This API is used to query all routes of the tenant submitting the request. The routes are filtered based on the filtering criteria.

Go debug

Creating a VPC Route

hcloud VPC CreateVpcRoute/v2

This API is used to create a route.

Go debug

Querying VPC Route Details

hcloud VPC ShowVpcRoute/v2

This API is used to query details about a route.

Go debug

Deleting a Route

hcloud VPC DeleteVpcRoute/v2

This API is used to delete a route.

Go debug

VPC Peering Connection

API Name

Command

Description

Operation

Querying VPC Peering Connections

hcloud VPC ListVpcPeerings/v2

This API is used to query all VPC peering connections accessible to the tenant submitting the request. The connections are filtered based on the filtering criteria.

Go debug

Creating a VPC Peering Connection

hcloud VPC CreateVpcPeering/v2

This API is used to create a VPC peering connection.

Go debug

Querying VPC Peering Connection Details

hcloud VPC ShowVpcPeering/v2

This API is used to query details about a VPC peering connection.

Go debug

Updating a VPC peering connection

hcloud VPC UpdateVpcPeering/v2

This API is used to update a VPC peering connection.

Go debug

Deleting a VPC Peering Connection

hcloud VPC DeleteVpcPeering/v2

This API is used to delete a VPC peering connection.

Go debug

Accepting a VPC Peering Connection

hcloud VPC AcceptVpcPeering/v2

After tenant A requests to create a VPC peering connection with a VPC of tenant B, the VPC peering connection takes effect only after tenant B accepts the request. This API is used by a tenant to accept a VPC peering connection request initiated by another tenant.

Go debug

Rejecting a VPC Peering Connection

hcloud VPC RejectVpcPeering/v2

After tenant A requests to create a VPC peering connection with a VPC of tenant B, the VPC peering connection takes effect only after tenant B accepts the request. This API is used by a tenant to reject a VPC peering connection request initiated by another tenant.

Go debug

OpenStack-Port

API Name

Command

Description

Operation

Querying Ports

hcloud VPC NeutronListPorts/v2

This API is used to query all ports accessible to the tenant submitting the request. A maximum of 2000 records can be returned for each query operation. If the number of records exceeds 2000, the pagination marker will be returned. For details, see section Pagination.

Go debug

Creating a Port

hcloud VPC NeutronCreatePort/v2

This API is used to create a port.

Go debug

Querying Port Details

hcloud VPC NeutronShowPort/v2

This API is used to query details about a port.

Go debug

Updating a Port

hcloud VPC NeutronUpdatePort/v2

This API is used to update a port.

Go debug

Deleting a Port

hcloud VPC NeutronDeletePort/v2

This API is used to delete a port.

Go debug

OpenStack-Network

API Name

Command

Description

Operation

Querying Networks

hcloud VPC NeutronListNetworks/v2

This API is used to query all networks accessible to the tenant submitting the request. A maximum of 2000 records can be returned for each query operation. If the number of records exceeds 2000, the pagination marker will be returned. For details, see section Pagination.

Go debug

Creating a Network

hcloud VPC NeutronCreateNetwork/v2

This API is used to create a network.

Go debug

Querying Network Details

hcloud VPC NeutronShowNetwork/v2

This API is used to query details about a network.

Go debug

Updating a Network

hcloud VPC NeutronUpdateNetwork/v2

This API is used to update a network.

Go debug

Deleting a Network

hcloud VPC NeutronDeleteNetwork/v2

This API is used to delete a network.

Go debug

OpenStack-Subnet

API Name

Command

Description

Operation

Querying Subnets

hcloud VPC NeutronListSubnets/v2

This API is used to query all subnets accessible to the tenant submitting the request. A maximum of 2000 records can be returned for each query operation. If the number of records exceeds 2000, the pagination marker will be returned. For details, see section Pagination.

Go debug

Creating a Subnet

hcloud VPC NeutronCreateSubnet/v2

This API is used to create a subnet.

Go debug

Querying Subnet Details

hcloud VPC NeutronShowSubnet/v2

This API is used to query details about a subnet.

Go debug

Updating a Subnet

hcloud VPC NeutronUpdateSubnet/v2

This API is used to update a subnet.

Go debug

Deleting a Subnet

hcloud VPC NeutronDeleteSubnet/v2

This API is used to delete a subnet.

Go debug

OpenStack-Network ACL

API Name

Command

Description

Operation

Querying Network ACLs

hcloud VPC NeutronListFirewallGroups/v2

This API is used to query all network ACLs accessible to the tenant submitting the request. A maximum of 2000 records can be returned for each query. If the number of records exceeds 2000, the pagination marker will be returned.

Go debug

Creating a Network ACL

hcloud VPC NeutronCreateFirewallGroup/v2

This API is used to create a network ACL.

Go debug

Removing a Network ACL Rule

hcloud VPC NeutronRemoveFirewallRule/v2

This interface is used to remove a network ACL rule from a network ACL policy.

Go debug

Querying Network ACL Rules

hcloud VPC NeutronListFirewallRules/v2

This API is used to query all network ACL rules accessible to the tenant submitting the request. A maximum of 2000 records can be returned for each query. If the number of records exceeds 2000, the pagination marker will be returned.

Go debug

Creating a Network ACL Rule

hcloud VPC NeutronCreateFirewallRule/v2

This API is used to create a network ACL rule.

Go debug

Querying a Specific Network ACL Rule

hcloud VPC NeutronShowFirewallRule/v2

This API is used to query a specific network ACL rule.

Go debug

Updating a Network ACL Rule

hcloud VPC NeutronUpdateFirewallRule/v2

This API is used to update a network ACL rule.

Go debug

Deleting a Network ACL Rule

hcloud VPC NeutronDeleteFirewallRule/v2

This API is used to delete a network ACL rule.

Go debug

Querying Details About a Specific Network ACL

hcloud VPC NeutronShowFirewallGroup/v2

This API is used to query details about a specific network ACL.

Go debug

Updating a Network ACL

hcloud VPC NeutronUpdateFirewallGroup/v2

This API is used to update a network ACL.

Go debug

Deleting a Network ACL

hcloud VPC NeutronDeleteFirewallGroup/v2

This API is used to delete a network ACL.

Go debug

Querying Details About a Specific Network ACL Policy

hcloud VPC NeutronShowFirewallPolicy/v2

This API is used to query details about a specific network ACL policy.

Go debug

Updating a Network ACL Policy

hcloud VPC NeutronUpdateFirewallPolicy/v2

This API is used to update a network ACL policy.

Go debug

Deleting a Network ACL Policy

hcloud VPC NeutronDeleteFirewallPolicy/v2

This API is used to delete a network ACL policy.

Go debug

Querying Network ACL Policies

hcloud VPC NeutronListFirewallPolicies/v2

This API is used to query all network ACL policies accessible to the tenant submitting the request. A maximum of 2000 records can be returned for each query. If the number of records exceeds 2000, the pagination marker will be returned.

Go debug

Creating a Network ACL Policy

hcloud VPC NeutronCreateFirewallPolicy/v2

This API is used to create a network ACL policy.

Go debug

Inserting a Network ACL Rule

hcloud VPC NeutronAddFirewallRule/v2

This API is used to insert a network ACL rule to a network ACL policy.

Go debug