全部產品
Search
文件中心

Edge Security Acceleration:CreateRoutineCodeDeployment - 建立邊緣函數代碼版本部署

更新時間:Mar 20, 2026

用於在指定環境中按比例灰階發布Routine代碼版本。

介面說明

請求說明

  • 建立 Routine 代碼版本部署時,環境名Env僅支援填寫測試環境staging或生產環境production

  • CodeVersions參數最多支援兩個版本的灰階發布,並且這些版本的比例總和必須等於 100%。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

esa:CreateRoutineCodeDeployment

none

*全部資源

*

請求參數

名稱

類型

必填

描述

樣本值

Name

string

邊緣函數 Routine 名。

test

Env

string

環境名,目前只能輸入測試環境staging或生產環境production

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. 輸入的參數校正不通過,請您核對參數的正確性後重試。

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情