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.

RequestId

string

The request ID.

18D5A1C6-14B8-545E-8408-0A7DDB4C6B5E

QuotaId

string

The ID of the resource quota.

quotajradxh4****

QuotaName

string

The name of the resource quota.

test-quota

ResourceType

string

The resource type of the quota.

ECS

ParentQuotaId

string

The ID of the parent quota.

quota1ci8g79****

ResourceGroupIds

array

The resource groups associated with the resource quota.

string

The ID of the resource group.

rg69rj0leslw****

AllocateStrategy

string

The resource allocation strategy.

ByNodeSpec

Min ResourceSpec

The minimum quota configuration.

Description

string

The description of the quota.

this is a test quota

Labels

array

The labels of the quota.

Label

The label key-value pair.

CreatorId

string

The ID of the user who created the quota.

1884692****

LatestOperationId

string

The ID of the latest operation on the quota.

operation****

Status

string

The status of the quota.

Ready

ReasonCode

string

The error code.

“”

ReasonMessage

string

The cause of the error.

“”

GmtCreatedTime

string

The time when the quota was created, in ISO 8601 format and UTC.

2023-06-22T00:00:00Z

GmtModifiedTime

string

The time when the quota was last modified, in ISO 8601 format and UTC.

2023-06-22T00:00:00Z

QuotaDetails QuotaDetails

The details of 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)

Workspaces

array

The workspaces associated with the quota.

WorkspaceIdName

The information about the associated workspace.

SubQuotas

array

The list of sub-quotas under the quota.

QuotaIdName

The ID of the sub-quota.

QueueStrategy

string

The queuing strategy for tasks in the quota.

PaiStrategyIntelligent

Version

string

The version information. This takes effect when the resource type is ECS.

1.0

HyperZones

array

The list of high-performance network zones.

string

The ID of the high-performance network zone.

A3

QuotaCluster QuotaCluster

The specifications and status of the cluster composed of resources within the quota.

GPUType

string

The GPU type.

L20

Examples

Success response

JSON format

{
  "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": "efg3.GN9A.ch72"
      }
    ]
  },
  "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": "mg123456",
          "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": false,
    "SubQuotaPreemptionConfig": {
      "PreemptedPriorityUpperBound": 9,
      "PreemptedProducts": [
        "dlc"
      ]
    },
    "EnableGPUShare": false,
    "OversoldUsageConfig": {
      "DisabledBy": "quotaxxx",
      "Disabled": false
    },
    "SelfQuotaPreemptionConfig": {
      "PreemptorPriorities": [
        7
      ],
      "PreemptedPriorities": [
        1
      ],
      "PreemptedProducts": [
        "dlc"
      ]
    },
    "EniCacheConfig": {
      "Enabled": false,
      "CachePoolSize": 0
    },
    "SandboxCacheConfig": {
      "Enabled": false
    },
    "UseCase": "",
    "EnableSelfQuotaPreemption": false,
    "ControlPlaneClusterId": "",
    "IsEncryptedResource": false,
    "WorkloadTypes": [
      "EAS"
    ]
  },
  "Workspaces": [
    {
      "WorkspaceId": "ws123***",
      "WorkspaceName": "myshellprod"
    }
  ],
  "SubQuotas": [
    {
      "QuotaId": "quota12345",
      "QuotaName": "dlc-quota"
    }
  ],
  "QueueStrategy": "PaiStrategyIntelligent",
  "Version": "1.0",
  "HyperZones": [
    "A3"
  ],
  "QuotaCluster": {
    "ClusterType": "RayCluster",
    "Image": "registry.cn-shanghai.aliyuncs.com/pai-training/kmeans:v1.0.0",
    "DataSources": [
      {
        "DataSourceId": "data-source-1",
        "MountPath": "/mnt/data/",
        "Uri": "oss://test-bucket.oss-cn-hangzhou-internal.aliyuncs.com/path/to/model/output/"
      }
    ],
    "Endpoints": {
      "key": "dlc16u8sndvcmu74-dashboard.cn-wulanchabu.aliyuncs.com"
    },
    "Status": "Running"
  },
  "GPUType": "L20"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.