ModifyInstance

Updated at:

Key Management Service (KMS) does not provide an operation to modify a KMS instance. To modify an instance, you can call the ModifyInstance operation of the transactions and bills management API. This API is 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, and obtain bills. For more information about the operations of the BSS API, see List of operations by function.

You can call the Instance Change Service interface in the Alibaba Cloud Billing and Account Management API to modify the configuration of a KMS instance. For information about how to call this interface, see request structure.

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

Name

Type

Required

Description

Example

ProductCode

string

Yes

The code of the service. Set the value to kms.

kms

ProductType

string

No

Product type

  • kms_ddi_public_cn: Alibaba Cloud China website

  • kms_ddi_public_intl: International site (alibabacloud.com)

kms_ddi_public_cn

SubscriptionType

string

Yes

The billing method. Valid values:

  • Subscription: upfront.

  • PayAsYouGo: pay-as-you-go.

Subscription

ModifyType

string

Yes

The type of configuration changes. Valid values:

  • Upgrade: upgrades the configurations of the KMS instance.

  • Downgrade: downgrades the configuration of the KMS instance.

Upgrade

InstanceId

String

Yes

kst-shh669f4f4ea2fzs5****

The ID of the KMS instance whose configurations you want to change.

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.

JASIOFKVNVIXXXXXX

Parameter

object []

No

The modules.

└Value

string

Yes

The value property configuration for the nth module, where n ranges from 1 to 100.

disk

└Code

string

Yes

This property specifies the configuration for the code property of the nth module. The value of n is an integer that ranges from 1 to 100. If you have multiple module properties, specify them in a sequence by incrementing n, such as n=1, n=2, and n=3.

InstanceType

Parameter settings

Name

Type

Required

Example value

Description

Parameter.1.Code

String

No

Spec

The performance data of the KMS instance.

Parameter.1.Value

String

No

1000

You can go to the KMS buy page to view valid values.

Parameter.2.Code

String

No

KeyNum

The key quota of the KMS instance.

Parameter.2.Value

String

No

1000

You can go to the KMS buy page to view valid values.

Parameter.3.Code

String

No

SecretNum

Indicates the quota for KMS instance credentials.

Parameter.3.Value

String

No

1000

You can go to the KMS buy page to view valid values.

Parameter.4.Code

String

No

VpcNum

The access management quota of the KMS instance.

Parameter.4.Value

String

No

10

You can go to the KMS buy page to view valid values.

Parameter.5.Code

String

No

log

Specifies whether logging is enabled for the KMS instance.

Parameter.5.Value

String

No

1

Valid values:

  • 0: no

  • 1: Enabled

Parameter.6.Code

String

No

logStore

The log capacity.

Parameter.6.Value

String

No

1000

You can go to the KMS buy page to view valid values.

Response parameters

Name

Type

Example

Description

Code

String

Success

The status code.

Data

Struct

The returned information.

└HostId

String

testid

The ID of the host.

└OrderId

String

2026532523****

The order ID was successfully created.

Message

String

Successful!

The error message for this request.

RequestId

String

65AE3CCE-D625-5CD5-A874-2DAB0CF80B37

The request ID.

Success

Boolean

true

Indicates whether the call is successful.

Examples

Sample success responses

XML format

<ModifyInstanceResponse>
      <Message>Successful!</Message>
      <RequestId>65AE3CCE-D625-5CD5-A874-2DAB0CF80B37</RequestId>
      <Success>true</Success>
      <Code>Success</Code>
      <Data>
            <OrderId>2026532523****</OrderId>
            <HostId>testid</HostId>
      </Data>
</ModifyInstanceResponse>

JSON format

{
  "Message": "Successful!",
  "RequestId": "65AE3CCE-D625-5CD5-A874-2DAB0CF80B37",
  "Data": {
    "OrderId": 23648989570****,
    "HostId": "testid"
  },
  "Code": "Success",
  "Success": true
}