Skip to main content
POST
/
cloud
/
v1
/
lifecycle_policy
/
{project_id}
/
{region_id}
/
{policy_id}
/
remove_schedules
Remove schedules from policy
curl --request POST \
  --url https://api.gcore.com/cloud/v1/lifecycle_policy/{project_id}/{region_id}/{policy_id}/remove_schedules \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "schedule_ids": [
    "<string>"
  ]
}
'
{
  "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>"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID Project ID

region_id
integer
required

Region ID Region ID

policy_id
integer
required

Lifecycle policy ID. Lifecycle policy ID.

Body

application/json
schedule_ids
string[]
required

List of schedule IDs.

Response

200 - application/json

OK

action
string
required

Action associated with the lifecycle policy.

id
integer
required

Unique identifier for the policy.

name
string
required

Name of the policy.

project_id
integer
required

Project ID associated with the policy.

region_id
integer
required

Region ID where the policy is applied.

schedules
(GetCronScheduleSerializer · object | GetIntervalScheduleSerializer · object)[]
required

List of schedules within the policy.

  • GetCronScheduleSerializer
  • GetIntervalScheduleSerializer
status
enum<string>
required

Status of the lifecycle policy.

Available options:
active,
paused
user_id
integer
required

User ID of the creator of the policy.

volumes
VolumeDataForLifecyclePolicySerializer · object[]
required

Data of volumes that should be reserved. Displayed only when the query parameter is specified.