You can call this operation to query the change information about a change operation that collects logs.

Note This operation can only query the change information about log collection.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request headers

This operation uses common request headers, instead of special request headers. For more information, see the "Common request headers" section in "Common request and response headers."

Request syntax

GET /pop/v1/wam/appEnv/gatherLog HTTP/1.1

Request parameters

Parameter Type Required? Example Description
ChangeId String No wc-5d412db056fd7c14ac9*****

The change ID used to query the change information about log collection.

Response parameters

Parameter Type Example Description
Code String OK

The response code. The value is OK if the request is successful.

GatherLogResult

The log collection result.

Change

The information about the change.

ActionName String GatherLog

The name of the change operation.

ChangeAborted Boolean false

Indicates whether the change was terminated.

ChangeDescription String "gather logs of env we-5d3eaaea2977ca5251e***** on [\"{\\\"targetInstances\\\":\\\"i-wz94zz7mx8kt5kz*****\\\"}\"]

The description of the change.

ChangeFinished Boolean true

Indicates whether the change was completed.

ChangeId String wc-5d412db056fd7c14ac9*****

The ID of the change.

ChangeMessage String ""

The message of the change.

ChangeName String gather.log

The name of the change.

ChangePaused Boolean false

Indicates whether the change was stopped.

ChangeSucceeded Boolean true

Indicates whether the change was successful.

ChangeTimedout Boolean false

Indicates whether the change timed out.

CreateTime Long 1564552624114

The start time of the change.

CreateUsername String user1

The name of the user who created the change.

EnvId String we-5d3eaaea2977ca5251e*****

The ID of the deployment environment.

FinishTime Long 1564552624564

The end time of the change.

UpdateTime Long 1564552624600

The time when the change was last updated.

InstanceResults

The log collection result of ECS instances.

InstanceId String ""

The ID of the ECS instance.

StorageKey String ""

The storage key of the log collection result.

TaskMessage String ""

The message of the log collection task.

TaskSucceeded Boolean true

Indicates whether the task was successful.

LogPath String /home/admin/app/webplus-app.log

The path to logs.

Message String success

The response message. The value is success if the request is successful.

RequestId String 76A821B7-A376-47C5-956C-34827EF*****

The ID of the request.

Examples

Sample request

GET /pop/v1/wam/appEnv/gatherLog HTTP/1.1
Common request headers

Sample success response

XML format

<DescribeGatherLogResultResponse>
    <Message>success</Message>
    <RequestId>C3D45688-AD84-420D-9CF3-5650B49*****</RequestId>
    <GatherLogResult>
        <InstanceResults></InstanceResults>
        <Change>
            <ChangeName>gather.log</ChangeName>
            <ActionName>GatherLog</ActionName>
            <ChangeAborted>false</ChangeAborted>
            <ChangeTimedout>false</ChangeTimedout>
            <UpdateTime>1564552624600</UpdateTime>
            <ChangeDescription>gather logs of env we-5d3eaaea2977ca5251e***** on ["{\"targetInstances\":\"i-wz94zz7mx8kt5kz*****\"}"]</ChangeDescription>
            <EnvId>we-5d3eaaea2977ca5251e*****</EnvId>
            <FinishTime>1564552624564</FinishTime>
            <CreateUsername>user1</CreateUsername>
            <ChangeSucceeded>true</ChangeSucceeded>
            <CreateTime>1564552624114</CreateTime>
            <ChangeId>wc-5d412db056fd7c14ac9*****</ChangeId>
            <ChangeFinished>true</ChangeFinished>
            <ChangeMessage></ChangeMessage>
            <ChangePaused>false</ChangePaused>
        </Change>
        <LogPath>/home/admin/app/webplus-app.log</LogPath>
    </GatherLogResult>
    <Code>OK</Code>
</DescribeGatherLogResultResponse>

JSON format

{
	"Message":"success",
	"RequestId":"76A821B7-A376-47C5-956C-34827EF*****",
	"GatherLogResult":{
		"InstanceResults":{
			"InstanceResult":[]
		},
		"Change":{
			"ChangeName":"gather.log",
			"ActionName":"GatherLog",
			"ChangeAborted":false,
			"ChangeTimedout":false,
			"UpdateTime":1564552624600,
			"ChangeDescription":"gather logs of env we-5d3eaaea2977ca5251e***** on [\"{\\\"targetInstances\\\":\\\"i-wz94zz7mx8kt5kz*****\\\"}\"]",
			"EnvId":"we-5d3eaaea2977ca5251e*****",
			"FinishTime":1564552624564,
			"CreateUsername":"user1",
			"ChangeSucceeded":true,
			"CreateTime":1564552624114,
			"ChangeId":"wc-5d412db056fd7c14ac9*****",
			"ChangeFinished":true,
			"ChangeMessage":"",
			"ChangePaused":false
		},
		"LogPath":"/home/admin/app/webplus-app.log"
	},
	"Code":"OK"
}

Error codes

For more information about error codes, see API Error Center.