Todos os produtos
Search
Central de documentação

MaxCompute:GetProject

Última atualização: Jul 04, 2026

Consulta as informações básicas de um projeto 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:GetProject

get

*Project

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

Nenhuma Nenhuma

Sintaxe da solicitação

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

Parâmetros de caminho

Parâmetro

Tipo

Obrigatório

Descrição

Exemplo

projectName

string

Sim

O nome do projeto.

odps_project

Parâmetros da solicitação

Parâmetro

Tipo

Obrigatório

Descrição

Exemplo

verbose

boolean

Não

Especifica se devem ser incluídas informações adicionais (securityProperties, superAdmins).

true

withStorageTierInfo

boolean

Não

Especifica se devem ser incluídas informações adicionais (properties.storageTierInfo).

true

withQuotaProductType

boolean

Não

Especifica se devem ser incluídas informações adicionais (productType).

true

Elementos de resposta

Elemento

Tipo

Descrição

Exemplo

object

Os parâmetros de resposta.

requestId

string

O ID da solicitação.

0b87b7b316643495896551555e855b

httpCode

integer

O código de status HTTP.

  • 1xx: Resposta informativa - A solicitação foi recebida e está sendo processada.

  • 2xx: Sucesso - A solicitação foi recebida, compreendida e aceita com sucesso pelo servidor.

  • 3xx: Redirecionamento - A solicitação foi redirecionada. Uma ação adicional é necessária para concluir a solicitação.

  • 4xx: Erro do cliente - A solicitação contém parâmetros incorretos, erros de sintaxe ou condições específicas da solicitação não podem ser atendidas.

  • 5xx: Erro do servidor - O servidor não consegue atender à solicitação devido a outros motivos.

200

errorCode

string

O código de erro.

OBJECT_NOT_EXIST

errorMsg

string

A mensagem de erro.

This object does not exist.

data

object

O resultado da resposta.

name

string

O nome do projeto.

odps_project

owner

string

As informações da conta do proprietário do projeto.

ALIYUN$odps****@aliyunid.com

type

string

O tipo de projeto. Valores válidos:

  • managed: projeto interno.

  • external: projeto externo.

managed

comment

string

A descrição do projeto.

BI_Analysis

defaultQuota

string

A cota de computação padrão. Usada para alocar recursos de computação. Se nenhuma cota de computação for especificada, os jobs iniciados por este projeto consumirão recursos da cota padrão. Para obter mais informações sobre o uso de recursos de computação, consulte Recursos de computação - Uso de cotas.

os_PayAsYouGoQuota

status

string

O status do projeto. Valores válidos:

  • AVAILABLE: normal.

  • READONLY: somente leitura.

  • FROZEN: congelado.

  • DELETING: sendo excluído.

AVAILABLE

productType

string

O modo de cobrança da cota de computação padrão.

PayAsYouGo

threeTierModel

boolean

Indica se o armazenamento baseado em schema é suportado. O MaxCompute suporta Schema, que é um objeto entre Project e Table/Resource/UDF para categorizar Tables, Resources e UDFs. Um Project pode conter vários Schemas. Para obter mais informações, consulte Operações de Schema.

true

costStorage

string

O tamanho total de armazenamento. Visualiza o tamanho de armazenamento atual do projeto. Este tamanho de armazenamento é consistente com o calibre de medição, que é o tamanho de armazenamento lógico após a compressão no nível do Project.

16489027

regionId

string

O ID da região.

cn-beijing

createdTime

integer

A hora de criação.

1704380838000

properties

object

The basic properties of the project.

timezone

string

The project timezone, which is the odps.sql.timezone property.

Asia/Shanghai

retentionDays

integer

The number of days to retain backup data. During this period, you can restore the current version to any backed-up data version. Valid values: [0, 30]. Default value: 1. A value of 0 indicates that the backup feature is disabled.

1

allowFullScan

boolean

Whether full table scans are allowed in the project. Full table scans consume significant resources, so this feature is disabled by default to improve processing efficiency.

false

typeSystem

string

The data type edition. Valid values:

  • 1: Edition 1.0.

  • 2: Edition 2.0.

  • hive: Hive-compatible type.

For differences among the three data type editions, see Data Type Editions.

2.0

enableDecimal2

boolean

Whether the MaxCompute 2.0 Decimal data type is enabled for the project.

true

sqlMeteringMax

string

The maximum threshold for single SQL consumption. Unit: scan volume (GB) × complexity.

1500

tableLifecycle

object

The lifecycle properties of tables.

type

string

