功能介紹
修改函數(shù)預(yù)留實(shí)例數(shù)量。
調(diào)試
您可以在API Explorer中調(diào)試該接口,支持自動(dòng)認(rèn)證鑒權(quán)。API Explorer可以自動(dòng)生成SDK代碼示例,并提供SDK代碼示例調(diào)試功能。
URI
PUT /v2/{project_id}/fgs/functions/{function_urn}/reservedinstances
參數(shù) |
是否必選 |
參數(shù)類型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
租戶項(xiàng)目 ID,獲取方式請參見獲取項(xiàng)目ID。 |
function_urn |
是 |
String |
函數(shù)的URN,詳細(xì)解釋見FunctionGraph函數(shù)模型的描述。 |
請求參數(shù)
參數(shù) |
是否必選 |
參數(shù)類型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
用戶Token。 通過調(diào)用 IAM 服務(wù)獲取用戶Token接口獲?。憫?yīng)消息頭中X-Subject-Token的值)。 |
參數(shù) |
是否必選 |
參數(shù)類型 |
描述 |
---|---|---|---|
count |
是 |
Integer |
預(yù)留實(shí)例個(gè)數(shù) |
idle_mode |
否 |
Boolean |
是否開啟閑置模式配置 |
tactics_config |
否 |
響應(yīng)參數(shù)
狀態(tài)碼: 200
參數(shù) |
參數(shù)類型 |
描述 |
---|---|---|
count |
Integer |
預(yù)留實(shí)例個(gè)數(shù) |
idle_mode |
Boolean |
是否開啟閑置模式配置 |
tactics_config |
參數(shù) |
參數(shù)類型 |
描述 |
---|---|---|
name |
String |
定時(shí)配置名稱 |
cron |
String |
定時(shí)表達(dá)式 |
count |
Integer |
拉起預(yù)留實(shí)例個(gè)數(shù) |
start_time |
Long |
開始時(shí)間戳 |
expired_time |
Long |
失效時(shí)間戳 |
參數(shù) |
參數(shù)類型 |
描述 |
---|---|---|
name |
String |
流量配置名稱 |
type |
String |
流量配置類型 |
threshold |
Integer |
流量閾值 |
min |
Integer |
流量最小值 |
狀態(tài)碼: 400
參數(shù) |
參數(shù)類型 |
描述 |
---|---|---|
error_code |
String |
錯(cuò)誤碼 |
error_msg |
String |
錯(cuò)誤信息 |
狀態(tài)碼: 401
參數(shù) |
參數(shù)類型 |
描述 |
---|---|---|
error_code |
String |
錯(cuò)誤碼 |
error_msg |
String |
錯(cuò)誤信息 |
狀態(tài)碼: 403
參數(shù) |
參數(shù)類型 |
描述 |
---|---|---|
error_code |
String |
錯(cuò)誤碼 |
error_msg |
String |
錯(cuò)誤信息 |
狀態(tài)碼: 404
參數(shù) |
參數(shù)類型 |
描述 |
---|---|---|
error_code |
String |
錯(cuò)誤碼 |
error_msg |
String |
錯(cuò)誤信息 |
狀態(tài)碼: 500
參數(shù) |
參數(shù)類型 |
描述 |
---|---|---|
error_code |
String |
錯(cuò)誤碼 |
error_msg |
String |
錯(cuò)誤信息 |
請求示例
將函數(shù)預(yù)留實(shí)例數(shù)量更新為3。
PUT https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/reservedinstances { "count" : 3 }
響應(yīng)示例
狀態(tài)碼: 200
OK
{ "count" : 2 }
狀態(tài)碼
狀態(tài)碼 |
描述 |
---|---|
200 |
OK |
400 |
Bad Request 請求錯(cuò)誤。 |
401 |
Unauthorized 鑒權(quán)失敗。 |
403 |
Forbidden 沒有操作權(quán)限。 |
404 |
Not Found 找不到資源。 |
500 |
Internal Server Error 服務(wù)內(nèi)部錯(cuò)誤。 |
錯(cuò)誤碼
請參見錯(cuò)誤碼。
最新文章
- 函數(shù)工作流使用流程_Serverless_函數(shù)工作流 FunctionGraph-華為云
- 使用函數(shù)工作流資源成本降低70%_函數(shù)能力_函數(shù)工作流 FunctionGraph-華為云
- 什么是函數(shù)工作流_functiongraph是什么_函數(shù)工作流服務(wù)
- GaussDB函數(shù)_GaussDB數(shù)據(jù)庫函數(shù)_高斯數(shù)據(jù)庫函數(shù)_華為云
- 如何規(guī)劃VPC數(shù)量_如何規(guī)劃VPC子網(wǎng)_如何規(guī)劃VPC路由策略
- Serverless 應(yīng)用生態(tài)