Help Center/ NAT Gateway/ CLI Reference/ CLI Command Reference
Updated on 2026-09-03 GMT+08:00

CLI Command Reference

Public NAT Gateway

API Name

Command

Description

Operation

Querying Public NAT Gateways

hcloud NAT ListNatGateways

This API is used to query public NAT gateways.

Go debug

Creating a Public NAT Gateway

hcloud NAT CreateNatGateway

This API is used to create a public NAT gateway.

Go debug

Querying Details About a Specified Public NAT Gateway

hcloud NAT ShowNatGateway

This API is used to query details about a specified public NAT gateway.

Go debug

Updating a Public NAT Gateway

hcloud NAT UpdateNatGateway

This API is used to update a public NAT gateway.

Go debug

Deleting a Public NAT Gateway

hcloud NAT DeleteNatGateway

This API is used to delete a public NAT gateway.

Go debug

Changing the Billing Mode of a Public NAT Gateway from Pay-per-Use to Yearly/Monthly

hcloud NAT UpdateNatGatewayToPeriod

This API is used to change the billing mode of a public NAT gateway from pay-per-use to yearly/monthly.

Go debug

Querying Available Specifications of Public NAT Gateways

hcloud NAT ListNatGatewaySpecs

This API is used to query the specifications of public NAT gateways that can be created.

Go debug

Public DNAT Rule

API Name

Command

Description

Operation

Querying DNAT Rules

hcloud NAT ListNatGatewayDnatRules

This API is used to query DNAT rules.

Go debug

Creating a DNAT Rule

hcloud NAT CreateNatGatewayDnatRule

This API is used to create a DNAT rule.

Go debug

Querying Details About a Specified DNAT Rule

hcloud NAT ShowNatGatewayDnatRule

This API is used to query details about a specified DNAT rule.

Go debug

Updating a DNAT Rule

hcloud NAT UpdateNatGatewayDnatRule

This API is used to update a specified DNAT rule.

Go debug

Deleting a DNAT Rule

hcloud NAT DeleteNatGatewayDnatRule

This API is used to delete a specified DNAT rule.

Go debug

Creating DNAT Rules in Batches

hcloud NAT BatchCreateNatGatewayDnatRules

This API is used to create DNAT rules in batches.

Go debug

Public SNAT Rule

API Name

Command

Description

Operation

Querying SNAT Rules

hcloud NAT ListNatGatewaySnatRules

This API is used to query SNAT rules.

Go debug

Creating an SNAT Rule

hcloud NAT CreateNatGatewaySnatRule

This API is used to create an SNAT rule.

Go debug

Querying Details About a Specified SNAT Rule

hcloud NAT ShowNatGatewaySnatRule

This API is used to query details about a specified SNAT rule.

Go debug

Updating an SNAT Rule

hcloud NAT UpdateNatGatewaySnatRule

This API is used to update a specified SNAT rule.

Go debug

Deleting an SNAT Rule

hcloud NAT DeleteNatGatewaySnatRule

This API is used to delete a specified SNAT rule.

Go debug

Private NAT Gateway

API Name

Command

Description

Operation

Querying Private NAT Gateways

hcloud NAT ListPrivateNats

This API is used to query private NAT gateways.

Go debug

Creating a Private NAT Gateway

hcloud NAT CreatePrivateNat

This API is used to create a private NAT gateway.

Go debug

Querying Details About a Specified Private NAT Gateway

hcloud NAT ShowPrivateNat

This API is used to query details about a specified private NAT gateway.

Go debug

Updating a Private NAT Gateway

hcloud NAT UpdatePrivateNat

This API is used to update a private NAT gateway.

Go debug

Deleting a Private NAT Gateway

hcloud NAT DeletePrivateNat

This API is used to delete a private NAT gateway.

Go debug

Querying the List of NAT Gateway Specifications Supported by a Project

hcloud NAT ListSpecs

This API is used to query the list of NAT gateway specifications supported by a project.

Go debug

Private DNAT Rule

API Name

Command

Description

Operation

Querying DNAT Rules

hcloud NAT ListPrivateDnats

This API is used to query DNAT rules.

Go debug

Creating a DNAT Rule

hcloud NAT CreatePrivateDnat

This API is used to create a DNAT rule.

Go debug

Querying Details About a Specified DNAT Rule

hcloud NAT ShowPrivateDnat

This API is used to query details about a specified DNAT rule.

Go debug

Updating a DNAT Rule

hcloud NAT UpdatePrivateDnat

This API is used to update a specified DNAT rule.

Go debug

Deleting a DNAT Rule

hcloud NAT DeletePrivateDnat

This API is used to delete a specified DNAT rule.

Go debug

Private SNAT Rule

API Name

Command

Description

Operation

Querying SNAT Rules

hcloud NAT ListPrivateSnats

This API is used to query SNAT rules.

Go debug

Creating an SNAT Rule

hcloud NAT CreatePrivateSnat

This API is used to create an SNAT rule.

Go debug

Querying Details About a Specified SNAT Rule

hcloud NAT ShowPrivateSnat

This API is used to query details about a specified SNAT rule.

Go debug

Updating an SNAT Rule

hcloud NAT UpdatePrivateSnat

This API is used to update a specified SNAT rule.

Go debug

Deleting an SNAT Rule

hcloud NAT DeletePrivateSnat

This API is used to delete a specified SNAT rule.

Go debug

Private Transit IP Address

API Name

Command

Description

Operation

Querying Transit IP Addresses

