ListAppEvents

更新时间:
复制 MD 格式

To list application events, call the ListAppEvents API.

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 to return per page. The value must be an integer from 0 to 10,000.

10

AppId

string

No

The application ID.

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

ObjectKind

string

No

The object kind. Valid values:

  • Deployment: The application.

  • Pod: The application instance.

  • Service: The Server Load Balancer (SLB) instance.

  • HorizontalPodAutoscaler: The auto scaling policy.

  • CloneSet: The application.

Pod

ObjectName

string

No

The name of the object. Prefix matching is supported.

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

EventType

string

No

The event type. Valid values:

  • Warning: An event that indicates a potential problem.

  • Normal: An event that indicates a routine operation.

Warning

Reason

string

No

The reason for the event. Prefix matching is supported.

Started

Namespace

string

Yes

The ID of the region where the namespace is located.

cn-beijing

Response elements

Element

Type

Description

Example

object

The data returned for the request.

Message

string

Additional information about the request result.

success

RequestId

string

The request ID.

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

Data

object

The event list.

CurrentPage

integer

The current page number.

1

AppEventEntity

array<object>

An array of application events.

object

A single event object.

ObjectKind

string

The object kind.

Pod

EventType

string

The event type.

Normal

LastTimestamp

string

The timestamp of the event's last occurrence.

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 reason for the event.

Created

FirstTimestamp

string

The timestamp of the event's first occurrence.

2020-02-19T05:01:28Z

CauseAnalysis

string

The cause analysis.

TotalSize

integer

The total count of application events.

20

PageSize

integer

The number of entries returned per page.

10

ErrorCode

string

The error code.

  • If the request is successful, the ErrorCode parameter is not returned.

  • If the request fails, the ErrorCode parameter is returned. For more information, see the Error Codes section.

Code

string

The HTTP status code returned for the request. Valid values:

  • 2xx: Success.

  • 3xx: Redirection.

  • 4xx: Client error.

  • 5xx: Server error.

200

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request 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": "",
  "Code": "200",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 get.event.error Failed to obtain event information.
400 InvalidParameter.NotEmpty You must specify the parameter %s.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.