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

CLI Command Reference (V3)

VPC

API Name

Command

Description

Operation

Querying VPCs

hcloud VPC ListVpcs/v3

This API is used to query VPCs.

Go debug

Querying Details About a VPC

hcloud VPC ShowVpc/v3

This API is used to query details about a VPC.

Go debug

Removing a Secondary CIDR Block from a VPC

hcloud VPC RemoveVpcExtendCidr/v3

This API is used to remove a secondary CIDR block from a VPC.

Go debug

Adding a Secondary CIDR Block to a VPC

hcloud VPC AddVpcExtendCidr/v3

This API is used to add a secondary CIDR block to a VPC.

Go debug

IP Address Group

API Name

Command

Description

Operation

Querying Details of an IP Address Group

hcloud VPC ShowAddressGroup/v3

This API is used to query details of an IP address group.

Go debug

Updating an IP Address Group

hcloud VPC UpdateAddressGroup/v3

This API is used to update an IP address group.

Go debug

Deleting an IP Address Group

hcloud VPC DeleteAddressGroup/v3

This API is used to delete an IP address group. Before deleting an IP address group, ensure that no resource is using this group.

Go debug

Querying IP Address Groups

hcloud VPC ListAddressGroup/v3

This API is used to query IP address groups based on filter criteria.

Go debug

Creating an IP Address Group

hcloud VPC CreateAddressGroup/v3

This API is used to create an IP address group.

Go debug

Forcibly Deleting an IP Address Group

hcloud VPC DeleteIpAddressGroupForce/v3

This API is used to forcibly delete an IP address group. If the IP address group to be deleted has associated security group rules, the IP address group and its associated rules will be deleted together.

Go debug

Querying Resources Associated with an IP Address Group

hcloud VPC ListAddressGroupsDependency/v3

This API is used to query the IDs and names of the network ACLs or security groups associated with an IP address group.

Go debug

Security Group Rule

API Name

Command

Description

Operation

Querying Security Group Rules

hcloud VPC ListSecurityGroupRules/v3

This API is used to query security group rules.

Go debug

Creating a Security Group Rule

hcloud VPC CreateSecurityGroupRule/v3

This API is used to create a security group rule.

Go debug

Querying Security Group Rule Details

hcloud VPC ShowSecurityGroupRule/v3

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

Go debug

Deleting a Security Group Rule

hcloud VPC DeleteSecurityGroupRule/v3

This API is used to delete a security group rule.

Go debug

Batch Creating Security Group Rules

hcloud VPC BatchCreateSecurityGroupRules/v3

This API is used to batch create security group rules in a specified security group

Go debug

Supplementary Network Interface

API Name

Command

Description

Operation

Querying Supplementary Network Interfaces

hcloud VPC ListSubNetworkInterfaces/v3

This API is used to query all supplementary network interfaces of a tenant. A maximum of 2000 records can be returned for each query.

Go debug

Creating a Supplementary Network Interface

hcloud VPC CreateSubNetworkInterface/v3

This API is used to create a supplementary network interface.

Go debug

Batch Creating Supplementary Network Interfaces

hcloud VPC BatchCreateSubNetworkInterface/v3

This API is used to batch create supplementary network interfaces.

Go debug

Querying Supplementary Network Interface Details

hcloud VPC ShowSubNetworkInterface/v3

This API is used to query details about a supplementary network interface.

Go debug

Updating a Supplementary Network Interface

hcloud VPC UpdateSubNetworkInterface/v3

This API is used to update a supplementary network interface.

Go debug

Deleting a Supplementary Network Interface

hcloud VPC DeleteSubNetworkInterface/v3

This API is used to delete a supplementary network interface.

Go debug

Querying the Number of Supplementary Network Interfaces

hcloud VPC ShowSubNetworkInterfacesQuantity/v3

This API is used to query the number of supplementary network interfaces.

Go debug

Port

API Name

Command

Description

Operation

Querying Ports

hcloud VPC ListPorts/v3

This API is used to query information about all ports, including the port ID, IP address, and associated cloud service instance.

Go debug

Querying Details About a Port

hcloud VPC ShowPort/v3

This API is used to query information about a port, including the port ID, IP address, and associated cloud service instance.

Go debug

Adding Security Groups to Port

hcloud VPC AddSecurityGroups/v3

This API is used to add security groups to port

Go debug

Removing Security Groups from Port

hcloud VPC RemoveSecurityGroups/v3

This API is used to remove security groups from port

Go debug

Security Group

API Name

Command

Description

Operation

Querying Security Groups

hcloud VPC ListSecurityGroups/v3

This API is used to query all security groups of a tenant.

Go debug

Creating a Security Group

hcloud VPC CreateSecurityGroup/v3

This API is used to create a security group.

Go debug

Querying Security Group Details

hcloud VPC ShowSecurityGroup/v3

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

Go debug

Updating a Security Group

hcloud VPC UpdateSecurityGroup/v3

This API is used to update a security group.

Go debug

Deleting a Security Group

hcloud VPC DeleteSecurityGroup/v3

