v32

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-151,1412,2144.5 MB
Snapshot Schedules

Create snapshot policy

Create a new snapshot policy with the specified configuration.

post/cloud/v1/lifecycle_policy/{project_id}/{region_id}

Path parameters

project_idinteger required

Project ID

Example:1

Project ID

region_idinteger required

Region ID

Example:1

Region ID

Request body

action'volume_snapshot' required
namestring required

Name of the lifecycle policy.

status'active' | 'paused'
volume_idsstring[]

List of volume IDs.

Example request

{
  "name": "schedule_1",
  "schedules": [
    {
      "day": "5",
      "day_of_week": "mon,fri",
      "hour": "0, 20",
      "max_quantity": 2,
      "minute": "30",
      "month": "1,6",
      "resource_name_template": "Snapshot of volume {volume_id} created by policy {lifecycle_policy_id}",
      "retention_time": {
        "hours": 2,
        "minutes": 1
      },
      "timezone": "UTC",
      "type": "cron",
      "week": "1"
    }
  ],
  "volume_ids": [
    "3ed9e2ce-f906-47fb-ba32-c25a3f63df4f"
  ]
}

Response

OK

actionstring required

Action associated with the lifecycle policy.

idinteger required

Unique identifier for the policy.

namestring required

Name of the policy.

project_idinteger required

Project ID associated with the policy.

region_idinteger required

Region ID where the policy is applied.

status'active' | 'paused' required
user_idinteger required

User ID of the creator of the policy.

Example response

{
  "action": "volume_snapshot",
  "id": 1,
  "name": "schedule_1",
  "project_id": 1,
  "region_id": 1,
  "schedules": [
    {
      "day": "5",
      "day_of_week": "mon,fri",
      "hour": "0, 20",
      "id": "1488e2ce-f906-47fb-ba32-c25a3f63df4f",
      "max_quantity": 2,
      "minute": "30",
      "month": "1,6",
      "owner": "lifecycle_policy",
      "owner_id": 1,
      "resource_name_template": "reserve snap of the volume {volume_id}",
      "retention_time": {
        "hours": 2,
        "minutes": 1
      },
      "timezone": "UTC",
      "type": "cron",
      "user_id": 12,
      "week": "1"
    }
  ],
  "user_id": 11,
  "volumes": [
    {
      "volume_id": "3ed9e2ce-f906-47fb-ba32-c25a3f63df4f",
      "volume_name": "test schedule"
    }
  ]
}