All Products
Search
Document Center

Bastionhost:Call the SetRenewal operation to enable auto-renewal for a bastion host

Last Updated:Aug 20, 2024

Bastionhost does not provide an API operation to enable auto-renewal for a bastion host. To enable auto-renewal for a bastion host, call the SetRenewal operation of the BSS API.

Background information

The Transactions and Bills Management (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 SetRenewal operation to enable auto-renewal for a bastion host. For more information about how to call the operation, see Request Structure.

This topic describes how to call the SetRenewal operation to enable auto-renewal for 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

InstanceIDs

String

Yes

The bastion host ID. If you specify multiple IDs, separate them with commas (,). You can enable auto-renewal only for subscription bastion hosts. You can specify up to 100 IDs.

bastionhost-cn-****

RenewalStatus

String

Yes

The method that is used to renew the bastion host. Valid values:

  • AutoRenewal

  • ManualRenewal

  • NotRenewal

AutoRenewal

RenewalPeriod

Integer

No

The auto-renewal period for the instance. Unit: month. Valid values:

  • 1

  • 2

  • 3

  • 6

  • 12

Note

RenewalPeriod is required if you set RenewalStatus to AutoRenewal.

1

RenewalPeriodUnit

String

No

The unit of the auto-renewal period. Valid values:

  • M: month.

  • Y: year.

Note

RenewalPeriodUnit is required if you set RenewalStatus to AutoRenewal.

M

ProductCode

String

Yes

The code of the service.

Set the value to bastionhost, which indicates Bastionhost.

bastionhost

ProductType

String

No

The service type.

Set the value to bastionhost, which indicates Bastionhost.

bastionhost

SubscriptionType

String

No

The billing method of the bastion host.

Set the value to Subscription.

Subscription

Response parameters

Parameter

Type

Example

Description

Code

String

Success

The status code.

Message

String

Successful!

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

<SetRenewalResponse>
      <Message>Successful!</Message>
      <RequestId>6000EE23-274B-4E07-A697-FF2E999520A4</RequestId>
      <Success>true</Success>
      <Code>Success</Code>
</SetRenewalResponse>

JSON format

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