compute

POST /v1/compute/servers/{serverId}/resize/quote

Get what resizing a server would cost, before the charge.

ចំណុចបញ្ចប់ compute ទាំងអស់

ការផ្ទៀងផ្ទាត់ភាពត្រឹមត្រូវ

បញ្ជូនសោ API ជា bearer token។ សោនេះត្រូវតែមានសិទ្ធិ sites.view។ សោដែលគ្មានសិទ្ធិនេះនឹងត្រូវបដិសេធដោយកូដ 403 មិនមែន 404 ទេ។

ចំនុចបញ្ចប់នេះមិនត្រូវការលេខសម្គាល់ស្ថាប័នទេ។ ពស័្ដកូនរបស់អ្នករួចហើយកំណត់អត្តសញ្ញាណស្ថាប័នដែលវាជាកម្មសិទ្ធិ ហើយការឆ្លើយតបគឺត្រូវបានកំណត់វិសាលភាពទៅតាមនោះ។

សាកល្បង

ជំនួសអ្វីមួយនៅក្នុងសញ្ញាពងក្រពើ < > ដោយប្រើតម្លៃផ្ទាល់ខ្លួនរបស់អ្នក ហើយជំនួសកន្លែងរក្សាទុកសោដោយប្រើសោចេញពីផ្ទាំងគ្រប់គ្រងរបស់អ្នក។

curl -X POST https://api.zinndigital.com/v1/compute/servers/{serverId}/resize/quote \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "spec": <string> }'

បានចូលគណនីរួចហើយមែនទេ? កុងសូល API ក្នុងផ្ទាំងគ្រប់គ្រងរបស់អ្នក បំពេញលេខសម្គាល់ស្ថាប័នពិតប្រាកដរបស់អ្នក និងសោផ្ទាល់ខ្លួនរបស់អ្នក ហើយដំណើរការសំណើទល់នឹង API ផ្ទាល់ ដូច្នេះអ្នកអាចមើលឃើញការឆ្លើយតបពិតប្រាកដ។ បើកចំណុចបញ្ចប់នេះក្នុងកុងសូល API

ព័ត៌មានលម្អិត

The provider's own figure for moving this machine to another size. A `POST` that changes nothing, deliberately: the size being quoted is a body field, and a quote is not a cacheable representation of a resource. ⛔ Showing it is not optional — an upgrade charged at an unstated amount is a refund request (§2.8). ⛔ `amount` is the provider's own **string**, unparsed, and it carries **no currency field**. Inventing one to fit a money type would put a number in front of a customer in the wrong currency, so a client renders it exactly as the provider stated it and labels it as the provider's estimate. `404` for a server that is not the caller's; `422` for a size the provider does not offer or a machine that is not in an operable state. Requires `sites.view` — reading a price commits to nothing.

ប៉ារ៉ាម៉ែត្រ

ឈ្មោះប្រភេទតម្រូវការតើវាជាអ្វី
serverId (path)Uuidបាទ/ចាសThe server's id, as `listComputeServers` reports it. **Ours** (UUIDv7), minted when the order row was written — never the provider's own identifier for the machine.

សំណើរបស់រាងកាយ

ឈ្មោះប្រភេទតម្រូវការតើវាជាអ្វី
specstringបាទ/ចាសThe target size, as `getComputeCatalogue` reported it.

ផ្អាកដំណើរការ

ឈ្មោះប្រភេទតម្រូវការតើវាជាអ្វី
specstringបាទ/ចាសThe size the figure is for.
amountstringបាទ/ចាសThe provider's figure, verbatim. Rendered as the provider stated it and labelled as the provider's estimate, never reformatted.
detailstringបាទ/ចាសWhatever else the provider said about the change, or `""`. Blank is common and is not an error.

កំហុសដែលចំណុចបញ្ចប់នេះអាចបង្វិលត្រឡប់មកវិញ

401 · 403 · 404 · 422 · 429 · 503