Queries the details of a cache analysis task.

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 to call this operation, we recommend that you use the latest version of the SDK.
  • 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 DescribeCacheAnalysisJob

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

InstanceId String Yes r-bp18ff4a195d****

The ID of the instance.

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

The ID of the cache analysis task. You can obtain the task ID from the response parameters of the CreateCacheAnalysisJob operation.

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 task.

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 of the large keys. The returned large keys are sorted in descending order based on the number of bytes occupied by the keys.

KeyInfo
Type String hash

The data type of the instance.

Db Integer 0

The name of the database.

ExpirationTimeMillis Long 1596256542547

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

Key String task_x****

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-x****-db-0

The ID of the data node on the instance.

Count Long 127

The number of elements in the key.

KeyPrefixes Array of Prefix

The prefixes of the keys.

Prefix
KeyNum Long 123

The number of keys that contain the prefix.

Type String hash

The data type of the instance.

Bytes Long 12345

The number of bytes that are occupied by the key.

Prefix String task_

The prefix of the key.

Count Long 127

The number of elements in the key.

BigKeysOfNum Array of KeyInfo

The details of the large keys. The returned large keys are sorted in descending order based on the number of keys.

KeyInfo
Type String hash

The data type of the instance.

Db Integer 0

The name of the database.

ExpirationTimeMillis Long 1596256542547

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

Key String task_x****

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-x****-db-0

The ID of the data node on the instance.

Count Long 127

The number of elements in the key.

UnexBigKeysOfBytes Array of KeyInfo

The details of permanent keys. The returned keys are sorted in descending order based on the number of bytes occupied by the keys.

KeyInfo
Type String hash

The data type of the instance.

Db Integer 0

The name of the database.

ExpirationTimeMillis Long 1596256542547

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

Key String task_x****

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-x****-db-0

The ID of the data node on the instance.

Count Long 127

The number of elements in the key.

UnexBigKeysOfNum Array of KeyInfo

The details of permanent keys. The returned keys are sorted in descending order based on the number of keys.

KeyInfo
Type String hash

The data type of the instance.

Db Integer 0

The name of the database.

ExpirationTimeMillis Long 1596256542547

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

Key String task_x****

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-x****-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.

Code String 200

The HTTP status code returned.

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=DescribeCacheAnalysisJob
&InstanceId=r-bp18ff4a195d****
&JobId=sf79-sd99-sa37-****
&Common request parameters

Sample success responses

XML format

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

<DescribeCacheAnalysisJobResponse>
    <Message>Successful</Message>
    <RequestId>B6D17591-B48B-4D31-9CD6-9B9796B2****</RequestId>
    <Data>
        <TaskState>BACKUP</TaskState>
        <JobId>sf79-sd99-sa37-****</JobId>
        <Message>Successful</Message>
        <BigKeys>
            <Type>hash</Type>
            <Db>0</Db>
            <ExpirationTimeMillis>1596256542547</ExpirationTimeMillis>
            <Key>task_x****</Key>
            <Encoding>hashtable</Encoding>
            <Bytes>12345</Bytes>
            <NodeId>r-x****-db-0</NodeId>
            <Count>127</Count>
        </BigKeys>
        <KeyPrefixes>
            <KeyNum>123</KeyNum>
            <Type>hash</Type>
            <Bytes>12345</Bytes>
            <Prefix>task_</Prefix>
            <Count>127</Count>
        </KeyPrefixes>
        <BigKeysOfNum>
            <Type>hash</Type>
            <Db>0</Db>
            <ExpirationTimeMillis>1596256542547</ExpirationTimeMillis>
            <Key>task_x****</Key>
            <Encoding>hashtable</Encoding>
            <Bytes>12345</Bytes>
            <NodeId>r-x****-db-0</NodeId>
            <Count>127</Count>
        </BigKeysOfNum>
        <UnexBigKeysOfBytes>
            <Type>hash</Type>
            <Db>0</Db>
            <ExpirationTimeMillis>1596256542547</ExpirationTimeMillis>
            <Key>task_x****</Key>
            <Encoding>hashtable</Encoding>
            <Bytes>12345</Bytes>
            <NodeId>r-x****-db-0</NodeId>
            <Count>127</Count>
        </UnexBigKeysOfBytes>
        <UnexBigKeysOfNum>
            <Type>hash</Type>
            <Db>0</Db>
            <ExpirationTimeMillis>1596256542547</ExpirationTimeMillis>
            <Key>task_x****</Key>
            <Encoding>hashtable</Encoding>
            <Bytes>12345</Bytes>
            <NodeId>r-x****-db-0</NodeId>
            <Count>127</Count>
        </UnexBigKeysOfNum>
        <InstanceId>r-bp18ff4a195d****</InstanceId>
        <NodeId>r-x****-db-0</NodeId>
    </Data>
    <Code>200</Code>
    <Success>true</Success>
</DescribeCacheAnalysisJobResponse>

JSON format

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

{
  "Message" : "Successful",
  "RequestId" : "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Data" : {
    "TaskState" : "BACKUP",
    "JobId" : "sf79-sd99-sa37-****",
    "Message" : "Successful",
    "BigKeys" : [ {
      "Type" : "hash",
      "Db" : 0,
      "ExpirationTimeMillis" : 1596256542547,
      "Key" : "task_x****",
      "Encoding" : "hashtable",
      "Bytes" : 12345,
      "NodeId" : "r-x****-db-0",
      "Count" : 127
    } ],
    "KeyPrefixes" : [ {
      "KeyNum" : 123,
      "Type" : "hash",
      "Bytes" : 12345,
      "Prefix" : "task_",
      "Count" : 127
    } ],
    "BigKeysOfNum" : [ {
      "Type" : "hash",
      "Db" : 0,
      "ExpirationTimeMillis" : 1596256542547,
      "Key" : "task_x****",
      "Encoding" : "hashtable",
      "Bytes" : 12345,
      "NodeId" : "r-x****-db-0",
      "Count" : 127
    } ],
    "UnexBigKeysOfBytes" : [ {
      "Type" : "hash",
      "Db" : 0,
      "ExpirationTimeMillis" : 1596256542547,
      "Key" : "task_x****",
      "Encoding" : "hashtable",
      "Bytes" : 12345,
      "NodeId" : "r-x****-db-0",
      "Count" : 127
    } ],
    "UnexBigKeysOfNum" : [ {
      "Type" : "hash",
      "Db" : 0,
      "ExpirationTimeMillis" : 1596256542547,
      "Key" : "task_x****",
      "Encoding" : "hashtable",
      "Bytes" : 12345,
      "NodeId" : "r-x****-db-0",
      "Count" : 127
    } ],
    "InstanceId" : "r-bp18ff4a195d****",
    "NodeId" : "r-x****-db-0"
  },
  "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.