Todos os produtos
Search
Central de documentação

MaxCompute:ListProjects

Última atualização: Jul 04, 2026

Obtém uma lista de projetos do MaxCompute.

Experimente agora

Experimente esta API no OpenAPI Explorer, sem necessidade de assinatura manual. Chamadas bem-sucedidas geram automaticamente código SDK correspondente aos seus parâmetros. Faça o download com segurança de credenciais integrada para uso local.

Testar

Autorização RAM

A tabela abaixo descreve a autorização necessária para chamar esta API. Você pode defini-la em uma política do Resource Access Management (RAM). As colunas da tabela estão detalhadas abaixo:

  • Ação: As ações que podem ser usadas no elemento Action das instruções de política de permissão do RAM para conceder permissões para executar a operação.

  • API: A API que você pode chamar para executar a ação.

  • Nível de acesso: O nível de acesso predefinido concedido para cada API. Valores válidos: create, list, get, update e delete.

  • Tipo de recurso: O tipo de recurso que suporta autorização para executar a ação. Indica se a ação suporta permissão em nível de recurso. O recurso especificado deve ser compatível com a ação. Caso contrário, a política será ineficaz.

    • Para APIs com permissões em nível de recurso, os tipos de recursos obrigatórios são marcados com um asterisco (*). Especifique o Nome de Recurso Alibaba Cloud (ARN) correspondente no elemento Resource da política.

    • Para APIs sem permissões em nível de recurso, é exibido como Todos os Recursos. Use um asterisco (*) no elemento Resource da política.

  • Chave de condição: As chaves de condição definidas pelo serviço. A chave permite controle granular, aplicando-se somente a ações ou a ações associadas a recursos específicos. Além das chaves de condição específicas do serviço, o Alibaba Cloud fornece um conjunto de chaves de condição comuns aplicáveis a todos os serviços compatíveis com RAM.

  • Ação dependente: As ações dependentes necessárias para executar a ação. Para concluir a ação, o usuário RAM ou a função RAM deve ter permissões para executar todas as ações dependentes.

Ação

Nível de acesso

Tipo de recurso

Chave de condição

Ação dependente

odps:ListProjects

list

Project

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

Nenhuma Nenhuma

Sintaxe da solicitação

GET /api/v1/projects HTTP/1.1

Parâmetros da solicitação

Parâmetro

Tipo

Obrigatório

Descrição

Exemplo

tenantId

string

Não

O ID do locatário. Para obter o ID, faça login no console do MaxCompute e selecione Gerenciamento de Locatários > Propriedades do Locatário no painel de navegação à esquerda.

5495****3697

region

string

Não

O ID da região.

cn-beijing

quotaNickName

string

Não

O apelido da cota. Para obter o apelido da cota, faça login no console do MaxCompute e selecione Workspace > Gerenciamento de Cotas no painel de navegação à esquerda.

os_PayAsYouGoQuota

quotaName

string

Não

O nome da cota. O sistema gera esse nome automaticamente. Para obter o nome da cota, faça login no console do MaxCompute e selecione Workspace > Gerenciamento de Cotas no painel de navegação à esquerda.

aliyun_5495***3697

prefix

string

Não

O prefixo dos nomes dos recursos a serem consultados. Por exemplo, se você especificar a para este parâmetro, apenas os recursos cujos nomes começam com "a" serão retornados.

a

marker

string

Não

O token que especifica o ponto inicial da consulta. Os resultados são retornados em ordem alfabética, começando pela entrada que segue imediatamente o marcador.

cHlvZHBzX3VkZl8xMDExNV8xNDU3NDI4NDkzKg==

maxItem

integer

Não

O número máximo de entradas a serem retornadas em cada página. Valor padrão: 10.

10

saleTags

string

Não

O ID da instância e o método de cobrança da cota de computação padrão.

{ "resourceId": "b7afb7d1-****-****-****-c393669c307b", "resourceType": "PayAsYouGo" }

type

string

Não

O tipo de projeto. Valores válidos:

  • managed: um projeto gerenciado.

  • external: um projeto externo.

managed

sortBy

string

Não

O campo de ordenação. O único valor suportado é createdTime.

Valores válidos:

  • createdTime :

    Ordena por hora de criação.

createdTime

sortOrder

string

Não

A ordem de classificação. Este parâmetro só entra em vigor quando sortBy é especificado. Os valores válidos são ASC e DESC. Os valores não diferenciam maiúsculas de minúsculas.

Valores válidos:

  • ASC :

    Ordem crescente.

  • DESC :

    Ordem decrescente.

DESC

listSystemCatalog

boolean

Não

Especifica se deve listar o projeto integrado SYSTEM_CATALOG. Este projeto fornece informações como metadados do projeto e histórico de uso. Para mais informações, consulte Information Schema.

