CLI Command Reference
BMS Lifecycle Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Details About BMSs | hcloud BMS ListBareMetalServers | This API is used to query BMSs by filters and display details about the BMSs. The information that can be queried includes the BMS billing mode and whether a BMS is frozen. | |
| Querying BMSs | hcloud BMS ListBareMetalServersDetail | This API is used to query BMSs by filters and display details about the BMSs. | |
| Creating BMSs | hcloud BMS CreateBareMetalServers | This API is used to create one or more BMSs. | |
| Querying Details About a BMS | hcloud BMS ListBareMetalServerDetails | This API is used to query details about a BMS. The information that can be queried includes the BMS billing mode and whether a BMS is frozen. |
BMS Status Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Changing a BMS Name | hcloud BMS ChangeBaremetalServerName | This API is used to change the name of a BMS. | |
| Reinstalling a BMS OS | hcloud BMS ReinstallBaremetalServerOs | This API is used to reinstall the OS of a BMS. For a quick-provisioning BMS, its system disk (OS) can be reinstalled using the original image, with its data disks unchanged. A password or key pair can be injected during OS reinstallation. | |
| Starting BMSs | hcloud BMS BatchStartBaremetalServers | This API is used to start BMSs of specified IDs. | |
| Restarting BMSs | hcloud BMS BatchRebootBaremetalServers | This API is used to restart BMSs of specified IDs. | |
| Stopping BMSs | hcloud BMS BatchStopBaremetalServers | This API is used to stop BMSs of specified IDs. | |
| Obtaining the Address for Remotely Logging In to a BMS | hcloud BMS ShowServerRemoteConsole | This API is used to obtain the address for remotely logging in to a BMS. | |
| Changing a BMS OS | hcloud BMS ChangeBaremetalServerOs | This API is used to change the OS of a BMS. A password or key pair can be injected during OS changes. |
BMS Metadata Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Updating BMS Metadata | hcloud BMS UpdateBaremetalServerMetadata | This API is used to update metadata of a BMS. If the metadata does not contain the field to be updated, the field is automatically added. If the metadata already contains the field, the field value will be updated. If a field in the metadata is not in the request, the field value remains unchanged. |
BMS Metadata Configuration Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Updating the Metadata Configuration of a BMS | hcloud BMS UpdateMetadataOptions | This API is used to update the metadata configuration of a BMS. You can enable or disable the IMDS service and select the IMDS version. | |
| Querying the Metadata Configuration of a BMS | hcloud BMS ShowMetadataOptions | This API is used to query the metadata configuration of a BMS. |
BMS NIC Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying NICs Attached to a BMS | hcloud BMS ShowBaremetalServerInterfaceAttachments | This API is used to query information about NICs attached to a BMS, such as the IP address and MAC address of each NIC. | |
| Detaching NICs from a BMS | hcloud BMS DeleteServerNics | This API is used to detach one or more NICs from a BMS. | |
| Modifying the Attribute of a BMS NIC | hcloud BMS UpdateBaremetalServerInterfaceAttachments | This API is used to specify whether to delete a NIC when the BMS is deleted or the NIC is detached. | |
| Attaching NICs to a BMS | hcloud BMS AddServerNics | This API is used to attach one or more NICs to a BMS. | |
| Modifying a BMS NIC | hcloud BMS ModifyVmNic | This API is used to modify a BMS NIC. |
BMS Disk Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Attaching an EVS Disk to a BMS | hcloud BMS AttachBaremetalServerVolume | This API is used to attach an EVS disk to a BMS as a data disk if existing disks are insufficient or cannot meet requirements. | |
| Detaching an EVS Disk from a BMS | hcloud BMS DetachBaremetalServerVolume | This API is used to detach a disk from a BMS. A disk attached to /dev/sda functions as a system disk and cannot be detached. A disk attached to a mount point other than /dev/sda functions as a data disk and can be detached from a running or stopped BMS. | |
| Querying EVS Disks Attached to a BMS | hcloud BMS ShowBaremetalServerVolumeInfo | This API is used to query EVS disks attached to a BMS. |
BMS Password Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Whether One-Click Password Reset Is Supported | hcloud BMS ShowResetPwd | This API is used to query whether a BMS supports one-click password reset. | |
| Resetting the BMS Password with a Few Clicks | hcloud BMS ResetPwdOneClick | This API is used to reset the password of the BMS management account (root or Administrator) when one-click password reset is supported. | |
| Obtaining the Password of a Windows BMS | hcloud BMS ShowWindowsBaremetalServerPwd | This API is used to obtain the random password of the administrator (account Administrator or an account configured using Cloudbase-Init) generated by the system during the initial installation of a Windows BMS. If the BMS is created from a private image, ensure that Cloudbase-Init has been installed. Cloudbase-Init is installed on public images by default. | |
| Deleting the Password of a Windows BMS | hcloud BMS DeleteWindowsBareMetalServerPassword | This API is used to delete the random password generated during initial Windows BMS installation. After the password is deleted, you can still use it to log in to your BMS. However, you cannot use the Get Password function to obtain the password. If the BMS is created from a private image, ensure that Cloudbase-Init has been installed. Cloudbase-Init is installed on public images by default. |
BMS Quota Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Tenant Quotas | hcloud BMS ShowTenantQuota | This API is used to query the quotas of all resources for a specified tenant, including used quotas. |
BMS Flavor Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Details About Flavors and Extended Flavor Information | hcloud BMS ListBaremetalFlavorDetailExtends | This API is used to query BMS flavor details and extended flavor information. You can call this API to query the value of parameter baremetal:extBootType to check whether a flavor supports quick BMS provisioning. | |
| Querying Available Resources | hcloud BMS ShowAvailableResource | This API is used to query available resources. |
Job Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Job Statuses | hcloud BMS ShowJobInfos | This API is used to query the execution status of a job. After an asynchronous API is called, for example an API for creating BMSs or attaching or detaching disks, job_id will be returned. You can use job_id to query the job status. |
API Version Query
BMS 2D Tag Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Adding Tags to a BMS | hcloud BMS BatchCreateBaremetalServerTags | This API is used to add tags to a specified BMS in a batch. The Tag Management Service (TMS) uses this API to batch manage tags of a BMS. | |
| Deleting Tags from a BMS | hcloud BMS BatchDeleteBaremetalServerTags | This API is used to delete tags from a specified BMS in a batch. TMS uses this API to batch manage tags of a BMS. | |
| Querying Tags of a BMS | hcloud BMS ShowBaremetalServerTags | This API is used to query tags of a specified BMS. TMS uses this API to query all tags of a specified BMS. |
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