Skip to content

Commit 8e91e86

Browse files
committed
Update API RenewAppInstanceGroup: add request parameters RenewAmount.
1 parent a106ae5 commit 8e91e86

File tree

5 files changed

+156
-4
lines changed

5 files changed

+156
-4
lines changed

appstream-center-20210901/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alicloud/appstream-center20210901",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "",
55
"main": "dist/client.js",
66
"scripts": {

appstream-center-20210901/src/client.ts

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,12 +1985,18 @@ export default class Client extends OpenApi {
19851985
* @remarks
19861986
* Before you call this operation, make sure that you fully understand the [billing methods and prices](https://help.aliyun.com/document_detail/426039.html) of App Streaming.
19871987
*
1988-
* @param request - RenewAppInstanceGroupRequest
1988+
* @param tmpReq - RenewAppInstanceGroupRequest
19891989
* @param runtime - runtime options for this request RuntimeOptions
19901990
* @returns RenewAppInstanceGroupResponse
19911991
*/
1992-
async renewAppInstanceGroupWithOptions(request: $_model.RenewAppInstanceGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RenewAppInstanceGroupResponse> {
1993-
request.validate();
1992+
async renewAppInstanceGroupWithOptions(tmpReq: $_model.RenewAppInstanceGroupRequest, runtime: $dara.RuntimeOptions): Promise<$_model.RenewAppInstanceGroupResponse> {
1993+
tmpReq.validate();
1994+
let request = new $_model.RenewAppInstanceGroupShrinkRequest({ });
1995+
OpenApiUtil.convert(tmpReq, request);
1996+
if (!$dara.isNull(tmpReq.renewNodes)) {
1997+
request.renewNodesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.renewNodes, "RenewNodes", "json");
1998+
}
1999+
19942000
let query = { };
19952001
if (!$dara.isNull(request.appInstanceGroupId)) {
19962002
query["AppInstanceGroupId"] = request.appInstanceGroupId;
@@ -2016,6 +2022,18 @@ export default class Client extends OpenApi {
20162022
query["PromotionId"] = request.promotionId;
20172023
}
20182024

2025+
if (!$dara.isNull(request.renewAmount)) {
2026+
query["RenewAmount"] = request.renewAmount;
2027+
}
2028+
2029+
if (!$dara.isNull(request.renewMode)) {
2030+
query["RenewMode"] = request.renewMode;
2031+
}
2032+
2033+
if (!$dara.isNull(request.renewNodesShrink)) {
2034+
query["RenewNodes"] = request.renewNodesShrink;
2035+
}
2036+
20192037
let req = new $OpenApiUtil.OpenApiRequest({
20202038
query: OpenApiUtil.query(query),
20212039
});

appstream-center-20210901/src/models/RenewAppInstanceGroupRequest.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ export class RenewAppInstanceGroupRequest extends $dara.Model {
7979
* 17440009****
8080
*/
8181
promotionId?: string;
82+
renewAmount?: number;
83+
renewMode?: string;
84+
renewNodes?: string[];
8285
static names(): { [key: string]: string } {
8386
return {
8487
appInstanceGroupId: 'AppInstanceGroupId',
@@ -87,6 +90,9 @@ export class RenewAppInstanceGroupRequest extends $dara.Model {
8790
periodUnit: 'PeriodUnit',
8891
productType: 'ProductType',
8992
promotionId: 'PromotionId',
93+
renewAmount: 'RenewAmount',
94+
renewMode: 'RenewMode',
95+
renewNodes: 'RenewNodes',
9096
};
9197
}
9298

@@ -98,10 +104,16 @@ export class RenewAppInstanceGroupRequest extends $dara.Model {
98104
periodUnit: 'string',
99105
productType: 'string',
100106
promotionId: 'string',
107+
renewAmount: 'number',
108+
renewMode: 'string',
109+
renewNodes: { 'type': 'array', 'itemType': 'string' },
101110
};
102111
}
103112

104113
validate() {
114+
if(Array.isArray(this.renewNodes)) {
115+
$dara.Model.validateArray(this.renewNodes);
116+
}
105117
super.validate();
106118
}
107119

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class RenewAppInstanceGroupShrinkRequest extends $dara.Model {
6+
/**
7+
* @remarks
8+
* The ID of the delivery group.
9+
*
10+
* This parameter is required.
11+
*
12+
* @example
13+
* aig-9ciijz60n4xsv****
14+
*/
15+
appInstanceGroupId?: string;
16+
/**
17+
* @remarks
18+
* Specifies whether to enable automatic payment.
19+
*
20+
* Valid values:
21+
*
22+
* * true
23+
* * false: manual payment. This is the default value.
24+
*
25+
* @example
26+
* false
27+
*/
28+
autoPay?: boolean;
29+
/**
30+
* @remarks
31+
* The subscription duration of resources. This parameter must be configured together with `PeriodUnit`.
32+
*
33+
* This parameter is required.
34+
*
35+
* @example
36+
* 1
37+
*/
38+
period?: number;
39+
/**
40+
* @remarks
41+
* The unit of the subscription duration. This parameter must be configured together with `Period`. The following items describe valid values for the combinations of `Period` and `PeriodUnit`:
42+
*
43+
* * 1 Week
44+
* * 1 Month
45+
* * 2 Month
46+
* * 3 Month
47+
* * 6 Month
48+
* * 1 Year
49+
* * 2 Year
50+
* * 3 Year
51+
*
52+
* > The value of this parameter is case-insensitive. For example, `Week` is valid and `week` is invalid. If you specify a value combination other than the preceding combinations, such as `2 Week`, the operation can still be called. However, an error occurs when you place the order.
53+
*
54+
* This parameter is required.
55+
*
56+
* @example
57+
* Week
58+
*/
59+
periodUnit?: string;
60+
/**
61+
* @remarks
62+
* The product type.
63+
*
64+
* Valid value:
65+
*
66+
* * CloudApp: App Streaming
67+
*
68+
* This parameter is required.
69+
*
70+
* @example
71+
* CloudApp
72+
*/
73+
productType?: string;
74+
/**
75+
* @remarks
76+
* The promotion ID. You can call the [GetResourcePrice](https://help.aliyun.com/document_detail/428503.html) operation to obtain the ID.
77+
*
78+
* @example
79+
* 17440009****
80+
*/
81+
promotionId?: string;
82+
renewAmount?: number;
83+
renewMode?: string;
84+
renewNodesShrink?: string;
85+
static names(): { [key: string]: string } {
86+
return {
87+
appInstanceGroupId: 'AppInstanceGroupId',
88+
autoPay: 'AutoPay',
89+
period: 'Period',
90+
periodUnit: 'PeriodUnit',
91+
productType: 'ProductType',
92+
promotionId: 'PromotionId',
93+
renewAmount: 'RenewAmount',
94+
renewMode: 'RenewMode',
95+
renewNodesShrink: 'RenewNodes',
96+
};
97+
}
98+
99+
static types(): { [key: string]: any } {
100+
return {
101+
appInstanceGroupId: 'string',
102+
autoPay: 'boolean',
103+
period: 'number',
104+
periodUnit: 'string',
105+
productType: 'string',
106+
promotionId: 'string',
107+
renewAmount: 'number',
108+
renewMode: 'string',
109+
renewNodesShrink: 'string',
110+
};
111+
}
112+
113+
validate() {
114+
super.validate();
115+
}
116+
117+
constructor(map?: { [key: string]: any }) {
118+
super(map);
119+
}
120+
}
121+

appstream-center-20210901/src/models/model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ export { PageListAppInstanceGroupUserRequest } from './PageListAppInstanceGroupU
168168
export { PageListAppInstanceGroupUserResponseBody } from './PageListAppInstanceGroupUserResponseBody';
169169
export { PageListAppInstanceGroupUserResponse } from './PageListAppInstanceGroupUserResponse';
170170
export { RenewAppInstanceGroupRequest } from './RenewAppInstanceGroupRequest';
171+
export { RenewAppInstanceGroupShrinkRequest } from './RenewAppInstanceGroupShrinkRequest';
171172
export { RenewAppInstanceGroupResponseBody } from './RenewAppInstanceGroupResponseBody';
172173
export { RenewAppInstanceGroupResponse } from './RenewAppInstanceGroupResponse';
173174
export { TagCloudResourcesRequest } from './TagCloudResourcesRequest';

0 commit comments

Comments
 (0)