Container Registry API, REST: ScanPolicy.GetByRegistry
Returns scan policy for the registry if any exists.
HTTP request
GET https://container-registry.api.yandexcloud.kz/container-registry/v1/scanPolicies/{registryId}:byRegistry
Path parameters
Field |
Description |
registryId |
string Required field. ID of the registry with scan policy. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"registryId": "string",
"name": "string",
"description": "string",
"rules": {
"pushRule": {
"repositoryPrefixes": [
"string"
],
"disabled": "boolean"
},
"scheduleRules": [
{
"repositoryPrefixes": [
"string"
],
"rescanPeriod": "string",
"disabled": "boolean"
}
]
},
"createdAt": "string",
"disabled": "boolean"
}
Field |
Description |
id |
string Output only. ID of the scan policy. |
registryId |
string ID of the registry that the scan policy belongs to. |
name |
string Name of the scan policy. |
description |
string Description of the scan policy. |
rules |
The rules of scan policy. |
createdAt |
string (date-time) Output only. Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
disabled |
boolean Turns off scan policy. |
ScanRules
Field |
Description |
pushRule |
Description of on-push scan rule. |
scheduleRules[] |
Description of time based rescan rule. |
PushRule
Field |
Description |
repositoryPrefixes[] |
string List of repositories that are scanned with rule. Child repositories are included into parent node. "*" - means all repositories in registry |
disabled |
boolean Turns off scan rule. |
ScheduledRule
Field |
Description |
repositoryPrefixes[] |
string List of repositories that are scanned with rule. Child repositories are included into parent node. "*" - means all repositories in registry |
rescanPeriod |
string (duration) Required field. Period of time since last scan to trigger automatic rescan. |
disabled |
boolean Turns off scan rule. |