您可以通过ListQuotas获取资源配额列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
pai:ListQuotas |
list |
*全部资源
|
无 | 无 |
请求语法
GET /api/v1/quotas/ HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| QuotaName |
string |
否 |
按照 QuotaName 过滤,支持模糊匹配。 |
quotajradxh43rgb |
| ResourceType |
string |
否 |
Quota 资源类型(Lingjun/ECS/ACS),默认值 ECS。 |
ECS |
| LayoutMode |
string |
否 |
展示方式,可以为树形或列表 |
Tree |
| ParentQuotaId |
string |
否 |
按 ParentQuotaId 过滤:
|
quotajradxh43rgb |
| QuotaIds |
string |
否 |
逗号分隔,按 QuotaIds 过滤,只支持精确匹配,最多同时支持 100 个。 |
quota1ci8g793pgm,quotajradxh43rgb |
| WorkspaceIds |
string |
否 |
逗号分隔,按 WorkspaceIds 过滤,只支持精确匹配,最多同时支持 10 个。 |
21345,38727 |
| Statuses |
string |
否 |
逗号分隔按照 Quota Statuses 过滤,只支持精确匹配。 |
Creating |
| PageNumber |
integer |
否 |
查询第几页数据,最小值为 1。 |
1 |
| PageSize |
integer |
否 |
设置查询的分页大小,最小值为 1。 |
20 |
| SortBy |
string |
否 |
返回结果的排序字段名,枚举值:
|
status |
| Order |
string |
否 |
排列顺序:desc 或者 asc。 |
desc |
| Labels |
string |
否 |
按照 Label 的 key 和 value 进行过滤,多个标签使用半角逗号(,)分隔。 |
official=true,gpu=false |
| Verbose |
boolean |
否 |
是否显示详情。取值如下:
|
true |
| WorkspaceName |
string |
否 |
所关联的工作空间名称。 |
myshellprod |
| HasResource |
string |
否 |
是否包含资源。 |
|
| Versions |
string |
否 |
按照版本信息搜索。 |
1.0 |
| ClusterType |
string |
否 |
集群类型 |
RayCluster |
| GPUType |
string |
否 |
GPU 类型。 |
V100 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| Quotas |
array |
资源配额列表。 |
|
| Quota |
单个资源配额详情。 |
||
| RequestId |
string |
请求 ID。 |
F082BD0D-21E1-5F9B-81A0-AB07485B03CD |
| TotalCount |
integer |
总记录数 |
23 |
示例
正常返回示例
JSON格式
{
"Quotas": [
{
"QuotaId": "quota12345",
"QuotaName": "dlc-quota",
"ResourceType": "ECS",
"ParentQuotaId": "\"\"",
"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",
"GPU": "16",
"GPUMemory": "80G",
"GPUMemoryBytes": 85899345920,
"GPUType": "GPU",
"Memory": "100Gi"
},
"ActualMinQuota": {
"CPU": "100",
"GPU": "16",
"GPUMemory": "80G",
"GPUMemoryBytes": 85899345920,
"GPUType": "GPU",
"Memory": "100Gi"
},
"RequestedQuota": {
"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
}
]
}
},
"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": {
"PreemptedPriorities": [
0
],
"PreemptedProducts": [
"dlc"
],
"PreemptorPriorities": [
0
]
},
"EniCacheConfig": {
"Enabled": true,
"CachePoolSize": 0
},
"SandboxCacheConfig": {
"Enabled": true
},
"UseCase": "",
"EnableSelfQuotaPreemption": true,
"ControlPlaneClusterId": "",
"IsEncryptedResource": true,
"WorkloadTypes": [
""
]
},
"Workspaces": [
{
"WorkspaceId": "ws123***",
"WorkspaceName": "myshellprod"
}
],
"SubQuotas": [
{
"QuotaId": "quota12345",
"QuotaName": "dlc-quota"
}
],
"QueueStrategy": "PaiStrategyIntelligent",
"Version": "",
"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": ""
},
"GPUType": "L20",
"HyperZones": [
"A3"
]
}
],
"RequestId": "F082BD0D-21E1-5F9B-81A0-AB07485B03CD",
"TotalCount": 23
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。