How to change the billing method of one or more instances

坏嘻嘻
Release: 2018-09-20 14:28:32
Original
2194 people have browsed it

The content of this article is about how to change the billing method of one or multiple instances. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

ModifyInstanceChargeType

Change the billing method of one or more instances. Supports conversion between pay-as-you-go instances and prepaid (annual and monthly) instances. At the same time, all pay-as-you-go cloud disks attached to the instances can be converted to prepaid (annual and monthly) cloud disks.

Description

When calling this interface, you need to pay attention:

Members who have reached a certain level can use prepaid transfer Pay-as-you-go functionality.

The status of the target instance must be Running or Stopped, and the billing method can be modified only if there is no outstanding payment.

If the pay-as-you-go instance has a release time set, this interface cannot be called.

Supports batch operations, and can modify the billing method of up to 20 instances at a time.

Supports the simultaneous conversion of all pay-as-you-go data disks attached to the instance into annual and monthly subscription data disks.

When you convert an annual or monthly instance to a mortgage instance, the new billing method will cover the entire life cycle of the instance. You will receive a refund for the price difference between the instance billing before and after the modification, which will be refunded to your original account. In payment channels, used vouchers will not be returned.

After changing the billing method, the fee will be automatically deducted by default. You need to ensure that your account balance is sufficient, otherwise an abnormal order will be generated, and the order can only be canceled at this time. If your account balance is insufficient, you can set the parameter AutoPay to false. At this time, a normal unpaid order will be generated, and you can log in to the ECS management console to pay.

Request parameters

How to change the billing method of one or more instances

How to change the billing method of one or more instances

## Return parametersHow to change the billing method of one or more instances

Example

Request example

https://ecs.aliyuncs.com/?Action=ModifyInstanceChargeType
&RegionId=cn-hangzhou
&InstanceIds=["i-xxxxx1","i-xxxxx2"]
&Period=1
&PeriodUnit=Month
&AutoPay=false
&IncludeAllDisks=true
&ClientToken=xxxxxxxxxxxxxx
&<公共请求参数>
Copy after login

Return example

XML format

<ModifyInstanceConfigurationResponse>
    <RequestId>04F0F334-1335-436C-A1D7-6C044FExxxxx</RequestId>
    <OrderId>10111111111xxxxx</OrderId>
</ModifyInstanceConfigurationResponse>
Copy after login

JSON format

{
    "RequestId": "04F0F334-1335-436C-A1D7-6C044FExxxxx",
    "OrderId": 1011111111111111,
}
Copy after login

Error codes

The following are the error codes unique to this interface. For more error codes, please visit the API Error Center.

How to change the billing method of one or more instances

The above is the detailed content of How to change the billing method of one or more instances. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template