All Products
Search
Document Center

MaxCompute:ListProjects

Last Updated:Oct 24, 2024

Queries a list of MaxCompute projects.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
odps:ListProjectslist
  • Project
    acs:odps:{#regionId}:{#accountId}:projects/*
    none
none

Request syntax

GET /api/v1/projects HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
tenantIdstringNo

The tenant ID.

549532154333697
regionstringNo

The ID of the region.

cn-beijing
quotaNickNamestringNo

The name of the quota.

quotaA
quotaNamestringNo

The name of the quota. The value of this parameter is the identifier of the quota in MaxCompute, which differs from the quotaNickname parameter. You can configure the quotaNickname parameter. The system automatically generates a value for the quotaName parameter. This parameter is only used to describe the tunnel quota.

"hsajkdgbkaubh"
prefixstringNo

Specifies the marker after which the returned list begins.

a
markerstringNo

The maximum number of entries to return on each page.

cHlvZHBzX3VkZl8xMDExNV8xNDU3NDI4NDkzKg==
maxItemintegerNo

The maximum number of entries returned per page.

10
saleTagsstringNo

The identifier of an object in a MaxCompute quota. This identifier is the same as the identifier in the sales bill of Alibaba Cloud. This parameter is used for tags.

"aaaa-bbbb"
typestringNo

The project type. Valid values: external and managed. The value external indicates an external project, which is used in the data lakehouse solution. The value managed indicates an internal project.

"managed"
listSystemCatalogbooleanNo

Specifies whether to list a project named SystemCatalog.

Valid values:

  • true

  • false

true

Response parameters

ParameterTypeDescriptionExample
object

PopResult<ListResultDTO<ProjectInfo, MarkerPageInfo>>

requestIdstring

The request ID.

0b16399216671970335563173e2340
dataobject

The returned data.

projectsarray<object>

The description of the project.

projectsobject
namestring

The name of the project.

odps_project
ownerstring

The owner of the project.

1139815775606813
typestring

The project type. Valid values: -managed: The project is an internal project. -external: The project is an external project.

managed
commentstring

The remarks.

maxcompute projects
defaultQuotastring

The default computing quota.

quotaA
statusstring

The status of the project. Valid values: -AVAILABLE: The project is available. -READONLY: The project is read-only. -FROZEN: The project is frozen. -DELETING: The project is being deleted.

AVAILABLE
costStoragestring

The storage usage.

16489027
regionIdstring

Region Id

cn-beijing
createdTimelong

Create time

1704380838000
propertiesobject

The properties of the project.

timezonestring

The time zone of the instance.

Asia/Shanghai
retentionDayslong

The maximum number of days for which backup data can be retained.

1
allowFullScanboolean

Indicates whether a full table scan on the project is enabled.

false
typeSystemstring

The data type edition. Valid values: -1: MaxCompute V1.0 data type edition. -2: MaxCompute V2.0 data type edition. -hive: Hive-compatible data type edition.

2
enableDecimal2boolean

Indicates whether the DECIMAL data type in the MaxCompute V2.0 data type edition is enabled.

true
sqlMeteringMaxstring

The upper limit for the resources that are consumed by an SQL statement.

1500
tableLifecycleobject

The lifecycle of a table in the project.

typestring

The type of the lifecycle. Valid values: -mandatory: The lifecycle clause is required. You must configure a lifecycle for a table. -optional: The lifecycle clause is optional in a table creation statement. If you do not configure a lifecycle for a table, the table does not expire. -inherit: If you do not configure a lifecycle for a table when you create the table, the value of odps.table.lifecycle.value is used by default.

optional
valuestring

The retention period of a table. Unit: days.

37231
encryptionobject

The encryption information.

enableboolean

Indicates whether data encryption is enabled. Valid values: true and false.

true
algorithmstring

The name of the encryption algorithm.

SHA1
keystring

The key of the encryption algorithm.

dafault
tunnelQuotastring

The name of the tunnel quota.

quota_tunnel
enableTunnelQuotaRouteboolean

Indicates whether tunnel quota routing is enabled.

true
securityPropertiesobject

The permission properties.

usingAclboolean

Indicates whether ACL-based access control is enabled.

true
usingPolicyboolean

Indicates whether policy-based access control is enabled.

true
objectCreatorHasAccessPermissionboolean

Indicates whether the object creator is allowed to perform operations on objects.

true
objectCreatorHasGrantPermissionboolean

Indicates whether the object creator is allowed to authorize other users to perform operations on objects.

true
labelSecurityboolean

Indicates whether label-based access control is enabled.

false
enableDownloadPrivilegeboolean

Indicates whether Download control is enabled.

false
projectProtectionobject

Indicates whether project data protection is enabled.

protectedboolean

Indicates whether project data protection is enabled.

true
exceptionPolicystring

The exception policy. If cross-project data access operations are required, the project owner must configure an exception policy in advance to allow the specified user to transfer data of a specified object from the current project to a specified project. After the exception policy is configured, data of the object can be transferred to the specified project even if the project data protection feature is enabled.

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

The IP address whitelist.

ipListstring

The list of IP addresses.

10.88.111.3
vpcIpListstring

The list of virtual private cloud (VPC) IP addresses.

10.88.111.3
saleTagobject

The identifier of an object in a MaxCompute quota. This identifier is the same as the identifier in the sales bill of Alibaba Cloud. This parameter is used for tags.

resourceIdstring

The identifier of an object in a MaxCompute quota. This identifier is the same as the identifier in the sales bill of Alibaba Cloud. This parameter is used for tags.

"aaaa-bbbb"
resourceTypestring

The type of the object. Valid values: quota and project.

"project"
Tagsarray<object>

The tags.

Tagsobject
TagValuestring

The tag value.

acceptance test
TagKeystring

The tag key.

Department
threeTierModelboolean

Indicates whether the current project supports the MaxCompute three-layer model.

Valid values:

  • true

  • false

true
markerstring

Indicates the marker after which the returned list begins.

cHlvZHBzX3VkZl8xMDExNV8xNDU3NDI4NDkzKg==
maxIteminteger

The maximum number of entries returned per page.

10
NextTokenstring

A pagination token. Only continuous page turning is supported. If NextToken is not empty, the next page exists. The value of NextToken can be used in the next request to retrieve a new page of results.

AAAAAV3MpHK1AP0pfERHZN5pu6kvikyUl3ChyRxN+qLPvtOb

Examples

Sample success responses

JSONformat

{
  "requestId": "0b16399216671970335563173e2340",
  "data": {
    "projects": [
      {
        "name": "odps_project",
        "owner": "1139815775606813",
        "type": "managed",
        "comment": "maxcompute projects\n",
        "defaultQuota": "quotaA",
        "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": "SHA1",
            "key": "dafault"
          },
          "tunnelQuota": "quota_tunnel",
          "enableTunnelQuotaRoute": 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": "\"aaaa-bbbb\"",
          "resourceType": "\"project\""
        },
        "Tags": [
          {
            "TagValue": "acceptance test",
            "TagKey": "Department"
          }
        ],
        "threeTierModel": true
      }
    ],
    "marker": "cHlvZHBzX3VkZl8xMDExNV8xNDU3NDI4NDkzKg==",
    "maxItem": 10,
    "NextToken": "AAAAAV3MpHK1AP0pfERHZN5pu6kvikyUl3ChyRxN+qLPvtOb"
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-09-12The response structure of the API has changedView Change Details
2024-07-31The response structure of the API has changedView Change Details
2024-01-08The response structure of the API has changedView Change Details
2023-11-14The request parameters of the API has changed. The response structure of the API has changedView Change Details
2023-09-21The response structure of the API has changedView Change Details
2023-08-23The request parameters of the API has changedView Change Details