All Products
Search
Document Center

Cloud Phone:RunCommand

Last Updated:Dec 12, 2025

Runs a command on a cloud phone instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

InstanceIds

array

No

The list of instance IDs. A single request can contain up to 50 instances.

string

No

The instance ID.

acp-7b15ex96****

CommandContent

string

No

The content of the command.

ls

Timeout

integer

No

The timeout period, in seconds. If the command does not finish running within the specified period, the command times out. If you do not specify this parameter, the default value is 60.

60

AgentType

string

No

The type of channel to use for running the command.

Valid values:

  • EdsAgent :

    The EdsAgent channel

  • CloudAssistant :

    Cloud Assistant

EdsAgent

ContentEncoding

string

No

The encoding method for the command content (CommandContent). The value is case-insensitive.

Note

If you specify a value that is not a valid enumeration value, the system treats the content as PlainText.

Valid values:

  • Base64 :

    The content is Base64-encoded.

  • PlainText :

    The content is not encoded and is transmitted in plaintext. (Default)

PlainText

Response elements

Element

Type

Description

Example

object

Response parameters

RequestId

string

The ID of the request.

440D7342-5E7C-B2DB-D0B4EAC2BDF1****

InvokeId

string

The ID of the command execution. You can use this ID to query the execution result.

t-gov2ujrk32v4****

RunCommandInfos

array<object>

object

InvokeId

string

InstanceId

string

Examples

Success response

JSON format

{
  "RequestId": "440D7342-5E7C-B2DB-D0B4EAC2BDF1****",
  "InvokeId": "t-gov2ujrk32v4****",
  "RunCommandInfos": [
    {
      "InvokeId": "",
      "InstanceId": ""
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.