Valores válidos:

  • true :

    Inclui o projeto SYSTEM_CATALOG nos resultados.

  • false :

    Exclui o projeto SYSTEM_CATALOG dos resultados.

true

Elementos de resposta

Elemento

Tipo

Descrição

Exemplo

object

O objeto de resposta.

requestId

string

O ID da solicitação.

0b16399216671970335563173e2340

data

object

Os dados retornados.

projects

array<object>

A lista de projetos.

array<object>

Os detalhes do projeto.

name

string

The name of the project.

odps_project

owner

string

The owner of the project.

ALIYUN$odps****@aliyunid.com

type

string

The type of the project. Valid values:

  • managed: An internal project.

  • external: An external project.

managed

comment

string

The description of the project.

BI_Analysis

defaultQuota

string

The default compute quota. If you do not specify a quota for a job, the job consumes computing resources from this default quota. For more information about how to use computing resources, see Use of computing resources.

os_PayAsYouGoQuota

status

string

The status of the project. Valid values:

  • AVAILABLE: The project is running as expected.

  • READONLY: The project is read-only.

  • FROZEN: The project is frozen.

  • DELETING: The project is being deleted.

AVAILABLE

costStorage

string

The total storage usage of the project, which represents the compressed, logical data size used for metering.

16489027

regionId

string

The region ID.

cn-beijing

createdTime

integer

The time when the project was created, as a Unix timestamp in milliseconds.

1704380838000

properties

object

The basic properties of the project.

timezone

string

The time zone of the project. This parameter corresponds to the odps.sql.timezone property.

Asia/Shanghai

retentionDays

integer

The number of retention days for backup data. You can restore data to any backup version that is created within the retention period. Valid values: 0 to 30. Default value: 1. A value of 0 indicates that the backup feature is disabled.

1

allowFullScan

boolean

Specifies whether to allow a full table scan in the project. This feature is disabled by default because a full table scan can consume a large amount of computing resources.

false

typeSystem

string

The data type version. Valid values:

  • 1: Version 1.0.

  • 2: Version 2.0.

  • hive: A Hive-compatible type.

For more information about the differences between the data type versions, see Data type versions.

2

enableDecimal2

boolean

Specifies whether to enable the MaxCompute 2.0 Decimal data type in the project.

true

sqlMeteringMax

string

The maximum metered cost for a single SQL statement. The cost is calculated by using the formula: (scanned data in GB) × (complexity).

1500

tableLifecycle

object

The table lifecycle properties.

type

string

The type of the lifecycle. Valid values:

  • mandatory: A lifecycle must be configured for each table.

  • optional: The lifecycle is optional. If unspecified for a table, the table does not expire.

  • inherit: If no lifecycle is specified for a table, the table inherits its lifecycle from the odps.table.lifecycle.value property.

optional

value

string

The lifecycle of the table, in days. Valid values: 1 to 37231. Default value: 37231.

37231

encryption

object

The storage encryption properties.

enable

boolean

Specifies whether to enable storage encryption for the project. For more information, see Storage encryption.

true

algorithm

string

The data encryption algorithm. Supported algorithms include AES256, AESCTR, and RC4.

AES256

key

string

The key for data encryption. You can use the default MaxCompute-managed key or a custom key with the Bring Your Own Key (BYOK) feature.

dafault

tunnelQuota

string

The Data Transmission Service resource group that is bound to the project.

  • Default (shared Data Transmission Service resource group): The project cannot use subscription Data Transmission Service resource groups. Data Transmission Service jobs submitted from this project automatically use the Default resource group, regardless of the default setting for the Data Transmission Service resource group.

  • Subscription Data Transmission Service resource group: The project can use a subscription Data Transmission Service resource group.

Default

enableTunnelQuotaRoute

boolean

Specifies whether to enable routing for the Data Transmission Service resource group.

  • true: Data transmission jobs submitted by default from the project use the bound Data Transmission Service resource group.

  • false: Data transmission jobs submitted by default from the project use the shared Data Transmission Service resource group.

true

externalProjectProperties

object

The properties of the external project.

isExternalCatalogBound

string

Specifies whether the project is an external project for Integrated Lakehouse.

true

securityProperties

object

The security-related properties.

usingAcl

boolean

Specifies whether to enable ACL-based access control. Default value: true.

true

usingPolicy

boolean

Specifies whether to enable policy-based access control. Default value: true.

true

objectCreatorHasAccessPermission

boolean

Specifies whether the creator of an object can access it. Default value: true.

true

objectCreatorHasGrantPermission

boolean

Specifies whether the creator of an object can grant other users permissions on it. Default value: true.

true

labelSecurity

boolean

Specifies whether to enable label-based access control. Default value: false.

false

enableDownloadPrivilege

boolean

Specifies whether to enable download control. Default value: false.

false

projectProtection

object

The project data protection properties.

protected

boolean

Specifies whether to enable project data protection to prevent data from being exported from the project. Default value: false.

