用於在指定環境中按比例灰階發布Routine代碼版本。
介面說明
請求說明
建立 Routine 代碼版本部署時,環境名
Env僅支援填寫測試環境staging或生產環境production。CodeVersions參數最多支援兩個版本的灰階發布,並且這些版本的比例總和必須等於 100%。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
esa:CreateRoutineCodeDeployment |
none |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| Name |
string |
是 |
邊緣函數 Routine 名。 |
test |
| Env |
string |
是 |
環境名,目前只能輸入測試環境 |
staging |
| Strategy |
string |
是 |
部署策略,目前只能輸入固定字串 percentage。 |
percentage |
| CodeVersions |
array<object> |
是 |
比例灰階版本號碼配置列表。最多支援兩個版本號碼,且總比例之和等於 100。 |
|
|
object |
是 |
比例灰階版本號碼單條配置。 |
||
| Percentage |
integer |
是 |
代碼版本灰階比例。取值 1-100。 |
100 |
| CodeVersion |
string |
是 |
代碼版本號碼。 |
1723599747213377175 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
該條工作要求 Id。 |
EDBD3EB3-97DA-5465-AEF5-8DCA5DC5E395 |
| Strategy |
string |
灰階發布策略,固定字串“percentage”。 |
percentage |
| DeploymentId |
string |
部署記錄 ID。 |
234 |
| CodeVersions |
array<object> |
比例灰階代碼版本號碼配置列表。 |
|
|
object |
比例灰階代碼單條版本號碼配置。 |
||
| Percentage |
integer |
代碼版本灰階比例。 |
100 |
| CodeVersion |
string |
代碼版本號碼。 |
1723599747213377175 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "EDBD3EB3-97DA-5465-AEF5-8DCA5DC5E395",
"Strategy": "percentage",
"DeploymentId": "234",
"CodeVersions": [
{
"Percentage": 100,
"CodeVersion": "1723599747213377175"
}
]
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | 調用服務失敗,請稍後重試或聯絡客服諮詢詳情。 |
| 400 | RoutineNotExist | The routine name does not exist. Check the routine name and try again. | 輸入的函數名不存在,請您核對函數名,再重試。 |
| 400 | ParameterNotExist | The specified parameter does not exist. Check your configurations and try again. | 輸入參數不存在,請您核對後重試。 |
| 400 | InternalOperationError | Failed to call the service. Try again later or contact technical support. | 調用服務失敗,請稍後重試或聯絡客服諮詢詳情。 |
| 400 | DependedByOthers | Failed to call the service. Try again later or contact technical support. | 調用服務失敗,請稍後重試或聯絡客服諮詢詳情。 |
| 400 | RoutineUserServiceStatusHalt | Failed to update the configurations because you have overdue payments. | 使用者處於停機狀態,不能進行更新操作。 |
| 400 | InvalidParameter | Parameter verification failed. Check your configurations and try again. | 輸入的參數校正不通過,請您核對參數的正確性後重試。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。