CLI Command Reference
Cloud Phone Servers
| API Name | Command | Description | Operation |
|---|---|---|---|
| Deleting a Shared Application | hcloud CPH DeleteShareApps | This API is used to delete a shared application from the storage directory of shared applications. This function is available only on cloud phones that support shared applications. | |
| Pushing Shared Applications | hcloud CPH PushShareApps | This API is used to push tar. files of applications to the shared storage space. This function is available only on cloud phone servers that support application sharing. | |
| Pushing Shared Storage Files | hcloud CPH PushShareFiles | This API is used to push files to the shared storage space. This function is available only on cloud phones that support storage sharing. | |
| Deleting a Shared Storage File | hcloud CPH DeleteShareFiles | This API is used to delete files from the shared storage directory. This function is available only on cloud phones that support shared storage. | |
| Querying Flavors of Cloud Phone Servers | hcloud CPH ListCloudPhoneServerModels | This API is used to query flavors of cloud phone servers. | |
| Querying Cloud Phone Servers | hcloud CPH ListCloudPhoneServers | This API is used to query cloud phone servers by page and list them by creation time in descending order. You can specify offset and limit. If no cloud phone server is found, an empty list will be returned. | |
| Querying the Details of a Cloud Phone Server | hcloud CPH ShowCloudPhoneServerDetail | This API is used to query the details of a cloud phone server based on the server ID. | |
| Modifying the Name of a Cloud Phone Server | hcloud CPH UpdateServerName | This API is to modify the name of a cloud phone server based on its ID. | |
| Restarting Cloud Phone Servers | hcloud CPH RestartCloudPhoneServer | This API is used to restart cloud phone servers. | |
| Changing the Flavor of a Cloud Phone Server | hcloud CPH ChangeCloudPhoneServerModel | This API is used to modify the flavor of a cloud phone server. After the API is successfully called, the flavor change will be completed in about 2 minutes. On the My Orders page of the management console, you can view that the order status is Successful. Also, if you query the server details on the My Orders page, you can see that the new flavor has been applied. | |
| Querying Shared Storage Files | hcloud CPH ListShareFiles | This API is used to query files in a specified path of shared storage. This function is supported only by cloud phones that support shared storage. | |
| [Creating](tag:fcs)[Purchasing](tag:hws,hws_hk,cmcc,ctc) a Cloud Phone Server | hcloud CPH CreateNet2CloudPhoneServer | This API is used to purchase a cloud phone server. You can use existing VPCs to manage your cloud phone servers and reuse resources such as the shared bandwidth you have purchased. | |
| Changing the Cloud Phone Server for a Cloud Phone | hcloud CPH ChangeCloudPhoneServer | This API is used to switch to a new cloud phone server. After the switchover, the server name and server ID are the same as those of the original server, and the billing mode remains unchanged. When the server is switched, new mobile phones will be created on the new server, and the original user data will not be retained. The switchover requires additional resources and resource quotas. | |
| Creating a Cloud Phone BMS | hcloud CPH CreateCloudPhoneSingleServer | This API is only used to create a server with an image. To create a server containing cloud phones and phone images, call the API for creating a cloud phone server. |
Bandwidth
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Bandwidth Information | hcloud CPH ShowBandwidthDetail | This API is used to query the bandwidth used by a cloud phone. This API applies only to cloud phone servers that use system-defined networks. | |
| Modifying a Shared Bandwidth | hcloud CPH UpdateBandwidth | This API is used to modify the bandwidth used by a cloud phone. This API applies only to cloud phone servers that use system-defined networks. |
Cloud Phones
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying the Image of a Cloud Phone | hcloud CPH ListCloudPhoneImages | This API is used to query available cloud phone images by project ID. | |
| Querying Cloud Phone Flavors | hcloud CPH ListCloudPhoneModels | This API is used to query cloud phone flavors. | |
| Querying Cloud Phones | hcloud CPH ListCloudPhones | This API is used to query cloud phones by page. The cloud phones are sorted by creation time in descending order. You can specify offset and limit. If no cloud phone is found, an empty list will be returned. | |
| Diverting Cloud Phone Traffic | hcloud CPH ImportTraffic | This API is used to modify the route of a cloud phone. | |
| Querying Cloud Phone Details | hcloud CPH ShowCloudPhoneDetail | This API is used to query cloud phone details. | |
| Editing the Name of a Cloud Phone | hcloud CPH UpdatePhoneName | This API is used to modify the cloud phone name based on the cloud phone ID. | |
| Resetting Cloud Phones | hcloud CPH ResetCloudPhone | Reset cloud phones in batches to restore them to factory settings. This API is an asynchronous API. | |
| Restarting Cloud Phones | hcloud CPH RestartCloudPhone | Restart cloud phones in batches or start cloud phones. This API is an asynchronous API. | |
| Restoring Data of Cloud Phones | hcloud CPH BatchImportCloudPhoneData | This asynchronous API is used to restore data to cloud phones in batches. | |
| Stopping Cloud Phones | hcloud CPH StopCloudPhone | This API is used to stop cloud phones. | |
| Exporting Data from Cloud Phones | hcloud CPH BatchExportCloudPhoneData | This asynchronous API is used to export data from cloud phones in batches. | |
| Updating Properties of Cloud Phones | hcloud CPH UpdateCloudPhoneProperty | Some cloud phone attributes can be updated. Some attributes cannot be updated, and some attributes take effect only after the phone is restarted. For details about attribute restrictions, see the cloud phone attribute list. If the cloud phone is in the abnormal state, the updated attributes take effect only after the cloud phone is restored to the running state. This API is an asynchronous API. | |
| Obtaining the Cloud Phone Access Information | hcloud CPH BatchShowPhoneConnectInfos | This API is used to obtain the cloud phone access information. | |
| Expanding the Data Disk of a Cloud Phone | hcloud CPH ExpandPhoneDataVolumeSize | This API is used to expand data disks of a cloud phone. |
Tasks
Keys
| API Name | Command | Description | Operation |
|---|---|---|---|
| Updating a Key Pair | hcloud CPH UpdateKeypair | This API is used to update the key pair for connecting to the cloud phone. |
Encoding Services
ADB Commands
| API Name | Command | Description | Operation |
|---|---|---|---|
| Pushing Files | hcloud CPH PushFile | This asynchronous API is used to push a file to the cloud phone file system. The file is downloaded and decompressed by the system, and then the decompressed content is pushed to the root directory of the cloud phone. Only .tar files can be pushed. You need to upload the .tar files to your OBS bucket in advance. | |
| Installing an APK | hcloud CPH InstallApk | This asynchronous API is used to install APK files on cloud phones. The system downloads specified APK files and installs them on the cloud phones. | |
| Uninstalling an APK | hcloud CPH UninstallApk | Uninstalling the APK file from a cloud phone This API is an asynchronous API. | |
| Running adb Commands Asynchronously | hcloud CPH RunShellCommand | Run the shell command on a cloud phone. This API is an asynchronous API. | |
| Running adb Commands Synchronously | hcloud CPH RunSyncCommand | This API is only used to synchronously run ADB shell commands and return the command output on a cloud phone. Within one minute, you can call this API for up to 6 times. The timeout interval for a cloud phone to run a command is 2 seconds, and the API calling time does not exceed 30 seconds (excluding the 2-second timeout interval). A larger number of cloud phones indicates a longer API calling time in total. |
Tags
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Tags of a Project | hcloud CPH ListProjectTags | This API is used to query all tags of a resource type in a region. | |
| Querying Resource Tags | hcloud CPH ListResourceTags | This API is used to query all resource tags. | |
| Querying Resources | hcloud CPH ListResourceInstances | This API is used to query resources. | |
| Adding Tags | hcloud CPH BatchCreateTags | This API is used to add tags. | |
| Deleting Tags | hcloud CPH BatchDeleteTags | This API is used to delete tags. |
Images
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Custom Images | hcloud CPH ListImages | This API is used to query custom images. | |
| Deleting an Image | hcloud CPH DeleteImage | This API is used to delete a custom image. | |
| Sharing an Image with an Account in a Specified Project | hcloud CPH AddImageMember | This API is used to share an image with a specified account. | |
| Obtaining Projects that the Image Is Shared with | hcloud CPH ListImageMembers | This API is used to obtain projects that the image is shared with. | |
| Accepting or Rejecting Images Shared By Others | hcloud CPH UpdateImageMember | This API is used to accept or reject images shared by others. The rejected images cannot be used. | |
| Deleting a Shared Image | hcloud CPH DeleteImageMember | This API is used to delete a shared image. |
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