Bastionhost does not provide an API operation to modify the specifications of a bastion host. To modify the specifications of a bastion host, you can call the ModifyInstance operation of the BSS API.

Background information

The BSS API is a set of common operations used to manage Alibaba Cloud resources. For example, you can call the operations to query service prices, manage instances, or obtain bills. For more information about the operations of the BSS API, see API Overview.

You can call the ModifyInstance operation to modify the specifications of a bastion host. For more information about how to call the operation, see Request Structure.

This topic describes how to call the ModifyInstance operation to modify the specifications of a bastion host and provides examples.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesModifyInstanceThe operation that you want to perform. Set the value to ModifyInstance.
ModifyTypeStringYesUpgradeThe type of modification that you want to perform on the bastion host. Set the value to Upgrade, which indicates an upgrade of the bastion host.
Parameter.1.CodeStringYesRegionIdThe code of the first attribute for the bastion host. Set the value to RegionId, which indicates the region of the bastion host.
Parameter.1.ValueStringYescn-shanghaiThe value of the first attribute for the bastion host. Set the value to the ID of the region in which the bastion host is deployed. You can call the DescribeRegions operation to query the region IDs supported by Bastionhost.
Parameter.2.CodeStringYesNetworkTypeThe code of the second attribute for the bastion host. Set the value to NetworkType, which indicates the network type of the bastion host.
Parameter.2.ValueStringYesvpcThe value of the second attribute for the bastion host. Set the value to vpc, which indicates that the bastion host is deployed in a virtual private cloud (VPC).
Parameter.3.CodeStringYesPlanCodeThe code of the third attribute for the bastion host. Set the value to PlanCode, which indicates the edition of the bastion host.
Parameter.3.ValueStringYescloudbastionThe value of the third attribute for the bastion host. Set the value to the edition that you want to use. Valid values:
  • cloudbastion: the Basic edition
  • cloudbastion_ha: the Enterprise edition
Parameter.4.CodeStringYesLicenseCodeThe code of the fourth attribute for the bastion host. Set the value to LicenseCode, which indicates the plan of the bastion host. The plan determines the number of the assets that can be managed by the bastion host.
Parameter.4.ValueStringYesbhah_ult_5000_assetThe value of the fourth attribute for the bastion host. Set the value to the plan that you want to use. Valid values:
  • bhah_ent_50_asset: A total of 50 assets can be managed by a bastion host of the Basic edition or Enterprise edition.
  • bhah_ent_100_asset: A total of 100 assets can be managed by a bastion host of the Basic edition or Enterprise edition.
  • bhah_ent_200_asset: A total of 200 assets can be managed by a bastion host of the Basic edition or Enterprise edition.
  • bhah_ult_500_asset: A total of 500 assets can be managed by a bastion host of the Basic edition or Enterprise edition.
  • bhah_ult_1000_asset: A total of 1,000 assets can be managed by a bastion host of the Enterprise edition.
  • bhah_ult_2000_asset: A total of 2,000 assets can be managed by a bastion host of the Enterprise edition.
  • bhah_ult_5000_asset: A total of 5,000 assets can be managed by a bastion host of the Enterprise edition.
  • bhah_ult_10000_asset: A total of 10,000 assets can be managed by a bastion host of the Enterprise edition.
Parameter.5.CodeStringYesStorageThe code of the fifth attribute for the bastion host. Set the value to Storage, which indicates the storage capacity of the bastion host.
Parameter.5.ValueStringYes5The value of the fifth attribute for the bastion host. Set the value to the storage capacity that you want to use. Valid values: 0 to 500. Unit: TB.
Parameter.6.CodeStringYesBandwidthThe value of the sixth attribute for the bastion host. Set the value to the bandwidth that you want to use.

Valid values: 0 to 200. Unit: Mbit/s. The value must be a multiple of 10.

Parameter.6.ValueStringYes5The value of the sixth attribute for the bastion host. Set the value to the bandwidth that you want to use.

Valid values: 0 to 200. Unit: Mbit/s. The value must be a multiple of 10.

ProductCodeStringYesbastionhostThe service code of the bastion host. Set the value to bastionhost, which indicates Bastionhost.
SubscriptionTypeStringYesSubscriptionThe billing method of the bastion host. Set the value to Subscription.
ProductTypeStringNobastionhostThe service type of the bastion host. Set the value to bastionhost, which indicates Bastionhost.
InstanceIdStringYesbastionhost-cn-****The ID of the bastion host.
ClientTokenStringNoJASIOFKVNVI****The client token that is used to ensure the idempotence of the request. The server checks whether a request with the same client token has been received. If yes, the server returns the query result of the last request.

Response parameters

ParameterTypeExampleDescription
CodeStringSuccessThe status code.
DataStructThe returned information.
â””InstanceIdStringbastionhost-cn-****The ID of the bastion host.
â””OrderIdString2026532523****The ID of the order.
MessageStringSuccessful! The message returned for Code.
RequestIdString6000EE23-274B-4E07-A697-FF2E999520A4The ID of the request.
SuccessBooleantrueIndicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ModifyInstance
&Parameter.1.Code=RegionId
&Parameter.1.Value=cn-shanghai
&Parameter.2.Code=NetworkType
&Parameter.2.Value=vpc
&Parameter.3.Code=PlanCode
&Parameter.3.Value=cloudbastion
&Parameter.4.Code=LicenseCode
&Parameter.4.Value=bhah_ult_5000_asset
&Parameter.5.Code=Storage
&Parameter.5.Value=5
&Parameter.6.Code=Bandwidth
&Parameter.6.Value=5
&ProductCode=bastionhost
&SubscriptionType=Subscription
&Period=12
&<Common request parameters>

Sample success responses

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****
    }
}