Updated on 2024-12-02 GMT+08:00

Modify Instance Specifications

Function

Modifying the specifications of the IoTDA instance.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

POST /v5/iot/{project_id}/iotda-instances/{instance_id}/resize

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Parameter description: project ID. For details, see Obtaining a Project ID.

instance_id

Yes

String

Parameter description: instance ID.

Value: Enter up to 36 characters, including lowercase letters (a-f), digits, and hyphens (-).

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

Parameter description: user token. You can obtain the token by calling the IAM API Obtaining a User Token Through Password Authentication. In the returned response header, X-Subject-Token is the desired user token. For details about how to obtain the token, see Token Authentication.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

flavor

Yes

Flavor object

Parameter description: specifications of an IoTDA instance.

is_auto_pay

No

Boolean

Parameter description: whether to automatically pay from the customer's account. This parameter can be specified during specifications change of a yearly/monthly instance. This parameter does not affect the payment mode of automatic renewal.

Value: true: automatic payment. Fees are automatically deducted from the account balance. false: default value. Orders are submitted but not paid. [Pay for the order by referring to Paying Yearly/Monthly Product Orders or on the Huawei Cloud official website.] (tag:hws)

delay

No

Boolean

Parameter description: whether to changing the billing information of a device instance in the delayed mode. To delay the change, you need to set the change time window of the instance first.

Options:

  • true: The change is delayed. The specification change task will be executed in the specified change time window.

  • false: The specification change task is executed immediately.

Table 4 Flavor

Parameter

Mandatory

Type

Description

type

Yes

String

Parameter description: specification name of the IoTDA instance to create. For details, see Specifications.

size

No

Integer

Parameter description: unit number of the standard IoTDA instances to create. For details, see Specifications. This parameter is mandatory when instance_type is set to standard.

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

order_id

String

Parameter description: order ID. This parameter is returned when a yearly/monthly instance is modified. This parameter is left blank when a pay-per-use instance is modified. For details about how to check the order details, see [Querying Order Details]. (tag:hws)

Example Requests

Modifying the specifications of a standard instance. Target: 2 standard intermediate-frequency units.

POST https://{endpoint}/v5/iot/{project_id}/iotda-instances/{instance_id}/resize

{
  "flavor" : {
    "type" : "iotda.standard.s2",
    "size" : 2
  }
}

Example Responses

Status code: 200

OK

{
  "order_id" : "CS22121614500ABCD"
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

Error Codes

See Error Codes.