All Products
Search
Document Center

DataWorks:GetDeployment

Last Updated:Nov 21, 2024

Queries the information about a deployment package.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dataworks:*get
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectIdlongNo

The ID of the DataWorks workspace. You can click the Workspace Manage icon in the upper-right corner of the DataStudio page to go to the Workspace Management page and view the workspace ID.

10000
ProjectIdentifierstringNo

The GUID of the DataWorks workspace. You can view the GUID in the upper part of the DataStudio page. You can also select another GUID to switch to another workspace.

You must specify either this parameter or the ProjectId parameter to determine the DataWorks workspace to which the operation is applied.

dw_project
DeploymentIdlongYes

The ID of the deployment task. A deployment task ID is generated when you call the SubmitFile or DeployFile operation.

3000001

Response parameters

ParameterTypeDescriptionExample
object
HttpStatusCodeinteger

The HTTP status code returned.

200
ErrorMessagestring

The error message returned.

The connection does not exist.
RequestIdstring

The ID of the request. You can troubleshoot errors based on the ID.

0000-ABCD-EFG****
ErrorCodestring

The error code returned.

Invalid.Tenant.ConnectionNotExists
Successboolean

Indicates whether the request is successful.

true
Dataobject

The data about the deployment task.

Deploymentobject

The details of the deployment task.

Statusinteger

The status of the deployment task. Valid values: 0, 1, and 2. A value of 0 indicates that the task is ready. A value of 1 indicates that the task was successful. A value of 2 indicates that the task failed.

1
ErrorMessagestring

The error message that was returned when the deployment task failed. In this case, the value of the Status parameter is 2.

FromEnvironmentinteger

The environment in which the deployment task was run. Valid values: 0 and 1. A value of 0 indicates the on-premises environment. A value of 1 indicates the development environment.

0
ToEnvironmentinteger

The environment to which the file was deployed. Valid values: 1 and 2. A value of 1 indicates the development environment. A value of 2 indicates the production environment.

1
CheckingStatusinteger

The check status of one or more files in the deployment task. If the value of the ToEnvironment parameter is 1, the files can be deployed to the production environment only when the value of the Status parameter is 1 and the CheckingStatus parameter is empty. Valid values:

  • 7: The file failed the check.
  • 8: The file is being checked.
7
CreateTimelong

The time when the deployment task was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1593877765000
HandlerIdstring

The ID of the Alibaba Cloud account used by the user who ran the deployment task.

2003****
CreatorIdstring

The ID of the Alibaba Cloud account used by the user who created the deployment task.

20030****
ExecuteTimelong

The time when the deployment task was run. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1593877765000
Namestring

The name of the deployment task. The value is the same as the name of the specific deployment task that is displayed on the Release Package page in the Deploy module.

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

Examples

Sample success responses

JSONformat

{
  "HttpStatusCode": 200,
  "ErrorMessage": "The connection does not exist.",
  "RequestId": "0000-ABCD-EFG****",
  "ErrorCode": "Invalid.Tenant.ConnectionNotExists",
  "Success": true,
  "Data": {
    "Deployment": {
      "Status": 1,
      "ErrorMessage": "",
      "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": 507642378,
        "FileVersion": 7,
        "Status": 1
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
403Forbidden.AccessAccess is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition.No permission, please authorize
429Throttling.ApiThe request for this resource has exceeded your available limit.-
429Throttling.SystemThe DataWorks system is busy. Try again later.-
429Throttling.UserYour request is too frequent. Try again later.-
500InternalError.SystemAn internal system error occurred. Try again later.-
500InternalError.UserId.MissingAn internal system error occurred. Try again later.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history