Querying Reserved Instances of a Function
Function
This API is used to query reserved instances of a function.
URI
GET /v2/{project_id}/fgs/functions/reservedinstanceconfigs
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
function_urn |
No |
String |
Function URN. For details, see the function model descriptions. |
marker |
No |
String |
Start position of the current query. The default value is 0. Default: 0 Minimum: 1 Maximum: 64 |
limit |
No |
String |
Maximum number of data records returned in a request. Max.: 500. Default: 100. Default: 100 Minimum: 1 Maximum: 64 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
reserved_instances |
Array of ReservedInstanceConfigs objects |
Reserved instances. |
page_info |
PageInfo object |
|
count |
Long |
Number of functions. |
Parameter |
Type |
Description |
---|---|---|
function_urn |
String |
Function URN. |
qualifier_type |
String |
Limiting type. Options: version and alias. |
qualifier_name |
String |
Limit value. |
min_count |
Integer |
Number of reserved instances. |
idle_mode |
Boolean |
Whether to enable the idle mode. |
tactics_config |
TacticsConfig object |
Parameter |
Type |
Description |
---|---|---|
cron_configs |
Array of CronConfig objects |
Scheduled configuration list. |
metric_configs |
Array of MetricConfig objects |
Flow control configuration list. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Scheduled configuration name. |
cron |
String |
Cron expression. |
count |
Integer |
Number of started reserved instances. |
start_time |
Long |
Start time. |
expired_time |
Long |
Expiry time. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Flow control configuration name. |
type |
String |
Flow control type. |
threshold |
Integer |
Flow control threshold. |
min |
Integer |
Minimum value. |
Parameter |
Type |
Description |
---|---|---|
next_marker |
Long |
Next read location. |
previous_marker |
Long |
Previous read location. |
current_count |
Long |
Number of items on the current page. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
Query reserved instances of a function.
GET https://{Endpoint}/v2/{project_id}/fgs/functions/reservedinstanceconfigs
Example Responses
Status code: 200
OK
{ "reserved_instances" : [ { "function_urn" : "urn:fss:{region}:46b6f338fc3445b8846c71dfb1fbxxxx:function:default:xxxxx:latest", "qualifier_type" : "version", "qualifier_name" : "latest", "min_count" : 10, "idle_mode" : false, "tactics_config" : { "cron_configs" : [ { "name" : "cronConfig", "cron" : "0 1 * * * *", "count" : 15, "start_time" : 1658073600, "expired_time" : 1658160000 } ], "metric_configs" : [ { "name" : "metricConfig", "type" : "Concurrency", "threshold" : 90, "min" : 12 } ] } } ], "count" : 1, "page_info" : { "next_marker" : 1, "previous_marker" : 0, "current_count" : 1 } }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad request. |
401 |
Unauthorized. |
403 |
Forbidden. |
404 |
Not found. |
500 |
Internal server error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot