Adds a self-managed image repository.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
yundun-sas:AddPrivateRegistry | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegistryType | string | Yes | The type of the private image repository. Valid values:
| harbor |
RegistryVersion | string | Yes | The version of the image repository. Valid values:
| V2 |
ProtocolType | long | Yes | The type of the protocol. Valid values:
| 2 |
NetType | long | Yes | The network type. Valid values:
| 2 |
VpcId | string | No | The ID of the VPC. | vpc-wz9hs3e5*******908kd |
RegistryHostIp | string | Yes | The IP address of the image repository. | 114.55.**.** |
DomainName | string | Yes | The domain name of the image repository. | example.com |
UserName | string | Yes | The username that is used to log on to the image repository. | xxxxx |
Password | string | Yes | The password that is used to log on to the image repository. | ****** |
RegistryRegionId | string | Yes | The region ID. Note
You can call the ListImageRegistryRegion operation to query the IDs of supported regions.
| cn-hangzhou |
TransPerHour | integer | No | The number of images that are scanned per hour. | 10 |
ExtraParam | string | No | The additional parameter of the image repository. This parameter is required when you set the RegistryType parameter to quay. Valid values:
| [{"namespace":"aa","authToken":"aa"}] |
Port | integer | No | The port number. | 80 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "F8B6F758-BCD4-597A-8A2C-DA5A552C****",
"Data": {
"VpcId": "vpc-2vchkxmf2j9yjt3x2****",
"Token": "3c3c602c-fa1f-4bc0-992f-b4b2cac7****",
"TransPerHour": 10,
"AliUid": 0,
"RegistryType": "harbor",
"DomainName": "example.com",
"RegionId": "cn-hangzhou",
"Password": "***********",
"NetType": 2,
"RegistryVersion": "V2",
"ProtocolType": 2,
"RegistryHostIp": "114.55.**.**",
"UserName": "******",
"Id": 0
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
403 | NoPermission | caller has no permission | You are not authorized to do this operation. |
500 | ServerError | ServerError | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-09-07 | The request parameters of the API has changed | View Change Details |