All Products
Search
Document Center

Container Registry:CreateChartRepository

Last Updated:Oct 14, 2022

Operation Description

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • 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 keyword: refers to the condition keyword defined by the cloud product itself.
  • 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.
Operateaccess levelResource typeconditional keywordAssociation operation
cr:CreateRepositoryWrite
  • CR
    acs:cr:{#regionId}:{#accountId}:chart/{#InstanceId}/{#NamespaceName}
    without
without

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the Container Registry instance.

cri-xkx6vujuhay0****
RepoNamestringYes

The name of the repository that you want to create.

repo01
RepoNamespaceNamestringYes

The namespace to which the repository belongs.

namespace01
RepoTypestringNo

The default repository type. Valid values:

  • PUBLIC
  • PRIVATE
PUBLIC
SummarystringNo

The summary about the repository.

summary

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The return value.

success
RepoIdstring

The ID of the repository.

crcr-2micxey5ewj4****
IsSuccessboolean

Indicates whether the API call is successful. Valid values:

  • true: successful
  • false: failed
true
RequestIdstring

The ID of the request.

60390244-A483-491A-B41D-F866C95380A1

Example

Normal return example

JSONFormat

{
    "IsSuccess": true,
    "RequestId": "60390244-A483-491A-B41D-F866C95380A1",
    "RepoId": "crcr-2micxey5ewj4****",
    "Code": "success"
}

XMLFormat

<IsSuccess>true</IsSuccess>
<RequestId>60390244-A483-491A-B41D-F866C95380A1</RequestId>
<RepoId>crcr-2micxey5ewj4****</RepoId>
<Code>success</Code>

Error codes

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

For a list of error codes, visit the API error center.