GetQuota
Retrieves the details of a resource quota to understand current resource usage and facilitate resource management and planning.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
pai:GetQuota |
none |
*All Resource
|
None | None |
Request syntax
GET /api/v1/quotas/{QuotaId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| QuotaId |
string |
No |
The ID of the quota. |
quota1ci8g79**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Verbose |
boolean |
No |
Specifies whether to display detailed information. |
true |
| WithNodeMeta |
boolean |
No |
Specifies whether to return the metadata of nodes bound to the quota. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response content. |
||
| AllocateStrategy |
string |
The resource allocation strategy. |
ByNodeSpec |
| CreatorId |
string |
The ID of the user who created the quota. |
1884692**** |
| Description |
string |
The description of the quota. |
this is a test quota |
| GPUType |
string |
The GPU type. |
L20 |
| GmtCreatedTime |
string |
The time when the quota was created, in ISO 8601 format and UTC time zone. |
2023-06-22T00:00:00Z |
| GmtModifiedTime |
string |
The time when the quota was last modified, in ISO 8601 format and UTC time zone. |
2023-06-22T00:00:00Z |
| HyperZones |
array |
The list of high-performance network zones. |
|
|
string |
The ID of the high-performance network zone. |
A3 |
|
| Labels |
array |
The labels of the quota. |
|
| Label |
The key-value pair of the label. |
||
| LatestOperationId |
string |
The ID of the latest operation on the quota. |
operation**** |
| Min | ResourceSpec |
The minimum quota configuration. |
|
| ParentQuotaId |
string |
The ID of the parent quota. |
quota1ci8g79**** |
| QueueStrategy |
string |
The queuing strategy for tasks in the quota. |
PaiStrategyIntelligent |
| QuotaCluster | QuotaCluster |
The specifications and status of the cluster composed of resources in the quota. |
|
| QuotaConfig | QuotaConfig |
The configuration of the quota:
|
|
| QuotaDetails | QuotaDetails |
The details of the quota. |
|
| QuotaId |
string |
The ID of the resource quota. |
quotajradxh4**** |
| QuotaName |
string |
The name of the resource quota. |
test-quota |
| ReasonCode |
string |
The error code. |
“” |
| ReasonMessage |
string |
The cause of the error. |
“” |
| RequestId |
string |
The request ID. |
18D5A1C6-14B8-545E-8408-0A7DDB4C6B5E |
| ResourceGroupIds |
array |
The resource group information corresponding to the resource quota. |
|
|
string |
The ID of the resource group. |
rg69rj0leslw**** |
|
| ResourceType |
string |
The resource type of the quota. |
ECS |
| Status |
string |
The status of the quota. |
Ready |
| SubQuotas |
array |
The list of sub-quotas of the quota. |
|
| QuotaIdName |
The ID of the sub-quota. |
||
| Version |
string |
The version information. This parameter takes effect when the resource type is ECS. |
1.0 |
| Workspaces |
array |
The workspaces associated with the quota. |
|
| WorkspaceIdName |
The information about the associated workspace. |
Examples
Success response
JSON format
{
"AllocateStrategy": "ByNodeSpec",
"CreatorId": "1884692****",
"Description": "this is a test quota",
"GPUType": "L20",
"GmtCreatedTime": "2023-06-22T00:00:00Z",
"GmtModifiedTime": "2023-06-22T00:00:00Z",
"HyperZones": [
"A3"
],
"Labels": [
{
"Key": "testAccTag",
"Value": "nihao"
}
],
"LatestOperationId": "operation****",
"Min": {
"NodeSpecs": [
{
"Type": "ecs.g6.4xlarge",
"Count": 10,
"BindingPolicy": {
"NodeSpecCount": 5,
"IncludeNodes": [
"lrnabc"
],
"ExcludeNodes": [
"lrndef"
]
},
"HyperType": ""
}
]
},
"ParentQuotaId": "quota1ci8g79****",
"QueueStrategy": "PaiStrategyIntelligent",
"QuotaCluster": {
"ClusterType": "RayCluster",
"Image": "registry.cn-shanghai.aliyuncs.com/pai-training/kmeans:v1.0.0",
"DataSources": [
{
"DataSourceId": "",
"MountPath": "",
"Uri": "oss://test-bucket.oss-cn-hangzhou-internal.aliyuncs.com/path/to/model/output/"
}
],
"Endpoints": {
"key": ""
},
"Status": ""
},
"QuotaConfig": {
"ACS": {
"ACSQuotaId": "rq-3kbt2gtimmyw7fgfgothocvh",
"AssociatedProducts": [
"PAI-DLC"
]
},
"ClusterId": "ceeb3724255364***",
"ControlPlaneClusterId": "",
"DefaultGPUDriver": "470.199.02",
"EnableGPUShare": false,
"EnablePreemptSubquotaWorkloads": false,
"EnableSelfQuotaPreemption": false,
"EnableSubQuotaPreemption": false,
"EniCacheConfig": {
"Enabled": false,
"CachePoolSize": 0
},
"IsEncryptedResource": false,
"OversoldUsageConfig": {
"DisabledBy": "",
"Disabled": false
},
"ResourceSpecs": [
{
"WorkspaceId": "122421",
"Product": "DLC",
"Specs": [
{
"SpecName": "spec_test",
"IsGuaranteedValid": true,
"IsOverSoldValid": true,
"Spec": {
"CPU": "100",
"GPU": "16",
"GPUMemory": "80G",
"GPUMemoryBytes": 85899345920,
"GPUType": "GPU",
"Memory": "100Gi"
},
"CodeType": "\"\"",
"Code": "\"\"",
"Reason": "\"\""
}
]
}
],
"SandboxCacheConfig": {
"Enabled": false
},
"SelfQuotaPreemptionConfig": {
"PreemptedPriorities": [
0
],
"PreemptedProducts": [
"dlc"
],
"PreemptorPriorities": [
0
]
},
"SubQuotaPreemptionConfig": {
"PreemptedPriorityUpperBound": 9,
"PreemptedProducts": [
"dlc"
]
},
"SupportGPUDrivers": [
"470.199.02"
],
"SupportRDMA": false,
"UseCase": "",
"UserVpc": {
"VpcId": "vpc-abcdef****",
"SwitchId": "vs-abcdef****",
"SecurityGroupId": "sg-abcdef****",
"ExtendedCIDRs": [
"\"192.168.0.1/24\""
],
"RoleArn": "acs:ram::25xxxx:role/AliyunPAIDLCDefaultRole",
"DefaultRoute": "eth0",
"DefaultForwardInfo": {
"NatGatewayId": "nat-7j4mka9wguxj",
"EipAllocationId": "eip-h29r78ieufbih"
}
},
"WorkloadTypes": [
""
]
},
"QuotaDetails": {
"DesiredMinQuota": {
"CPU": "100",
"GPU": "16",
"GPUMemory": "80G",
"GPUMemoryBytes": 85899345920,
"GPUType": "GPU",
"Memory": "100Gi"
},
"ActualMinQuota": {
"CPU": "100",
"GPU": "16",
"GPUMemory": "80G",
"GPUMemoryBytes": 85899345920,
"GPUType": "GPU",
"Memory": "100Gi"
},
"NodeStatistics": {
"ActualMinNodeNum": 0,
"ActualMinHyperNodeNum": 0,
"AllocatedNodeNum": 0,
"AllocatedHyperNodeNum": 0,
"EmptyNodeNum": 0,
"AllocatedHyperNodeDetails": [
{
"HyperNodeName": "",
"AllocatedNodeNum": 0,
"TotalNodeNum": 0,
"EmptyNodeNum": 0
}
]
}
},
"QuotaId": "quotajradxh4****",
"QuotaName": "test-quota",
"ReasonCode": "“”",
"ReasonMessage": "“”",
"RequestId": "18D5A1C6-14B8-545E-8408-0A7DDB4C6B5E",
"ResourceGroupIds": [
"rg69rj0leslw****"
],
"ResourceType": "ECS",
"Status": "Ready",
"SubQuotas": [
{
"QuotaId": "quota12345",
"QuotaName": "dlc-quota"
}
],
"Version": "1.0",
"Workspaces": [
{
"WorkspaceId": "ws123***",
"WorkspaceName": "myshellprod"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.