All Products
Search
Document Center

Container Registry:GetRepository

更新時間:Dec 05, 2024

Queries details about an image repository.

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
cr:GetRepositoryget
*Repository
acs:cr:{#regionId}:{#accountId}:repository/{#InstanceId}/{#NamespaceName}/{#RepositoryName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance.

cri-kmsiwlxxdcva****
RepoIdstringNo

The ID of the repository.

crr-03cuozrsqhkw****
RepoNamespaceNamestringNo

The name of the namespace to which the repository belongs.

test
RepoNamestringNo

The name of the repository.

test

Response parameters

ParameterTypeDescriptionExample
object
Summarystring

The summary of the repository.

Automatically created repository
CreateTimelong

The time when the repository was created.

1570759546000
IsSuccessboolean

Indicates whether the request is successful.

true
InstanceIdstring

The ID of the instance.

cri-kmsiwlxxdcva****
RepoStatusstring

The status of the repository.

NORMAL
RepoTypestring

The type of the repository. Valid values:

  • PUBLIC: public repository.
  • PRIVATE: private repository.
PRIVATE
RepoBuildTypestring

Indicates how the repository was created. Valid values:

  • MANUAL: The repository was manually created.
  • AUTO: The repository was automatically created.
MANUAL
ModifiedTimelong

The time when the repository was last modified.

1570759546100
RequestIdstring

The ID of the request.

915E6734-3E50-4640-8DBA-126D2D94DE29
RepoIdstring

The ID of the repository.

crr-l5eoubonp0l****
Codestring

The return value.

success
RepoNamespaceNamestring

The name of the namespace.

test
TagImmutabilityboolean

Indicates whether the feature of image tag immutability is enabled. Valid values:

  • true: The feature of image tag immutability is enabled.
  • false: The feature of image tag immutability is disabled.
true
RepoNamestring

The name of the repository.

test
Detailstring

The details of the repository.

test
ResourceGroupIdstring

The ID of the resource group.

rg-acfmv36i4is****

Examples

Sample success responses

JSONformat

{
  "Summary": "Automatically created repository",
  "CreateTime": 1570759546000,
  "IsSuccess": true,
  "InstanceId": "cri-kmsiwlxxdcva****",
  "RepoStatus": "NORMAL",
  "RepoType": "PRIVATE",
  "RepoBuildType": "MANUAL",
  "ModifiedTime": 1570759546100,
  "RequestId": "915E6734-3E50-4640-8DBA-126D2D94DE29",
  "RepoId": "crr-l5eoubonp0l****",
  "Code": "success",
  "RepoNamespaceName": "test",
  "TagImmutability": true,
  "RepoName": "test",
  "Detail": "test",
  "ResourceGroupId": "rg-acfmv36i4is****"
}

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.

Change history

Change timeSummary of changesOperation
2023-08-21The Error code has changedView Change Details