Yandex Cloud Registry API, gRPC: ScanPolicyService.GetByRegistry
Returns scan policy for the registry if any exists.
gRPC request
rpc GetByRegistry (GetScanPolicyByRegistryRequest) returns (ScanPolicy)
GetScanPolicyByRegistryRequest
{
"registry_id": "string"
}
|
Field |
Description |
|
registry_id |
string Required field. ID of the registry with scan policy. The maximum string length in characters is 50. |
ScanPolicy
{
"id": "string",
"registry_id": "string",
"name": "string",
"description": "string",
"scan_policy_options": {
"scan_lang_packages": "bool"
},
"rules": {
"push_rule": {
"paths": [
"string"
],
"disabled": "bool"
},
"schedule_rules": [
{
"amount": "int64",
"interval_unit": "IntervalUnit",
"paths": [
"string"
],
"disabled": "bool"
}
]
},
"created_at": "google.protobuf.Timestamp",
"disabled": "bool"
}
|
Field |
Description |
|
id |
string Output only. ID of the scan policy. |
|
registry_id |
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. |
|
scan_policy_options |
Scan policy options. |
|
rules |
The rules of scan policy. |
|
created_at |
Output only. Creation timestamp. |
|
disabled |
bool Turns off scan policy. |
ScanPolicyOptions
|
Field |
Description |
|
scan_lang_packages |
bool Flag indicating whether language packages should be scanned. |
ScanRules
|
Field |
Description |
|
push_rule |
Description of on-push scan rule. |
|
schedule_rules[] |
Description of time based rescan rule. |
PushRule
|
Field |
Description |
|
paths[] |
string List of paths that are scanned with rule. Child paths are included into parent node. "*" - means all artifacts in registry Each value must match the regular expression |
|
disabled |
bool Turns off scan rule. |
ScheduledRule
|
Field |
Description |
|
amount |
int64 Amount of time units for the scan interval. Value must be greater than 0. |
|
interval_unit |
enum IntervalUnit Unit for the scan interval.
|
|
paths[] |
string List of paths that are scanned with rule. Child paths are included into parent node. "*" - means all artifacts in registry Each value must match the regular expression |
|
disabled |
bool Turns off scan rule. |