Queries the previous deployment tasks of an edge instance.

Limits

A single Alibaba Cloud account can run a maximum of 10 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 QueryEdgeInstanceHistoricDeployment

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

CurrentPage Integer Yes 1

The number of the page from which the results are displayed. The minimum value is 1. If you specify a value smaller than 1, the system uses 1.

InstanceId String Yes PgEfYupSn6Pvhfkx****

The ID of the edge instance.

PageSize Integer Yes 15

The number of entries to return on each page. Maximum value: 30. Default value: 10. If you specify a value smaller than 1, the system uses 10.

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.

StartTime Long No 1558951998639

The beginning of the time range to query. If you do not specify the start time and end time, all previous deployment tasks of the edge instance are queried.

EndTime Long No 1561543998639

The end of the time range to query. If you do not specify the start time and end time, all previous deployment tasks of the edge instance are queried.

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 C9D9C91B-1B3B-4D84-BE58-68E7B2A989E4

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.

Total Integer 6

The total number of deployment tasks.

PageSize Integer 2

The number of entries returned per page.

CurrentPage Integer 1

The page number of the returned page.

DeploymentList Array

The list of deployment tasks.

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

The time when the deployment task was created.

GmtModified String 2019-06-28 12:07:16

The time when the deployment task was last modified.

GmtCompleted String 2019-06-28 12:07:16

The time when the deployment task was completed.

DeploymentId String e4803e566b424fa68e7f4b1c747c****

The ID of the deployment task.

Description String deploy_1561694817061

The description of the deployment task.

Status Integer 2

The 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.

Examples

Sample requests

http(s)://iot.cn-shanghai.aliyuncs.com/? Action=QueryEdgeInstanceHistoricDeployment
&PageSize=15
&EndTime=1561543998639
&InstanceId=PgEfYupSn6Pvhfkx****
&CurrentPage=1
&StartTime=1558951998639
&<Common request parameters>

Sample success responses

XML format

<QueryEdgeInstanceHistoricDeploymentResponse>
    <RequestId>C9D9C91B-1B3B-4D84-BE58-68E7B2A989E4</RequestId>
    <Data>
        <DeploymentList>
            <Deployment>
                <Status>2</Status>
                <DeploymentId>e4803e566b424fa68e7f4b1c747c****</DeploymentId>
                <GmtCompleted>2019-06-28 12:07:16</GmtCompleted>
                <Type>deploy</Type>
                <GmtCreate>2019-06-28 12:06:57</GmtCreate>
                <Description>deploy_1561694817061</Description>
                <GmtModified>2019-06-28 12:07:16</GmtModified>
            </Deployment>
            <Deployment>
                <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>
                <GmtModified>2019-06-26 18:12:35</GmtModified>
            </Deployment>
        </DeploymentList>
        <PageSize>2</PageSize>
        <CurrentPage>1</CurrentPage>
        <Total>6</Total>
    </Data>
    <Code>Success</Code>
    <Success>true</Success>
</QueryEdgeInstanceHistoricDeploymentResponse>

JSON format

{
  "RequestId": "C9D9C91B-1B3B-4D84-BE58-68E7B2A989E4",
  "Data": {
    "DeploymentList": [
      {
        "Status": 2,
        "DeploymentId": "e4803e566b424fa68e7f4b1c747c****",
        "GmtCompleted": "2019-06-28 12:07:16",
        "Type": "deploy",
        "GmtCreate": "2019-06-28 12:06:57",
        "Description": "deploy_1561694817061",
        "GmtModified": "2019-06-28 12:07:16"
      },
      {
        "Status": 2,
        "DeploymentId": "9261e308a9504fde9b4cf8462b0b****",
        "GmtCompleted": "2019-06-26 18:12:35",
        "Type": "deploy",
        "GmtCreate": "2019-06-26 18:12:29",
        "Description": "deploy_1561543948874",
        "GmtModified": "2019-06-26 18:12:35"
      }
    ],
    "PageSize": 2,
    "CurrentPage": 1,
    "Total": 6
  },
  "Code": "Success",
  "Success": true
}

Error codes

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