curl --request GET \
--url https://api.gcore.com/cloud/v1/lifecycle_policy/{project_id}/{region_id} \
--header 'Authorization: <api-key>'{
"count": 1,
"results": [
{
"action": "<string>",
"id": 123,
"name": "<string>",
"project_id": 123,
"region_id": 123,
"schedules": [
{
"id": "<string>",
"max_quantity": 123,
"owner": "<string>",
"owner_id": 123,
"retention_time": {
"days": 0,
"hours": 2,
"minutes": 1,
"weeks": 0
},
"type": "<string>",
"user_id": 123,
"day": "5",
"day_of_week": "mon,fri",
"hour": "0, 20",
"minute": "30",
"month": "1,6",
"resource_name_template": "reserve snap of the volume {volume_id}",
"timezone": "UTC",
"week": "1"
}
],
"status": "active",
"user_id": 123,
"volumes": [
{
"volume_id": "<string>",
"volume_name": "<string>"
}
]
}
]
}List all snapshot policies in the specified project and region.
curl --request GET \
--url https://api.gcore.com/cloud/v1/lifecycle_policy/{project_id}/{region_id} \
--header 'Authorization: <api-key>'{
"count": 1,
"results": [
{
"action": "<string>",
"id": 123,
"name": "<string>",
"project_id": 123,
"region_id": 123,
"schedules": [
{
"id": "<string>",
"max_quantity": 123,
"owner": "<string>",
"owner_id": 123,
"retention_time": {
"days": 0,
"hours": 2,
"minutes": 1,
"weeks": 0
},
"type": "<string>",
"user_id": 123,
"day": "5",
"day_of_week": "mon,fri",
"hour": "0, 20",
"minute": "30",
"month": "1,6",
"resource_name_template": "reserve snap of the volume {volume_id}",
"timezone": "UTC",
"week": "1"
}
],
"status": "active",
"user_id": 123,
"volumes": [
{
"volume_id": "<string>",
"volume_name": "<string>"
}
]
}
]
}API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
OK
Number of objects
x >= 0Objects
Show child attributes
Action associated with the lifecycle policy.
Unique identifier for the policy.
Name of the policy.
Project ID associated with the policy.
Region ID where the policy is applied.
List of schedules within the policy.
Show child attributes
Schedule ID
Number of stored resources.
x <= 10000Schedule owner
Owner ID
Time after which the resource will be deleted
Show child attributes
Number of days to wait
0
Number of hours to wait
2
Number of minutes to wait
1
Number of weeks to wait
0
Schedule type
"cron"User ID
Day of the month (1-31, '*') or a comma-separated list of days
"5"
Weekday or a comma-separated list of weekdays (mon,tue,wed,thu,fri,sat,sun,*)
"mon,fri"
Hour (0-23, '*') or a comma-separated list of hours
"0, 20"
Minute (0-59, '*') or a comma-separated list of minutes
"30"
Month (1-12, '*') or a comma-separated list of months
"1,6"
Template for resource names
"reserve snap of the volume {volume_id}"
A pytz timezone. Defaults to UTC.
"UTC"
ISO week (1-53, '*') or a comma-separated list of weeks
"1"
Status of the lifecycle policy.
active, paused User ID of the creator of the policy.
Was this page helpful?