This API is used to delete a security group.

Go debug

Network ACL

API Name

Command

Description

Operation

Querying Network ACLs

hcloud VPC ListFirewall/v3

Querying Network ACLs

Go debug

Creating a Network ACL

hcloud VPC CreateFirewall/v3

Creating a Network ACL

Go debug

Querying Details of a Network ACL

hcloud VPC ShowFirewall/v3

Querying Details of a Network ACL

Go debug

Updating a Network ACL

hcloud VPC UpdateFirewall/v3

Updating a Network ACL

Go debug

Deleting a Network ACL

hcloud VPC DeleteFirewall/v3

Deleting a Network ACL

Go debug

Updating Rules of a Network ACL

hcloud VPC UpdateFirewallRules/v3

Updating Rules of a Network ACL

Go debug

Adding Rules to a Network ACL

hcloud VPC AddFirewallRules/v3

Adding Rules to a Network ACL

Go debug

Removing Rules from a Network ACL

hcloud VPC RemoveFirewallRules/v3

Removing Rules from a Network ACL

Go debug

Associating Subnets to a Network ACL

hcloud VPC AssociateSubnetFirewall/v3

Associating Subnets to a Network ACL

Go debug

Disassociating Subnets from a Network ACL

hcloud VPC DisassociateSubnetFirewall/v3

Disassociating Subnets from a Network ACL

Go debug

Traffic Mirror Session

API Name

Command

Description

Operation

Querying Traffic Mirror Sessions

hcloud VPC ListTrafficMirrorSessions/v3

This API is used to query traffic mirror sessions

Go debug

Creating a Traffic Mirror Session

hcloud VPC CreateTrafficMirrorSession/v3

This API is used to create a traffic mirror session

Go debug

Querying Details About a Traffic Mirror Session

hcloud VPC ShowTrafficMirrorSession/v3

This API is used to query details about a traffic mirror session

Go debug

Updating a Traffic Mirror Session

hcloud VPC UpdateTrafficMirrorSession/v3

This API is used to update a traffic mirror session

Go debug

Deleting a Traffic Mirror Session

hcloud VPC DeleteTrafficMirrorSession/v3

This API is used to delete a traffic mirror session

Go debug

Removing a Traffic Mirror Source from a Traffic Mirror Session

hcloud VPC RemoveSourcesFromTrafficMirrorSession/v3

This API is used to remove a traffic mirror source from a traffic mirror session

Go debug

Adding a Traffic Mirror Source to a Traffic Mirror Session

hcloud VPC AddSourcesToTrafficMirrorSession/v3

This API is used to add a traffic mirror source to a traffic mirror session

Go debug

Traffic Mirror Filter

API Name

Command

Description

Operation

Querying Traffic Mirror Filters

hcloud VPC ListTrafficMirrorFilters/v3

This API is used to query traffic mirror filters

Go debug

Creating a Traffic Mirror Filter

hcloud VPC CreateTrafficMirrorFilter/v3

This API is used to create a traffic mirror filter

Go debug

Querying Details About a Traffic Mirror Filter

hcloud VPC ShowTrafficMirrorFilter/v3

This API is used to query details about a traffic mirror filter

Go debug

Updating a Traffic Mirror Filter

hcloud VPC UpdateTrafficMirrorFilter/v3

This API is used to update a traffic mirror filter

Go debug

Deleting a Traffic Mirror Filter

hcloud VPC DeleteTrafficMirrorFilter/v3

This API is used to delete a traffic mirror filter

Go debug

Traffic Mirror Filter Rule

API Name

Command

Description

Operation

Querying Traffic Mirror Filter Rules

hcloud VPC ListTrafficMirrorFilterRules/v3

This API is used to query traffic mirror filter rules

Go debug

Creating a Traffic Mirror Filter Rule

hcloud VPC CreateTrafficMirrorFilterRule/v3

This API is used to create a traffic mirror filter rule

Go debug

Querying Details About a Traffic Mirror Filter Rule

hcloud VPC ShowTrafficMirrorFilterRule/v3

This API is used to querying details about a traffic mirror filter rule

Go debug

Updating a Traffic Mirror Filter Rule

hcloud VPC UpdateTrafficMirrorFilterRule/v3

This API is used to update a traffic mirror filter rule

Go debug

Deleting a Traffic Mirror Filter Rule

hcloud VPC DeleteTrafficMirrorFilterRule/v3

This API is used to delete a traffic mirror filter rule

Go debug

Port Tag Management

API Name

Command

Description

Operation

Querying the Number of Ports Using Tags

hcloud VPC CountPortsByTags/v3

This API is used to query the number of ports using tags.

Go debug

Querying Ports Using Tags

hcloud VPC ListPortsByTags/v3

This API is used to query ports using tags.

Go debug

Querying Tags of a Port

hcloud VPC ShowPortTags/v3

This API is used to query tags of a port.

Go debug

Adding a Tag to a Port

hcloud VPC CreatePortTag/v3

