All Products
Search
Document Center

Container Registry:GetArtifactBuildRule

Last Updated:Dec 16, 2025

Queries the details of an artifact building rule.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
cr:GetArtifactBuildRuleget
*Instance
acs:cr:{#regionId}:{#accountId}:instance/{#InstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the Container Registry instance.

cri-xkx6vujuhay0****
ScopeTypestringYes

The effective range of the artifact building rule. Valid values:

  • REPOSITORY: The artifact building rule is effective in the repository level.
REPOSITORY
ScopeIdstringYes

The ID of the effective range of the artifact building rule.

  • Set the value to the ID of the image repository.
crr-8dz3aedjqlmk****
ArtifactTypestringYes

The type of the artifact.

  • ACCELERATED_IMAGE: accelerated images.
ACCELERATED_IMAGE
BuildRuleIdstringYes

The ID of the artifact building rule.

crabr-o2670wqz2n70****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

7A3E98F6-296C-54AC-A612-B75E7777D4C1
ScopeIdstring

The ID of the effective range of the artifact building rule.

  • The parameter value is the ID of the image repository.
crr-8dz3aedjqlmk****
BuildRuleIdstring

The ID of the artifact building rule.

crabr-o2670wqz2n70****
ArtifactTypestring

The type of the artifact. Valid values:

  • ACCELERATED_IMAGE: accelerated images.
ACCELERATED_IMAGE
ScopeTypestring

The effective range of the artifact building rule. Valid values:

  • REPOSITORY: The artifact building rule is effective in the repository level.
REPOSITORY
Parametersobject

Additional parameters.

ImageIndexOnlyboolean

Indicates whether the index-only mode is enabled.

false
PriorityFilestring

The list of files that you want to prefetch when you use the image acceleration feature. Each entry contains the Base64-encoded absolute path of a file.

L2hvbWUvdGVzdC8=
IsSuccessboolean

Indicates whether the API request is successful. Valid values:

  • true: The request is successful.
  • false: The request fails.
true

Examples

Sample success responses

JSONformat

{
  "RequestId": "7A3E98F6-296C-54AC-A612-B75E7777D4C1",
  "ScopeId": "crr-8dz3aedjqlmk****",
  "BuildRuleId": "crabr-o2670wqz2n70****\n",
  "ArtifactType": "ACCELERATED_IMAGE",
  "ScopeType": "REPOSITORY",
  "Parameters": {
    "ImageIndexOnly": false,
    "PriorityFile": "L2hvbWUvdGVzdC8="
  },
  "Code": "success",
  "IsSuccess": true
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-12-27The response structure of the API has changedView Change Details
2024-02-05The response structure of the API has changedView Change Details