ListQuotas

Updated at:

Retrieves a list of resource quotas.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

pai:ListQuotas

list

*All Resource

*

None None

Request syntax

GET /api/v1/quotas/ HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

QuotaName

string

No

Filters the results by QuotaName. Fuzzy matching is supported.

quotajradxh43rgb

ResourceType

string

No

The resource type of the quota. Valid values: Lingjun, ECS, and ACS. Default value: ECS.

ECS

LayoutMode

string

No

The display mode. Valid values: tree and list.

Tree

ParentQuotaId

string

No

Filters the results by ParentQuotaId.

  • If this parameter is not specified, all quotas under the tenant are listed, including root quotas and child quotas.

  • If this parameter is left empty, all root quotas are listed.

  • If this parameter is specified, all child quotas of the specified ParentQuotaId are listed.

quotajradxh43rgb

QuotaIds

string

No

Filters the results by QuotaIds. Separate multiple IDs with commas (,). Only exact matching is supported. A maximum of 100 IDs can be specified at a time.

quota1ci8g793pgm,quotajradxh43rgb

WorkspaceIds

string

No

Filters the results by WorkspaceIds. Separate multiple IDs with commas (,). Only exact matching is supported. A maximum of 10 IDs can be specified at a time.

21345,38727

Statuses

string

No

Filters the results by quota statuses. Separate multiple statuses with commas (,). Only exact matching is supported.

Creating

PageNumber

integer

No

The number of the page to return. Minimum value: 1.

1

PageSize

integer

No

The number of entries to return on each page. Minimum value: 1.

20

SortBy

string

No

The field by which to sort the returned results. Valid values:

  • QuotaName

  • Status

  • CPU

  • Memory

  • GPU

  • GmtCreatedTime

  • GmtModifiedTime

status

Order

string

No

The sort order. Valid values: desc and asc.

desc

Labels

string

No

Filters the results by label keys and values. Separate multiple labels with commas (,).

official=true,gpu=false

Verbose

boolean

No

Specifies whether to display details. Valid values:

  • true: Displays details.

  • false: Does not display details.

true

WorkspaceName

string

No

The name of the associated workspace.

myshellprod

HasResource

string

No

Specifies whether the quota contains resources.

true

Versions

string

No

Filters the results by version information.

1.0

ClusterType

string

No

The cluster type.

RayCluster

GPUType

string

No

The GPU type.

V100

Response elements

Element

Type

Description

Example

object

Schema of Response

Quotas

array

The list of resource quotas.

Quota

The details of a single resource quota.

RequestId

string

The request ID.

F082BD0D-21E1-5F9B-81A0-AB07485B03CD

TotalCount

integer

The total number of entries.

23

Examples

Success response

JSON format

{
  "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": {
        "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,
                "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": [
          ""
        ]
      },
      "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
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.