Queries the status of a trail.

This topic describes how to query the status of a sample trail named trail-test.

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 GetTrailStatus

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

Name String Yes trail-test

The name of the trail.

The name must be 6 to 36 characters in length. The name must start with a lowercase letter and can contain lowercase letters, digits, hyphens (-), and underscores (_).

Note The name must be unique within your Alibaba Cloud account.
IsOrganizationTrail Boolean No false

Specifies whether to query the status of a multi-account trail. Valid values:

  • true: Query the status of a multi-account trail.
  • false: Query the status of a single-account trail. It is the default value.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String 8FFD2DE7-74F0-4582-A4CB-BF6523FEF06C

The ID of the request.

StartLoggingTime String 2021-03-31T04:06:41Z

The time when logging was last enabled for the trail.

LatestDeliveryError String write sls failed, exception: the parent of sub user must be project owner, itemscount: 1

The log of the last failed delivery.

StopLoggingTime String 2021-04-02T02:36:56Z

The time when logging was last disabled for the trail.

IsLogging Boolean false

Indicates whether logging is enabled for the trail.

LatestDeliveryTime String 1547792223000

The most recent time when an event was delivered by the trail.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetTrailStatus
&Name=trail-test
&<Common request parameters>

Sample success responses

JSON format

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

{
  "RequestId" : "8FFD2DE7-74F0-4582-A4CB-BF6523FEF06C",
  "StartLoggingTime" : "2021-03-31T04:06:41Z",
  "LatestDeliveryError" : "write sls failed, exception: the parent of sub user must be project owner, itemscount: 1",
  "StopLoggingTime" : "2021-04-02T02:36:56Z",
  "IsLogging" : false
}

Error codes

HTTP status code Error code Error message Description
404 TrailNotFoundException The specified Trail does not exist. The error message returned because the specified trail does not exist.

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