All Products
Search
Document Center

Container Registry:ListInstance

Last Updated:Mar 28, 2023

Queries instances in a region.

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 keyAssociation operation
cr:ListInstanceList
  • CR
    acs:cr:*:{#accountId}:*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceNamestringNo

The name of the instance.

test
InstanceStatusstringNo

The status of the instance. Valid values:

  • PENDING: The instance is being initialized.
  • INIT_ERROR: The instance fails to be initialized.
  • STARTING: The instance is starting.
  • RUNNING: The instance is running.
  • STOPPING: The instance is being stopped.
  • STOPPED: The instance is stopped.
  • DELETING: The instance is being deleted.
  • DELETED: The instance is deleted.
RUNNING
PageNointegerNo

The number of the page to return.

1
PageSizeintegerNo

The number of entries to return on each page.

30
ResourceGroupIdstringNo

The ID of the resource group.

rg-acfmv36i4is****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

A2A9BA68-B264-4953-9154-CE61B1C03BA6
Codestring

The return value.

success
PageNointeger

The page number of the returned page.

1
IsSuccessboolean

Indicates whether the request is successful.

true
PageSizeinteger

The number of entries returned per page.

30
TotalCountinteger

The total number of returned entries.

12121
Instancesarray

The instances that are queried.

object
ModifiedTimestring

The time when the instance was last modified.

1562849760000
InstanceNamestring

The name of the instance.

test
CreateTimestring

The time when the instance was created.

1562849679000
InstanceSpecificationstring

The edition of the Container Registry Enterprise Edition instance.

Enterprise_Basic
InstanceStatusstring

The status of the instance.

RUNNING
InstanceIdstring

The ID of the instance.

cri-sgedpenzw80e****
RegionIdstring

The region ID of the instance.

cn-shanghai

Examples

Sample success responses

JSONformat

{
  "RequestId": "A2A9BA68-B264-4953-9154-CE61B1C03BA6",
  "Code": "success",
  "PageNo": 1,
  "IsSuccess": true,
  "PageSize": 30,
  "TotalCount": 12121,
  "Instances": [
    {
      "ModifiedTime": "1562849760000",
      "InstanceName": "test",
      "CreateTime": "1562849679000",
      "InstanceSpecification": "Enterprise_Basic",
      "InstanceStatus": "RUNNING",
      "InstanceId": "cri-sgedpenzw80e****",
      "RegionId": "cn-shanghai",
      "ResourceGroupId": ""
    }
  ]
}

Error codes

HTTP status codeError codeError message
403NoPrivilegeAccess denied for this user.
500SystemErrorUnknown error.

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