Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Container Registry
  • Getting started
  • Yandex Container Solution
  • Access management
  • Pricing policy
  • Terraform reference
    • Authentication with the API
      • Overview
        • Overview
        • Get
        • GetByRegistry
        • Create
        • Update
        • Delete
  • Monitoring metrics
  • Audit Trails events
  • Troubleshooting
  • FAQ

In this article:

  • gRPC request
  • GetScanPolicyByRegistryRequest
  • ScanPolicy
  • ScanRules
  • PushRule
  • ScheduledRule
  1. API reference
  2. gRPC
  3. ScanPolicy
  4. GetByRegistry

Container Registry API, gRPC: ScanPolicyService.GetByRegistry

Written by
Yandex Cloud
Updated at November 26, 2024
  • gRPC request
  • GetScanPolicyByRegistryRequest
  • ScanPolicy
  • ScanRules
  • PushRule
  • ScheduledRule

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.

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.
Required. The maximum string length in characters is 50.

name

string

Name of the scan policy.

description

string

Description of the scan policy.
The maximum string length in characters is 256.

rules

ScanRules

The rules of scan policy.

created_at

google.protobuf.Timestamp

Output only. Creation timestamp.

disabled

bool

Turns off scan policy.

ScanRules

Field

Description

push_rule

PushRule

Description of on-push scan rule.

schedule_rules[]

ScheduledRule

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

google.protobuf.Duration

Required field. Period of time since last scan to trigger automatic rescan.

disabled

bool

Turns off scan rule.

Was the article helpful?

Previous
Get
Next
Create
© 2025 Direct Cursus Technology L.L.C.