This API is used to add a tag to a specified port. This is an idempotent API. When you add tags, if there are duplicate keys in the request body, an error is reported. Duplicate keys are not allowed. If a key already exists, its value will be overwritten by the new value.

Go debug

Querying Tags of Ports in a Project

hcloud VPC ListPortTags/v3

This API is used to query all tags of ports in a specific project.

Go debug

Adding Tags to a Port in Batches

hcloud VPC BatchCreatePortTags/v3

This API is used to add tags to a specified port in batches. This is an idempotent API. When you add tags, if there are duplicate keys in the request body, an error is reported. Duplicate keys are not allowed. If a key already exists, its value will be overwritten by the new value.

Go debug

Deleting a Tag from a Port

hcloud VPC DeletePortTag/v3

This API is used to delete a tag from a specified port. This is an idempotent API. The tag key cannot be left blank or be an empty string. If the key of the tag to be deleted does not exist, 404 will be returned.

Go debug

Deleting Tags from a Port in Batches

hcloud VPC BatchDeletePortTags/v3

This API is used to delete tags from a specified port in batches. This is an idempotent API. If some tags to be deleted do not exist, the deletion is considered to be successful by default. The character set of the tags will not be checked. When you delete tags, the tag structure cannot be missing, and the key cannot be left blank or be an empty string.

Go debug

Virtual Subnets

API Name

Command

Description

Operation

Querying Virtual Subnets

hcloud VPC ListVirsubnets/v3

This API is used to query information about all subnets, including the subnet name and ID.

Go debug

Querying Details About a Virtual Subnet

hcloud VPC ShowVirsubnet/v3

This API is used to query details about a subnet, including the subnet name, ID, and status.

Go debug

Quotas

API Name

Command

Description

Operation

Querying Quotas

hcloud VPC ShowQuota/v3

This API is used to query the quotas of VPC resources, including security group quotas and security group rule quotas.

Go debug

Network ACL Tag Management

API Name

Command

Description

Operation

Querying the Number of Network ACLs Using Tags

hcloud VPC CountFirewallsByTags/v3

This API is used to query the number of network ACLs using tags.

Go debug

Querying Network ACLs Using Tags

hcloud VPC ListFirewallsByTags/v3

This API is used to query network ACLs using tags.

Go debug

Querying Tags of Network ACLs

hcloud VPC ShowFirewallTags/v3

This API is used to query tags of a specific network ACL.

Go debug

Adding a Tag to a Network ACL

hcloud VPC CreateFirewallTag/v3

This API is used to add a tag to a specific network ACL. This is an idempotent API. If the new tag has the same key as an existing tag, the tag will be created and overwrite the existing one.

Go debug

Querying Tags of Network ACLs in a Project

hcloud VPC ListFirewallTags/v3

This API is used to query all tags of network ACLs in a specific project.

Go debug

Adding Tags to a Network ACL in Batches

hcloud VPC BatchCreateFirewallTags/v3

This API is used to add tags to a specified network ACL in batches. This is an idempotent API. When you add tags, if there are duplicate keys in the request body, an error is reported. Duplicate keys are not allowed. If a key already exists, its value will be overwritten by the new value.

Go debug

Delete a Tag from a Network ACL

hcloud VPC DeleteFirewallTag/v3

This API is used to delete a tag from a specified network ACL. This is an idempotent API. The tag key cannot be left blank or be an empty string. If the key of the tag to be deleted does not exist, 404 will be returned.

Go debug

Deleting Tags from a Network ACL in Batches

hcloud VPC BatchDeleteFirewallTags/v3

This API is used to delete tags from a specified network ACL in batches. This is an idempotent API. If some tags to be deleted do not exist, the deletion is considered to be successful by default. The character set of the tags will not be checked. When you delete tags, the tag structure cannot be missing, and the key cannot be left blank or be an empty string.

Go debug

Subnet CIDR Reservations

API Name

Command

Description

Operation

Querying the List of Subnet CIDR Reservations

hcloud VPC ListVirsubnetCidrReservations/v3

This API is used to query information about all subnet CIDR reservations, including the name and CIDR block.

Go debug

Creating a Subnet CIDR Reservation

hcloud VPC CreateVirsubnetCidrReservation/v3

A subnet CIDR reservation is an IP address range that you set aside from a subnet CIDR block. IP addresses in the subnet CIDR reservation will not be used by instances in the subnet. You can create a subnet CIDR reservation to reserve an IP address range for special scenarios.

Go debug

Querying Details About a Subnet CIDR Reservation

hcloud VPC ShowVirsubnetCidrReservation/v3

This API is used to query details about a subnet CIDR reservation, including the name and CIDR block.

Go debug

Updating a Subnet CIDR Reservation

hcloud VPC UpdateVirsubnetCidrReservation/v3

This API is used to update basic information about a subnet CIDR reservation, including the name and description.

Go debug

Deleting a Subnet CIDR Reservation

hcloud VPC DeleteVirsubnetCidrReservation/v3

This API is used to delete a subnet CIDR reservation that is no longer required.

Go debug