Deleting a lifecycle policy
Written by
To access the policy, use its ID. For information about getting a policy ID, see Getting information about lifecycle policies.
CLI
API
If you don't have the Yandex Cloud command line interface yet, install and initialize it.
-
Delete the policy by specifying its ID:
yc container repository lifecycle-policy delete crp6lg1868p3i0emkv1b
-
Make sure that the policy was deleted:
yc container repository lifecycle-policy list --repository-name crp2hlbs67tj4ggrfodb/ubuntu
Result:
+----+------+---------------+--------+---------+-------------+ | ID | NAME | REPOSITORY ID | STATUS | CREATED | DESCRIPTION | +----+------+---------------+--------+---------+-------------+ +----+------+---------------+--------+---------+-------------+
To delete a policy, use the Delete method for the LifecyclePolicyService resource. In the lifecycle_policy_id
parameter, specify a policy ID.
You can retrieve a list of policies using the List method for the LifecyclePolicyService resource.