Help Center/ Cloud Container Engine/ API Reference/ Out-of-Date APIs/ Cluster Management/ Creating a Yearly/Monthly Cluster Flavor Change Order (To Be Discarded)
Updated on 2025-11-05 GMT+08:00

Creating a Yearly/Monthly Cluster Flavor Change Order (To Be Discarded)

Function

This API is used to create a yearly/monthly cluster flavor change order.

Calling Method

For details, see Calling APIs.

URI

PUT /api/v2/orders/{order_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

order_id

Yes

String

Definition

Order ID

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Definition

The request body type or format

Constraints

GET requests are not validated.

Range

  • application/json

  • application/json;charset=utf-8

  • application/x-pem-file

  • multipart/form-data (used when the FormData parameter is present)

Default Value

N/A

X-Auth-Token

Yes

String

Definition

Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details about how to obtain a token, see Authentication.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

tenantId

No

String

Definition

Project ID. For details about how to obtain the project ID, see How to Obtain Parameters in the API URI.

Constraints

N/A

Range

The project ID of the account

Default Value

N/A

cloudServiceType

No

String

Definition

Cloud service type. The value is fixed at hws.service.type.cce.

Constraints

N/A

Range

N/A

Default Value

N/A

resourceId

No

String

Definition

Cluster ID. For details about how to obtain the cluster ID, see How to Obtain Parameters in the API URI.

Constraints

N/A

Range

Cluster ID

Default Value

N/A

changeMode

No

Integer

Definition

Flavor change type. The value is fixed at 10.

Constraints

N/A

Range

N/A

Default Value

N/A

productInfo

No

productInfo object

Definition

New cloud service product information after the change

Constraints

N/A

Range

N/A

Default Value

N/A

cloudServiceEndpoint

No

String

Definition

Address for a cloud service resource change. The format is fixed at https://cce-internal.{region}.myhuaweicloud.com/api/v2/projects/{project_id}/clusters/{cluster_id}/periodresize.

NOTE:
  • region: region name, for example, cn-north-4

  • project_id: Project ID

  • cluster_id: cluster ID

Constraints

N/A

Range

N/A

Default Value

N/A

cloudServiceForm

No

String

Definition

Parameters for a cloud service resource change. The format is fixed at {\"flavorResize\":\"{flavor}\",\"extendParam\":{\"orderID\":\"{order_id}\",\"productID\":\"{project_id}\"}}.

NOTE:
  • This parameter is of the string type. The double quotation marks need to be escaped.

  • flavor: flavor after the change, for example, cce.s1.medium

  • order_id: order ID. It is the same as that in the request path parameter.

  • project_id: product ID after the change

Constraints

N/A

Range

N/A

Default Value

N/A

Table 4 productInfo

Parameter

Mandatory

Type

Description

productId

No

String

Definition

Product ID

Constraints

N/A

Range

N/A

Default Value

N/A

cloudServiceType

No

String

Definition

Cloud service type. The value is fixed at hws.service.type.cce.

Constraints

N/A

Range

N/A

Default Value

N/A

resourceType

No

String

Definition

Cloud service resource type. The value is fixed at hws.resource.type.cce.cluster.

Constraints

N/A

Range

N/A

Default Value

N/A

resourceSpecCode

No

String

Definition

The flavor code

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

The yearly/monthly cluster flavor change order has been created.

N/A

Example Requests

Create a cluster flavor change order.

/api/v2/orders/CS25092010161TL5R

{
  "tenantId" : "{{project_id}}",
  "cloudServiceType" : "hws.service.type.cce",
  "resourceId" : "9461db5e-95c4-11f0-addc-0255ac1001b6",
  "changeMode" : 10,
  "productInfo" : {
    "productId" : "00301-166028-0--0",
    "cloudServiceType" : "hws.service.type.cce",
    "resourceType" : "hws.resource.type.cce.cluster",
    "resourceSpecCode" : "cce.s1.medium"
  },
  "cloudServiceEndpoint" : "https://cce-internal.cn-north-7.myhuaweicloud.com/api/v2/projects/{{project_id}}/clusters/{{cluster_id}}/periodresize",
  "cloudServiceForm" : "{\"flavorResize\":\"cce.s1.medium\",\"extendParam\":{\"orderID\":\"CS25092010161TL5R\",\"productID\":\"00301-166028-0--0\"}}"
}

Example Responses

N/A

Status Codes

Status Code

Description

200

The yearly/monthly cluster flavor change order has been created.

Error Codes

See Error Codes.