Skip to main content
POST
/
cloud
/
v2
/
pricing
/
{project_id}
/
{region_id}
/
lifecycle_policy
Preview snapshot policy price
curl --request POST \
  --url https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/lifecycle_policy \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "volume_ids": [
    "<string>"
  ],
  "schedules": []
}
'
{
  "currency_code": "AZN",
  "discount": 0.1,
  "per_hour": {
    "volumes": [
      {
        "discount": 0.1,
        "price": 123,
        "type": "cold"
      }
    ]
  },
  "per_month": {
    "volumes": [
      {
        "discount": 0.1,
        "price": 123,
        "type": "cold"
      }
    ]
  },
  "price_status": "error",
  "price_without_discount_per_month": 800,
  "tax_percent": 123,
  "total_price_per_hour": 1.02,
  "total_price_per_month": 734.4
}

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

Body

application/json
volume_ids
string<uuid4>[]
required

List of volume IDs.

Required array length: 1 - 100 elements
schedules
(CreateCronScheduleSerializer · object | CreateIntervalScheduleSerializer · object)[]

List of schedules associated with the policy.

Maximum array length: 10

List of schedules associated with the policy. If the schedule made 'max_quantity' snapshots, a new snapshot will be created in time, but the oldest from the schedules snapshots will be deleted. If 'retention_time' was set and the schedules snapshots will be delete after the specified period of time. In resource_name_template you can use such forms that will then be automatically filled in with values: '{volume_id}', '{schedule_id}', '{lifecycle_policy_id}', '{datetime_utc}', '{local_datetime}'.

  • CreateCronScheduleSerializer
  • CreateIntervalScheduleSerializer

Response

200 - application/json

OK

Billing response preview schema for server instance.

currency_code
enum<string>
required

Currency code (3-letter code per ISO 4217).

Available options:
AZN,
EUR,
USD
discount
number | null
required

Discount value within range [0..1] where 1 is 100%.

Example:

0.1

per_hour
VolumePricingWithDiscountPerPeriodSerializer · object
required

Prices per category charged per hour.

per_month
VolumePricingWithDiscountPerPeriodSerializer · object
required

Prices per category charged per month.

price_status
enum<string>
required

Price status for the UI.

Available options:
error,
hide,
show
price_without_discount_per_month
number | null
required

Total price VAT inclusive per month without discount.

Example:

800

tax_percent
number
required

Tax rate applied to the subtotal, represented as a percentage

total_price_per_hour
number | null
required

Total price VAT inclusive per hour.

Example:

1.02

total_price_per_month
number | null
required

Total price VAT inclusive per month.

Example:

734.4