Yandex Cloud 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",
"scan_lang_packages": "bool",
"rules": {
"push_rule": {
"paths": [
"string"
],
"disabled": "bool"
},
"schedule_rules": [
{
"amount": "int64",
"interval_unit": "IntervalUnit",
"paths": [
"string"
],
"disabled": "bool"
}
]
},
"disabled": "bool"
}
|
Field |
Description |
|
scan_policy_id |
string Required field. ID of the scan policy. The maximum string length in characters is 50. |
|
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. Value must match the regular expression |
|
description |
string Description of the scan policy. The maximum string length in characters is 256. |
|
scan_lang_packages |
bool Flag indicating whether language packages should be scanned. |
|
rules |
Rules of the scan policy. |
|
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 |
|
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. |
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": "google.protobuf.Any",
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": "google.protobuf.Any"
// 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. |