Container Registry API, gRPC: ImageService
A set of methods for managing Image resources.
Call | Description |
---|---|
List | Retrieves the list of Image resources in the specified registry or repository. |
Get | Returns the specified Image resource. |
Delete | Deletes the specified Docker image. |
Calls ImageService
List
Retrieves the list of Image resources in the specified registry or repository.
rpc List (ListImagesRequest) returns (ListImagesResponse)
ListImagesRequest
Field | Description |
---|---|
registry_id | string ID of the registry to list Docker images in. registry_id is ignored if a ListImagesRequest.repository_name is specified in the request. To get the registry ID use a RegistryService.List request. The maximum string length in characters is 50. |
repository_name | string Name of the repository to list Docker images in. 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]+)*))* . |
folder_id | string ID of the folder to list Docker images in. folder_id is ignored if a ListImagesRequest.repository_name or a ListImagesRequest.registry_id are specified in the request. To get the folder ID use a 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 ListImagesResponse.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 ListImagesResponse.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:
|
order_by | string The maximum string length in characters is 100. |
ListImagesResponse
Field | Description |
---|---|
images[] | Image List of Image 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 ListImagesRequest.page_size, use the next_page_token as the value for the ListImagesRequest.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. |
Image
Field | Description |
---|---|
id | string Output only. ID of the Docker image. |
name | string Name of the Docker image. The name is unique within the registry. |
digest | string Content-addressable identifier of the Docker image. |
compressed_size | int64 Compressed size of the Docker image, specified in bytes. |
config | Blob Configuration of the Docker image. |
layers[] | Blob Layers of the Docker image. |
tags[] | string Tags of the Docker image. Each tag is unique within the repository. |
created_at | google.protobuf.Timestamp Output only. Creation timestamp in RFC3339 |
Blob
Field | Description |
---|---|
id | string Output only. ID of the blob. |
digest | string Content-addressable identifier of the blob. |
size | int64 Size of the blob, specified in bytes. |
urls[] | string List of blob urls. |
Get
Returns the specified Image resource.
To get the list of available Image resources, make a List request.
rpc Get (GetImageRequest) returns (Image)
GetImageRequest
Field | Description |
---|---|
image_id | string Required. ID of the Docker image resource to return. To get the Docker image ID use a ImageService.List request. The maximum string length in characters is 50. |
Image
Field | Description |
---|---|
id | string Output only. ID of the Docker image. |
name | string Name of the Docker image. The name is unique within the registry. |
digest | string Content-addressable identifier of the Docker image. |
compressed_size | int64 Compressed size of the Docker image, specified in bytes. |
config | Blob Configuration of the Docker image. |
layers[] | Blob Layers of the Docker image. |
tags[] | string Tags of the Docker image. Each tag is unique within the repository. |
created_at | google.protobuf.Timestamp Output only. Creation timestamp in RFC3339 |
Blob
Field | Description |
---|---|
id | string Output only. ID of the blob. |
digest | string Content-addressable identifier of the blob. |
size | int64 Size of the blob, specified in bytes. |
urls[] | string List of blob urls. |
Delete
Deletes the specified Docker image.
rpc Delete (DeleteImageRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteImageMetadata
Operation.response:google.protobuf.Empty
DeleteImageRequest
Field | Description |
---|---|
image_id | string Required. ID of the Docker image to delete. To get Docker image ID use a ImageService.List request. 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 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 if operation finished successfully. |
DeleteImageMetadata
Field | Description |
---|---|
image_id | string ID of the Docker image that is being deleted. |