Creates a delivery chain.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateChain

The operation that you want to perform. Set this parameter to CreateChain.

RegionId String Yes cn-chengdu

The region ID of the Container Registry instance.

InstanceId String Yes cri-4cdrlqmhn4gm****

The ID of the Container Registry instance.

RepoName String Yes repo1

The name of the repository.

RepoNamespaceName String Yes ns1

The name of the namespace.

Name String Yes test

The name of the delivery chain.

Description String No description

The description of the delivery chain.

ChainConfig String No chainconfig

The configuration of the delivery chain in the JSON format.

Response parameters

Parameter Type Example Description
Code String success

The response code.

ChainId String chi-02ymhtwl3cq8****

The ID of the delivery chain.

IsSuccess Boolean true

Indicates whether the operation is successful.

RequestId String 4BC03B36-E515-5806-99AC-268AE3C0****

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateChain
&InstanceId=cri-4cdrlqmhn4gm****
&Name=test
&RegionId=cn-chengdu
&RepoName=repo1
&RepoNamespaceName=ns1
&Description=description
&ChainConfig={"Routers":[{"From":{"NodeName":"DOCKER_IMAGE_BUILD"},"To":{"NodeName":"DOCKER_IMAGE_PUSH"}},{"From":{"NodeName":"DOCKER_IMAGE_PUSH"},"To":{"NodeName":"VULNERABILITY_SCANNING"}},{"From":{"NodeName":"VULNERABILITY_SCANNING"},"To":{"NodeName":"ACTIVATE_REPLICATION"}},{"From":{"NodeName":"ACTIVATE_REPLICATION"},"To":{"NodeName":"TRIGGER"}},{"From":{"NodeName":"VULNERABILITY_SCANNING"},"To":{"NodeName":"SNAPSHOT"}},{"From":{"NodeName":{"NodeName":"SNAPSHOT"},"To":{"NodeName":"TRIGGER_SNAPSHOT"}}],"Nodes":[{"Customized":true,"Title":"Image building","Enable":true,"Icon":"","Name":"DOCKER_IMAGE_BUILD","NodeName":"DOCKER_IMAGE_BUILD","NodeConfig":{}},{"Customized":false,"Title":"Image pushing","Enable":true,"Icon":"","Name":"DOCKER_IMAGE_PUSH","NodeName":"DOCKER_IMAGE_PUSH","NodeConfig":{}},{"Customized":true,"Title":"Security scanning","Enable":true,"Icon":"","Name":"VULNERABILITY_SCANNING","NodeName":"VULNERABILITY_SCANNING","NodeConfig":{"DenyPolicy":{},"ScanEngine":"ACR_SCAN_SERVICE"}},{"Customized":true,"Title":"Synchronization triggering","Enable":true,"Icon":"","Name":"ACTIVATE_REPLICATION","NodeName":"ACTIVATE_REPLICATION","NodeConfig":{}},{"Customized":true,"Title":"Trigger","Enable":true,"Icon":"","Name":"TRIGGER","NodeName":"TRIGGER","NodeConfig":{}},{"Customized":true,"Title":"Disk snapshot","Enable":false,"Icon":","Name":"SNAPSHOT","NodeName":"SNAPSHOT","NodeConfig":{}},{"Customized":true,"Title":" Disk snapshot trigger ","Enable":false,"Icon":"","Name":"TRIGGER_SNAPSHOT","NodeName":"TRIGGER_SNAPSHOT","NodeConfig":{}}]}
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateChainResponse>
    <Code>success</Code>
    <ChainId>chi-02ymhtwl3cq8****</ChainId>
    <IsSuccess>true</IsSuccess>
    <RequestId>4BC03B36-E515-5806-99AC-268AE3C0****</RequestId>
</CreateChainResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Code" : "success",
  "ChainId" : "chi-02ymhtwl3cq8****",
  "IsSuccess" : true,
  "RequestId" : "4BC03B36-E515-5806-99AC-268AE3C0****"
}

Error codes

For a list of error codes, visit the API Error Center.