All Products
Search
Document Center

Alibaba Cloud DNS:DescribeGtmLogs

Last Updated:Oct 24, 2024

You can call this operation to query logs of a Global Traffic Manager (GTM) instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
alidns:DescribeGtmLogsget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
LangstringNo

The language used by the user.

en
InstanceIdstringNo

The ID of the GTM instance whose logs you want to query.

gtm-cn-xxxxx
KeywordstringNo

The keyword for searching logs, in case-insensitive "%Keyword%" format.

test
PageNumberintegerNo

The number of the page to return. Pages start from page 1. Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page. Maximum value: 100. Default value: 20.

20
StartTimestamplongNo

The beginning of the time range to query.

1363453340000
EndTimestamplongNo

The timestamp that specifies the end of the time range to query.

1363453350000

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries returned per page.

20
RequestIdstring

The ID of the request.

50C60A29-2E93-425A-ABA8-068686E28873
PageNumberinteger

The page number of the returned page.

1
TotalPagesinteger

The total number of pages returned.

224
Logsarray<object>

The list of logs returned.

Logobject
OperTimestamplong

A timestamp that indicates the time when the operation was performed.

1516779348000
EntityIdstring

The ID of the object that was operated on.

121212
EntityTypestring

The type of the object that was operated on.

POOL
OperTimestring

The time when the operation was performed.

2018-01-24T07:35Z
OperIpstring

The IP address subject to the operation.

106.11.34.X
OperActionstring

The operation performed.

add
Contentstring

The formatted message content.

addtest-pool-1
EntityNamestring

The name of the object that was operated on.

test-pool-1
Idlong

The ID of the log record.

6726
TotalItemsinteger

The total number of entries returned on all pages.

224

Examples

Sample success responses

JSONformat

{
  "PageSize": 20,
  "RequestId": "50C60A29-2E93-425A-ABA8-068686E28873",
  "PageNumber": 1,
  "TotalPages": 224,
  "Logs": {
    "Log": [
      {
        "OperTimestamp": 1516779348000,
        "EntityId": "121212",
        "EntityType": "POOL",
        "OperTime": "2018-01-24T07:35Z",
        "OperIp": "106.11.34.X",
        "OperAction": "add",
        "Content": "addtest-pool-1",
        "EntityName": "test-pool-1",
        "Id": 6726
      }
    ]
  },
  "TotalItems": 224
}

Error codes

For a list of error codes, visit the Service error codes.