Queries a stack and its resource events.

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 ListStackEvents

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

StackId String Yes 4a6c9851-3b0f-4f5f-b4ca-a14bf691****

The ID of the stack.

PageSize Long No 10

The number of entries to return per page.

Maximum value: 50.

Default value: 10.

RegionId String Yes cn-hangzhou

The ID of the region in which the stack resides. You can call the DescribeRegions operation to query the most recent list of Alibaba Cloud regions.

PageNumber Long No 1

The page number of the page to return.

Pages start from page 1.

Default value: 1.

Status.N String No CREATE_IN_PROGRESS

The state of the resource. Valid values:

  • CREATE_COMPLETE
  • CREATE_FAILED
  • CREATE_IN_PROGRESS
  • UPDATE_IN_PROGRESS
  • UPDATE_FAILED
  • UPDATE_COMPLETE
  • UPDATE_SKIPPED
  • DELETE_IN_PROGRESS
  • DELETE_FAILED
  • CHECK_IN_PROGRESS
  • CHECK_FAILED
  • CHECK_COMPLETE
  • IMPORT_IN_PROGRESS
  • IMPORT_FAILED
  • IMPORT_COMPLETE
ResourceType.N String No ALIYUN::ECS::Instance

The list of resource types. Maximum value of N: 200.

For more information about resource types, see List of resource types by service.

LogicalResourceId.N String No WebServer

The logical ID of the resource that is defined in the template.

Response parameters

Parameter Type Example Description
TotalCount Integer 20

The total number of returned events.

PageSize Integer 10

The number of entries returned per page.

Maximum value: 50.

Default value: 10.

RequestId String B288A0BE-D927-4888-B0F7-B35EF84B6E6

The ID of the request.

PageNumber Integer 1

The page number of the returned page.

Pages start from page 1.

Default value: 1.

Events Array of Event

The list of events.

Status String CREATE_COMPLETE

The state of the resource.

EventId String 0086612d-77cf-4056-b0b5-ff8e94ad****

The ID of the event.

LogicalResourceId String WebServer

The logical ID of the resource that is defined in the template.

StackId String 4a6c9851-3b0f-4f5f-b4ca-a14bf691****

The ID of the stack.

PhysicalResourceId String i-m5e3tfdbinchnexh****

The physical ID of the resource.

ResourceType String ALIYUN::ECS::Instance

The resource type.

StatusReason String state changed

The reason why the resource is in its current state.

CreateTime String 2019-08-01T04:07:39

The time when the resource was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss format. The time is displayed in UTC.

StackName String StackName

The name of the stack.

Examples

Sample requests

http(s)://ros.aliyuncs.com/?Action=ListStackEvents
&RegionId=cn-hangzhou
&StackId=4a6c9851-3b0f-4f5f-b4ca-a14bf691****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListStackEventsResponse>
    <TotalCount>20</TotalCount>
    <PageSize>10</PageSize>
    <RequestId>B288A0BE-D927-4888-B0F7-B35EF84B6E6</RequestId>
    <PageNumber>1</PageNumber>
    <Events>
        <Status>CREATE_COMPLETE</Status>
        <EventId>0086612d-77cf-4056-b0b5-ff8e94ad****</EventId>
        <LogicalResourceId>WebServer</LogicalResourceId>
        <StackId>4a6c9851-3b0f-4f5f-b4ca-a14bf691****</StackId>
        <PhysicalResourceId>i-m5e3tfdbinchnexh****</PhysicalResourceId>
        <ResourceType>ALIYUN::ECS::Instance</ResourceType>
        <StatusReason>state changed</StatusReason>
        <CreateTime>2019-08-01T04:07:39</CreateTime>
        <StackName>StackName</StackName>
    </Events>
</ListStackEventsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalCount" : 20,
  "PageSize" : 10,
  "RequestId" : "B288A0BE-D927-4888-B0F7-B35EF84B6E6",
  "PageNumber" : 1,
  "Events" : {
    "Status" : "CREATE_COMPLETE",
    "EventId" : "0086612d-77cf-4056-b0b5-ff8e94ad****",
    "LogicalResourceId" : "WebServer",
    "StackId" : "4a6c9851-3b0f-4f5f-b4ca-a14bf691****",
    "PhysicalResourceId" : "i-m5e3tfdbinchnexh****",
    "ResourceType" : "ALIYUN::ECS::Instance",
    "StatusReason" : "state changed",
    "CreateTime" : "2019-08-01T04:07:39",
    "StackName" : "StackName"
  }
}

Error codes

For a list of error codes, see Service error codes.

HttpCode

Error code

Error message

Description

404

StackNotFound

The Stack ({name}) could not be found.

The error message returned because the stack does not exist. name indicates the name or ID of the stack.