All Products
Search
Document Center

Bastionhost:Call the ModifyInstance operation to modify the specifications of a bastion host

Last Updated:Sep 12, 2024

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 Transactions and Bills Management (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

Parameter

Type

Required

Description

Example

ProductCode

string

Yes

The code of the service.

bastionhost

ProductType

string

No

The service type.

bastionhost

SubscriptionType

string

Yes

The billing method. Bastion hosts use only the subscription billing method. Set the value to Subscription.

Subscription

ModifyType

string

Yes

The type of specification changes. Valid values:

  • Upgrade: upgrades the specifications of the bastion host.

  • Downgrade: downgrades the specifications of the bastion host.

    Note

    This feature is in canary release. If you want to use this feature, join the DingTalk group 33797269 to request technical support.

Upgrade

InstanceId

String

Yes

bastionhost-cn-****

The ID of the bastion host.

ClientToken

string

No

The client token that is used to ensure the idempotence of the request. The server checks whether a request that uses the same client token has been received. If a request that uses the same client token has been received, the server returns the same request result as the previous request.

JASIOFKVNVIXXXXXX

Parameter

object []

No

The details of the attributes.

└Value

string

Yes

The value of the Nth attribute configured for the bastion host. Valid values of N: 1 to 100.

disk

└Code

string

Yes

The code of the Nth attribute configured for the bastion host. Valid values of N: 1 to 100. If you want to configure multiple attributes, concatenate the attributes in ascending numerical order.

InstanceType

Parameter settings

Parameter

Type

Required

Example

Description

Parameter.1.Code

String

Yes

RegionId

The code of the first attribute for the bastion host. Set the value to RegionId, which indicates the region in which the bastion host is deployed.

Parameter.1.Value

String

Yes

cn-shanghai

The value of the first attribute for the bastion host. Set the value to the region ID of the bastion host. You can call the DescribeRegions operation to query the region ID.

Parameter.2.Code

String

Yes

NetworkType

The 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.Value

String

Yes

vpc

The 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.Code

String

Yes

PlanCode

The code of the third attribute for the bastion host. Set the value to PlanCode, which indicates the edition of the bastion host.

Parameter.3.Value

String

Yes

cloudbastion

The value of the third attribute for the bastion host. Set the value to the edition that you want to use. Valid values:

  • cloudbastion: Basic Edition.

  • cloudbastion_ha: Enterprise Edition

Parameter.4.Code

String

Yes

LicenseCode

The 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.Value

String

Yes

bhah_ult_5000_asset

The 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: Up to 50 assets can be managed by a bastion host. This applies to both Basic Edition and Enterprise Edition.

  • bhah_ent_100_asset: Up to 100 assets can be managed by a bastion host. This applies to both Basic Edition and Enterprise Edition.

  • bhah_ent_200_asset: Up to 200 assets can be managed by a bastion host. This applies to both Basic Edition and Enterprise Edition.

  • bhah_ult_500_asset: Up to 500 assets can be managed by a bastion host. This applies to both Basic Edition and Enterprise Edition.

  • bhah_ult_1000_asset: Up to 1,000 assets can be managed by a bastion host. This applies only to Enterprise Edition.

  • bhah_ult_2000_asset: Up to 2,000 assets can be managed by a bastion host. This applies only to Enterprise Edition.

  • bhah_ult_5000_asset: Up to 5,000 assets can be managed by a bastion host. This applies only to Enterprise Edition.

  • bhah_ult_10000_asset: Up to 10,000 assets can be managed by a bastion host. This applies only to Enterprise Edition.

Parameter.5.Code

String

Yes

Storage

The 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.Value

String

Yes

5

The 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.Code

String

Yes

Bandwidth

The code of the sixth attribute configured for the bastion host, which indicates the maximum bandwidth of the bastion host.

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

Parameter.6.Value

String

Yes

5

The 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.

Response parameters

Parameter

Type

Example

Description

Code

String

Success

The returned status code.

Data

Struct

The returned information.

└InstanceId

String

bastionhost-cn-****

The ID of the bastion host.

└OrderId

String

2026532523****

The ID of the order created for the bastion host.

Message

String

Successful!

The returned error message.

RequestId

String

6000EE23-274B-4E07-A697-FF2E999520A4

The request ID.

Success

Boolean

true

Indicates whether the request is successful.

Examples

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