Container Registry API, gRPC: LifecyclePolicyService.List
Retrieves the list of lifecycle policies in the specified repository.
gRPC request
rpc List (ListLifecyclePoliciesRequest) returns (ListLifecyclePoliciesResponse)
ListLifecyclePoliciesRequest
{
// Includes only one of the fields `registry_id`, `repository_id`
"registry_id": "string",
"repository_id": "string",
// end of the list of possible fields
"page_size": "int64",
"page_token": "string",
"filter": "string",
"order_by": "string"
}
Field |
Description |
registry_id |
string ID of the lifecycle policy. Includes only one of the fields |
repository_id |
string Repository of the lifecycle policy. Includes only one of the fields |
page_size |
int64 The maximum number of results per page to return. If the number of available |
page_token |
string Page token. To get the next page of results, set |
filter |
string A filter expression that filters lifecycle policy resources listed in the response. The expression must specify:
|
order_by |
string Sorting the list by LifecyclePolicy.name, LifecyclePolicy.created_at and LifecyclePolicy.status fields. |
ListLifecyclePoliciesResponse
{
"lifecycle_policies": [
{
"id": "string",
"name": "string",
"repository_id": "string",
"description": "string",
"status": "Status",
"created_at": "google.protobuf.Timestamp",
"rules": [
{
"description": "string",
"expire_period": "google.protobuf.Duration",
"tag_regexp": "string",
"untagged": "bool",
"retained_top": "int64"
}
]
}
],
"next_page_token": "string"
}
Field |
Description |
lifecycle_policies[] |
List of lifecycle policies. |
next_page_token |
string Token for getting the next page of the list. If the number of results is greater than Each subsequent page will have its own |
LifecyclePolicy
Field |
Description |
id |
string ID of the lifecycle policy. |
name |
string Name of the lifecycle policy. |
repository_id |
string ID of the repository that the lifecycle policy belongs to. |
description |
string Description of the lifecycle policy. |
status |
enum Status Status of lifecycle policy.
|
created_at |
Creation timestamp. |
rules[] |
The rules of lifecycle policy. |
LifecycleRule
Field |
Description |
description |
string Description of the lifecycle policy rule. |
expire_period |
Period of time for automatic deletion. |
tag_regexp |
string Tag for specifying a filter in the form of a regular expression. |
untagged |
bool Tag for applying the rule to Docker images without tags. |
retained_top |
int64 Number of Docker images (falling under the specified filter by tags) that must be left, even if the expire_period has already expired. |