全部產品
Search
文件中心

ENS:DistApplicationData - 分發資料到目標資源執行個體

更新時間:Mar 20, 2026

調用DistApplicationData分發已預推成功的資料到應用的邊緣資源執行個體,目標邊緣資源的範圍支援多種灰階策略,同時支援檔案解壓縮與容器重啟。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

ens:DistApplicationData

update

*全部資源

*

請求參數

名稱

類型

必填

描述

樣本值

AppId

string

應用 ID。擷取 AppId,請參見 ListApplications。

e76f8985-7965-41fc-925b-9648bb6bf650

Data

string

分發的資料檔案列表,Json 數組的字串格式。

[{\"name\":\"app01\", \"version\":\"1.0\", \"destPath\":\"/root/installed\", \"decompress\":true, \"targetDirName\":\"target01\", \"fileMode\":755, \"timeout\":1000 }, { \"name\":\"app02\", \"version\":\"1.1\", \"destPath\":\"/tmp/test.txt\", \"decompress\":false }]

DistStrategy

string

灰階分發策略,Json 格式的字串,支援多種分發策略,預設全量分發。

{\"name\":\"ScheduleToAllByMatchExpressions\",\"parameters\":{\"match_expressions\":[{\"key\":\"region_id\",\"operator\":\"In\",\"values\":[\"cn-wuhan-telecom_unicom_cmcc-2\"]}]}}

返回參數

名稱

類型

描述

樣本值

object

RequestId

string

請求 ID。

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

DistInstanceTotalCount

integer

目標邊緣資源執行個體 ID 的總數。

2

DistInstanceIds

object

DistInstanceId

array

目標邊緣資源執行個體 ID 列表。

string

執行個體 ID。

i-xxx

DistResults

object

DistResult

array<object>

各個資料檔案的分發操作執行結果。

object

資料檔案的分發操作執行結果。

ResultDescrip

string

分髮結果描述資訊。

Success

Version

string

資料檔案版本號碼。

standard

ResultCode

integer

分發執行結果錯誤碼。枚舉類型。

400

Name

string

資料檔案名。

gcs-prod-websocket-eip-unicom

樣本

正常返回樣本

JSON格式

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "DistInstanceTotalCount": 2,
  "DistInstanceIds": {
    "DistInstanceId": [
      "i-xxx"
    ]
  },
  "DistResults": {
    "DistResult": [
      {
        "ResultDescrip": "Success",
        "Version": "standard",
        "ResultCode": 400,
        "Name": "gcs-prod-websocket-eip-unicom"
      }
    ]
  }
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 NoPermission Permission denied.
400 InvalidParameter.%s The specified field %s invalid. Please check it again.

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

變更歷史

更多資訊,參考變更詳情