Skip to main content
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": "<string>",
  "day_of_week": "<string>",
  "days": 123,
  "hour": "<string>",
  "hours": 123,
  "max_quantity": 123,
  "minute": "<string>",
  "minutes": 123,
  "month": "<string>",
  "resource_name_template": "<string>",
  "retention_time": {
    "days": 123,
    "hours": 123,
    "minutes": 123,
    "weeks": 123
  },
  "timezone": "<string>",
  "type": "cron",
  "week": "<string>",
  "weeks": 123
}
'
{
  "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"
}

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

schedule_id
string
required

Schedule ID Schedule ID

Body

application/json
day
string

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

day_of_week
string

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

days
integer

Number of days to wait

hour
string

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

hours
integer

Number of hours to wait

max_quantity
integer

Number of stored resources.

Required range: x <= 10000
minute
string

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

minutes
integer

Number of minutes to wait

month
string

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

resource_name_template
string

Template for resource names.

retention_time
CreateIntervalTimeSerializer · object

Time after which the resource will be deleted

timezone
string

A pytz timezone. Defaults to UTC.

type
enum<string>

Type of the schedule.

Available options:
cron,
interval
week
string

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

weeks
integer

Number of weeks to wait

Response

200 - application/json

OK

  • GetCronScheduleSerializer
  • GetIntervalScheduleSerializer
id
string
required

Schedule ID

max_quantity
integer
required

Number of stored resources.

Required range: x <= 10000
owner
string
required

Schedule owner

owner_id
integer
required

Owner ID

retention_time
RetentionTimeSerializer · object
required

Time after which the resource will be deleted

type
string
required

Schedule type

Allowed value: "cron"
user_id
integer
required

User ID

day
string | null

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

Example:

"5"

day_of_week
string | null

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

Example:

"mon,fri"

hour
string | null

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

Example:

"0, 20"

minute
string | null

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

Example:

"30"

month
string | null

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

Example:

"1,6"

resource_name_template
string | null

Template for resource names

Example:

"reserve snap of the volume {volume_id}"

timezone
string | null

A pytz timezone. Defaults to UTC.

Example:

"UTC"

week
string | null

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

Example:

"1"