全部產品
Search
文件中心

DataWorks:GetDeployment - 擷取發布包的詳情

更新時間:Mar 21, 2026

調用GetDeployment擷取發布包的詳情。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

dataworks:*

get

*全部資源

*

請求參數

名稱

類型

必填

描述

樣本值

ProjectId

integer

DataWorks 工作空間的 ID,您可以單擊頁面右上方的小扳手表徵圖,進入工作空間管理頁面查看。

10000

ProjectIdentifier

string

DataWorks 工作空間的唯一識別碼,即資料開發頁面頂部切換工作空間處的英文標識。

該參數與 ProjectId 參數二者必須設定其一,以確定本次 API 呼叫操作的 DataWorks 工作空間。

dw_project

DeploymentId

integer

發布包的 ID。執行 SubmitFileDeployFile 時,都會產生一個對應的發布包 ID。

3000001

返回參數

名稱

類型

描述

樣本值

object

返回資料結構。

HttpStatusCode

integer

HTTP 狀態代碼。

200

ErrorMessage

string

錯誤資訊。

The connection does not exist.

RequestId

string

本次調用的唯一 ID。出現錯誤後,您可以根據該 ID 排查問題。

0000-ABCD-EFG****

ErrorCode

string

錯誤碼。

Invalid.Tenant.ConnectionNotExists

Success

boolean

調用是否成功。

true

Data

object

發布包的詳情。

Deployment

object

發布包的詳情。

Status

integer

發布包當前的狀態,包括 0(就緒)、1(成功)和 2(失敗)。

1

ErrorMessage

string

當發布包執行失敗(status 為 2)後,該欄位記錄具體的錯誤資訊。

Success

FromEnvironment

integer

執行本次發布所在的環境,包括 0(本地)和 1(開發環境)。

0

ToEnvironment

integer

發布檔案資訊的目標環境,包括 1(開發環境)和 2(生產環境)。

1

CheckingStatus

integer

當前發布包涉及節點的檢查狀態,當發布包的目標環境是開發環境(toEnviroment=1)時,只有發布包的 Status 為 1 並且 CheckingStatus 為空白時,才可以繼續進行檔案到生產環境的發布。

  • 7:檢查未通過

  • 8:正在處於檢查中的狀態

7

CreateTime

integer

發布包產生的毫秒時間戳記。

1593877765000

HandlerId

string

發布包執行者的阿里雲使用者識別碼。

2003****

CreatorId

string

發布包建立者的阿里雲使用者識別碼。

20030****

ExecuteTime

integer

發布包開始執行的毫秒時間戳記。

1593877765000

Name

string

發布包的名稱,顯示在任務發布>發布包列表頁面。

ods_user_info_d-2020-07-04_20030****

DeployedItems

array<object>

發布項列表。

object

發布項詳情

FileId

integer

檔案的 ID。

5076****

FileVersion

integer

檔案的版本。

7

Status

integer

  • UNPUBLISHED(0): 未發布

  • SUCCESS(1): 發布成功

  • ERROR(2): 發布失敗

  • CLONED(3): 複製成功

  • DEPLOY_ERROR(4): 發布失敗

  • CLONING(5): 複製中

  • REJECT(6): 發布駁回

1

樣本

正常返回樣本

JSON格式

{
  "HttpStatusCode": 200,
  "ErrorMessage": "The connection does not exist.",
  "RequestId": "0000-ABCD-EFG****",
  "ErrorCode": "Invalid.Tenant.ConnectionNotExists",
  "Success": true,
  "Data": {
    "Deployment": {
      "Status": 1,
      "ErrorMessage": "Success",
      "FromEnvironment": 0,
      "ToEnvironment": 1,
      "CheckingStatus": 7,
      "CreateTime": 1593877765000,
      "HandlerId": "2003****",
      "CreatorId": "20030****",
      "ExecuteTime": 1593877765000,
      "Name": "ods_user_info_d-2020-07-04_20030****"
    },
    "DeployedItems": [
      {
        "FileId": 0,
        "FileVersion": 7,
        "Status": 1
      }
    ]
  }
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

500 InternalError.System An internal system error occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. 沒有許可權,請授權
429 Throttling.Api The request for this resource has exceeded your available limit.
429 Throttling.System The DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later.

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

變更歷史

更多資訊,參考變更詳情