Container Registry API, gRPC: ScanPolicyService.Get
Returns the specified scan policy.
gRPC request
rpc Get (GetScanPolicyRequest) returns (ScanPolicy)
GetScanPolicyRequest
{
"scanPolicyId": "string"
}
Field |
Description |
scanPolicyId |
string Required field. ID of the scan policy. |
ScanPolicy
{
"id": "string",
"registryId": "string",
"name": "string",
"description": "string",
"rules": {
"pushRule": {
"repositoryPrefixes": [
"string"
],
"disabled": "bool"
},
"scheduleRules": [
{
"repositoryPrefixes": [
"string"
],
"rescanPeriod": "google.protobuf.Duration",
"disabled": "bool"
}
]
},
"createdAt": "google.protobuf.Timestamp",
"disabled": "bool"
}
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 |
Output only. Creation timestamp. |
disabled |
bool 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 |
bool 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 |
Required field. Period of time since last scan to trigger automatic rescan. |
disabled |
bool Turns off scan rule. |