CreateQuota

Updated at:

Creates a resource quota.

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

none

*All Resource

*

None None

Request syntax

POST /api/v1/quotas HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body parameters.

QuotaName

string

No

The name of the quota.

test-quota

ResourceType

string

No

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

ECS

ParentQuotaId

string

No

The ID of the parent quota.

  • If this parameter is left empty, a root quota is created, and machines are allocated from the dedicated resource group.

  • If this parameter is specified, a child quota is created, and resources are allocated from the nodes bound to the root quota.

quota1ci8g793pgm

ResourceGroupIds

array

No

The list of dedicated resource groups. Constraints:

  • Only root quotas (where the parent quota ID is empty) can allocate machines from resource groups.

  • The VPC configurations in the specified resource groups must be consistent.

string

No

The ID of the resource group.

rgl593id9qqwkmbr

AllocateStrategy

string

No

The allocation strategy of the quota. Currently, only ByNodeSpecs is supported.

ByNodeSpecs

Min ResourceSpec

No

The minimum quota configuration. Details:

  • ResourceAmount: specifies the CPU, memory, and GPU details.

  • NodeSpecs: specifies the machine specifications and quantity. Constraints:

  • If the quota allocates resources from a dedicated resource group, only the NodeSpecs strategy is allowed.

  • If the quota allocates resources from a parent quota, both strategies are allowed, but all child quotas must use the same strategy.

  • All GPU specifications within a quota must use the same GPU model.

  • Resource quotas of the ECS or Lingjun resource type can only use the NodeSpecs strategy.

Description

string

No

The description of the quota.

this is a test quota

Labels

array

No

The labels of the quota.

Label

No

The label.

QuotaConfig QuotaConfig

No

The quota configuration constraints:

  • This configuration does not take effect when the ECS or Lingjun resource type is used.

  • When the ACS resource type is used, the user VPC information and ACS configuration take effect.

QueueStrategy

string

No

Four queuing policies are supported for the quota. Valid values:

  • PaiStrategyIntelligent: intelligent policies.

  • PaiStrategyBalance: balanced policy.

  • PaiStrategyRoundRobin: resource-first policy.

  • PaiStrategyStrictFIFO: FIFO policy.

PaiStrategyIntelligent

ClusterSpec ClusterSpec

No

The specifications of the native cluster for the resource quota.

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

CBF05F13-B24C-5129-9048-4FA684DCD579

QuotaId

string

The ID of the resource quota.

quotad2kd8ljpsno

Examples

Success response

JSON format

{
  "RequestId": "CBF05F13-B24C-5129-9048-4FA684DCD579",
  "QuotaId": "quotad2kd8ljpsno"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.