All Products
Search
Document Center

MaxCompute:ALLOW PROJECT

Last Updated:May 30, 2025

The resource provider grants permissions to other projects to install the package.

Syntax

allow project <project_name> to install package <package_name> [using label <number>];

Parameters

Parameter

Required

Description

project_name

Yes

The name of the MaxCompute project that you want to authorize to use the package.

Log on to the MaxCompute console. In the top navigation bar, select a region. On the Project management tab, obtain the name of the MaxCompute project.

package_name

Yes

The name of the package that is created.

You can run the show packages; command on the MaxCompute client to obtain the information about the package that you created.

number

No

This parameter is used to add a label-based access control policy. This parameter specifies the sensitivity level of data that a package user can access. The authorized MaxCompute project can access only the package data whose sensitivity level is lower than or equal to the level specified by number. If you do not specify this parameter, the sensitivity level is 0 by default.

For more information about label-based access control, see Label-based access control.

Examples

Execute the following command in the test_project_a project.

Authorize test_project_b to install the datashare package that is created in the test_project_a project. Sample statement:

-- Authorize the test_project_b project to install the datashare package. 
allow project test_project_b to install package datashare;

Related statements

  • CREATE PACKAGE: Creates a package.

  • ADD TO PACKAGE: Adds the resources that are required by package users to the package that is created.

  • REMOVE FROM PACKAGE: Removes resources from the package that is created.

  • DISALLOW PROJECT: A package creator revokes access permissions on a package from a project.

  • DESCRIBE PACKAGE: Views the details of a package that is created in a MaxCompute project.

  • DROP PACKAGE: Deletes a package.

  • INSTALL PACKAGE: Installs a package in a MaxCompute project.

  • UNINSTALL PACKAGE: Uninstalls a package that is installed from a MaxCompute project.

  • GRANT: Authorizes a user or role to access a package.

  • REVOKE: Revokes access permissions on a package from a user or role.

  • SHOW: Views the packages that are created or installed in a MaxCompute project.