Creates a Jenkins 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:CreateJenkinsImageRegistry | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegistryName | string | No | The alias of the image repository. | testRepo |
RegistryType | string | No | The type of the image repository. Valid values:
| CI/CD |
RegistryVersion | string | No | The version of the image repository. Default value: -. Valid values:
| V1 |
ProtocolType | integer | No | The type of the protocol. Valid values:
| 1 |
NetType | integer | No | The network type. Valid values:
| 1 |
VpcId | string | No | The ID of the VPC. | vpc-2ze4aoqgeu51ydfb8**** |
RegistryHostIp | string | No | The IP address of the image repository. | 114.55.XXX.XXX |
DomainName | string | No | The domain name of the image repository. | example.com |
UserName | string | No | The username. | RegistryUser |
Password | string | No | The password. | Harbor******** |
RegionId | string | No | The region ID of the image repository. | cn-shanghai |
WhiteList | string | No | The whitelist of IP addresses. | 192.168.XXX.XXX |
TransPerHour | integer | No | The number of images that can be scanned per hour. | 30 |
ExtraParam | string | No | The additional parameters of the image repository. The value of this parameter contains the following fields:
| [{\"namespace\":\"aa\",\"authToken\":\"aa\"}] |
PersistenceDay | integer | No | The number of days during which assets can be retained. | 30 |
SourceIp | string | No | The source IP address of the request. | 41.121.XXX.XXX |
Response parameters
Examples
Sample success responses
JSON
format
{
"Data": {
"Id": 443496,
"GmtCreate": "2022-10-16 18:17:16",
"GmtModified": "2022-11-21 10:40:01",
"RegistryName": "fanyi",
"RegistryType": "CI/CD",
"ProtocolType": 1,
"NetType": 1,
"VpcId": "vpc-2vchkxmf2j9yjt3x2****",
"RegistryHostIp": "1.13.XXX.XXX",
"DomainName": "example.com",
"UserName": "RegistryUser",
"Password": "Harbor******",
"RegionId": "cn-shanghai",
"Token": "3c3c602c-fa1f-4bc0-992f-b4b2cac7****",
"WhiteList": "192.168.XXX.XXX",
"BlackList": "61.9.XXX.XXX",
"TransPerHour": 30,
"PersistenceDay": 30
},
"RequestId": "1AF1E723-53F1-55BF-A4B2-15CB7A32****",
"HttpStatusCode": 200,
"TimeCost": 1
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | NoPermission | no permission | - |
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 |
---|---|---|
2024-10-29 | The Error code has changed | View Change Details |