All Products
Search
Document Center

MaxCompute:GetPackage - 获取Package信息

Last Updated:Aug 20, 2026

获取package信息。

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

odps:GetPackage

get

*Project

acs:odps:{#regionId}:{#accountId}:projects/{#ProjectName}

None None

Request syntax

GET /api/v1/projects/{projectName}/packages/{packageName} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

projectName

string

Yes

MaxCompute 项目名称

projectA

packageName

string

Yes

package 名称

test_package

Request parameters

Parameter

Type

Required

Description

Example

sourceProject

string

No

package 所属项目。如果 package 是 install 的,此参数必填。

projectB

Response elements

Element

Type

Description

Example

object

PopResult

requestId

string

请求 id

0b57ff8316614119858417939e3e54

httpCode

integer

业务成功与否。如果非空且不是 200,那么表示业务处理失败。

200

errorCode

string

错误码

040002

errorMsg

string

错误信息

异常信息

data

object

返回数据

allowedProjectList

array<object>

已经安装的项目列表

object

已经安装的项目列表

label

string

指定安全许可标签级别

2

project

string

maxcompute 项目名称

proejctB

resourceList

object

package 内包含的资源详情

table

array<object>

表列表

object

表列表

name

string

表名称

dim_odps

schemaName

string

schema 名称。

default

actions

array

表操作

string

表操作

describe

resource

array<object>

资源列表

object

资源列表

name

string

资源名称

res_1

schemaName

string

schema 名称。

default

actions

array

资源的操作

string

资源的操作

read

function

array<object>

函数列表

object

函数列表

name

string

函数名称

function_1

schemaName

string

schema 名称。

default

actions

array

函数操作

string

函数操作

read

Examples

Success response

JSON format

{
  "requestId": "0b57ff8316614119858417939e3e54",
  "httpCode": 200,
  "errorCode": "040002",
  "errorMsg": "异常信息",
  "data": {
    "allowedProjectList": [
      {
        "label": "2",
        "project": "proejctB"
      }
    ],
    "resourceList": {
      "table": [
        {
          "name": "dim_odps\n",
          "schemaName": "default",
          "actions": [
            "describe"
          ]
        }
      ],
      "resource": [
        {
          "name": "res_1",
          "schemaName": "default",
          "actions": [
            "read"
          ]
        }
      ],
      "function": [
        {
          "name": "function_1",
          "schemaName": "default",
          "actions": [
            "read"
          ]
        }
      ]
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.