hcloud NAT ListTransitIps

This API is to query transit IP addresses.

Go debug

Assigning a Transit IP Address

hcloud NAT CreateTransitIp

This API is used to assign a transit IP address.

Go debug

Querying Details About a Specified Transit IP Address.

hcloud NAT ShowTransitIp

This API is used to query details about a specified transit IP address.

Go debug

Releasing a Transit IP Address

hcloud NAT DeleteTransitIp

This API is used to release a transit IP address.

Go debug

Private NAT Gateway Tag

API Name

Command

Description

Operation

Querying Private NAT Gateways

hcloud NAT ListPrivateNatsByTags

- This API is used to query private NAT gateways by tag.

Go debug

Querying Tags of All Private NAT Gateways in a Project

hcloud NAT ListPrivateNatTags

- This API is used to query tags of all private NAT gateways owned by a tenant in a specified project.

Go debug

Querying Tags of a Private NAT Gateway

hcloud NAT ShowPrivateNatTags

- This API is used to query tags of a specified private NAT gateway.

Go debug

Adding a Tag to a Private NAT Gateway

hcloud NAT CreatePrivateNatTag

- A private NAT gateway can have up to 10 tags.

Go debug

Batch Adding Tags to or Deleting Tags from a Private NAT Gateway

hcloud NAT BatchCreateDeletePrivateNatTags

- This API is used to batch add tags to or delete tags from a private NAT gateway.

Go debug

Deleting a Tag from a Private NAT Gateway

hcloud NAT DeletePrivateNatTag

- This API is idempotent.

Go debug

Private Transit IP Address Tag

API Name

Command

Description

Operation

Querying Transit IP Addresses

hcloud NAT ListTransitIpsByTags

- This API is used to query transit IP addresses by tag.

Go debug

Querying Tags of All Transit IP Addresses in a Specified Project

hcloud NAT ListTransitIpTags

- This API is used to query tags of all transit IP addresses owned by a tenant in a specified project.

Go debug

Querying Tags of a Transit IP Address

hcloud NAT ShowTransitIpTags

- This API is used to query tags of a specified transit IP address.

Go debug

Adding a Tag to a Transit IP Address

hcloud NAT CreateTransitIpTag

- A transit IP address can have up to 10 tags.

Go debug

Batch Adding Tags to or Deleting Tags from a Transit IP Address

hcloud NAT BatchCreateDeleteTransitIpTags

- This API is used to batch add tags to or delete tags from a specified transit IP address.

Go debug

Deleting Tags from a Transit IP Address

hcloud NAT DeleteTransitIpTag

- This API is idempotent.

Go debug

Transit Subnet

API Name

Command

Description

Operation

Creating a Transit Subnet

hcloud NAT CreateTransitSubnet

Creating a Transit Subnet.

Go debug

Querying Transit Subnets

hcloud NAT ListTransitSubnet

Querying Transit Subnets.

Go debug

Querying the Details of a Transit Subnet

hcloud NAT ShowTransitSubnet

Querying the Details of a Transit Subnet.

Go debug

Updating a Transit Subnet

hcloud NAT UpdateTransitSubnet

Updating a Transit Subnet.

Go debug

Deleting a Transit Subnet

hcloud NAT DeleteTransitSubnet

Deleting a Transit Subnet.

Go debug

Querying Transit Subnets by Tag

hcloud NAT ListTransitSubnetsByTags

- This API is used to query transit subnets by tag.

Go debug

Transit Subnet Address Tag

API Name

Command

Description

Operation

Querying Tags of All Transit Subnets in a Specified Project

hcloud NAT ListTransitSubnetTags

- This API is used to query tags of all transit subnets of a tenant in a project.

Go debug

Querying Tags of a Transit Subnet

hcloud NAT ShowTransitSubnetTags

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

Go debug

Adding a Tag to a Transit Subnet

hcloud NAT CreateTransitSubnetTag

- This API is used to add a tag to a specified transit subnet.

Go debug

Batch Adding or Deleting Tags to or from a Transit Subnet

hcloud NAT BatchCreateDeleteTransitSubnetTags

- This API is used to batch add or delete tags to or from a transit subnet.

Go debug

Deleting a Transit Subnet Tag

hcloud NAT DeleteTransitSubnetTag

- This is an idempotent API to delete a tag from a transit subnet.

Go debug

Public NAT Gateway Tags

API Name

Command

Description

Operation

Querying Public NAT Gateways by Tag

hcloud NAT ListNatGatewayByTag

- This API is used to query public NAT gateways by tag.

Go debug

Batch Adding or Deleting Tags to or from a Public NAT Gateway

hcloud NAT BatchCreateDeleteNatGatewayTag

- This API is used to batch add or delete tags to or from a public NAT gateway.

Go debug

Adding a Tag to a Public NAT Gateway

hcloud NAT CreateNatGatewayTag

- This API is used to add a tag to a public NAT gateway. A resource can have up to 20 tags.

Go debug

Querying Tags of a Public NAT Gateway

hcloud NAT ShowNatGatewayTag

- This API is used to query tags of a public NAT gateway.

Go debug

Deleting a Tag from a Public NAT Gateway

hcloud NAT DeleteNatGatewayTag

- This API is used to delete a tag from a public NAT gateway.

Go debug

Querying Tags of All Public NAT Gateways in a Project

hcloud NAT ListNatGatewayTag

- This API is used to query tags of all public NAT gateways owned by a tenant in a project.

Go debug