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": [
    "1488e2ce-f906-47fb-ba32-c25a3f63df4f"
  ]
}'
{
  "action": "volume_snapshot",
  "id": 1,
  "name": "schedule_1",
  "project_id": 1,
  "region_id": 1,
  "schedules": [
    {
      "day_of_week": "*",
      "hour": "0, 10, 20",
      "id": "1488e2ce-f906-47fb-ba32-c25a3f63df4f",
      "max_quantity": 2,
      "minute": "30",
      "owner": "lifecycle_policy",
      "owner_id": 1,
      "resource_name_template": "reserve snap of the volume {volume_id}",
      "type": "cron",
      "user_id": 12
    }
  ],
  "status": "active",
  "user_id": 11,
  "volumes": [
    {
      "volume_id": "3ed9e2ce-f906-47fb-ba32-c25a3f63df4f",
      "volume_name": "test schedule"
    }
  ]
}

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

Examples:

1

region_id
integer
required

Region ID

Examples:

1

policy_id
integer
required

Lifecycle policy ID.

Examples:

1

Body

application/json
schedule_ids
string[]
required

List of schedule IDs.

Examples:
["1488e2ce-f906-47fb-ba32-c25a3f63df4f"]

Response

200 - application/json

OK

action
string
required

Action associated with the lifecycle policy.

Examples:

"volume_snapshot"

id
integer
required

Unique identifier for the policy.

Examples:

1

name
string
required

Name of the policy.

Examples:

"schedule_1"

project_id
integer
required

Project ID associated with the policy.

Examples:

1

region_id
integer
required

Region ID where the policy is applied.

Examples:

1

schedules
Schedules · array
required

List of schedules within the policy.

Examples:
[
{
"day_of_week": "*",
"hour": "0, 10, 20",
"id": "1488e2ce-f906-47fb-ba32-c25a3f63df4f",
"max_quantity": 2,
"minute": "30",
"owner": "lifecycle_policy",
"owner_id": 1,
"resource_name_template": "reserve snap of the volume {volume_id}",
"type": "cron",
"user_id": 12
}
]
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.

Examples:

11

volumes
VolumeDataForLifecyclePolicySerializer · object[]
required

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

Examples:
[
{
"volume_id": "3ed9e2ce-f906-47fb-ba32-c25a3f63df4f",
"volume_name": "test schedule"
}
]