Updated on 2025-11-19 GMT+08:00

Obtaining OS Quotas

Function

This API is used to obtain the quotas of some ModelArts OS resources, such as resource pool quotas and network quotas. This API is used when you need to know the usage limits of resource pools or network resources, plan resource allocation, or monitor resource usage. Before using this API, ensure that ModelArts OS is deployed and you have the required permissions (such as administrator permissions or resource management permissions). After the API is called, the system returns details about resource pool quotas and network quotas, helping you better plan and manage resources. If you do not have the required permission, the service is unavailable, or the quota information is not configured, the API will return an error message.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

GET /v1/{project_id}/quotas

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: User project ID. For details, see Obtaining a Project ID and Name.

Constraints: N/A

Range: N/A

Default Value: N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

quotas

Quota object

Definition: Resource quota.

Table 3 Quota

Parameter

Type

Description

resources

Array of ResourceQuota objects

Definition: Resource quota.

Table 4 ResourceQuota

Parameter

Type

Description

type

String

Definition: Resource type.

Range:

  • VPC: Virtual private cloud.

  • SUBNET: Subnet.

  • SECURITY_GROUP: Security group.

  • SECURITY_GROUP_RULE: Security group rule.

  • PUBLIC_IP: Public IP address.

  • VPC_PEER: Number of VPC peering connections.

  • FIREWALL: Firewall.

  • SHARE_BANDWIDTH: Shared bandwidth.

  • SHARE_BANDWIDTH_IP: Shared bandwidth IP address.

  • LOADBALANCER: Load balancer.

  • LISTENER: Listener.

  • PHYSICAL_CONNECT: Physical connection.

  • VIRTUAL_INTERFACE: Virtual interface.

  • VPC_CONTAIN_ROUTETABLE: Route tables contained in the VPC.

  • ROUTETABLE_CONTAIN_ROUTES: Routes contained in the routing table.

quota

String

Definition: Upper limit of the resource quota.

Range: N/A

used

String

Definition: Used quota.

Range: N/A

Status code: 404

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Example Requests

None

Example Responses

Status code: 200

OK.

{
  "quotas" : {
    "resources" : [ {
      "type" : "pool",
      "quota" : 15,
      "used" : 10
    }, {
      "type" : "network",
      "quota" : 15,
      "used" : 10
    } ]
  }
}

Status Codes

Status Code

Description

200

OK.

404

Not found.

Error Codes

See Error Codes.