Creates an artifact subscription rule.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cr:CreateArtifactSubscriptionRule |
create |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
cri-c0o11woew0k**** |
| SourceProvider |
string |
Yes |
The source of the artifact. Valid values:
Valid values:
|
DOCKER_HUB |
| SourceNamespaceName |
string |
No |
The source namespace. |
library |
| SourceRepoName |
string |
Yes |
The source repository. |
nginx |
| NamespaceName |
string |
Yes |
The Container Registry namespace name. |
test-ns |
| RepoName |
string |
Yes |
The Container Registry repository name. |
test-repo |
| TagRegexp |
string |
Yes |
The image tag to subscribe to. Supports regular expressions. |
release-v.* |
| TagCount |
integer |
Yes |
The number of image tags to subscribe to. |
1 |
| Override |
boolean |
No |
Whether to overwrite existing images in the destination repository. |
true |
| Accelerate |
boolean |
No |
Whether to enable subscription acceleration. This feature is in public preview and optimizes scheduling and network links to speed up image synchronization. |
true |
| Platform |
array |
Yes |
The OS and architecture platforms to subscribe. For multi-arch source images, only the specified platforms are synchronized to the Enterprise Edition instance. |
|
|
string |
No |
The operating system and architecture. Valid values:
Valid values:
|
*/* |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The return value. |
success |
| IsSuccess |
boolean |
Whether the request succeeded. Valid values:
|
true |
| RequestId |
string |
The request ID. |
02B27D80-FD32-5155-931A-93700779BB9E |
| RuleId |
string |
The ID of the artifact subscription rule. |
crasr-lxdfele7dg4**** |
Examples
Success response
JSON format
{
"Code": "success",
"IsSuccess": true,
"RequestId": "02B27D80-FD32-5155-931A-93700779BB9E",
"RuleId": "crasr-lxdfele7dg4****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | SystemError | A system error occurred. | An unknown error occurred. |
| 403 | NoPrivilege | Access is denied for the user. | The user is not authorized. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.