GetQuota

Updated at:

Retrieves the details of a resource quota to understand current resource usage and facilitate resource management and planning.

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: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:

  • VPC information

  • Whether RDMA is supported

  • ACS configuration (takes effect when the resource type is ACS)

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.