PATCH
/
cloud
/
v1
/
schedule
/
{project_id}
/
{region_id}
/
{schedule_id}
Update schedule
curl --request PATCH \
  --url https://api.gcore.com/cloud/v1/schedule/{project_id}/{region_id}/{schedule_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "day": "5",
  "day_of_week": "mon,fri",
  "days": 0,
  "hour": "0, 20",
  "hours": 2,
  "max_quantity": 2,
  "minute": "30",
  "minutes": 1,
  "month": "1,6",
  "resource_name_template": "Snapshot of volume {volume_id} created by policy {lifecycle_policy_id}",
  "retention_time": {
    "days": 0,
    "hours": 2,
    "minutes": 1,
    "weeks": 0
  },
  "timezone": "UTC",
  "type": "cron",
  "week": "1",
  "weeks": 0
}'
{
  "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": {
    "days": 0,
    "hours": 2,
    "minutes": 1,
    "weeks": 0
  },
  "timezone": "UTC",
  "type": "cron",
  "user_id": 12,
  "week": "1"
}

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

schedule_id
string
required

Schedule ID

Examples:

"1488e2ce-f906-47fb-ba32-c25a3f63df4f"

Body

application/json
day
string

Day of the month (1-31, '*') or a comma-separated list of days

Examples:

"5"

day_of_week
string

Weekday or a comma-separated list of weekdays (mon,tue,wed,thu,fri,sat,sun,*)

Examples:

"mon,fri"

days
integer

Number of days to wait

Examples:

0

hour
string

Hour (0-23, '*') or a comma-separated list of hours

Examples:

"0, 20"

hours
integer

Number of hours to wait

Examples:

2

max_quantity
integer

Number of stored resources.

Required range: 0 < x <= 10000
Examples:

2

minute
string

Minute (0-59, '*') or a comma-separated list of minutes

Examples:

"30"

minutes
integer

Number of minutes to wait

Examples:

1

month
string

Month (1-12, '*') or a comma-separated list of months

Examples:

"1,6"

resource_name_template
string

Template for resource names.

Examples:

"Snapshot of volume {volume_id} created by policy {lifecycle_policy_id}"

retention_time
object

Time after which the resource will be deleted

timezone
string

A pytz timezone. Defaults to UTC.

Examples:

"UTC"

type
enum<string>

Type of the schedule.

Available options:
cron,
interval
Examples:

"cron"

week
string

ISO week (1-53, '*') or a comma-separated list of weeks

Examples:

"1"

weeks
integer

Number of weeks to wait

Examples:

0

Response

200 - application/json

OK

id
string
required

Schedule ID

Examples:

"1488e2ce-f906-47fb-ba32-c25a3f63df4f"

max_quantity
integer
required

Number of stored resources.

Required range: 0 < x <= 10000
Examples:

2

owner
string
required

Schedule owner

Examples:

"lifecycle_policy"

owner_id
integer
required

Owner ID

Examples:

1

retention_time
object | null
required

Time after which the resource will be deleted

type
string
required

Schedule type

Allowed value: "cron"
Examples:

"cron"

user_id
integer
required

User ID

Examples:

12

day
string | null

Day of the month (1-31, '*') or a comma-separated list of days

Examples:

"5"

day_of_week
string | null

Weekday or a comma-separated list of weekdays (mon,tue,wed,thu,fri,sat,sun,*)

Examples:

"mon,fri"

hour
string | null

Hour (0-23, '*') or a comma-separated list of hours

Examples:

"0, 20"

minute
string | null

Minute (0-59, '*') or a comma-separated list of minutes

Examples:

"30"

month
string | null

Month (1-12, '*') or a comma-separated list of months

Examples:

"1,6"

resource_name_template
string | null

Template for resource names

Examples:

"reserve snap of the volume {volume_id}"

timezone
string | null

A pytz timezone. Defaults to UTC.

Examples:

"UTC"

week
string | null

ISO week (1-53, '*') or a comma-separated list of weeks

Examples:

"1"