Queries cache analysis tasks.

Before you call this operation, take note of the following items:

  • If you use an Alibaba Cloud SDK or a Database Autonomy Service (DAS) SDK, we recommend that you use the latest version.
  • If you use an SDK to call operations of DAS, you must set the region to cn-shanghai.
  • This operation is applicable only to ApsaraDB for Redis.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeCacheAnalysisJobs

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

InstanceId String Yes r-bp18ff4a195d****

The ID of the database instance.

StartTime String Yes 1596177993000

The beginning of the time range to query. Specify the time in the UNIX timestamp format. Unit: milliseconds.

EndTime String Yes 1596177993001

The end of the time range to query. Specify the time in the UNIX timestamp format. Unit: milliseconds.

Note The end time must be later than the start time.
PageNo String No 1

The number of the page to return. The value must be an integer that is greater than 0. Default value: 1.

PageSize String No 10

The maximum number of entries to return on each page. Default value: 10.

Response parameters

Parameter Type Example Description
Message String Successful

The message that is returned for the request.

Note If the request is successful, Successful is returned. If the request fails, an error message that contains information such as an error code is returned.
RequestId String B6D17591-B48B-4D31-9CD6-9B9796B2****

The ID of the request.

Data Object

The details of the instance.

List Array of CacheAnalysisJob

The details of the cache analysis tasks.

CacheAnalysisJob
TaskState String BACKUP

The state of the cache analysis task. Valid values:

  • BACKUP: The data is being backed up.
  • ANALYZING: The data is being analyzed.
  • FINISHED: The data is analyzed.
  • FAILED: An error occurred.
JobId String sf79-sd99-sa37-****

The ID of the cache analysis task.

Message String Successful

The message that is returned for the request.

Note If the request is successful, Successful is returned. If the request fails, an error message that contains information such as an error code is returned.
BigKeys Array of KeyInfo

The details about the big keys.

Important The sub-parameters of this parameter and the corresponding values are not returned. If you want to query the details of the cache analysis tasks, call the DescribeCacheAnalysisJob operation.
KeyInfo
Type String hash

The data type of the instance.

Db Integer 0

The name of the database.

ExpirationTimeMillis Long 1596256542547

The expiration time of the key. Unit: milliseconds. The value 0 indicates that the key does not expire.

Key String task_*****

The name of the key.

Encoding String hashtable

The data type of the key.

Bytes Long 12345

The number of bytes that are occupied by the key.

NodeId String r-****-db-0

The ID of the data node on the instance.

Count Long 127

The number of elements in the key.

InstanceId String r-bp18ff4a195d****

The ID of the database instance.

NodeId String r-x****-db-0

The ID of the data node on the instance.

PageNo Long 1

The number of the returned page. The value must be an integer that is greater than 0. Default value: 1.

PageSize Long 10

The maximum number of entries returned on each page. Default value: 10.

Extra String None

The reserved parameter.

Total Long 4

The total number of cache analysis tasks.

Code String 200

The returned HTTP status code.

Success String true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.

Examples

Sample requests

http(s)://das.cn-shanghai.aliyuncs.com/?Action=DescribeCacheAnalysisJobs
&InstanceId=r-bp18ff4a195d****
&StartTime=1596177993000
&EndTime=1596177993001
&PageNo=1
&PageSize=10
&<Common request parameters>

Sample success responses

XML format

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

<DescribeCacheAnalysisJobsResponse>
    <Message>Successful</Message>
    <RequestId>B6D17591-B48B-4D31-9CD6-9B9796B2****</RequestId>
    <Data>
        <List>
            <TaskState>BACKUP</TaskState>
            <JobId>sf79-sd99-sa37-****</JobId>
            <Message>Successful</Message>
            <BigKeys>
                <Type>hash</Type>
                <Db>0</Db>
                <ExpirationTimeMillis>1596256542547</ExpirationTimeMillis>
                <Key>task_*****</Key>
                <Encoding>hashtable</Encoding>
                <Bytes>12345</Bytes>
                <NodeId>r-****-db-0</NodeId>
                <Count>127</Count>
            </BigKeys>
            <InstanceId>r-bp18ff4a195d****</InstanceId>
            <NodeId>r-x****-db-0</NodeId>
        </List>
        <PageNo>1</PageNo>
        <PageSize>10</PageSize>
        <Extra>None</Extra>
        <Total>4</Total>
    </Data>
    <Code>200</Code>
    <Success>true</Success>
</DescribeCacheAnalysisJobsResponse>

JSON format

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

{
  "Message" : "Successful",
  "RequestId" : "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Data" : {
    "List" : [ {
      "TaskState" : "BACKUP",
      "JobId" : "sf79-sd99-sa37-****",
      "Message" : "Successful",
      "BigKeys" : [ {
        "Type" : "hash",
        "Db" : 0,
        "ExpirationTimeMillis" : 1596256542547,
        "Key" : "task_*****",
        "Encoding" : "hashtable",
        "Bytes" : 12345,
        "NodeId" : "r-****-db-0",
        "Count" : 127
      } ],
      "InstanceId" : "r-bp18ff4a195d****",
      "NodeId" : "r-x****-db-0"
    } ],
    "PageNo" : 1,
    "PageSize" : 10,
    "Extra" : "None",
    "Total" : 4
  },
  "Code" : "200",
  "Success" : "true"
}

Error codes

HTTP status code Error code Error message Description
400 InvalidParams The request parameters are invalid. The error message returned because the specified request parameters are invalid.

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