All Products
Search
Document Center

:GetDeployment

更新時間:May 13, 2024

Queries the information about a deployment package.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action

String

Yes

GetDeployment

The operation that you want to perform. Set the value to GetDeployment.

ProjectId

Long

No

10000

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

ProjectIdentifier

String

No

dw_project

The unique identifier of the DataWorks workspace. You can click the identifier in the upper-left corner of the DataStudio page to switch to another workspace.

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

DeploymentId

Long

Yes

3000001

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

Response parameters

Parameter

Type

Example

Description

HttpStatusCode

Integer

200

The HTTP status code.

ErrorMessage

String

The connection does not exist.

The error message.

RequestId

String

0000-ABCD-EFG****

The request ID.

ErrorCode

String

Invalid.Tenant.ConnectionNotExists

The error code.

Success

Boolean

true

Indicates whether the request was successful.

Data

Object

The data returned.

Deployment

Object

The details of the deployment package.

Status

Integer

1

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

ErrorMessage

String

Success

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

FromEnvironment

Integer

0

The environment in which the deployment package was deployed. Valid values: 0 and 1. The value 0 indicates the on-premises environment. The value 1 indicates the development environment.

ToEnvironment

Integer

1

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

CheckingStatus

Integer

7

The check status of one or more files in the deployment package. 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 left empty. Valid values:

  • 7: check failed

  • 8: checking

CreateTime

Long

1593877765000

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

HandlerId

String

2003****

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

CreatorId

String

20030****

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

ExecuteTime

Long

1593877765000

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

Name

String

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

The name of the deployment package. The value is the same as the name of the specific deployment package that is displayed on the Deployment Packages page in Deploy.

DeployedItems

Array of DeployedItem

The deployed items.

FileId

Long

507642378

The file ID.

FileVersion

Long

7

The file version.

Status

Integer

1

The status. Valid values:

  • UNPUBLISHED(0): not deployed

  • SUCCESS(1): deployed

  • ERROR(2): deployment failed

  • CLONED(3): cloned

  • DEPLOY_ERROR(4): deployment failed

  • CLONING(5): cloning

  • REJECT(6): deployment request rejected

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetDeployment
&ProjectId=10000
&ProjectIdentifier=dw_project
&DeploymentId=3000001
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetDeploymentResponse>
    <HttpStatusCode>200</HttpStatusCode>
    <ErrorMessage>The connection does not exist.</ErrorMessage>
    <RequestId>0000-ABCD-EFG****</RequestId>
    <ErrorCode>Invalid.Tenant.ConnectionNotExists</ErrorCode>
    <Success>true</Success>
    <Data>
        <Deployment>
            <Status>1</Status>
            <ErrorMessage>Success</ErrorMessage>
            <FromEnvironment>0</FromEnvironment>
            <ToEnvironment>1</ToEnvironment>
            <CheckingStatus>7</CheckingStatus>
            <CreateTime>1593877765000</CreateTime>
            <HandlerId>2003****</HandlerId>
            <CreatorId>20030****</CreatorId>
            <ExecuteTime>1593877765000</ExecuteTime>
            <Name>ods_user_info_d-2020-07-04_20030****</Name>
        </Deployment>
        <DeployedItems>
            <FileId>507642378</FileId>
            <FileVersion>7</FileVersion>
            <Status>1</Status>
        </DeployedItems>
    </Data>
</GetDeploymentResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/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" : 507642378,
      "FileVersion" : 7,
      "Status" : 1
    }
  }
}

Error codes

HTTP status code

Error code

Error message

Description

429

Throttling.Api

The request for this resource has exceeded your available limit.

The number of requests for the resource has exceeded the upper limit.

429

Throttling.System

The DataWorks system is busy. Try again later.

The DataWorks system is busy. Try again later.

429

Throttling.User

Your request is too frequent. Try again later.

Excessive requests have been submitted within a short period of time. Try again later.

500

InternalError.System

An internal system error occurred. Try again later.

An internal error occurred. Try again later.

500

InternalError.UserId.Missing

An internal system error occurred. Try again later.

An internal error occurred. Try again later.

For a list of error codes, see Service error codes.