Bastionhost does not provide an API operation to renew a bastion host. However, you can call the RenewInstance operation supported by the transactions and bills management API to renew a bastion host. This API is also called BSS API for short.

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 RenewInstance operation to renew a bastion host. For more information about how to call the operation, see Request Structure.

This topic describes how to call the RenewInstance operation to renew 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
ActionStringYesRenewInstanceThe operation that you want to perform. Set the value to RenewInstance.
InstanceIdStringYesbastionhost-cn-****The ID of the bastion host.
ProductCodeStringYesbastionhostThe service code of the bastion host. Set the value to bastionhost, which indicates Bastionhost.
RenewPeriodIntegerYes6

The renewal period of the subscription bastion host. Unit: months. Valid values:

  • 1~9
  • 12
  • 24
  • 36
ProductTypeStringNobastionhost_std_public_intlThe service type of the bastion host. Set the value to bastionhost, which indicates Bastionhost.
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 so, the server returns the query result of the last request.

Response parameters

ParameterTypeExampleDescription
CodeStringSuccessThe status code.
DataStructThe returned information.
â””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=RenewInstance
&InstanceId=bastionhost-cn-****
&ProductCode=bastionhost
&RenewPeriod=6
&<Common request parameters>

Sample success responses

XML format

<RenewInstanceResponse>
      <Message>Successful!</Message>
      <RequestId>6000EE23-274B-4E07-A697-FF2E999520A4</RequestId>
      <Success>true</Success>
      <Code>Success</Code>
      <Data>
            <OrderId>2026532523****</OrderId>
      </Data>
</RenewInstanceResponse>

JSON format

{
    "Message": "Successful!",
    "RequestId": "6000EE23-274B-4E07-A697-FF2E999520A4",
    "Success": true,
    "Code": "Success",
    "Data": {
        "OrderId": 2026532523****
    }
}