Obtém uma lista de projetos do MaxCompute.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
odps:ListProjects |
list |
Project
|
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 |
| 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 |
| sortBy |
string |
Não |
O campo de ordenação. O único valor suportado é Valores válidos:
|
createdTime |
| sortOrder |
string |
Não |
A ordem de classificação. Este parâmetro só entra em vigor quando Valores válidos:
|
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 |
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 |
| 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 |
| 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 |
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: |
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:
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:
|
optional |
| value |
string |
The lifecycle of the table, in days. Valid values: |
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 |
| enableTunnelQuotaRoute |
boolean |
Specifies whether to enable routing for the 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 |
| usingPolicy |
boolean |
Specifies whether to enable policy-based access control. Default value: |
true |
| objectCreatorHasAccessPermission |
boolean |
Specifies whether the creator of an object can access it. Default value: |
true |
| objectCreatorHasGrantPermission |
boolean |
Specifies whether the creator of an object can grant other users permissions on it. Default value: |
true |
| labelSecurity |
boolean |
Specifies whether to enable label-based access control. Default value: |
false |
| enableDownloadPrivilege |
boolean |
Specifies whether to enable download control. Default value: |
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: |
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 |
| 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.