您可以通过GetQuota获取一个资源配额详情,以了解当前资源使用情况,方便进行资源管理和规划。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
pai:GetQuota |
none |
*全部资源
|
无 | 无 |
请求语法
GET /api/v1/quotas/{QuotaId} HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| QuotaId |
string |
否 |
获取详细信息的 Quota identifier。 |
quota1ci8g79**** |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Verbose |
boolean |
否 |
是否显示详细信息。 |
true |
| WithNodeMeta |
boolean |
否 |
是否返回绑定到 Quota 的节点 meta 信息 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回内容。 |
||
| RequestId |
string |
请求 ID。 |
18D5A1C6-14B8-545E-8408-0A7DDB4C6B5E |
| QuotaId |
string |
资源配额 ID。 |
quotajradxh4**** |
| QuotaName |
string |
资源配额名称。 |
test-quota |
| ResourceType |
string |
Quota 资源类型。 |
ECS |
| ParentQuotaId |
string |
父 Quota ID。 |
quota1ci8g79**** |
| ResourceGroupIds |
array |
资源配额对应的资源组信息。 |
|
|
string |
资源组 ID。 |
rg69rj0leslw**** |
|
| AllocateStrategy |
string |
资源分配策略。 |
ByNodeSpec |
| Min | ResourceSpec |
Min Quota 配置。 |
|
| Description |
string |
Quota 描述。 |
this is a test quota |
| Labels |
array |
Quota 标签。 |
|
| Label |
label key value 对。 |
||
| CreatorId |
string |
Quota 创建人 ID。 |
1884692**** |
| LatestOperationId |
string |
Quota 最近变更 ID。 |
operation**** |
| Status |
string |
Quota 状态。 |
Ready |
| ReasonCode |
string |
错误码。 |
“” |
| ReasonMessage |
string |
错误原因。 |
“” |
| GmtCreatedTime |
string |
Quota 创建时间。 |
2023-06-22T00:00:00Z |
| GmtModifiedTime |
string |
Quota 修改时间。 |
2023-06-22T00:00:00Z |
| QuotaDetails | QuotaDetails |
Quota 的详情。 |
|
| QuotaConfig | QuotaConfig |
Quota 对应配置:
|
|
| Workspaces |
array |
Quota 关联的工作空间。 |
|
| WorkspaceIdName |
所关联的工作空间信息。 |
||
| SubQuotas |
array |
Quota 的子 Quota 列表。 |
|
| QuotaIdName |
包含的子 Quota 的 ID。 |
||
| QueueStrategy |
string |
Quota 上任务的排队策略。 |
PaiStrategyIntelligent |
| Version |
string |
版本信息。当 resource type 为 ECS 时生效。 |
1.0 |
| HyperZones |
array |
高性能网络区列表 |
|
|
string |
高性能网络区 ID |
A3 |
|
| QuotaCluster |
QuotaCluster |
由配额内资源组成的集群规格与状态 |
示例
正常返回示例
JSON格式
{
"RequestId": "18D5A1C6-14B8-545E-8408-0A7DDB4C6B5E",
"QuotaId": "quotajradxh4****",
"QuotaName": "test-quota",
"ResourceType": "ECS",
"ParentQuotaId": "quota1ci8g79****",
"ResourceGroupIds": [
"rg69rj0leslw****"
],
"AllocateStrategy": "ByNodeSpec",
"Min": {
"NodeSpecs": [
{
"Type": "ecs.g6.4xlarge",
"Count": 10,
"BindingPolicy": {
"NodeSpecCount": 5,
"IncludeNodes": [
"lrnabc"
],
"ExcludeNodes": [
"lrndef"
]
},
"HyperType": ""
}
]
},
"Description": "this is a test quota",
"Labels": [
{
"Key": "testAccTag",
"Value": "nihao"
}
],
"CreatorId": "1884692****",
"LatestOperationId": "operation****",
"Status": "Ready",
"ReasonCode": "“”",
"ReasonMessage": "“”",
"GmtCreatedTime": "2023-06-22T00:00:00Z",
"GmtModifiedTime": "2023-06-22T00:00:00Z",
"QuotaDetails": {
"DesiredMinQuota": {
"CPU": "100",
"Memory": "100Gi",
"GPU": "16",
"GPUType": "GPU"
},
"ActualMinQuota": {
"CPU": "100",
"Memory": "100Gi",
"GPU": "16",
"GPUType": "GPU"
},
"RequestedQuota": {
"CPU": "100",
"Memory": "100Gi",
"GPU": "16",
"GPUType": "GPU"
},
"NodeStatistics": {
"ActualMinNodeNum": 0,
"ActualMinHyperNodeNum": 0,
"AllocatedNodeNum": 0,
"AllocatedHyperNodeNum": 0,
"EmptyNodeNum": 0,
"AllocatedHyperNodeDetails": [
{
"HyperNodeName": "",
"AllocatedNodeNum": 0,
"TotalNodeNum": 0,
"EmptyNodeNum": 0
}
]
}
},
"QuotaConfig": {
"SupportRDMA": false,
"ClusterId": "ceeb3724255364***",
"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"
}
},
"SupportGPUDrivers": [
"470.199.02"
],
"DefaultGPUDriver": "470.199.02",
"ACS": {
"ACSQuotaId": "rq-3kbt2gtimmyw7fgfgothocvh",
"AssociatedProducts": [
"PAI-DLC"
]
},
"ResourceSpecs": [
{
"WorkspaceId": "122421",
"Product": "DLC",
"Specs": [
{
"SpecName": "spec_test",
"IsGuaranteedValid": true,
"IsOverSoldValid": true,
"CodeType": "\"\"",
"Code": "\"\"",
"Reason": "\"\""
}
]
}
],
"EnablePreemptSubquotaWorkloads": false,
"EnableSubQuotaPreemption": true,
"SubQuotaPreemptionConfig": {
"PreemptedPriorityUpperBound": 9,
"PreemptedProducts": [
"dlc"
]
},
"EnableGPUShare": true,
"OversoldUsageConfig": {
"DisabledBy": "",
"Disabled": true
},
"SelfQuotaPreemptionConfig": {
"PreemptorPriorities": [
0
],
"PreemptedPriorities": [
0
],
"PreemptedProducts": [
""
]
},
"EniCacheConfig": {
"Enabled": true,
"CachePoolSize": 0
},
"SandboxCacheConfig": {
"Enabled": true
},
"UseCase": "",
"EnableSelfQuotaPreemption": true,
"ControlPlaneClusterId": "",
"IsEncryptedResource": true,
"WorkloadTypes": [
""
]
},
"Workspaces": [
{
"WorkspaceId": "ws123***",
"WorkspaceName": ""
}
],
"SubQuotas": [
{
"QuotaId": "quota12345",
"QuotaName": "dlc-quota"
}
],
"QueueStrategy": "PaiStrategyIntelligent",
"Version": "1.0",
"HyperZones": [
"A3"
],
"QuotaCluster": {
"ClusterType": "",
"Image": "",
"DataSources": [
{
"DataSourceId": "",
"MountPath": "",
"Uri": ""
}
],
"Endpoints": {
"key": ""
},
"Status": ""
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。