Key Management Service (KMS) does not provide an operation to set up auto-renewal for instances. You can call the SetRenewal operation of the Alibaba Cloud Billing Management API to set up auto-renewal for KMS instances.
Background information
The BSS API is a set of common APIs for managing your Alibaba Cloud resources. For example, you can use these APIs to query service prices, manage instances, and retrieve billing information. For a full list of operations supported by the BSS API, see List of operations by function.
You can call the BSS API's SetRenewal operation to configure auto-renewal for a KMS instance. For information about how to call this operation, see Request syntax and signature method V3.
Debugging
Request parameters
Parameter | Type | Required | Description | Example |
InstanceIDs | String | Yes | The IDs of the instances for which you want to set auto-renewal. Only subscription instances are supported. You can specify up to 100 instance IDs. Separate multiple IDs with commas (,). | kst-hzz65f176a0ogplgq**** |
RenewalStatus | String | Yes | The renewal status. Valid values:
| AutoRenewal |
RenewalPeriod | Integer | No | The auto-renewal period. Unit: months. Valid values:
Note This parameter is required if you set RenewalStatus to AutoRenewal. | 1 |
RenewalPeriodUnit | String | No | The unit of the auto-renewal period. Valid values:
Note This parameter is required if you set RenewalStatus to AutoRenewal. | M |
ProductCode | String | Yes | The service code. The service code for Key Management Service is kms. | kms |
ProductType | String | No | The service type. Valid values:
| kms_ddi_public_cn |
SubscriptionType | String | No | The billing method. The value must be Subscription. | Subscription |
Response parameters
Parameter | Type | Example | Description |
Code | String | Success | The status code returned for the request. |
Message | String | Successful! | The message returned for the request. |
RequestId | String | 6000EE23-274B-4E07-A697-FF2E999520A4 | The request ID. |
Success | Boolean | true | Indicates whether the request was successful. |
Examples
Sample success response
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"
}