All Products
Search
Document Center

Security Center:CreateJenkinsImageRegistry

Last Updated:Aug 24, 2024

Creates a Jenkins image repository.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
yundun-sas:CreateJenkinsImageRegistrycreate
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegistryNamestringNo

The alias of the image repository.

testRepo
RegistryTypestringNo

The type of the image repository. Valid values:

  • CI/CD: Jenkins
CI/CD
RegistryVersionstringNo

The version of the image repository. Default value: -. Valid values:

  • -: the default version
  • V1: V1.0
  • V2: V2.0
V1
ProtocolTypeintegerNo

The type of the protocol. Valid values:

  • 1: HTTP
  • 2: HTTPS
1
NetTypeintegerNo

The network type. Valid values:

  • 1: Internet
  • 2: Virtual Private Cloud (VPC)
1
VpcIdstringNo

The ID of the VPC.

vpc-2ze4aoqgeu51ydfb8****
RegistryHostIpstringNo

The IP address of the image repository.

114.55.XXX.XXX
DomainNamestringNo

The domain name of the image repository.

example.com
UserNamestringNo

The username.

RegistryUser
PasswordstringNo

The password.

Harbor********
RegionIdstringNo

The region ID of the image repository.

cn-shanghai
WhiteListstringNo

The whitelist of IP addresses.

192.168.XXX.XXX
TransPerHourintegerNo

The number of images that can be scanned per hour.

30
ExtraParamstringNo

The additional parameters of the image repository. The value of this parameter contains the following fields:

  • namespace: the namespace
  • authToken: the authorization token
[{\"namespace\":\"aa\",\"authToken\":\"aa\"}]
PersistenceDayintegerNo

The number of days during which assets can be retained.

30
SourceIpstringNo

The source IP address of the request.

41.121.XXX.XXX

Response parameters

ParameterTypeDescriptionExample
object

The data returned.

Dataobject

The result of creating the image repository.

Idlong

The ID of the image repository.

443496
GmtCreatestring

The creation time. The time is in the yyyy-MM-dd HH:mm:ss format.

2022-10-16 18:17:16
GmtModifiedstring

The update time. The time is in the yyyy-MM-dd HH:mm:ss format.

2022-11-21 10:40:01
RegistryNamestring

The alias of the image repository.

fanyi
RegistryTypestring

The type of the image repository. Valid values:

  • CI/CD: Jenkins
CI/CD
ProtocolTypeinteger

The type of the protocol. Valid values:

  • 1: HTTP
  • 2: HTTPS
1
NetTypeinteger

The network type. Valid values:

  • 1: Internet
  • 2: VPC
1
VpcIdstring

The ID of the VPC.

vpc-2vchkxmf2j9yjt3x2****
RegistryHostIpstring

The IP address of the image repository.

1.13.XXX.XXX
DomainNamestring

The domain name of the image repository.

example.com
UserNamestring

The username.

RegistryUser
Passwordstring

The password.

Harbor******
RegionIdstring

The region ID of the image repository.

cn-shanghai
Tokenstring

The authentication token of the user.

3c3c602c-fa1f-4bc0-992f-b4b2cac7****
WhiteListstring

The whitelist.

192.168.XXX.XXX
BlackListstring

The blacklist.

61.9.XXX.XXX
TransPerHourinteger

The number of images that can be scanned per hour.

30
PersistenceDayinteger

The number of days during which assets can be retained.

30
RequestIdstring

The ID of the request.

1AF1E723-53F1-55BF-A4B2-15CB7A32****
HttpStatusCodeinteger

The HTTP status code returned.

200
TimeCostlong

The time consumed. Unit: seconds.

1

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400NoPermissionno permission-
403NoPermissioncaller has no permissionYou are not authorized to do this operation.
500ServerErrorServerError-

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