Queries the configuration information of 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 GetChain

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

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.

ChainId String Yes chi-0ops0gsmw5x2****

The ID of the delivery chain.

Response parameters

Parameter Type Example Description
ModifiedTime Long 1638259914000

The time when the delivery chain description was modified.

ScopeId String crr-nyrh2oko32xb****

The ID of the scope where the delivery chain takes effect.

RequestId String C87993B5-7D61-5CAC-8D64-1AC732DD69FF

The ID of the request.

Description String description

THe description of the delivery chain.

CreateTime Long 1638255427000

The time when the delivery chain was created.

ScopeType String REPOSITORY

The scope type of the delivery chain.

Code String success

The response code.

ChainId String chi-0ops0gsmw5x2****

The ID of the delivery chain.

InstanceId String cri-4cdrlqmhn4gm****

The ID of the Container Registry instance.

IsSuccess Boolean true

Indicates whether the operation is successful.

Name String test

The name of the delivery chain.

ChainConfig Object

The delivery chain configuration.

ChainConfigId String cci-lz3ycgo69ukt****

The ID of the delivery chain configuration.

IsActive Boolean true

Indicates whether the delivery chain configuration takes effect. Valid values:

  • true: The delivery chain configuration takes effect.
  • false: The delivery chain configuration does not take effect.
Version String 1

The version of the delivery chain.

Routers Array of Routers

The routes between the nodes in the delivery chain.

From Object

The source node.

NodeName String DOCKER_IMAGE_BUILD

The name of the source node.

To Object

The destination node.

NodeName String DOCKER_IMAGE_PUSH

The name of the destination node.

Nodes Array of Nodes

The list of nodes in the delivery chain.

NodeName String VULNERABILITY_SCANNING

The name of the delivery chain node.

Enable Boolean true

Indicates whether the delivery chain node is enabled.

  • true: The delivery chain node is enabled.
  • false: The delivery chain node is disabled.
NodeConfig Object

The configuration of the delivery chain node.

Timeout Long 5

The timeout period.

Retry Integer 3

The number of retries.

DenyPolicy Object

The block rule for image security scanning.

Logic String AND

The logic of the system to block image security scanning.

IssueLevel String HIGH

The severity level of the detected vulnerabilities at which the system triggers the block.

IssueCount String 10

The number of vulnerabilities detected on images for the system to trigger the block.

Action String BLOCK

The block operation. Valid values:

  • BLOCK: The system stops the following steps in the delivery chain.
  • BLOCK_RETAG: The system stops overwriting the previously pushed image tags.
  • BLOCK_DELETE_TAG: The system stops deleting image tags.
ScanEngine String ACR_SCAN_SERVICE

The scan engine.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetChain
&InstanceId=cri-4cdrlqmhn4gm****
&ChainId=chi-0ops0gsmw5x2****
&Common request parameters

Sample success responses

XML format

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

<GetChainResponse>
    <ModifiedTime>1638259914000</ModifiedTime>
    <ScopeId>crr-nyrh2oko32xb****</ScopeId>
    <RequestId>C87993B5-7D61-5CAC-8D64-1AC732DD69FF</RequestId>
    <Description>description</Description>
    <CreateTime>1638255427000</CreateTime>
    <ScopeType>REPOSITORY</ScopeType>
    <Code>success</Code>
    <ChainId>chi-0ops0gsmw5x2****</ChainId>
    <InstanceId>cri-4cdrlqmhn4gm****</InstanceId>
    <IsSuccess>true</IsSuccess>
    <Name>test</Name>
    <ChainConfig>
        <ChainConfigId>cci-lz3ycgo69ukt****</ChainConfigId>
        <IsActive>true</IsActive>
        <Version>1</Version>
        <Routers>
            <From>
                <NodeName>DOCKER_IMAGE_BUILD</NodeName>
            </From>
            <To>
                <NodeName>DOCKER_IMAGE_PUSH</NodeName>
            </To>
        </Routers>
        <Nodes>
            <NodeName>VULNERABILITY_SCANNING</NodeName>
            <Enable>true</Enable>
            <NodeConfig>
                <Timeout>5</Timeout>
                <Retry>3</Retry>
                <DenyPolicy>
                    <Logic>AND</Logic>
                    <IssueLevel>HIGH</IssueLevel>
                    <IssueCount>10</IssueCount>
                    <Action>BLOCK</Action>
                </DenyPolicy>
                <ScanEngine>ACR_SCAN_SERVICE</ScanEngine>
            </NodeConfig>
        </Nodes>
    </ChainConfig>
</GetChainResponse>

JSON format

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

{
  "ModifiedTime" : 1638259914000,
  "ScopeId" : "crr-nyrh2oko32xb****",
  "RequestId" : "C87993B5-7D61-5CAC-8D64-1AC732DD69FF",
  "Description" : "description",
  "CreateTime" : 1638255427000,
  "ScopeType" : "REPOSITORY",
  "Code" : "success",
  "ChainId" : "chi-0ops0gsmw5x2****",
  "InstanceId" : "cri-4cdrlqmhn4gm****",
  "IsSuccess" : true,
  "Name" : "test",
  "ChainConfig" : {
    "ChainConfigId" : "cci-lz3ycgo69ukt****",
    "IsActive" : true,
    "Version" : "1",
    "Routers" : [ {
      "From" : {
        "NodeName" : "DOCKER_IMAGE_BUILD"
      },
      "To" : {
        "NodeName" : "DOCKER_IMAGE_PUSH"
      }
    } ],
    "Nodes" : [ {
      "NodeName" : "VULNERABILITY_SCANNING",
      "Enable" : true,
      "NodeConfig" : {
        "Timeout" : 5,
        "Retry" : 3,
        "DenyPolicy" : {
          "Logic" : "AND",
          "IssueLevel" : "HIGH",
          "IssueCount" : "10",
          "Action" : "BLOCK"
        },
        "ScanEngine" : "ACR_SCAN_SERVICE"
      }
    } ]
  }
}

Error codes

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