Updated on 2026-11-12 GMT+08:00

Modifying the Training Quota

Function

This API is used to modify the training resource quota of a user in ModelArts.

This API is applicable to the following scenario: When an administrator needs to adjust the training resource quota of a user (such as the job quantity quota, automatic aging switch, and quota alarm notification), the administrator can use this API to modify the quota. Before using this API, ensure that you have logged in to the system and have the permission to modify quotas. After the modification is successful, the training resource quota of the user is updated. If you do not have the permission or the quota information is invalid, 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.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    modelarts:trainJob:updateQuotas

    Write

    -

    g:EnterpriseProjectId

    modelarts:trainJob:update

    -

URI

PUT /v2/{project_id}/training-quotas

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed.

Range: N/A

Default Value: N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

user_id

Yes

String

Definition: User ID.

Constraints: N/A

Range: N/A

Default Value: N/A

quotas

Yes

Array of ModifyTrainingQuotaItem objects

Definition: Quota group of a training job.

Table 3 ModifyTrainingQuotaItem

Parameter

Mandatory

Type

Description

resource

Yes

String

Definition: Resource type of the quota.

Constraints: N/A

Range:

  • job-num: job quantity quota

  • visual-job-num: visualization job quantity quota

  • job-retention-enabled: user-level automatic job aging switch

  • job-num-quota-notify: SMN notification configuration for quota alarms

Default Value: N/A

quota

Yes

Integer

Definition: Quota.

Constraints: Value constraints vary by resource type: job-retention-enabled takes a value of 0 (disabled) or 1 (enabled); job-num-quota-notify is fixed at 0, with the notification topic URN stored in extra_info; for all other resource types, the value must be no less than 1.

Range: 0 to 2147483647

Default Value: N/A

used

No

Integer

Definition: Used quota.

Constraints: N/A

Range: N/A

Default Value: N/A

extra_info

No

String

Definition: Additional quota information.

Constraints: When resource is job-num-quota-notify, this field stores the SMN topic URN.

Range: N/A

Default Value: N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

user_id

String

Definition: User ID.

Range: N/A

quotas

Array of ModifyTrainingQuotaItem objects

Definition: Quota group of a training job.

Table 5 ModifyTrainingQuotaItem

Parameter

Type

Description

resource

String

Definition: Resource type of the quota.

Range:

  • job-num: job quantity quota

  • visual-job-num: visualization job quantity quota

  • job-retention-enabled: user-level automatic job aging switch

  • job-num-quota-notify: SMN notification configuration for quota alarms

quota

Integer

Definition: Quota.

Range: 0 to 2147483647

used

Integer

Definition: Used quota.

Range: N/A

extra_info

String

Definition: Additional quota information.

Range: N/A

Example Requests

Change the job quantity quota of the user whose ID is fa412c98-6d94-42a2-891a-99cd1da93916.

PUT https://{endpoint}/v2/{project_id}/training-quotas

{
  "user_id" : "fa412c98-6d94-42a2-891a-99cd1da93916",
  "quotas" : [ {
    "resource" : "job-num",
    "quota" : 20000
  } ]
}

Example Responses

Status code: 200

{
  "user_id" : "fa412c98-6d94-42a2-891a-99cd1da93916",
  "quotas" : [ {
    "resource" : "job-num",
    "quota" : 20000
  } ]
}

Status Codes

Status Code

Description

200

Response body for modifying the training quota.

Error Codes

See Error Codes.