Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex Container Registry
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Authentication in Container Registry
    • Managing a Docker image
      • Getting information about available Docker images
      • Creating a Docker image
      • Pushing a Docker image to a registry
      • Pulling a Docker image from a registry
      • Deleting a Docker image from a registry
    • Managing Helm charts
      • Getting information about available Helm charts
      • Pushing a Helm chart to a registry
      • Pulling a Helm chart from a registry
      • Deleting a Helm chart from a registry
    • Managing a registry
      • Getting information about existing registries
      • Creating a registry
      • Updating a registry
      • Deleting a registry
    • Managing a repository
      • Getting information about existing repositories
      • Creating a repository
    • Managing Docker image lifecycle policies
      • Getting information about existing lifecycle policies
      • Creating a lifecycle policy
      • Updating a lifecycle policy
      • Performing lifecycle policy dry runs
      • Deleting a lifecycle policy
    • Scanning Docker images for vulnerabilities
    • Working with roles
      • Assigning a role
      • Viewing assigned roles
      • Revoking a role
  • Yandex Container Solution
  • Practical guidelines
    • All tutorials
    • Running a Docker image on a VM
    • Creating a trigger with Yandex Cloud Functions
    • Setting up automatic scanning of a Docker image
  • Concepts
    • Overview
    • Docker image
    • Docker volume
    • Registry
    • Repository
    • Docker image lifecycle policies
    • Vulnerability scanner
    • Yandex Cloud Functions trigger
    • Backups
    • Quotas and limits
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • ImageService
      • LifecyclePolicyService
      • RegistryService
      • RepositoryService
      • ScannerService
      • OperationService
    • REST
      • Overview
      • Image
        • Overview
        • delete
        • get
        • list
      • LifecyclePolicy
        • Overview
        • create
        • delete
        • dryRun
        • get
        • getDryRunResult
        • list
        • listDryRunResultAffectedImages
        • listDryRunResults
        • update
      • Registry
        • Overview
        • create
        • delete
        • get
        • list
        • listAccessBindings
        • listIpPermission
        • setAccessBindings
        • setIpPermission
        • update
        • updateAccessBindings
        • updateIpPermission
      • Repository
        • Overview
        • delete
        • get
        • getByName
        • list
        • listAccessBindings
        • setAccessBindings
        • updateAccessBindings
        • upsert
      • Scanner
        • Overview
        • get
        • getLast
        • list
        • listVulnerabilities
        • scan
  • Troubleshooting
  • Questions and answers
  1. API reference
  2. gRPC
  3. RepositoryService

Container Registry API, gRPC: RepositoryService

Written by
Yandex Cloud
  • Calls RepositoryService
  • Get
    • GetRepositoryRequest
    • Repository
  • GetByName
    • GetRepositoryByNameRequest
    • Repository
  • List
    • ListRepositoriesRequest
    • ListRepositoriesResponse
    • Repository
  • ListAccessBindings
    • ListAccessBindingsRequest
    • ListAccessBindingsResponse
    • AccessBinding
    • Subject
  • Upsert
    • UpsertRepositoryRequest
    • Operation
    • UpsertRepositoryMetadata
    • Repository
  • Delete
    • DeleteRepositoryRequest
    • Operation
    • DeleteRepositoryMetadata
  • SetAccessBindings
    • SetAccessBindingsRequest
    • AccessBinding
    • Subject
    • Operation
    • SetAccessBindingsMetadata
  • UpdateAccessBindings
    • UpdateAccessBindingsRequest
    • AccessBindingDelta
    • AccessBinding
    • Subject
    • Operation
    • UpdateAccessBindingsMetadata

A set of methods for managing Repository resources.

Call Description
Get Returns the specified Repository resource.
GetByName Returns the specified Repository resource.
List Retrieves the list of Repository resources in the specified registry.
ListAccessBindings Lists access bindings for the specified repository.
Upsert Upserts a repository in the specified registry.
Delete Deletes the specified repository.
SetAccessBindings Sets access bindings for the specified repository.
UpdateAccessBindings Updates access bindings for the specified repository.

