Bastionhost does not provide an API operation to renew a bastion host. To renew a bastion host, you can call the RenewInstance 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 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
Request parameters
Parameter | Type | Required | Description | Example |
ProductCode | String | Yes | The code of the service. Set the value to bastionhost, which indicates Bastionhost. | bastionhost |
InstanceId | String | Yes | The ID of the bastion host that you want to renew. | bastionhost-cn-**** |
RenewPeriod | Integer | Yes | The duration of the subscription renewal. Unit: month. Valid values:
| 6 |
ProductType | String | No | The service type. Set the value to bastionhost, which indicates Bastionhost. | bastionhost |
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. This parameter ensures the idempotence of requests and prevents repeated requests. | JASIOFKVNVI**** |
Response parameters
Parameter | Type | Example | Description |
Code | String | Success | The status code. |
Data | Struct | The returned information. | |
└OrderId | String | 2026532523**** | The ID of the order. |
Message | String | Successful! | The return message that corresponds to the value of Code. |
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
<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****
}
}