Modifies the configuration of a Bastionhost instance — such as the edition, asset quota, storage, and bandwidth — by calling the ModifyInstance operation from the Alibaba Cloud Billing Management API.
Bastionhost does not provide a dedicated API operation for modifying instance configurations. Use the ModifyInstance operation from the Alibaba Cloud Billing Management API instead.
Background
The Alibaba Cloud Billing Management API provides a set of common operations for managing Alibaba Cloud resources, including querying service prices, managing instances, and retrieving billing information. For a full list of supported operations, see API overview.
For information on how to call this operation, see Request structure.
Debugging
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| ProductCode | string | Yes | The product code. | bastionhost |
| ProductType | string | No | The product type. | bastionhost |
| SubscriptionType | string | Yes | The billing method. Bastionhost uses the subscription billing method. Set this parameter to Subscription. | Subscription |
| ModifyType | string | Yes | The type of configuration change. Valid values: Upgrade, Downgrade. > Note Downgrade is in grayscale release. To use this feature, join the DingTalk group (ID: 33797269) and contact the product and technical team. | Upgrade |
| InstanceId | String | Yes | The ID of the Bastionhost instance to modify. | bastionhost-cn-**** |
| ClientToken | string | No | A client token that ensures the idempotence of the request. If a previous request with the same client token is found, the server returns the same result. | JASIOFKVNVIXXXXXX |
| Parameter | object[] | No | The list of configuration modules. Valid values of n: 1 to 100. | — |
| └Code | string | Yes | The code of the nth module property. To specify multiple module properties, concatenate them in the n=1,2,3...n format. | InstanceType |
| └Value | string | Yes | The value of the nth module property. | disk |
Parameter settings
The following table describes the six required property groups for modifying a Bastionhost instance. Each group is passed as a Parameter.N.Code and Parameter.N.Value pair.
| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
| Parameter.1.Code | String | Yes | RegionId | Set to RegionId to specify the region. |
| Parameter.1.Value | String | Yes | cn-shanghai | The ID of the region where the Bastionhost instance resides. Call DescribeRegions to get valid region IDs. |
| Parameter.2.Code | String | Yes | NetworkType | Set to NetworkType to specify the network type. |
| Parameter.2.Value | String | Yes | vpc | The network type. Set to vpc for Virtual Private Cloud (VPC). |
| Parameter.3.Code | String | Yes | PlanCode | Set to PlanCode to specify the edition. |
| Parameter.3.Value | String | Yes | cloudbastion | The edition of the Bastionhost instance. Valid values: cloudbastion (Basic Edition), cloudbastion_ha (Enterprise Edition). |
| Parameter.4.Code | String | Yes | LicenseCode | Set to LicenseCode to specify the asset quota. |
| Parameter.4.Value | String | Yes | bhah_ult_5000_asset | The asset quota of the Bastionhost instance. Valid values: bhah_ent_50_asset (50 assets, Basic or Enterprise Edition), bhah_ent_100_asset (100 assets, Basic or Enterprise Edition), bhah_ent_200_asset (200 assets, Basic or Enterprise Edition), bhah_ult_500_asset (500 assets, Basic or Enterprise Edition), bhah_ult_1000_asset (1,000 assets, Enterprise Edition only), bhah_ult_2000_asset (2,000 assets, Enterprise Edition only), bhah_ult_5000_asset (5,000 assets, Enterprise Edition only), bhah_ult_10000_asset (10,000 assets, Enterprise Edition only). |
| Parameter.5.Code | String | Yes | Storage | Set to Storage to specify the storage capacity. |
| Parameter.5.Value | String | Yes | 5 | The storage capacity of the Bastionhost instance, in TB. Valid values: 0 to 500. |
| Parameter.6.Code | String | Yes | Bandwidth | Set to Bandwidth to specify the bandwidth. |
| Parameter.6.Value | String | Yes | 5 | The bandwidth of the Bastionhost instance, in Mbit/s. Valid values: 0 to 200, in increments of 10. |
Response parameters
| Name | Type | Example | Description |
|---|---|---|---|
| Code | String | Success | The status code of the request. |
| Data | Struct | — | The data returned for the request. |
| └InstanceId | String | bastionhost-cn-**** | The ID of the instance whose configuration was modified. |
| └OrderId | String | 2026532523**** | The ID of the order created for the configuration change. |
| Message | String | Successful! | The response message. |
| RequestId | String | 6000EE23-274B-4E07-A697-FF2E999520A4 | The request ID. |
| Success | Boolean | true | Indicates whether the request was successful. |
Examples
Sample successful response
XML format
<ModifyInstanceResponse>
<Message>Successful!</Message>
<RequestId>6000EE23-274B-4E07-A697-FF2E999520A4</RequestId>
<Success>true</Success>
<Code>Success</Code>
<Data>
<OrderId>2026532523****</OrderId>
</Data>
</ModifyInstanceResponse>JSON format
{
"Message": "Successful!",
"RequestId": "6000EE23-274B-4E07-A697-FF2E999520A4",
"Success": true,
"Code": "Success",
"Data": {
"OrderId": "2026532523****"
}
}