Queries detailed information of a deployment task that is created for an edge instance.

Limits

A single Alibaba Cloud account can run a maximum of 5 queries per second (QPS).

Note RAM users share the quota of the Alibaba Cloud account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetEdgeInstanceDeployment

The operation that you want to perform. Set the value to GetEdgeInstanceDeployment.

DeploymentId String Yes 9261e308a9504fde9b4cf8462b0b****

The ID of the deployment task.

InstanceId String Yes PgEfYupSn6Pvhfkx****

The ID of the edge instance.

IotInstanceId String No iot_instc_pu****_c*-v64********

The ID of the Internet of Things (IoT) service instance. This parameter is not required for public instances. However, this parameter is required for the instances that you have purchased.

In addition to the preceding exclusive request parameters, you must specify common request parameters when calling this API operation. For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String 6B72291A-9492-445E-81D9-335D2D3E44C0

The ID of the request.

Success Boolean true

Indicates whether the call was successful. true: indicates that the call was successful. false: indicates that the call failed.

Code String Success

The error code. Success indicates that the call was successful. Other values indicate that specific errors occurred. For more information, see Error codes.

ErrorMessage String request parameter error

The error message returned if the call failed.

Data Struct

The data returned if the call was successful.

GmtCreate String 2019-06-26 18:12:29

The time when the deployment task was created.

GmtModified String 2019-06-26 18:12:35

The time when the deployment task was last modified.

GmtCompleted String 2019-06-26 18:12:35

The time when the deployment task was completed.

DeploymentId String 9261e308a9504fde9b4cf8462b0b****

The ID of the deployment task.

Description String deploy_1561543948874

The description of the deployment task.

Status Integer 2

The current status of the deployment task.

  • 0: The task has not started.
  • 1: The task is being processed.
  • 2: The task was successful.
  • 3: The task failed.
Type String deploy

The type of the deployment task.

  • deploy: deploys the edge instance.
  • Reset: resets the edge instance.
TaskList Array

The list of deployment subtasks.

GmtCreate String 2019-06-26 18:12:29

The time when the deployment subtask was created.

GmtModified String 2019-06-26 18:12:35

The time when the deployment subtask was last modified.

GmtCompleted String 2019-06-26 18:12:35

The time when the deployment subtask was completed.

GatewayId String jQWf3MVgQjMzcwsY****000101

The ID of the gateway device.

TaskId String 49ea651529014bf8b5645d5f9062****

The ID of the deployment subtask.

Stage Integer 32

The current stage of the deployment subtask.

  • 0: The subtask has not started.
  • 8: The subtask is being assembled.
  • 16: The subtask is being packaged.
  • 24: The subtask is being dispatched.
  • 32: The subtask was completed.
Status Integer 2

The current status of the deployment subtask.

  • 0: The subtask is in the initial state.
  • 1: The subtask is being processed.
  • 2: The subtask was successful.
  • 3: The subtask failed.
ResourceSnapshotList Array

The list of deployment task snapshots.

GmtCreate String 2019-06-26 18:12:29

The time when the deployment task snapshot was created.

GmtModified String 2019-06-26 18:12:34

The time when the deployment task snapshot was last modified.

GmtCompleted String 2019-06-26 18:12:34

The time when the deployment task snapshot was completed.

SnapshotId String ab576e84a43043d7840cbcebf4a5****

The ID of the deployment task snapshot.

ResourceType String device_config

The type of the resource.

ResourceId String device_config

The ID of the resource.

ResourceName String device_config

The name of the resource.

OperateType Integer 0

The type of the operation.

  • 0: deploys resources.
  • 1: deletes resources.
Stage Integer 32

The current stage of the snapshot task.

  • 0: The snapshot task is in the initial state.
  • 8: The snapshot task is being assembled.
  • 16: The snapshot task is being packaged.
  • 24: The snapshot task is being dispatched.
  • 32: The snapshot task was completed.
Status Integer 2

The current status of the snapshot task.

  • 0: The snapshot task has not started.
  • 1: The snapshot task is being processed.
  • 2: The snapshot task was successful.
  • 3: The snapshot task failed.
