POST
/
cloud
/
v1
/
lifecycle_policy
/
{project_id}
/
{region_id}
/
estimate_max_policy_usage
Check snapshot policy quota
curl --request POST \
  --url https://api.gcore.com/cloud/v1/lifecycle_policy/{project_id}/{region_id}/estimate_max_policy_usage \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "action": "volume_snapshot",
  "name": "schedule_1",
  "schedules": [],
  "status": "active",
  "volume_ids": [
    "3ed9e2ce-f906-47fb-ba32-c25a3f63df4f"
  ]
}'
{
  "max_cost": {
    "currency_code": "USD",
    "price_per_hour": 0.01,
    "price_per_month": 7.2,
    "price_status": "show"
  },
  "max_volume_snapshot_count_usage": 2,
  "max_volume_snapshot_sequence_length": 2,
  "max_volume_snapshot_size_usage": 20
}

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

Body

application/json
action
enum<string>
required

Action that the policy will perform.

Available options:
volume_snapshot
name
string
required

Name of the lifecycle policy.

Examples:

"schedule_1"

schedules
Schedules · array

List of schedules associated with the policy.

Maximum length: 10
status
enum<string>

Current status of the lifecycle policy.

Available options:
active,
paused
volume_ids
string<uuid4>[]

List of volume IDs.

Examples:
["3ed9e2ce-f906-47fb-ba32-c25a3f63df4f"]

Response

200 - application/json

OK

max_cost
object
required

Total billed cost of all snapshots that can be created by the schedule. Cost of max_volume_snapshot_count_usage snapshots.

Examples:
{
"currency_code": "USD",
"discount_percent": 0.16,
"price_per_hour": 1,
"price_per_month": 720,
"price_status": "show",
"price_without_discount_per_month": 604.8
}
max_volume_snapshot_count_usage
integer
required

Count of snapshots that can be created if the schedule creates the maximum possible number of snapshots.

Examples:

2

max_volume_snapshot_sequence_length
integer
required

Maximum volume snapshot sequence length.

Examples:

2

max_volume_snapshot_size_usage
integer
required

The amount of memory in GiB that snapshots will take up if the schedule creates the maximum possible number of them.

Examples:

20