@@ -8,6 +8,75 @@ import OpenApiUtil from '@alicloud/openapi-util';
88import EndpointUtil from '@alicloud/endpoint-util' ;
99import * as $tea from '@alicloud/tea-typescript' ;
1010
11+ export class ApproveOperationRequest extends $tea . Model {
12+ nodeId ?: string ;
13+ operationType ?: string ;
14+ static names ( ) : { [ key : string ] : string } {
15+ return {
16+ nodeId : 'NodeId' ,
17+ operationType : 'OperationType' ,
18+ } ;
19+ }
20+
21+ static types ( ) : { [ key : string ] : any } {
22+ return {
23+ nodeId : 'string' ,
24+ operationType : 'string' ,
25+ } ;
26+ }
27+
28+ constructor ( map ?: { [ key : string ] : any } ) {
29+ super ( map ) ;
30+ }
31+ }
32+
33+ export class ApproveOperationResponseBody extends $tea . Model {
34+ errorMessage ?: string ;
35+ requestId ?: string ;
36+ static names ( ) : { [ key : string ] : string } {
37+ return {
38+ errorMessage : 'ErrorMessage' ,
39+ requestId : 'RequestId' ,
40+ } ;
41+ }
42+
43+ static types ( ) : { [ key : string ] : any } {
44+ return {
45+ errorMessage : 'string' ,
46+ requestId : 'string' ,
47+ } ;
48+ }
49+
50+ constructor ( map ?: { [ key : string ] : any } ) {
51+ super ( map ) ;
52+ }
53+ }
54+
55+ export class ApproveOperationResponse extends $tea . Model {
56+ headers : { [ key : string ] : string } ;
57+ statusCode : number ;
58+ body : ApproveOperationResponseBody ;
59+ static names ( ) : { [ key : string ] : string } {
60+ return {
61+ headers : 'headers' ,
62+ statusCode : 'statusCode' ,
63+ body : 'body' ,
64+ } ;
65+ }
66+
67+ static types ( ) : { [ key : string ] : any } {
68+ return {
69+ headers : { 'type' : 'map' , 'keyType' : 'string' , 'valueType' : 'string' } ,
70+ statusCode : 'number' ,
71+ body : ApproveOperationResponseBody ,
72+ } ;
73+ }
74+
75+ constructor ( map ?: { [ key : string ] : any } ) {
76+ super ( map ) ;
77+ }
78+ }
79+
1180export class ChangeResourceGroupRequest extends $tea . Model {
1281 resourceGroupId ?: string ;
1382 resourceId ?: string ;
@@ -2792,6 +2861,39 @@ export default class Client extends OpenApi {
27922861 return EndpointUtil . getEndpointRules ( productId , regionId , endpointRule , network , suffix ) ;
27932862 }
27942863
2864+ async approveOperationWithOptions ( request : ApproveOperationRequest , runtime : $Util . RuntimeOptions ) : Promise < ApproveOperationResponse > {
2865+ Util . validateModel ( request ) ;
2866+ let body : { [ key : string ] : any } = { } ;
2867+ if ( ! Util . isUnset ( request . nodeId ) ) {
2868+ body [ "NodeId" ] = request . nodeId ;
2869+ }
2870+
2871+ if ( ! Util . isUnset ( request . operationType ) ) {
2872+ body [ "OperationType" ] = request . operationType ;
2873+ }
2874+
2875+ let req = new $OpenApi . OpenApiRequest ( {
2876+ body : OpenApiUtil . parseToMap ( body ) ,
2877+ } ) ;
2878+ let params = new $OpenApi . Params ( {
2879+ action : "ApproveOperation" ,
2880+ version : "2022-12-15" ,
2881+ protocol : "HTTPS" ,
2882+ pathname : "/" ,
2883+ method : "POST" ,
2884+ authType : "AK" ,
2885+ style : "RPC" ,
2886+ reqBodyType : "formData" ,
2887+ bodyType : "json" ,
2888+ } ) ;
2889+ return $tea . cast < ApproveOperationResponse > ( await this . callApi ( params , req , runtime ) , new ApproveOperationResponse ( { } ) ) ;
2890+ }
2891+
2892+ async approveOperation ( request : ApproveOperationRequest ) : Promise < ApproveOperationResponse > {
2893+ let runtime = new $Util . RuntimeOptions ( { } ) ;
2894+ return await this . approveOperationWithOptions ( request , runtime ) ;
2895+ }
2896+
27952897 async changeResourceGroupWithOptions ( request : ChangeResourceGroupRequest , runtime : $Util . RuntimeOptions ) : Promise < ChangeResourceGroupResponse > {
27962898 Util . validateModel ( request ) ;
27972899 let query = { } ;
0 commit comments