ListAppEvents

Updated at:

Queries application events.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

sae:ListAppEvents

get

*All Resource

*

None None

Request syntax

GET /pop/v1/sam/app/listAppEvents HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

CurrentPage

integer

No

The current page number.

1

PageSize

integer

No

The number of entries per page in the paging Settings for a paged query. Valid values: 0 to 10000.

10

AppId

string

No

The application ID.

f7730764-d88f-4b9a-8d8e-cd8efbfe****

ObjectKind

string

No

The object type. Valid values:

  • Deployment: application

  • Pod: application instance

  • Service: SLB

  • HorizontalPodAutoscaler: auto scaling

  • CloneSet: application

Pod

ObjectName

string

No

The object name. Prefix-based fuzzy search is supported.

errew-b86bf540-b4dc-47d8-a42f-b4997c14bd8f-5595cbddd6-x****

EventType

string

No

The event type. Valid values:

  • Warning: alert

  • Normal: normal

Warning

Reason

string

No

The event reason. Prefix-based fuzzy search is supported.

Started

Namespace

string

Yes

The namespace ID.

cn-beijing

Response elements

Element

Type

Description

Example

object

The response data.

Message

string

The additional information about the call result.

success

RequestId

string

The request ID.

B4D805CA-926D-41B1-8E63-7AD0C1ED****

Data

object

The list of events.

CurrentPage

integer

The current page number.

1

AppEventEntity

array<object>

The event.

object

The event.

ObjectKind

string

The object type.

Pod

EventType

string

The event type.

Normal

LastTimestamp

string

The time when the event last occurred.

2020-02-19T05:01:28Z

Message

string

The event message.

Created container

ObjectName

string

The object name.

errew-b86bf540-b4dc-47d8-a42f-b4997c14bd8f-5595cbddd6-2****

Reason

string

The event reason.

Created

FirstTimestamp

string

The time when the event first occurred.

2020-02-19T05:01:28Z

CauseAnalysis

string

The cause analysis.

Instance health check failed

TotalSize

integer

The total number of application events.

20

PageSize

integer

The number of entries per page in the paging Settings for a paged query.

10

ErrorCode

string

The error code. Valid values:

  • Successful request: The ErrorCode field is not returned.

  • Failed request: The ErrorCode field is returned. For more information, see the Error codes section in this topic.

get.event.error

Code

string

The API status code or POP error code. Valid values:

  • 2xx: success

  • 3xx: redirection

  • 4xx: request error

  • 5xx: server error

200

Success

boolean

Specifies whether the application events were queried successfully. Valid values:

  • true: The query was successful.

  • false: The query failed.

true

Examples

Success response

JSON format

{
  "Message": "success",
  "RequestId": "B4D805CA-926D-41B1-8E63-7AD0C1ED****",
  "Data": {
    "CurrentPage": 1,
    "AppEventEntity": [
      {
        "ObjectKind": "Pod",
        "EventType": "Normal",
        "LastTimestamp": "2020-02-19T05:01:28Z",
        "Message": "Created container",
        "ObjectName": "errew-b86bf540-b4dc-47d8-a42f-b4997c14bd8f-5595cbddd6-2****",
        "Reason": "Created",
        "FirstTimestamp": "2020-02-19T05:01:28Z",
        "CauseAnalysis": "实例健康检查失败。"
      }
    ],
    "TotalSize": 20,
    "PageSize": 10
  },
  "ErrorCode": "get.event.error",
  "Code": "200",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 get.event.error Failed to obtain event information. Failed to retrieve event information.
400 InvalidParameter.NotEmpty You must specify the parameter %s. Invalid parameter: %s cannot be empty.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.