true

exceptionPolicy

string

If project data protection is enabled, you can configure an exception policy. This policy allows specified users to export data from specified objects to trusted projects, bypassing the data protection mechanism.

{ "Version": "1", "Statement": [ { "Effect": "Allow", "Principal": "", "Action": [ "odps:[, , ...]" ], "Resource": "acs:odps:*:", "Condition": { "StringEquals": { "odps:TaskType": [ "" ] } } } ] }

ipWhiteList

object

The IP whitelist.

ipList

string

The IP whitelist for access over the public network and from other Alibaba Cloud services.

Nota

If you configure only this IP whitelist, access over the public network and from other Alibaba Cloud services is restricted based on the whitelist, and all access from VPCs is denied.

10.88.111.3

vpcIpList

string

The IP whitelist for access from VPCs.

Nota

If you configure only the VPC IP whitelist, access from VPCs is restricted based on the whitelist, and all access over the public network and from other Alibaba Cloud services is denied.

10.88.111.3

saleTag

object

The instance ID and billing method of the default compute quota.

resourceId

string

The instance ID of the default compute quota.

b7afb7d1-****-****-****-c393669c307b

resourceType

string

The billing method of the default compute quota.

PayAsYouGo

threeTierModel

boolean

Specifies whether the project uses a three-tier model (project > schema > object). In this model, schemas are used within a project to organize objects such as tables, resources, and user-defined functions (UDFs). For more information, see Schema operations.

Valores válidos:

  • true :

    Supported

  • false :

    Not supported

true

marker

string

Um marcador de paginação usado para recuperar a próxima página de resultados. Este parâmetro é retornado quando a resposta é truncada.

cHlvZHBzX3VkZl8xMDExNV8xNDU3NDI4NDkzKg==

maxItem

integer

O número máximo de entradas retornadas por página.

10

NextToken

string

O token para recuperar a próxima página de resultados. Se este parâmetro estiver vazio, todos os resultados foram retornados.

AAAAAV3MpHK1AP0pfERHZN5pu6kvikyUl3ChyRxN+qLPvtOb

Exemplos

Resposta de sucesso

JSON formato

{
  "requestId": "0b16399216671970335563173e2340",
  "data": {
    "projects": [
      {
        "name": "odps_project",
        "owner": "ALIYUN$odps****@aliyunid.com\n",
        "type": "managed",
        "comment": "BI_Analysis",
        "defaultQuota": "os_PayAsYouGoQuota\n",
        "status": "AVAILABLE",
        "costStorage": "16489027",
        "regionId": "cn-beijing",
        "createdTime": 1704380838000,
        "properties": {
          "timezone": "Asia/Shanghai\n",
          "retentionDays": 1,
          "allowFullScan": false,
          "typeSystem": "2",
          "enableDecimal2": true,
          "sqlMeteringMax": "1500",
          "tableLifecycle": {
            "type": "optional",
            "value": "37231\n"
          },
          "encryption": {
            "enable": true,
            "algorithm": "AES256",
            "key": "dafault"
          },
          "tunnelQuota": "Default",
          "enableTunnelQuotaRoute": true,
          "externalProjectProperties": {
            "isExternalCatalogBound": "true"
          }
        },
        "securityProperties": {
          "usingAcl": true,
          "usingPolicy": true,
          "objectCreatorHasAccessPermission": true,
          "objectCreatorHasGrantPermission": true,
          "labelSecurity": false,
          "enableDownloadPrivilege": false,
          "projectProtection": {
            "protected": true,
            "exceptionPolicy": "{\n      \"Version\": \"1\",\n      \"Statement\": [\n            {\n                  \"Effect\": \"Allow\",\n                  \"Principal\": \"\",\n                  \"Action\": [\n                        \"odps:[, , ...]\"\n                  ],\n                  \"Resource\": \"acs:odps:*:\",\n                  \"Condition\": {\n                        \"StringEquals\": {\n                              \"odps:TaskType\": [\n                                    \"\"\n                              ]\n                        }\n                  }\n            }\n      ]\n}"
          }
        },
        "ipWhiteList": {
          "ipList": "10.88.111.3",
          "vpcIpList": "10.88.111.3"
        },
        "saleTag": {
          "resourceId": "b7afb7d1-****-****-****-c393669c307b\n",
          "resourceType": "PayAsYouGo\n"
        },
        "threeTierModel": true
      }
    ],
    "marker": "cHlvZHBzX3VkZl8xMDExNV8xNDU3NDI4NDkzKg==",
    "maxItem": 10,
    "NextToken": "AAAAAV3MpHK1AP0pfERHZN5pu6kvikyUl3ChyRxN+qLPvtOb"
  }
}

Códigos de erro

Consulte Códigos de Erro para uma lista completa.

Notas de versão

Consulte Notas de Versão para uma lista completa.