Log String [{\"resourceId\":\"device_config\",\"code\":\"0\",\"stage\":0,\"level\":\"INFO\",\"message\":\"init success\",\"resourceType\":\"DEVICE_CONFIG\",\"timestamp\":1561543949858},{\"resourceId\":\"device_config\",\"code\":\"0\",\"stage\":8,\"level\":\"INFO\",\"message\":\"assembly success\",\"resourceType\":\"DEVICE_CONFIG\",\"timestamp\":1561543951419},{\"resourceId\":\"device_config\",\"code\":\"0\",\"stage\":16,\"level\":\"INFO\",\"message\":\"package success\",\"resourceType\":\"DEVICE_CONFIG\",\"timestamp\":1561543952591},{\"resourceId\":\"device_config\",\"code\":\"0\",\"stage\":32,\"level\":\"INFO\",\"message\":\"download success\",\"resourceType\":\"DEVICE_CONFIG\",\"timestamp\":1561543954149}]

The logs of resource deployment.

Examples

Sample requests

http(s)://iot.cn-shanghai.aliyuncs.com/? Action=GetEdgeInstanceDeployment
&InstanceId=PgEfYupSn6Pvhfkx****
&DeployId=9261e308a9504fde9b4cf8462b0b****
&<Common request parameters>

Sample success responses

XML format

<GetEdgeInstanceDeploymentResponse>
    <RequestId>6B72291A-9492-445E-81D9-335D2D3E44C0</RequestId>
    <Data>
        <Status>2</Status>
        <DeploymentId>9261e308a9504fde9b4cf8462b0b****</DeploymentId>
        <GmtCompleted>2019-06-26 18:12:35</GmtCompleted>
        <Type>deploy</Type>
        <GmtCreate>2019-06-26 18:12:29</GmtCreate>
        <Description>deploy_1561543948874</Description>
        <TaskList>
            <Task>
                <Status>2</Status>
                <GmtCompleted>2019-06-26 18:12:35</GmtCompleted>
                <GmtCreate>2019-06-26 18:12:29</GmtCreate>
                <TaskId>49ea651529014bf8b5645d5f9062****</TaskId>
                <ResourceSnapshotList>
                    <ResourceSnapshot>
                        <Status>2</Status>
                        <SnapshotId>ab576e84a43043d7840cbcebf4a5****</SnapshotId>
                        <GmtCompleted>2019-06-26 18:12:34</GmtCompleted>
                        <GmtCreate>2019-06-26 18:12:29</GmtCreate>
                        <Log>[{"resourceId":"device_config","code":"0","stage":0,"level":"INFO","message":"init success","resourceType":"DEVICE_CONFIG","timestamp":1561543949858},{"resourceId":"device_config","code":"0","stage":8,"level":"INFO","message":"assembly success","resourceType":"DEVICE_CONFIG","timestamp":1561543951419},{"resourceId":"device_config","code":"0","stage":16,"level":"INFO","message":"package success","resourceType":"DEVICE_CONFIG","timestamp":1561543952591},{"resourceId":"device_config","code":"0","stage":32,"level":"INFO","message":"download success","resourceType":"DEVICE_CONFIG","timestamp":1561543954149}]</Log>
                        <ResourceId>device_config</ResourceId>
                        <ResourceName>device_config</ResourceName>
                        <GmtModified>2019-06-26 18:12:34</GmtModified>
                        <Stage>32</Stage>
                        <ResourceType>device_config</ResourceType>
                        <OperateType>0</OperateType>
                    </ResourceSnapshot>
                </ResourceSnapshotList>
                <GmtModified>2019-06-26 18:12:35</GmtModified>
                <Stage>32</Stage>
                <GatewayId>jQWf3MVgQjMzcwsY****000101</GatewayId>
            </Task>
        </TaskList>
        <GmtModified>2019-06-26 18:12:35</GmtModified>
    </Data>
    <Code>Success</Code>
    <Success>true</Success>
</GetEdgeInstanceDeploymentResponse>

JSON format

{
  "RequestId": "6B72291A-9492-445E-81D9-335D2D3E44C0",
  "Data": {
    "Status": 2,
    "DeploymentId": "9261e308a9504fde9b4cf8462b0b****",
    "GmtCompleted": "2019-06-26 18:12:35",
    "Type": "deploy",
    "GmtCreate": "2019-06-26 18:12:29",
    "Description": "deploy_1561543948874",
    "TaskList": [
      {
        "Status": 2,
        "GmtCompleted": "2019-06-26 18:12:35",
        "GmtCreate": "2019-06-26 18:12:29",
        "TaskId": "49ea651529014bf8b5645d5f9062****",
        "ResourceSnapshotList": [
          {
            "Status": 2,
            "SnapshotId": "ab576e84a43043d7840cbcebf4a5****",
            "GmtCompleted": "2019-06-26 18:12:34",
            "GmtCreate": "2019-06-26 18:12:29",
            "Log": "[{\"resourceId\":\"device_config\",\"code\":\"0\",\"stage\":0,\"level\":\"INFO\",\"message\":\"init success\",\"resourceType\":\"DEVICE_CONFIG\",\"timestamp\":1561543949858},{\"resourceId\":\"device_config\",\"code\":\"0\",\"stage\":8,\"level\":\"INFO\",\"message\":\"assembly success\",\"resourceType\":\"DEVICE_CONFIG\",\"timestamp\":1561543951419},{\"resourceId\":\"device_config\",\"code\":\"0\",\"stage\":16,\"level\":\"INFO\",\"message\":\"package success\",\"resourceType\":\"DEVICE_CONFIG\",\"timestamp\":1561543952591},{\"resourceId\":\"device_config\",\"code\":\"0\",\"stage\":32,\"level\":\"INFO\",\"message\":\"download success\",\"resourceType\":\"DEVICE_CONFIG\",\"timestamp\":1561543954149}]",
            "ResourceId": "device_config",
            "ResourceName": "device_config",
            "GmtModified": "2019-06-26 18:12:34",
            "Stage": 32,
            "ResourceType": "device_config",
            "OperateType": 0
          }
        ],
        "GmtModified": "2019-06-26 18:12:35",
        "Stage": 32,
        "GatewayId": "jQWf3MVgQjMzcwsY****000101"
      }
    ],
    "GmtModified": "2019-06-26 18:12:35"
  },
  "Code": "Success",
  "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.