SetRenewal

更新时间:
复制 MD 格式

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

You can call this operation directly in OpenAPI Explorer without needing to calculate a signature. OpenAPI Explorer also automatically generates SDK code examples after a successful call.

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: The instance is automatically renewed.

  • ManualRenewal: The instance must be renewed manually.

  • NotRenewal: The instance is not renewed upon expiration.

AutoRenewal

RenewalPeriod

Integer

No

The auto-renewal period. Unit: months. Valid values:

  • 1

  • 2

  • 3

  • 6

  • 12

Note

This parameter 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

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: China site

  • kms_ddi_public_intl: international site

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