Container Registry API, gRPC: LifecyclePolicyService.Get
Returns the specified lifecycle policy.
To get the list of all available lifecycle policies, make a List request.
gRPC request
rpc Get (GetLifecyclePolicyRequest) returns (LifecyclePolicy)
GetLifecyclePolicyRequest
{
"lifecycle_policy_id": "string"
}
Field |
Description |
lifecycle_policy_id |
string Required field. ID of the lifecycle policy. |
LifecyclePolicy
{
"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"
}
]
}
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. |