Updated on 2024-07-04 GMT+08:00

Creating an Order Quota by HSS

Function

The billing mode can only be yearly/monthly when an order quota is created by HSS.

Calling Method

For details, see Calling APIs.

URI

POST /v5/{project_id}/quotas/orders

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Minimum: 0

Maximum: 512

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Enterprise project ID. To query all enterprise projects, set this parameter to all_granted_eps.

Minimum: 0

Maximum: 128

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a user token.

Minimum: 0

Maximum: 4096

Content-Type

No

String

Default value: application/json; charset=utf-8

Minimum: 0

Maximum: 128

region

Yes

String

Region ID

Minimum: 0

Maximum: 32

Table 4 Request body parameters

Parameter

Mandatory

Type

Description

resource_spec_code

Yes

String

Specifications

  • hss.version.basic: basic edition

  • hss.version.advanced: professional edition

  • hss.version.enterprise: enterprise edition

  • hss.version.premium: premium edition

  • hss.version.wtp: WTP edition

  • hss.version.container.enterprise: container edition

Minimum: 0

Maximum: 128

period_type

Yes

Integer

Subscription period type.

  • 2: month

  • 3: year

Minimum: 0

Maximum: 100

period_num

Yes

Integer

Number of subscription periods

Minimum: 0

Maximum: 1000

is_auto_renew

No

Boolean

Whether to support auto renewal. The options are true (yes) and false (no). The default value is false.

is_auto_pay

No

Boolean

whether to support automatic payment. The options are true (yes) and false (no). The default value is false.

subscription_num

Yes

Integer

Subscription quantity

Minimum: 0

Maximum: 500

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

order_id

String

Order ID

Minimum: 0

Maximum: 256

Example Requests

Create an order of HSS enterprise edition quota. The order information is as follows. The billing mode is yearly/monthly. The quantity is 1. The subscription period is 1. The subscription period type is monthly. Automatic renewal is disabled. The order will be automatically paid.

POST https://{endpoint}/v5/{project_id}/quotas/orders

{
  "resource_spec_code" : "hss.version.enterprise",
  "subscription_num" : 1,
  "period_num" : 1,
  "period_type" : 2,
  "is_auto_renew" : false,
  "is_auto_pay" : false
}

Example Responses

Status code: 200

Subscription information

{
  "order_id" : "CS2404171642AAAAA"
}

Status Codes

Status Code

Description

200

Subscription information

Error Codes

See Error Codes.