All Products
Search
Document Center

MaxCompute:GetProject

Last Updated:Dec 23, 2024

Queries the information about a MaxCompute project.

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:GetProjectget
*Project
acs:odps:{#regionId}:{#accountId}:projects/{#ProjectName}
    none
none

Request syntax

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

Request parameters

ParameterTypeRequiredDescriptionExample
projectNamestringYes

The name of the MaxCompute project.

odps_project
verbosebooleanNo

Specifies whether to use additional information.

true

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

requestIdstring

The request ID.

0b87b7b316643495896551555e855b
httpCodeinteger

The HTTP status code.

  • 1xx: informational response. The request is received and is being processed.
  • 2xx: success. The request is successfully received, understood, and accepted by the server.
  • 3xx: redirection. The request is redirected, and further actions are required to complete the request.
  • 4xx: client error. The request contains invalid request parameters and syntaxes, or specific request conditions cannot be met.
  • 5xx: server error. The server cannot meet requirements due to other reasons.
200
errorCodestring

The error code.

040002
errorMsgstring

The error message.

error message.
dataobject

The data returned.

namestring

The project name.

odps_project
ownerstring

The account information of the project owner.

1565950907343451
typestring

The project type. Valid values:

  • managed: internal project
  • external: external project
managed
commentstring

The project description.

maxcompute project
defaultQuotastring

The default computing quota that is used to allocate computing resources. If you do not specify a computing quota for your project, the jobs that are initiated by your project consume the computing resources in the default quota. For more information about how to use computing resources, see Use quota groups for computing resources.

quota_a
statusstring

The project status. Valid values:

  • AVAILABLE
  • READONLY
  • FROZEN
  • DELETING
AVAILABLE
productTypestring

The billing method of the default computing quota.

PayAsYouGo
threeTierModelboolean

Indicates whether data storage by schema is supported. MaxCompute supports the schema feature. This feature allows you to classify objects such as tables, resources, and user-defined functions (UDFs) in a project by schema. You can create multiple schemas in a project. For more information, see Schema-related operations.

true
costStoragestring

The total storage usage. The storage space that is occupied by your project, which is the logical storage space after your project data is collected and compressed.

16489027
regionIdstring

The region ID.

cn-beijing
createdTimelong

The creation time.

1704380838000
propertiesobject

The basic properties of the project.

timezonestring

The time zone that is used by your project. The time zone is the same as the time zone specified by odps.sql.timezone.

Asia/Shanghai
retentionDayslong

The retention period for backup data. Unit: days. During the retention period, you can restore data of the version in use to the backup data of any version. Valid values: [0,30]. Default value: 1. The value 0 indicates that the backup feature is disabled.

1
allowFullScanboolean

Indicates whether a full table scan is allowed in the project. A full table scan occupies a large number of resources, which reduces data processing efficiency. By default, the full table scan feature is disabled.

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

For more information about the differences among the three data type editions, see Data type editions.

2.0
enableDecimal2boolean

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

true
sqlMeteringMaxstring

The maximum consumption threshold of a single SQL statement. Formula: Amount of scanned data (GB) × Complexity.

1500
tableLifecycleobject

The table lifecycle properties.

typestring

The lifecycle type. Valid values:

  • mandatory: The lifecycle clause is required in a table creation statement.
  • 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 the odps.table.lifecycle.value parameter is used as the table lifecycle by default.
optional
valuestring

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

37231
encryptionobject

The storage encryption properties.

enableboolean

Indicates whether the data encryption feature needs to be enabled for the project. For more information about data encryption, see

Storage encryption.

true
algorithmstring

The data encryption algorithm that is supported by the key. Valid values: AES256, AESCTR, and RC4.

SHA1
keystring

The type of key that is used for data encryption. You can select MaxCompute Default Key or Bring Your Own Key (BYOK) as the key type. If you select MaxCompute Default Key, the default key that is created by MaxCompute is used.

dafault
tunnelQuotastring

The Tunnel resource group that is bound to the project.

  • Default resource group: The Tunnel shared resource group is used. You cannot use the subscription-based Tunnel resource group for the project. The default resource group is automatically used by the Tunnel service of your project, regardless of the parameter setting.
  • Subscription-based Tunnel resource group: You can use the subscription-based Tunnel resource group for the project.
Quota
elderTunnelQuotastring

The Tunnel parent resource group that is bound to the project. You do not need to pay attention to this group.

No value
enableTunnelQuotaRouteboolean

Indicates whether the routing of the Tunnel resource group is enabled.

  • true: The data transfer tasks that are submitted by the project by default use the Tunnel resource group that is bound to the project.
  • false: The data transfer tasks that are submitted by the project by default use the Tunnel shared resource group.
true
storageTierInfoobject

The storage tier information.

storageTierSizeobject

The storage tier information.

standardSizelong

The storage usage at the standard storage tier.

27649172
longTermSizelong

The storage usage at the long-term storage tier.

21764917
lowFrequencySizelong

The storage usage at the Infrequent Access (IA) layer.

767693
projectTotalSizelong

The total storage usage.

56066037
projectBackupSizelong

The backup storage usage.

86672917
fdcQuotastring

The quota for external table caching.

fdc_quota
enableFdcCacheForceboolean

Indicates whether external table caching is forcefully enabled.

true
enableTieredStorageboolean

Indicates whether tiered storage is enabled.

true
tableLifecycleConfigobject

The properties of tiered storage lifecycle rules. After you configure the properties, the system triggers automatic switching of storage tiers based on the rules.

TierToLongtermobject

The information about the long-term storage tier.

DaysAfterLastModificationGreaterThanlong

The system triggers an automatic storage tier change N days after the last modification time of data. N is specified by this parameter and corresponds to LastModifiedTime that is configured for the table or partition.

180
DaysAfterLastAccessGreaterThanlong

The system triggers an automatic storage tier change N days after the last access time of data. N is specified by this parameter and corresponds to LastAccessTime that is configured for the table or partition.

Note If LastAccessTime of a table or partition is left empty, the following rules are applied:
  • For tables or partitions that you created before October 1, 2023, 2023.10.01 00:00:00 in UTC+0 is considered as the last access time.

  • For tables or partitions that you created on or after October 1, 2023, if no data is accessed, the table or partition creation time is considered as the last access time.

180
DaysAfterLastTierModificationGreaterThanlong

The period after the previous storage tier change time.

1
TierToLowFrequencyobject

The information about the IA storage tier.

DaysAfterLastModificationGreaterThanlong

The system triggers an automatic storage tier change N days after the last modification time of data. N is specified by this parameter and corresponds to LastModifiedTime that is configured for the table or partition.

30
DaysAfterLastAccessGreaterThanlong

The system triggers an automatic storage tier change N days after the last access time of data. N is specified by this parameter and corresponds to LastAccessTime that is configured for the table or partition.

Note If LastAccessTime of a table or partition is left empty, the following rules are applied:
  • For tables or partitions that you created before October 1, 2023, 2023.10.01 00:00:00 in UTC+0 is considered as the last access time.

  • For tables or partitions that you created on or after October 1, 2023, if no data is accessed, the table or partition creation time is considered as the last access time.

30
DaysAfterLastTierModificationGreaterThanlong

The period after the previous storage tier change time.

1
externalProjectPropertiesobject

The properties of the external project.

isExternalCatalogBoundstring

Indicates whether the external project is an external project for data lakehouse solution 2.0.

true
superAdminsarray

The list of Super_Administrator role members of the project.

superAdminstring

The account information of the Super_Administrator role members of the project.

ALIYUN$***@aliyun.com
securityPropertiesobject

The permission properties.

usingAclboolean

Indicates whether the ACL-based access control feature is enabled. By default, this feature is enabled.

true
usingPolicyboolean

Indicates whether the policy-based access control feature is enabled. By default, this feature is enabled.

true
objectCreatorHasAccessPermissionboolean

Indicates whether to allow the object creator to have the access permissions on the object. The default value is true, which indicates that the object creator has the access permissions on the object.

true
objectCreatorHasGrantPermissionboolean

Indicates whether the object creator has the authorization permissions on the object. The default value is true, which indicates that the object creator has the authorization permissions on the object.

true
labelSecurityboolean

Indicates whether the label-based access control feature is enabled. By default, this feature is disabled.

false
enableDownloadPrivilegeboolean

Indicates whether the download control feature is enabled. By default, this feature is disabled.

false
projectProtectionobject

The properties of the data protection mechanism.

exceptionPolicystring

If you enable the project data protection mechanism, you can configure exception or trusted projects. This allows specified users to transfer data of a specified object to a specified project. The project data protection mechanism does not take effect in all the situations that are specified in the exception policy.

{ "Version": "1", "Statement": [{ "Effect":"Allow", "Principal":"<Principal>", "Action":["odps:<Action1>[, <Action2>, ...]"], "Resource":"acs:odps:*:<Resource>", "Condition":{ "StringEquals": { "odps:TaskType":["<Tasktype>"] } } }] }
protectedboolean

Indicates whether the data protection mechanism is enabled for the project. This allows or denies data transfer across projects. By default, the data protection mechanism is disabled.

true
ipWhiteListobject

The information about the IP address whitelist.

ipListstring

The IP address whitelist for access over the Internet or the network for interconnecting with other Alibaba Cloud services.

Note If you configure only the IP address whitelist for access over the Internet or the network for interconnecting with other Alibaba Cloud services, the access over the Internet or the network for interconnecting with other Alibaba Cloud services is subject to configurations, and access over a virtual private cloud (VPC) is not allowed.
10.88.111.3
vpcIpListstring

The IP address whitelist for access over a VPC.

Note If you configure only the IP address whitelist for access over a VPC, the access over a VPC is subject to configurations, and the access over the Internet or the network for interconnecting with other Alibaba Cloud services is not allowed.
10.88.111.3
saleTagobject

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

resourceIdstring

The instance ID of the default computing quota.

project_name
resourceTypestring

The billing method of the default computing quota.

project

Examples

Sample success responses

JSONformat

{
  "requestId": "0b87b7b316643495896551555e855b",
  "httpCode": 200,
  "errorCode": "040002",
  "errorMsg": "error message.",
  "data": {
    "name": "odps_project",
    "owner": "1565950907343451",
    "type": "managed",
    "comment": "maxcompute project\n",
    "defaultQuota": "quota_a",
    "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": "SHA1",
        "key": "dafault"
      },
      "tunnelQuota": "Quota",
      "elderTunnelQuota": "No value\n",
      "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"
      }
    },
    "superAdmins": [
      "ALIYUN$***@aliyun.com"
    ],
    "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\":\"<Principal>\",\n        \"Action\":[\"odps:<Action1>[, <Action2>, ...]\"],\n        \"Resource\":\"acs:odps:*:<Resource>\",\n        \"Condition\":{\n            \"StringEquals\": {\n                \"odps:TaskType\":[\"<Tasktype>\"]\n            }\n        }\n    }]\n    }",
        "protected": true
      }
    },
    "ipWhiteList": {
      "ipList": "10.88.111.3",
      "vpcIpList": "10.88.111.3"
    },
    "saleTag": {
      "resourceId": "project_name",
      "resourceType": "project"
    }
  }
}

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-11The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-06-25The response structure of the API has changedView Change Details
2024-06-24The response structure of the API has changedView Change Details
2024-06-24The response structure of the API has changedView Change Details
2024-04-17The response structure of the API has changedView Change Details
2024-01-08The response structure of the API has changedView Change Details
2023-12-28API Description Update. The request parameters of the API has changed. The response structure of the API has changedView Change Details
2023-11-21The response structure of the API has changedView Change Details
2023-09-21The response structure of the API has changedView Change Details
2023-09-14API Description Update. The response structure of the API has changedView Change Details