您可以通过ListQuotas获取资源配额列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求语法
GET /api/v1/quotas/
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
QuotaName | string | 否 | 按照 QuotaName 过滤,支持模糊匹配。 | quotajradxh43rgb |
ResourceType | string | 否 | Quota 资源类型(Lingjun/ECS/ACS),默认值 ECS。 | ECS |
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 |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "F082BD0D-21E1-5F9B-81A0-AB07485B03CD",
"Quotas": [
{
"QuotaId": "quota12345",
"QuotaName": "dlc-quota",
"ResourceType": "",
"ParentQuotaId": "",
"ResourceGroupIds": [
""
],
"AllocateStrategy": "",
"Min": {
"NodeSpecs": [
{
"Type": "ecs.g6.4xlarge",
"Count": 10
}
]
},
"Description": "",
"Labels": [
{
"Key": "testAccTag",
"Value": "nihao"
}
],
"CreatorId": "",
"LatestOperationId": "",
"Status": "",
"ReasonCode": "",
"ReasonMessage": "",
"GmtCreatedTime": "",
"GmtModifiedTime": "",
"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"
}
},
"QuotaConfig": {
"SupportRDMA": false,
"ClusterId": "ceeb3724255364664",
"UserVpc": {
"VpcId": "vpc-abcdef****",
"SwitchId": "vs-abcdef****",
"SecurityGroupId": "sg-abcdef****",
"ExtendedCIDRs": [
"\"192.168.0.1/24\""
],
"RoleArn": "acs:ram::25xxxx:role/AliyunPAIDLCDefaultRole",
"DefaultRoute": "eth0"
},
"SupportGPUDrivers": [
"470.199.02"
],
"DefaultGPUDriver": "470.199.02",
"ACS": {
"ACSQuotaId": "rq-3kbt2gtimmyw7fgfgothocvh",
"AssociatedProducts": [
"PAI-DLC"
]
},
"ResourceSpecs": [
{
"WorkspaceId": "",
"Product": "",
"Specs": [
{
"SpecName": "",
"IsGuaranteedValid": true,
"IsOverSoldValid": true,
"CodeType": "",
"Code": "",
"Reason": ""
}
]
}
]
},
"Workspaces": [
{
"WorkspaceId": "ws123456"
}
],
"SubQuotas": [
{
"QuotaId": "quota12345",
"QuotaName": "dlc-quota"
}
],
"QueueStrategy": ""
}
],
"TotalCount": 0
}
错误码
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 | ||||
---|---|---|---|---|---|---|
2024-03-19 | OpenAPI 返回结构发生变更 | 看变更集 | ||||
| ||||||
2024-01-24 | OpenAPI 入参发生变更 | 看变更集 | ||||
|