All Products
Search
Document Center

MaxCompute:ALLOW PROJECT

Last Updated:Jul 18, 2023

A package creator in a project authorizes other projects to use the package that is created.

Syntax

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

Parameters

ParameterRequiredDescription
project_nameYesThe 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_nameYesThe name of the package that is created.

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

numberNoThis 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

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.