Container Registry API, gRPC: ScanPolicyService.Update
Updates the specified scan policy.
gRPC request
rpc Update (UpdateScanPolicyRequest) returns (operation.Operation)
UpdateScanPolicyRequest
{
"scan_policy_id": "string",
"update_mask": "google.protobuf.FieldMask",
"name": "string",
"description": "string",
"rules": {
"push_rule": {
"repository_prefixes": [
"string"
],
"disabled": "bool"
},
"schedule_rules": [
{
"repository_prefixes": [
"string"
],
"rescan_period": "google.protobuf.Duration",
"disabled": "bool"
}
]
}
}
Field |
Description |
scan_policy_id |
string Required field. ID of the scan policy. |
update_mask |
Field mask that specifies which fields of the scan policy resource are going to be updated. |
name |
string Name of the scan policy. |
description |
string Description of the scan policy. |
rules |
Rules of the 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. |
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": {
"scan_policy_id": "string"
},
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": {
"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"
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field |
Description |
id |
string ID of the operation. |
description |
string Description of the operation. 0-256 characters long. |
created_at |
Creation timestamp. |
created_by |
string ID of the user or service account who initiated the operation. |
modified_at |
The time when the Operation resource was last modified. |
done |
bool If the value is |
metadata |
Service-specific metadata associated with the operation. |
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
UpdateScanPolicyMetadata
Field |
Description |
scan_policy_id |
string ID of the scan policy resource that is updated. |
ScanPolicy
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. |