Container Registry API, gRPC: ScanPolicyService.Get
Returns the specified scan policy.
gRPC request
rpc Get (GetScanPolicyRequest) returns (ScanPolicy)
GetScanPolicyRequest
{
"scan_policy_id": "string"
}
Field |
Description |
scan_policy_id |
string Required field. ID of the scan policy. |
ScanPolicy
{
"id": "string",
"registry_id": "string",
"name": "string",
"description": "string",
"rules": {
"push_rule": {
"repository_prefixes": [
"string"
],
"disabled": "bool"
},
"schedule_rules": [
{
"repository_prefixes": [
"string"
],
"rescan_period": "google.protobuf.Duration",
"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. |
rules |
The rules of scan policy. |
created_at |
Output only. Creation timestamp. |
disabled |
bool Turns off scan policy. |
ScanRules
Field |
Description |
push_rule |
Description of on-push scan rule. |
schedule_rules[] |
Description of time based rescan rule. |
PushRule
Field |
Description |
repository_prefixes[] |
string List of repositories that are scanned with rule. Child repositories are included into parent node. "*" - means all repositories in registry |
disabled |
bool Turns off scan rule. |
ScheduledRule
Field |
Description |
repository_prefixes[] |
string List of repositories that are scanned with rule. Child repositories are included into parent node. "*" - means all repositories in registry |
rescan_period |
Required field. Period of time since last scan to trigger automatic rescan. |
disabled |
bool Turns off scan rule. |