> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/security/zos/datastructure.md).

# Data Types

## Command

Information on commands.

Referenced by：DescribeCommands

| Parameter Name       | Type                                    | Description                |
| -------------------- | --------------------------------------- | -------------------------- |
| commandId            | String                                  | Command ID.                |
| name                 | String                                  | Command name.              |
| type                 | [CommandType](#commandtype)             | Script language type.      |
| createTime           | String                                  | Creation time of command.  |
| description          | String                                  | Command note.              |
| content              | String                                  | Script content.            |
| latestInvocationTime | String                                  | Latest execution time.     |
| tags                 | [Tags](#tags)                           | Tag of command             |
| resourceGroup        | [ResourceGroupInfo](#resourcegroupinfo) | Resource group of command. |

## CommandInvocation

Information on execution of commands.

Referenced by：DescribeCommandInvocations

| Parameter Name      | Type                                               | Description                                 |
| ------------------- | -------------------------------------------------- | ------------------------------------------- |
| invocationId        | String                                             | Execution ID.                               |
| commandId           | String                                             | Command ID.                                 |
| commandName         | String                                             | Command name.                               |
| commandType         | [CommandType](#commandtype)                        | Script language type.                       |
| content             | String                                             | Script content.                             |
| timeout             | Integer                                            | Execution timeout.                          |
| createTime          | String                                             | Execution creation time.                    |
| invocationStatus    | [InvocationStatus](#invocationstatus)              | Execution state.                            |
| invocationInstances | Array of [InvocationInstance](#invocationinstance) | Target instance list for command execution. |

## CommandType

Script language types.

Referenced by：DescribeCommands, CreateCommand, DescribeCommandInvocations

| Value      | Description                                     |
| ---------- | ----------------------------------------------- |
| SHELL      | Shell script running on Linux instances.        |
| POWERSHELL | PowerShell script running on Windows instances. |
| BAT        | Bat script running on Windows instances.        |

## InvocationInstance

Information on target instances for command execution.

Referenced by：DescribeCommandInvocations

| Parameter Name | Type                                                | Description                                    |
| -------------- | --------------------------------------------------- | ---------------------------------------------- |
| instanceId     | String                                              | Execution ID.                                  |
| instanceName   | String                                              | Instance name.                                 |
| instanceExist  | Boolean                                             | Whether the specified instance exists.         |
| taskStatus     | [InvocationTaskStatus](#invocationtaskstatus)       | Instance status of command execution.          |
| exitCode       | Integer                                             | Exit code of command execution.                |
| errorCode      | [InvocationTaskErrorCode](#invocationtaskerrorcode) | Error code of command execution.               |
| output         | String                                              | Standard output (stdout) of command execution. |
| outputError    | String                                              | Standard input (stderr) of command execution.  |
| execStartTime  | String                                              | Start time of command execution.               |
| execEndTime    | String                                              | End time of command execution.                 |

## InvocationStatus

Command execution state.

Referenced by：DescribeCommandInvocations

| Value         | Description                                                                                            |
| ------------- | ------------------------------------------------------------------------------------------------------ |
| Pending       | <p>Command executions are pending.</p><p>All instance tasks are Pending.</p>                           |
| Running       | <p>Command executions are running.</p><p>All instance tasks are Running.</p>                           |
| PartialFailed | <p>Command executions are partially failed.</p><p>All instance tasks completed with mixed results.</p> |
| Failed        | <p>Command executions are failed.</p><p>All instance tasks completed and failed.</p>                   |
| Success       | <p>Command executions are succeeded.</p><p>All instance tasks completed successfully.</p>              |

## InvocationTaskErrorCode

Information on error codes.

Referenced by：DescribeCommandInvocations

| Value                  | Description                                       |
| ---------------------- | ------------------------------------------------- |
| InstanceNotExists      | Instance does not exist.                          |
| InstanceInstanceState  | Instance is not running.                          |
| SystemError            | System error. Execution pending.                  |
| CommandPlatformInvalid | Command type cannot be executed on this instance. |
| ExecutionTimeout       | Script execution timed out.                       |
| ExecutionExitNoneZero  | Script execution failed with non-zero exit code.  |

## InvocationTaskStatus

Instance status of command execution.

Referenced by：DescribeCommandInvocations

| Value   | Description                                                           |
| ------- | --------------------------------------------------------------------- |
| Pending | Waiting for command execution.                                        |
| Running | Command execution in progress.                                        |
| Timeout | Command execution timed out.                                          |
| Failed  | Command execution failed with non-zero exit code.                     |
| Success | Command completed with exit code 0.                                   |
| Error   | Command execution failed due to system error or instance not running. |

## ResourceGroupInfo

Information on resource group, including resource group name and resource group ID.

Referenced by：DescribeCommands

| Parameter Name    | Type   | Description          |
| ----------------- | ------ | -------------------- |
| resourceGroupId   | String | Resource group ID.   |
| resourceGroupName | String | Resource group name. |

## Tag

Information on a tag, including its key and value.

Referenced by：DescribeCommands, CreateCommand

| Parameter Name | Type   | Required | Description                                  |
| -------------- | ------ | -------- | -------------------------------------------- |
| key            | String | Yes      | Tag key. Length limit: 1 to 64 characters.   |
| value          | String | No       | Tag value. Length limit: 1 to 64 characters. |

## TagAssociation

Information on tags bound to resources, including their keys and values.

Referenced by：CreateCommand

| Parameter Name | Type                 | Required | Description   |
| -------------- | -------------------- | -------- | ------------- |
| tags           | Array of [Tag](#tag) | Yes      | List of tags. |

## Tags

Information on tags, including their keys and values.

Referenced by：DescribeCommands

| Parameter Name | Type                 | Description   |
| -------------- | -------------------- | ------------- |
| tags           | Array of [Tag](#tag) | List of tags. |
