CreateQuota

更新时间:
复制 MD 格式

Call the CreateQuota operation to create a 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.

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 you do not specify this parameter, a root quota is created. Resources are allocated from a dedicated resource group.

  • If you specify this parameter, a child quota is created. Resources are allocated from the nodes that are bound to the root quota.

quota1ci8g793pgm

ResourceGroupIds

array

No

The IDs of the dedicated resource groups. The following constraints apply:

  • Only a root quota, for which ParentQuotaId is empty, can allocate nodes from a resource group.

  • The VPC configurations of the specified resource groups must be the same.

string

No

The ID of the resource group.

rgl593id9qqwkmbr

AllocateStrategy

string

No

The allocation strategy for the quota. Only ByNodeSpecs is supported.

ByNodeSpecs

Min ResourceSpec

No

The minimum resources for the quota. You can define this in one of the following ways:

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

  • NodeSpecs: Specifies the node specification and the number of nodes.

Constraints:

  • If this quota allocates resources from a dedicated resource group, you must use the NodeSpecs method.

  • If this quota allocates resources from a parent quota, both methods are allowed. However, all its child quotas must use the same method.

  • All GPU specifications within the quota must have the same GPU type.

  • For quotas with the resource type set to ECS or Lingjun, only the NodeSpecs method can be used.

Description

string

No

The description of the quota.

this is a test quota

Labels

array

No

The tags for the quota.

Label

No

The tag.

QuotaConfig QuotaConfig

No

Constraints for the QuotaConfig parameter:

  • This parameter is ignored if the resource type is ECS or Lingjun.

  • If the resource type is ACS, the specified VPC and ACS configurations are applied.

QueueStrategy

string

No

The queuing strategy for the quota. Four strategies are supported:

  • PaiStrategyIntelligent: The intelligent strategy.

  • PaiStrategyBalance: The balance strategy.

  • PaiStrategyRoundRobin: The round-robin strategy.

  • PaiStrategyStrictFIFO: The FIFO strategy.

PaiStrategyIntelligent

ClusterSpec

ClusterSpec

No

The native cluster specification for the quota.

Response elements

Element

Type

Description

Example

object

The response schema.

RequestId

string

The request ID.

CBF05F13-B24C-5129-9048-4FA684DCD579

QuotaId

string

The quota ID.

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.