All Products
Search
Document Center

Elastic Container Instance:DescribeDataCaches

Last Updated:Nov 14, 2024

Queries the information about data caches.

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
eci:DescribeDataCacheslist
*DataCache
acs:eci:{#regionId}:{#accountId}:datacache/{#datacacheId}
  • eci:tag
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the data caches that you want to query.

cn-hangzhou
DataCacheIdarrayNo

The data cache IDs.

stringNo

The data cache ID.

edc-bp1a7n7uawwwol******
BucketstringNo

The bucket that stores the data cache. Default value: default.

default
PathstringNo

The virtual host (vHost) directory in which the data cache resides.

/data/models/
Tagarray<object>No

The tags that are attached to the data cache.

objectNo
KeystringNo

The tag key.

testkey
ValuestringNo

The tag value.

testvalue
ResourceGroupIdstringNo

The ID of the resource group to which the data cache belongs.

rg-acfmzw2jz2z****
LimitintegerNo

The maximum entries of query results that are allowed to be displayed. Valid values: 1 to 20. Default value: 20.

20
NextTokenstringNo

The query token. Set the value to the NextToken value that is returned in the previous call.

d78f2dd8-5979-42fe-****-b16db43be5bc

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

B8756BA0-6452-419C-9727-37A6209C85E0
DataCachesarray<object>

The information about the data caches.

DataCacheobject
DataCacheIdstring

The ID of the data cache.

edc-bp15l4vvys94oo******
CreationTimestring

The time when the data cache was created.

2023-06-16T02:43Z
Statusstring

The status of the data cache. Valid values:

  • Loading: The data cache is loading data.
  • Creating: The data cache is being created.
  • Available: The data cache is created.
  • Failed: The data cache failed to be created.
  • Updating: The data cache is being updated.
  • UpdateFailed: The data cache failed to be updated.

If the data cache is in the Available state, the data cache can be used.

Available
Progressstring

The creation progress of the data cache.

100%
LastMatchedTimestring

The time when the data cache was last matched.

2023-06-18T02:43Z
ExpireDateTimestring

The time when the data cache expires.

2023-06-26T02:43Z
ContainerGroupIdstring

The ID of the elastic container instance that was generated when the data cache was created.

eci-8vb1y2w1dv7zeirn****
Tagsarray<object>

The tags that are attached to the data cache.

Tagobject
Keystring

The tag key.

testkey
Valuestring

The tag value.

testvalue
Eventsarray<object>

The events.

Eventobject
Typestring

The type of the event. Valid values:

  • Normal
  • Warning
Normal
LastTimestampstring

The time when the event ended.

2021-06-16T02:24:48Z
Messagestring

The message about the event.

Successfully check data cache resource.
Namestring

The event name.

datacache
Countinteger

The number of times that the event occurred.

1
FirstTimestampstring

The time when the event started.

2021-06-16T02:14:48Z
Reasonstring

The reason for the transition into the current status of the event.

Started
RegionIdstring

The region ID.

cn-hangzhou
SnapshotIdstring

The snapshot ID.

s-2zec5oj8e1yhxijt****
FlashSnapshotIdstring

The ID of the on-premises snapshot.

s-bp12w3v37sit96t6****
ResourceGroupIdstring

The ID of the resource group.

rg-aek2hlt3ux4****
Sizeinteger

The size of the data cache. Unit: GiB.

20
Namestring

The name of the data cache.

test
DataSourceobject

The information about the data source.

Typestring

The type of the data source. Valid values:

  • NAS
  • OSS
  • URL
  • SNAPSHOT
URL
Optionsstring

The parameters that are configured for the data source.

{ "options": { "path": "/", "server": "0ce1f4****-or***.cn-hangzhou.nas.aliyuncs.com", "vers": "3", "options": "nolock,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport" }, "type": "NAS" }
Bucketstring

The bucket that stores the data cache.

default
Pathstring

The directory in which the virtual host of the data cache resides.

/data/models/
NextTokenstring

The query token. Set the value to the NextToken value that is returned in the previous call.

d78f2dd8-5979-42fe-xaee-b16db43be5bc
TotalCountinteger

The number of entries returned.

2

Examples

Sample success responses

JSONformat

{
  "RequestId": "B8756BA0-6452-419C-9727-37A6209C85E0",
  "DataCaches": [
    {
      "DataCacheId": "edc-bp15l4vvys94oo******\n",
      "CreationTime": "2023-06-16T02:43Z",
      "Status": "Available",
      "Progress": "100%",
      "LastMatchedTime": "2023-06-18T02:43Z",
      "ExpireDateTime": "2023-06-26T02:43Z\n",
      "ContainerGroupId": "eci-8vb1y2w1dv7zeirn****",
      "Tags": [
        {
          "Key": "testkey",
          "Value": "testvalue"
        }
      ],
      "Events": [
        {
          "Type": "Normal",
          "LastTimestamp": "2021-06-16T02:24:48Z",
          "Message": "Successfully check data cache resource.",
          "Name": "datacache",
          "Count": 1,
          "FirstTimestamp": "2021-06-16T02:14:48Z",
          "Reason": "Started"
        }
      ],
      "RegionId": "cn-hangzhou",
      "SnapshotId": "s-2zec5oj8e1yhxijt****",
      "FlashSnapshotId": "s-bp12w3v37sit96t6****\n",
      "ResourceGroupId": "rg-aek2hlt3ux4****",
      "Size": 20,
      "Name": "test",
      "DataSource": {
        "Type": "URL",
        "Options": "{\n      \"options\": {\n            \"path\": \"/\",\n            \"server\": \"0ce1f4****-or***.cn-hangzhou.nas.aliyuncs.com\",\n            \"vers\": \"3\",\n            \"options\": \"nolock,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\"\n      },\n      \"type\": \"NAS\"\n}"
      },
      "Bucket": "default",
      "Path": "/data/models/"
    }
  ],
  "NextToken": "d78f2dd8-5979-42fe-xaee-b16db43be5bc",
  "TotalCount": 2
}

Error codes

HTTP status codeError codeError messageDescription
400Account.ArrearageYour account has an outstanding payment.Your account has an outstanding payment.
400DryRunOperationRequest validation has been passed with DryRun flag set.Request validation has been passed with DryRun flag set.
400ServiceNotEnabled%sYou have not activated the service that is required for processing this request.
403Forbidden.SubUserThe specified action is not available for you.The specified action is not available for you.
403Forbidden.UserBussinessStatusThis operation is not allowed, because you have overdue bills. Pay the overdue bill and try again.-
403Forbidden.UserNotRealNameAuthenticationThis operation is not allowed, because you have not passed the real-name verification.-
403NoPermissionThe RAM role does not belong to ECS.-

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

Change history

Change timeSummary of changesOperation
2023-09-05The Error code has changed. The response structure of the API has changedView Change Details