The lifecycle type. Valid values:

  • mandatory: The Lifecycle clause is mandatory. Users must set the table lifecycle.

  • optional: The Lifecycle clause is optional when creating a table. If the table lifecycle is not set, the table is permanently valid.

  • inherit: If the table lifecycle is not set when creating a table, the table lifecycle defaults to the value of odps.table.lifecycle.value.

optional

value

string

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

37231

encryption

object

The storage encryption properties.

enable

boolean

Whether data encryption is enabled for the project. For more information about data encryption, see Storage Encryption.

true

algorithm

string

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

AES256

key

string

The key type used for data encryption, including the default key (MaxCompute Default Key) and Bring Your Own Key (BYOK). The default key (MaxCompute Default Key) is created internally by MaxCompute.

dafault

tunnelQuota

string

The Data Transfer Service resource group bound to the project.

  • Default (Data Transfer Service shared resource group): This project is not allowed to use the Data Transfer Service (subscription) resource group. Regardless of the default Data Transfer Service resource group setting, Data Transfer Service tasks submitted by this project will automatically use the Default resource group.

  • Data Transfer Service (subscription) resource group: This project is allowed to use the Data Transfer Service (subscription) resource group.

Default

elderTunnelQuota

string

The parent group of the Data Transfer Service resource group bound to the project (can be ignored).

Default_p

enableTunnelQuotaRoute

boolean

Whether the Data Transfer Service resource group routing is enabled.

  • true: Data Transfer Service tasks submitted by this project will use the bound Data Transfer Service resource group by default.

  • false: Data Transfer Service tasks submitted by this project will use the Data Transfer Service shared resource group by default.

true

storageTierInfo

object

The tiered storage information.

storageTierSize

object

The tiered storage information.

standardSize

integer

The standard storage usage.

27649172

longTermSize

integer

The long-term storage usage.

21764917

lowFrequencySize

integer

The infrequent access storage usage.

767693

projectTotalSize

integer

The total storage usage.

56066037

projectBackupSize

integer

The backup storage size.

86672917

fdcQuota

string

The external table cache quota.

fdc_quota

enableFdcCacheForce

boolean

Whether to force enable external table caching.

true

enableTieredStorage

boolean

Whether tiered storage is enabled.

true

tableLifecycleConfig

object

The tiered storage lifecycle rules properties. After configuration, the system will trigger automatic storage tier conversion based on these rules.

TierToLongterm

object

The long-term storage identifier.

DaysAfterLastModificationGreaterThan

integer

The number of days after the last data modification before automatic conversion, corresponding to the LastModifiedTime of the table or partition.

180

DaysAfterLastAccessGreaterThan

integer

The number of days after the last data access before automatic conversion, corresponding to the LastAccessTime of the table or partition.

Nota

If the LastAccessTime of the table or partition is empty:

  • For tables or partitions created before October 1, 2023, the default time is 2023.10.01 00:00:00 in the UTC+0 timezone.

  • For tables or partitions created after October 1, 2023, if the data has not been accessed, the CreateTime is used for calculation.

180

DaysAfterLastTierModificationGreaterThan

integer

The number of days since the last storage tier conversion.

1

TierToLowFrequency

object

The infrequent access storage identifier.

DaysAfterLastModificationGreaterThan

integer

The number of days after the last data modification before automatic conversion, corresponding to the LastModifiedTime of the table or partition.

30

DaysAfterLastAccessGreaterThan

integer

The number of days after the last data access before automatic conversion, corresponding to the LastAccessTime of the table or partition.

Nota

If the LastAccessTime of the table or partition is empty:

  • For tables or partitions created before October 1, 2023, the default time is 2023.10.01 00:00:00 in the UTC+0 timezone.

  • For tables or partitions created after October 1, 2023, if the data has not been accessed, the CreateTime is used for calculation.

30

DaysAfterLastTierModificationGreaterThan

integer

The number of days since the last storage tier conversion.

1

externalProjectProperties

object

The external project properties.

isExternalCatalogBound

string

Whether this is a Lakehouse 2.0 external project.

true

tableFormat

string

warehouse

string

foreignServerName

string

foreignServerType

string

externalCatalogId

string

enableAutoMv

boolean

autoMvQuotaGb

integer

enableDr

boolean

enableDataMasking

boolean

superAdmins

array

A lista de membros com a função Super_Administrator no projeto.

string

As informações da conta do membro com a função Super_Administrator no projeto.

RAM$odps****@aliyunid.com:RAM_USER

securityProperties

object

As propriedades de permissão.

usingAcl

boolean

Whether the ACL-based access control feature is enabled. It is enabled by default.

true

usingPolicy

boolean

Whether the policy-based access control feature is enabled. It is enabled by default.

true

objectCreatorHasAccessPermission

boolean

