ModifyAppInstanceGroupChargeType
Changes the billing method of a specified app instance group to the target billing method and returns the ID of the billing conversion task to be created.
Operation description
This operation converts the billing method, which may create an order and trigger subsequent billing changes. A successful response or a returned task ID does not indicate that the new billing method has taken effect.
Prerequisites:
The resources belong to the current account, and the product and business region match the request. Only one app instance group can be specified per request.
The target billing method must be different from the current one, and the target resource specifications must support the corresponding sales and Billable methods.
App instance groups that have been added to a valid collection cannot have their Billable methods converted individually.
Multiple app instance groups created in the same batch of orders cannot have their Billable methods converted separately.
Parameter relationships and call sequence:
Query the resource details first to confirm the product, business region, and current
ChargeType. You can use GetAppInstanceGroup to query cloud app instance groups.Explicitly specify the target
ChargeType. If you need to purchase a subscription, specify the purchase duration by combiningPeriodandPeriodUnit. The period combination must comply with the sales rules currently supported by the resource.Set
AutoPaybased on whether automatic payment is allowed. If auto-renewal is involved, explicitly setAutoRenew.After the call, save the returned
AppInstanceGroupModel.TaskId. If there are unpaid orders, complete the payment first, and then query the resource details again to confirm that the billing method has been changed.
This operation does not accept an expiration time parameter. Do not pass the expiration time from other operations into this request. The task examples only illustrate the purpose of the ID and do not define a fixed prefix or length for actual task IDs.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
appstreaming:ModifyAppInstanceGroupChargeType |
update |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| BizRegionId |
string |
Yes |
The ID of the business region where the target app instance group is located. It must be the same as the actual region to which the resource belongs. |
cn-hangzhou |
| ProductType |
string |
Yes |
The product type. Set this parameter to the following fixed value when you call the operation:
Valid values:
|
CloudApp |
| AppInstanceGroupIds |
array |
Yes |
The list of IDs of the app instance groups to be modified, in JSON array format. You must and can only specify one item at a time. The resources must belong to the current account, the specified product, and the business region. |
|
|
string |
Yes |
The ID of a cloud app instance group to be modified. You can obtain it from the cloud app instance group list. |
aig-9ciijz60n4xsv**** |
|
| ChargeType |
string |
Yes |
The target billing method after conversion. It must be different from the current billing method.
Valid values:
|
PrePaid |
| PromotionId |
string |
No |
The ID of the promotion used for this conversion order. It takes effect only when an order is created and the promotion is applicable. If omitted, no specific coupon is specified. The availability of the promotion is subject to the order result. |
17440009**** |
| AutoPay |
boolean |
No |
Specifies whether to allow automatic payment for this conversion order. Default value:
Valid values:
|
false |
| AutoRenew |
boolean |
No |
Specifies whether to enable auto-renewal for this order. We recommend that you explicitly specify this parameter for subscription orders to determine whether to enable auto-renewal.
Valid values:
|
false |
| Period |
integer |
No |
The numeric part of the purchase duration, used together with |
1 |
| PeriodUnit |
string |
No |
The unit of the purchase duration, used together with
These units do not mean that any combination can be purchased for every product. When converting to subscription, select a period supported by the target resource. For example, for a resource that supports monthly purchases, you can set Valid values:
|
Month |
The list of resource IDs is in JSON array format and contains only one item. The product, business region, and target resource must match. The target billing method must not be the same as the current value.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response information of this call. |
||
| RequestId |
string |
The unique ID of the request. You can use this ID to troubleshoot request issues. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
| AppInstanceGroupModel |
object |
The task information for this billing method conversion. |
|
| TaskId |
string |
The ID of the billing conversion order task, used to associate with this conversion. It is returned only when a related order task is required and created. It does not indicate that the payment is completed or the new billing method has taken effect. |
task-123 |
Returns the request ID and the billing conversion task information. A returned task ID indicates that a related order task is returned. You still need to complete the payment and verify the actual billing method of the resource.
Examples
Success response
JSON format
{
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
"AppInstanceGroupModel": {
"TaskId": "task-123"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.