Calls RepositoryService

Get

Returns the specified Repository resource.
To get the list of available Repository resources, make a List request.

rpc Get (GetRepositoryRequest) returns (Repository)

GetRepositoryRequest

Field Description
repository_id string
Required. ID of the Repository resource to return.
To get the repository ID use a RepositoryService.List request. The maximum string length in characters is 50.

Repository

Field Description
name string
Name of the repository. The name is unique within the registry.
id string
Output only. ID of the repository.

GetByName

Returns the specified Repository resource.
To get the list of available Repository resources, make a List request.

rpc GetByName (GetRepositoryByNameRequest) returns (Repository)

GetRepositoryByNameRequest

Field Description
repository_name string
Required. Name of the Repository resource to return.
To get the repository name use a RepositoryService.List request. Value must match the regular expression [a-z0-9]+(?:[._-][a-z0-9]+)*(/([a-z0-9]+(?:[._-][a-z0-9]+)*))*.

Repository

Field Description
name string
Name of the repository. The name is unique within the registry.
id string
Output only. ID of the repository.

List

Retrieves the list of Repository resources in the specified registry.

rpc List (ListRepositoriesRequest) returns (ListRepositoriesResponse)

ListRepositoriesRequest

Field Description
registry_id string
ID of the registry to list repositories in.
To get the registry ID use a RegistryService.List request. The maximum string length in characters is 50.
folder_id string
ID of the folder to list registries in.
folder_id is ignored if a ListImagesRequest.registry_id is specified in the request.
To get the folder ID use a yandex.cloud.resourcemanager.v1.FolderService.List request. The maximum string length in characters is 50.
page_size int64
The maximum number of results per page to return. If the number of available results is larger than page_size, the service returns a ListRepositoriesResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000.
page_token string
Page token. To get the next page of results, set page_token to the ListRepositoriesResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100.
filter string
A filter expression that filters resources listed in the response. The expression must specify:
  1. The field name. Currently you can use filtering only on Repository.name field.
  2. An = operator.
  3. The value in double quotes ("). Must be 3-63 characters long and match the regular expression [a-z][-a-z0-9]{1,61}[a-z0-9].
The maximum string length in characters is 1000.
order_by string
The maximum string length in characters is 100.

ListRepositoriesResponse

Field Description
repositories[] Repository
List of Repository resources.
next_page_token string
This token allows you to get the next page of results for list requests. If the number of results is larger than ListRepositoriesRequest.page_size, use the next_page_token as the value for the ListRepositoriesRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

Repository

Field Description
name string
Name of the repository. The name is unique within the registry.
id string
Output only. ID of the repository.

ListAccessBindings

Lists access bindings for the specified repository.

rpc ListAccessBindings (ListAccessBindingsRequest) returns (ListAccessBindingsResponse)

ListAccessBindingsRequest

Field Description
resource_id string
Required. ID of the resource to list access bindings for.
To get the resource ID, use a corresponding List request. For example, use the yandex.cloud.resourcemanager.v1.CloudService.List request to get the Cloud resource ID. The maximum string length in characters is 50.
page_size int64
The maximum number of results per page that should be returned. If the number of available results is larger than page_size, the service returns a ListAccessBindingsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000.
page_token string
Page token. Set page_token to the ListAccessBindingsResponse.next_page_token returned by a previous list request to get the next page of results. The maximum string length in characters is 100.

ListAccessBindingsResponse

Field Description
access_bindings[] AccessBinding
List of access bindings for the specified resource.
next_page_token string
This token allows you to get the next page of results for list requests. If the number of results is larger than ListAccessBindingsRequest.page_size, use the next_page_token as the value for the ListAccessBindingsRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

AccessBinding

Field Description
role_id string
Required. ID of the yandex.cloud.iam.v1.Role that is assigned to the subject. The maximum string length in characters is 50.
subject Subject
Required. Identity for which access binding is being created. It can represent an account with a unique ID or several accounts with a system identifier.

Subject

Field Description
id string
Required. ID of the subject.
It can contain one of the following values:
  • allAuthenticatedUsers: A special system identifier that represents anyone
who is authenticated. It can be used only if the type is system.
  • allUsers: A special system identifier that represents anyone. No authentication is required.
For example, you don't need to specify the IAM token in an API query.
  • <cloud generated id>: An identifier that represents a user account.
It can be used only if the type is userAccount, federatedUser or serviceAccount. The maximum string length in characters is 50.
type string
Required. Type of the subject.
It can contain one of the following values:
  • userAccount: An account on Yandex or Yandex.Connect, added to Yandex.Cloud.
  • serviceAccount: A service account. This type represents the yandex.cloud.iam.v1.ServiceAccount resource.
  • federatedUser: A federated account. This type represents a user from an identity federation, like Active Directory.
  • system: System group. This type represents several accounts with a common system identifier.

For more information, see Subject to which the role is assigned. The maximum string length in characters is 100.

Upsert

Upserts a repository in the specified registry.

rpc Upsert (UpsertRepositoryRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:UpsertRepositoryMetadata

    Operation.response:Repository

UpsertRepositoryRequest

Field Description
name string
Required. Name of the repository.
The name of the repository should match the name of the images that will be pushed in the repository. Value must match the regular expression [a-z0-9]+(?:[._-][a-z0-9]+)*(/([a-z0-9]+(?:[._-][a-z0-9]+)*))*.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
metadata google.protobuf.Any<UpsertRepositoryMetadata>
Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<Repository>
if operation finished successfully.

UpsertRepositoryMetadata

Field Description
repository_id string
ID of the repository that is being upserted.

Repository

Field Description
name string
Name of the repository. The name is unique within the registry.
id string
Output only. ID of the repository.

Delete

Deletes the specified repository.

rpc Delete (DeleteRepositoryRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:DeleteRepositoryMetadata

    Operation.response:google.protobuf.Empty

DeleteRepositoryRequest

Field Description
repository_id string
Required. ID of the repository to delete. The maximum string length in characters is 50.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
metadata google.protobuf.Any<DeleteRepositoryMetadata>
Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<google.protobuf.Empty>
if operation finished successfully.

DeleteRepositoryMetadata

Field Description
repository_id string
ID of the repository that is being deleted.

SetAccessBindings

Sets access bindings for the specified repository.

rpc SetAccessBindings (SetAccessBindingsRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:SetAccessBindingsMetadata

    Operation.response:google.protobuf.Empty

SetAccessBindingsRequest

Field Description
resource_id string
Required. ID of the resource for which access bindings are being set.
To get the resource ID, use a corresponding List request. The maximum string length in characters is 50.
access_bindings[] AccessBinding
Required. Access bindings to be set. For more information, see Access Bindings.

AccessBinding

Field Description
role_id string
Required. ID of the yandex.cloud.iam.v1.Role that is assigned to the subject. The maximum string length in characters is 50.
subject Subject
Required. Identity for which access binding is being created. It can represent an account with a unique ID or several accounts with a system identifier.

Subject

Field Description
id string
Required. ID of the subject.
It can contain one of the following values:
  • allAuthenticatedUsers: A special system identifier that represents anyone
who is authenticated. It can be used only if the type is system.
  • allUsers: A special system identifier that represents anyone. No authentication is required.
For example, you don't need to specify the IAM token in an API query.
  • <cloud generated id>: An identifier that represents a user account.
It can be used only if the type is userAccount, federatedUser or serviceAccount. The maximum string length in characters is 50.
type string
Required. Type of the subject.
It can contain one of the following values:
  • userAccount: An account on Yandex or Yandex.Connect, added to Yandex.Cloud.
  • serviceAccount: A service account. This type represents the yandex.cloud.iam.v1.ServiceAccount resource.
  • federatedUser: A federated account. This type represents a user from an identity federation, like Active Directory.
  • system: System group. This type represents several accounts with a common system identifier.

For more information, see Subject to which the role is assigned. The maximum string length in characters is 100.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
metadata google.protobuf.Any<SetAccessBindingsMetadata>
Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<google.protobuf.Empty>
if operation finished successfully.

SetAccessBindingsMetadata

Field Description
resource_id string
ID of the resource for which access bindings are being set.

UpdateAccessBindings

Updates access bindings for the specified repository.

rpc UpdateAccessBindings (UpdateAccessBindingsRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:UpdateAccessBindingsMetadata

    Operation.response:google.protobuf.Empty

UpdateAccessBindingsRequest

Field Description
resource_id string
Required. ID of the resource for which access bindings are being updated. The maximum string length in characters is 50.
access_binding_deltas[] AccessBindingDelta
Required. Updates to access bindings. The number of elements must be greater than 0.

AccessBindingDelta

Field Description
action enum AccessBindingAction
Required. The action that is being performed on an access binding.
  • ADD: Addition of an access binding.
  • REMOVE: Removal of an access binding.
access_binding AccessBinding
Required. Access binding. For more information, see Access Bindings.

AccessBinding

Field Description
role_id string
Required. ID of the yandex.cloud.iam.v1.Role that is assigned to the subject. The maximum string length in characters is 50.
subject Subject
Required. Identity for which access binding is being created. It can represent an account with a unique ID or several accounts with a system identifier.

Subject

Field Description
id string
Required. ID of the subject.
It can contain one of the following values:
  • allAuthenticatedUsers: A special system identifier that represents anyone
who is authenticated. It can be used only if the type is system.
  • allUsers: A special system identifier that represents anyone. No authentication is required.
For example, you don't need to specify the IAM token in an API query.
  • <cloud generated id>: An identifier that represents a user account.
It can be used only if the type is userAccount, federatedUser or serviceAccount. The maximum string length in characters is 50.
type string
Required. Type of the subject.
It can contain one of the following values:
  • userAccount: An account on Yandex or Yandex.Connect, added to Yandex.Cloud.
  • serviceAccount: A service account. This type represents the yandex.cloud.iam.v1.ServiceAccount resource.
  • federatedUser: A federated account. This type represents a user from an identity federation, like Active Directory.
  • system: System group. This type represents several accounts with a common system identifier.

For more information, see Subject to which the role is assigned. The maximum string length in characters is 100.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
metadata google.protobuf.Any<UpdateAccessBindingsMetadata>
Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<google.protobuf.Empty>
if operation finished successfully.

UpdateAccessBindingsMetadata

Field Description
resource_id string
ID of the resource for which access bindings are being updated.

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • Calls RepositoryService
  • Get
  • GetRepositoryRequest
  • Repository
  • GetByName
  • GetRepositoryByNameRequest
  • Repository
  • List
  • ListRepositoriesRequest
  • ListRepositoriesResponse
  • Repository
  • ListAccessBindings
  • ListAccessBindingsRequest
  • ListAccessBindingsResponse
  • AccessBinding
  • Subject
  • Upsert
  • UpsertRepositoryRequest
  • Operation
  • UpsertRepositoryMetadata
  • Repository
  • Delete
  • DeleteRepositoryRequest
  • Operation
  • DeleteRepositoryMetadata
  • SetAccessBindings
  • SetAccessBindingsRequest
  • AccessBinding
  • Subject
  • Operation
  • SetAccessBindingsMetadata
  • UpdateAccessBindings
  • UpdateAccessBindingsRequest
  • AccessBindingDelta
  • AccessBinding
  • Subject
  • Operation
  • UpdateAccessBindingsMetadata