Whether the object creator is allowed to have access permissions on the object. This is allowed by default.

true

objectCreatorHasGrantPermission

boolean

Whether the object creator is allowed to have grant permissions on the object. This is allowed by default.

true

labelSecurity

boolean

Whether the label-based access control feature is enabled. It is disabled by default.

false

enableDownloadPrivilege

boolean

Whether the download control feature is enabled. It is disabled by default.

false

projectProtection

object

The data protection properties.

exceptionPolicy

string

If project data protection is enabled, you can set exceptions or trusted projects to allow specified users to export data of specified objects to specified projects. All scenarios described in the Exception Policy can override the data protection mechanism.

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

protected

boolean

Whether the project data protection mechanism is enabled to prohibit or allow data to flow out of the project. It is disabled by default.

true

ipWhiteList

object

A lista de permissões de IP.

ipList

string

The IP whitelist for public network and cloud product interconnection network.

Nota

If only the public network and cloud product interconnection network IP whitelist is configured, access through the public network and cloud product interconnection network is restricted by the configuration, and all VPC network access is prohibited.

10.88.111.3

vpcIpList

string

The VPC network IP whitelist.

Nota

If only the VPC network IP whitelist is configured, VPC network access is restricted by the configuration, and all public network and cloud product interconnection network access is prohibited.

10.88.111.3

saleTag

object

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

resourceId

string

The instance ID of the default computing quota.

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

resourceType

string

The billing type of the default computing quota.

PayAsYouGo

Exemplos

Resposta de sucesso

JSON formato

{
  "requestId": "0b87b7b316643495896551555e855b",
  "httpCode": 200,
  "errorCode": "OBJECT_NOT_EXIST",
  "errorMsg": "This object does not exist.",
  "data": {
    "name": "odps_project",
    "owner": "ALIYUN$odps****@aliyunid.com",
    "type": "managed",
    "comment": "BI_Analysis",
    "defaultQuota": "os_PayAsYouGoQuota",
    "status": "AVAILABLE",
    "productType": "PayAsYouGo",
    "threeTierModel": true,
    "costStorage": "16489027",
    "regionId": "cn-beijing",
    "createdTime": 1704380838000,
    "properties": {
      "timezone": "Asia/Shanghai",
      "retentionDays": 1,
      "allowFullScan": false,
      "typeSystem": "2.0",
      "enableDecimal2": true,
      "sqlMeteringMax": "1500",
      "tableLifecycle": {
        "type": "optional",
        "value": "37231"
      },
      "encryption": {
        "enable": true,
        "algorithm": "AES256",
        "key": "dafault"
      },
      "tunnelQuota": "Default",
      "elderTunnelQuota": "Default_p",
      "enableTunnelQuotaRoute": true,
      "storageTierInfo": {
        "storageTierSize": {
          "standardSize": 27649172,
          "longTermSize": 21764917,
          "lowFrequencySize": 767693
        },
        "projectTotalSize": 56066037,
        "projectBackupSize": 86672917
      },
      "fdcQuota": "fdc_quota",
      "enableFdcCacheForce": true,
      "enableTieredStorage": true,
      "tableLifecycleConfig": {
        "TierToLongterm": {
          "DaysAfterLastModificationGreaterThan": 180,
          "DaysAfterLastAccessGreaterThan": 180,
          "DaysAfterLastTierModificationGreaterThan": 1
        },
        "TierToLowFrequency": {
          "DaysAfterLastModificationGreaterThan": 30,
          "DaysAfterLastAccessGreaterThan": 30,
          "DaysAfterLastTierModificationGreaterThan": 1
        }
      },
      "externalProjectProperties": {
        "isExternalCatalogBound": "true",
        "tableFormat": "",
        "warehouse": "",
        "foreignServerName": "",
        "foreignServerType": "",
        "externalCatalogId": ""
      },
      "enableAutoMv": false,
      "autoMvQuotaGb": 0,
      "enableDr": false,
      "enableDataMasking": false
    },
    "superAdmins": [
      "RAM$odps****@aliyunid.com:RAM_USER\n"
    ],
    "securityProperties": {
      "usingAcl": true,
      "usingPolicy": true,
      "objectCreatorHasAccessPermission": true,
      "objectCreatorHasGrantPermission": true,
      "labelSecurity": false,
      "enableDownloadPrivilege": false,
      "projectProtection": {
        "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}",
        "protected": true
      }
    },
    "ipWhiteList": {
      "ipList": "10.88.111.3",
      "vpcIpList": "10.88.111.3"
    },
    "saleTag": {
      "resourceId": "b7afb7d1-****-****-****-c393669c307b",
      "resourceType": "PayAsYouGo"
    }
  }
}

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.