Queries cache analysis tasks.

Before you call this operation, make sure that the following conditions are met:

  • This operation is applicable to only the Redis engine.
  • When you use an Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than V4.3.3. We recommend that you use the latest version.
  • The SDK version for Database Autonomy Service (DAS) must be V1.0.2 or later.
  • When you use the SDK to call the DAS service, you must specify the region as cn-shanghai.

Request parameters

Parameter Type Required Example Description
Action String No DescribeCacheAnalysisJobs

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

InstanceId String No r-bp18ff4a195d****

The ID of the instance.

StartTime String No 1596177993000

The start time of the query task. Unit: millisecond. Specify the time in the UNIX timestamp format.

EndTime String No 1596177993000

The end time of the query task. Unit: millisecond. Specify the time in the UNIX timestamp format.

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

The number of the page to return.

PageSize String No 10

The number of entries to return on each page.

Set RegionId to cn-shanghai.

Response parameters

Parameter Type Example Description
Code String 200

The returned status code.

Data Struct

The information list.

Extra String None

The hidden parameter.

List Array of CacheAnalysisJob

The detailed information.

CacheAnalysisJob
BigKeys Array of KeyInfo

The details of the big keys.

KeyInfo
Bytes Long 12345

The number of bytes that are occupied by the keys.

Count Long 127

The number of elements in the keys.

Db Integer 0

The name of the database.

Encoding String hashtable

The data type of the keys.

ExpirationTimeMillis Long 1596256542547

The time when the keys expire. Unit: millisecond. The value 0 indicates that the keys do not expire.

Key String task_xxxxx

The name of the key.

NodeId String r-xxxx-db-0

The ID of the sharded instance.

Type String hash

The type of the Redis data structure.

InstanceId String r-bp18ff4a195d****

The ID of the instance.

JobId String sf79-sd99-sa37-****

The ID of the cache analysis task.

Message String Successful

The returned message of the request.

Note If the request is successful, Successful is returned for this parameter. If the request fails, a request exception message such as an error code is returned.
NodeId String r-x****-db-0

The ID of the sharded instance.

TaskState String BACKUP

The status of the cache analysis task:

  • BACKUP: The data is being backed up.
  • ANALYZING: The task is in the analysis phase.
  • FINISHED: The analysis is complete.
  • FAILED: An error occurred.
PageNo Long 1

The page number of the returned page.

PageSize Long 10

The number of entries returned on each page.

Total Long 2

The number of results.

Message String Successful

The returned message of the request.

Note If the request is successful, Successful is returned for this parameter. If the request fails, a request exception message such as an error code is returned.
RequestId String B6D17591-B48B-4D31-9CD6-9B9796B2****

The ID of the request.

Success String true

Indicates whether the request was successful.

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

Examples

Sample requests

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

Sample success responses

XML format

<DescribeCacheAnalysisJobsReponse>
  <RequestId> B6D17591-B48B-4D31-9CD6-9B9796B2xxxx</RequestId>
  <Message>Successful</Message>
  <Data>
        <Extra>None</Extra>
        <PageSize>10</PageSize>
        <Total>2</Total>
        <PageNo>1</PageNo>
        <List>
              <CacheAnalysisJob>
                    <NodeId>r-xxxxx-db-0</NodeId>
                    <Message>Successful</Message>
                    <InstanceId>r-bp18ff4a195dxxxx</InstanceId>
                    <TaskState>BACKUP</TaskState>
                    <JobId>xxxx-xxxx-xxxx-xxxx</JobId>
              </CacheAnalysisJob>
              <CacheAnalysisJob>
                    <BigKeys>
                          <KeyInfo>
                                <Bytes>12345</Bytes>
                                <Type>hash</Type>
                                <NodeId>r-xxxx-db-0</NodeId>
                                <ExpirationTimeMillis>1596256542547</ExpirationTimeMillis>
                                <Encoding>hashtable</Encoding>
                                <Count>127</Count>
                                <Key>task_xxxxx</Key>
                                <Db>0</Db>
                          </KeyInfo>
                    </BigKeys>
              </CacheAnalysisJob>
        </List>
  </Data>
  <Code>200</Code>
  <Success>true</Success>
</DescribeCacheAnalysisJobsReponse>

JSON format

{"RequestId":" B6D17591-B48B-4D31-9CD6-9B9796B2xxxx","Message":"Successful","Data":{"Extra":"None","PageSize":"10","Total":"2","PageNo":"1","List":{"CacheAnalysisJob":[{"NodeId":"r-xxxxx-db-0",
"Message":"Successful",
"InstanceId":"r-bp18ff4a195dxxxx",
"TaskState":"BACKUP",
"JobId":"xxxx-xxxx-xxxx-xxxx"},{
    "BigKeys":{
        "KeyInfo":[{
            "Bytes":"12345",
            "Type":"hash",
            "NodeId":"r-xxxx-db-0",
            "ExpirationTimeMillis":"1596256542547",
            "Encoding":"hashtable",
            "Count":"127",
            "Key":"task_xxxxx",
            "Db":"0"}]}}]}},
            "Code":"200",
            "Success":"true"}

Error codes

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