CLI Command Reference
API Version Query
Lifecycle Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Creating ECSs | hcloud ECS CreateServers | This API is used to create one or more ECSs. | |
| Creating ECSs (Pay-per-Use) | hcloud ECS CreatePostPaidServers | This API is used to create one or more pay-per-use ECSs. | |
| Deleting ECSs | hcloud ECS DeleteServers | This API is used to delete ECSs with specified IDs. | |
| Querying Details About an ECS | hcloud ECS ShowServer | This API is used to query details about an ECS. | |
| Modifying an ECS | hcloud ECS UpdateServer | This API is used to modify an ECS, including the ECS name, description, and hostname. | |
| Listing Details About ECSs | hcloud ECS ListServersDetails | This API is used to filter ECSs from the database based on request conditions and obtain the ECS details. | |
| Listing ECSs | hcloud ECS ListCloudServers | This API is used to list ECSs. | |
| Listing ECSs | hcloud ECS NovaListServers | This API is used to list ECSs. | |
| Creating an ECS | hcloud ECS NovaCreateServers | This API is used to create an ECS. | |
| Displaying Details About an ECS | hcloud ECS NovaShowServer | This API is used to query details about an ECS based on the ECS ID. | |
| Modifying an ECS | hcloud ECS NovaUpdateServer | This API is used to modify an ECS. Currently, the ECS name and description can be modified. | |
| Deleting an ECS | hcloud ECS NovaDeleteServer | This API is used to delete an ECS. | |
| Listing Details About ECSs | hcloud ECS NovaListServersDetails | This API is used to list details about ECSs. |
Status Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Reinstalling an ECS OS (Using an Image with Cloud-Init Installed) | hcloud ECS ReinstallServerWithCloudInit | This API is used to reinstall an ECS OS. During the system disk reinstallation using the original image, the data disks of the ECS remain unchanged. | |
| Changing an ECS OS (Using an Image Without Cloud-Init Installed) | hcloud ECS ChangeServerOsWithCloudInit | This API is used to change the OS of an ECS. During the system disk reinstallation using a new image, the data disks of the ECS remain unchanged. | |
| Reinstalling an ECS OS (Using an Image Without Cloud-Init Installed) | hcloud ECS ReinstallServerWithoutCloudInit | This API is used to reinstall an ECS OS. | |
| Changing an ECS OS (Using an Image Without Cloud-Init Installed) | hcloud ECS ChangeServerOsWithoutCloudInit | This API is used to change the OS of an ECS. | |
| Cold Migrating an ECS | hcloud ECS MigrateServer | An ECS deployed on a DeH can be migrated to another DeH. | |
| Obtaining the VNC Login Address | hcloud ECS ShowServerRemoteConsole | This API is used to obtain the address for remotely logging in to an ECS using VNC. | |
| Modifying the Specifications of an ECS | hcloud ECS ResizeServer | This API is used to modify the specifications of an ECS. | |
| Modifying the Specifications of an ECS (Pay-per-Use) | hcloud ECS ResizePostPaidServer | You can modify ECS specifications, such as vCPUs and memory, to meet service requirements. | |
| Changing the ECS Billing Mode | hcloud ECS ChangeServerChargeMode | This API is used to change the ECS billing mode. | |
| Redeploying an ECS | hcloud ECS ExecuteServerRedeploy | This API is used to redeploy an ECS. | |
| Starting an ECS | hcloud ECS NovaStartServer | This API is used to start an ECS. | |
| Restarting an ECS | hcloud ECS NovaRebootServer | This API is used to restart an ECS. | |
| Stopping an ECS | hcloud ECS NovaStopServer | This API is used to stop an ECS. | |
| Locking an ECS | hcloud ECS NovaLockServer | This API is used to lock an ECS. | |
| Unlocking an ECS | hcloud ECS NovaUnlockServer | This API is used to unlock an ECS. | |
| Adding an ECS to the Monitoring List | hcloud ECS RegisterServerMonitor | This API is used to add an ECS to the monitoring list. | |
| Triggering an ECS Kernel Dump | hcloud ECS ExecuteServerDump | This API is used to trigger an ECS kernel dump. |
Batch Operations
| API Name | Command | Description | Operation |
|---|---|---|---|
| Starting ECSs in a Batch | hcloud ECS BatchStartServers | This API is used to start ECSs in a batch based on the specified ECS IDs. A maximum of 1,000 ECSs can be started at a time. | |
| Restarting ECSs in a Batch | hcloud ECS BatchRebootServers | This API is used to restart ECSs in a batch based on the specified ECS IDs. A maximum of 1,000 ECSs can be restarted at a time. | |
| Stopping ECSs in a Batch | hcloud ECS BatchStopServers | This API is used to stop ECSs in a batch based on the specified ECS IDs. A maximum of 1,000 ECSs can be stopped at a time. | |
| Modifying ECSs in a Batch | hcloud ECS BatchUpdateServersName | This API is used to modify ECSs in a batch. | |
| Resetting the Passwords for Logging In to ECSs in a Batch | hcloud ECS BatchResetServersPassword | This API is used to reset the passwords of ECS management accounts, root or Administrator, in a batch. | |
| Attaching a Specified Shared EVS Disk to Multiple ECSs in a Batch | hcloud ECS BatchAttachSharableVolumes | This API is used to attach a specified shared EVS disk to multiple ECSs. | |
| Modifying Specifications of Multiple ECSs in a Batch | hcloud ECS BatchResizeServers | This API is used to modify specifications of multiple ECSs in a batch. | |
| Detaching Disks in a Batch | hcloud ECS BatchDetachVolumes | This API is used to detach disks in a batch. |
NIC Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Adding NICs to an ECS in a Batch | hcloud ECS BatchAddServerNics | This API is used to add one or multiple NICs to an ECS. | |
| Batch Deleting NICs from an ECS | hcloud ECS BatchDeleteServerNics | This API is used to detach and delete one or multiple NICs from an ECS. | |
| Updating Attributes of a Specified NIC for an ECS | hcloud ECS ChangeServerNetworkInterface | This API is used to update the attributes of a specified NIC for an ECS. Currently, only the NIC IP address can be updated. | |
| Binding a Virtual IP Address to an ECS NIC | hcloud ECS AssociateServerVirtualIp | A virtual IP address provides another IP address for one or multiple ECS NICs, improving high availability between the ECSs. | |
| Unbinding a Virtual IP Address from an ECS NIC | hcloud ECS DisassociateServerVirtualIp | A virtual IP address provides another IP address for one or multiple ECS NICs, improving high availability between the ECSs. | |
| Listing NICs of an ECS | hcloud ECS ListServerInterfaces | This API is used to list NICs of an ECS. | |
| Changing a VPC for an ECS | hcloud ECS ChangeVpc | This API is used to change a VPC for an ECS. | |
| Updating NIC Attachment Information of an ECS | hcloud ECS UpdateServerInterface | This API is used to update NIC attachment information of an ECS. | |
| Listing NICs of an ECS | hcloud ECS NovaListServerInterfaces | This API is used to list NICs of an ECS. | |
| Adding a NIC to an ECS | hcloud ECS NovaAttachInterface | This API is used to add a NIC to an ECS. | |
| Querying Details About an ECS NIC | hcloud ECS NovaShowServerInterface | This API is used to query details about an ECS NIC based on the specified NIC ID. | |
| Deleting an ECS NIC | hcloud ECS NovaDetachInterface | This API is used to delete a NIC from an ECS based on the specified port ID. | |
| Querying the NICs That Can Be Attached to an ECS | hcloud ECS ShowServerAttachableNicNum | This API is used to query the NICs that can be attached to an ECS. |
Disk Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Details About a Single Disk Attached to an ECS | hcloud ECS ShowServerBlockDevice | This API is used to query details about a single disk attached to an ECS. | |
| Modifying a Single Disk Attached to an ECS | hcloud ECS UpdateServerBlockDevice | This API is used to modify information about a single disk attached to an ECS. Currently, only the delete_on_termination parameter can be modified. | |
| Listing Disks Attached to an ECS | hcloud ECS ListServerVolumeAttachments | This API is used to list disks attached to an ECS. | |
| Listing Details About Disks Attached to an ECS | hcloud ECS ListServerBlockDevices | This API is used to list details about disks attached to an ECS. | |
| Attaching a Disk to an ECS | hcloud ECS AttachServerVolume | This API is used to attach a disk to an ECS. | |
| Detaching a Disk from an ECS | hcloud ECS DetachServerVolume | This API is used to detach a disk from an ECS. | |
| Listing Details About Disks Attached to an ECS | hcloud ECS NovaListServerVolumes | This API is used to list details about disks attached to an ECS. | |
| Attaching an ECS Disk | hcloud ECS NovaAttachVolume | This API is used to attach a disk to an ECS. | |
| Querying a Disk Attached to an ECS | hcloud ECS NovaShowServerVolume | This API is used to query a disk attached to an ECS based on the disk ID. | |
| Detaching an ECS Disk | hcloud ECS NovaDetachVolume | This API is used to detach a disk from an ECS. | |
| Querying the Number of Disks That Can Be Added to a Yearly/Monthly ECS | hcloud ECS ShowAppendableVolumeQuota | This API is used to query the number of disks that can be added to a yearly/monthly ECS. |
Security Group Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Adding a Security Group | hcloud ECS NovaAssociateSecurityGroup | This API is used to add an ECS to a security group. | |
| Removing a Security Group | hcloud ECS NovaDisassociateSecurityGroup | This API is used to remove an ECS from a security group. | |
| Listing Security Groups of a Specified ECS | hcloud ECS NovaListServerSecurityGroups | This API is used to list security groups of a specified ECS. |
Flavor Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Listing Flavor Details and Extended Information | hcloud ECS ListFlavors | This API is used to list flavor details and extended information. | |
| Listing Flavor Sales Policies | hcloud ECS ListFlavorSellPolicies | This API is used to list flavor sales policies. | |
| Listing Supported Flavor Changes | hcloud ECS ListResizeFlavors | An ECS flavor cannot be changed to certain flavors. This API is used to query the target flavors to which a specified ECS flavor can be changed. | |
| Listing ECS Flavors | hcloud ECS NovaListFlavors | This API is used to list available ECS flavors. | |
| Listing Details About ECS Flavors | hcloud ECS NovaListFlavorsDetails | This API is used to list details about ECS flavors. | |
| Querying Details About an ECS Flavor | hcloud ECS NovaShowFlavor | This API is used to query details about an ECS flavor based on the flavor ID. | |
| Querying the extra_specs Value for an ECS Flavor | hcloud ECS NovaShowFlavorExtraSpecs | This API is used to query the extra_specs value for a specified ECS flavor. | |
| Querying the Capacity of a Flavor | hcloud ECS ShowFlavorCapacity | This API is used to query the capacity of a flavor. |
Metadata Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Updating ECS Metadata | hcloud ECS UpdateServerMetadata | This API is used to update ECS metadata. | |
| Deleting Specified ECS Metadata | hcloud ECS DeleteServerMetadata | This API is used to delete specified ECS metadata. | |
| Querying ECS Metadata | hcloud ECS NovaShowServerMetadata | This API is used to query ECS metadata. | |
| Updating ECS Metadata | hcloud ECS NovaUpdateServerMetadata | This API is used to update ECS metadata. | |
| Configuring ECS Metadata | hcloud ECS NovaCreateServerMetadata | This API is used to configure ECS metadata. | |
| Obtaining ECS Metadata with a Specified Key | hcloud ECS NovaShowServerMetadataItem | This API is used to obtain ECS metadata with a specified key. | |
| Modifying ECS Metadata with a Specified Key | hcloud ECS NovaUpdateServerMetadataItem | This API is used to modify ECS metadata with a specified key. | |
| Deleting Specified ECS Metadata | hcloud ECS NovaDeleteServerMetadataItem | This API is used to delete specified ECS metadata. |
Metadata Configuration Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Updating ECS Metadata Configuration | hcloud ECS UpdateMetadataOptions | This API is used to update the metadata configuration of an ECS. You can enable or disable the IMDS service and select the IMDS version. | |
| Querying ECS Metadata Configuration | hcloud ECS ShowMetadataOptions | This API is used to query the metadata configuration of an ECS. |
Tenant Quota Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Tenant Quotas | hcloud ECS ShowServerLimits | This API is used to query tenant quotas. |
Job Status Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Job Execution Status | hcloud ECS ShowJob | This API is used to query the execution status of a job. |
Tag Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Adding Tags to an ECS in a Batch | hcloud ECS BatchCreateServerTags | This API is used to add tags to a specified ECS in a batch. | |
| Deleting Tags from an ECS in a Batch | hcloud ECS BatchDeleteServerTags | This API is used to delete tags from a specified ECS in a batch. | |
| Querying Project Tags | hcloud ECS ListServerTags | Projects are used to group and isolate OpenStack resources, which include computing, storage, and network resources. A project can be a department or a team. Multiple projects can be created for the same account. | |
| Querying Tags of an ECS | hcloud ECS ShowServerTags | This API is used to query tags of a specified ECS. |
Key and Password Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Whether One-Click Password Reset Is Supported | hcloud ECS ShowResetPasswordFlag | This API is used to query whether an ECS supports one-click password reset. | |
| Resetting the Password of an ECS with a Few Clicks (Enterprise Project) | hcloud ECS ResetServerPassword | This API is used to reset the password of the ECS management account, root or Administrator. | |
| Obtaining the Password of an ECS (Enterprise Project) | hcloud ECS ShowServerPassword | This API is used to obtain the random password generated for the Administrator account or the account configured using Cloudbase-Init during initial installation of a Windows ECS created using an image that supports Cloudbase-Init. | |
| Deleting the Password of an ECS (Enterprise Project) | hcloud ECS DeleteServerPassword | This API is used to delete the password generated during initial installation of a Windows ECS. After a password is deleted, you can still use it to log in to your ECS. However, you cannot use the Get Password function to obtain it. | |
| Listing SSH Key Pairs | hcloud ECS NovaListKeypairs | This API is used to list SSH key pairs. | |
| Creating and Importing an SSH Key Pair | hcloud ECS NovaCreateKeypair | This API is used to create an SSH key pair or import a public key to generate a key pair. | |
| Querying Details About an SSH Key Pair | hcloud ECS NovaShowKeypair | This API is used to query details about a specified SSH key pair based on the key pair name. | |
| Deleting an SSH Key Pair | hcloud ECS NovaDeleteKeypair | This API is used to delete a specified SSH key pair based on the key pair name. |
ECS Group Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Adding ECSs to an ECS Group in a Batch | hcloud ECS BatchAddServerGroupMember | This API is used to add ECSs to an ECS group. ECSs in the same group are automatically deployed on different hosts if possible. | |
| Removing ECSs from an ECS Group in a Batch | hcloud ECS BatchDeleteServerGroupMember | This API is used to remove ECSs from an ECS group. The anti-affinity policy will not be applied to the ECSs after they are removed from the group. | |
| Listing ECS Groups | hcloud ECS ListServerGroups | This API is used to list ECS groups. | |
| Creating an ECS Group | hcloud ECS CreateServerGroup | This API is used to create an ECS group. | |
| Displaying Details About an ECS Group | hcloud ECS ShowServerGroup | This API is used to query details about an ECS group. | |
| Deleting an ECS Group | hcloud ECS DeleteServerGroup | This API is used to delete an ECS group. | |
| Listing ECS Groups | hcloud ECS NovaListServerGroups | This API is used to list ECS groups. | |
| Creating an ECS Group | hcloud ECS NovaCreateServerGroup | This API is used to create an ECS group. | |
| Querying Details About an ECS Group | hcloud ECS NovaShowServerGroup | This API is used to query details about an ECS group. | |
| Deleting an ECS Group | hcloud ECS NovaDeleteServerGroup | This API is used to delete an ECS group. |
ECS Management
AZ Management
Scheduled Event Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Listing Scheduled Events | hcloud ECS ListScheduledEvents | This API is used to list scheduled events. | |
| Updating a Scheduled Event | hcloud ECS UpdateScheduledEvent | This API is used to update the execution start time of a scheduled event. | |
| Accepting and Authorizing the Execution of a Scheduled Event | hcloud ECS AcceptScheduledEvent | When the system reports a system maintenance event, you need to authorize maintenance for ECSs (including bare metal ECSs). |
Recycle Bin Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying the Recycle Bin Configuration | hcloud ECS ShowRecycleBin | This API is used to query the recycle bin configuration. | |
| Updating the Recycle Bin Configuration | hcloud ECS UpdateRecycleBin | This API is used to update the recycle bin configuration. | |
| Deleting a Server from the Recycle Bin | hcloud ECS DeleteRecycleBinServer | This API is used to delete a server from the recycle bin. | |
| Listing Servers in the Recycle Bin | hcloud ECS ListRecycleBinServers | This API is used to list servers in the recycle bin. | |
| Updating the Recycle Bin Policy | hcloud ECS UpdateRecycleBinPolicy | This API is used to update the recycle bin policy. | |
| Recovering a Server from the Recycle Bin | hcloud ECS RevertRecycleBinServer | This API is used to recover a server from the recycle bin. |
Template Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Listing Template Versions | hcloud ECS ListLaunchTemplateVersions | This API is used to filter and list the launch template versions based on the request conditions. You can filter templates by image_id and flavor_id. | |
| Deleting a Template | hcloud ECS DeleteLaunchTemplates | This API is used to delete a launch template. All versions of the template are deleted. | |
| Listing Templates | hcloud ECS ListTemplates | This API is used to filter and list launch templates from the database based on the request conditions. | |
| Creating a Template | hcloud ECS CreateLaunchTemplate | This API is used to create a launch template. The automatically-generated version 1 is the default version. |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot