@@ -2401,6 +2401,74 @@ public function novaAssociateSecurityGroupAsyncWithHttpInfo($request){
24012401 $ asyncRequest = true );
24022402 }
24032403
2404+ /**
2405+ * 添加云服务器网卡
2406+ *
2407+ * 给云服务器添加一张网卡。
2408+ *
2409+ * Please refer to G42 cloud API Explorer for details.
2410+ *
2411+ * @param $request 请求对象
2412+ * @return response
2413+ */
2414+ public function novaAttachInterfaceAsync ($ request )
2415+ {
2416+ return $ this ->novaAttachInterfaceAsyncWithHttpInfo ($ request );
2417+ }
2418+
2419+ public function novaAttachInterfaceAsyncWithHttpInfo ($ request ){
2420+ $ collection_formats = [];
2421+ $ resourcePath = '/v2.1/{project_id}/servers/{server_id}/os-interface ' ;
2422+ $ formParams = [];
2423+ $ queryParams = [];
2424+ $ headerParams = [];
2425+ $ pathParams = [];
2426+ $ httpBody = null ;
2427+ $ multipart = false ;
2428+ $ localVarParams = [];
2429+ $ arr = $ request ::attributeMap ();
2430+ foreach ($ arr as $ k => $ v ) {
2431+ $ getter = $ request ::getters ()[$ k ];
2432+ $ value = $ request ->$ getter ();
2433+ $ localVarParams [$ k ] = $ value ;
2434+ }
2435+ if ($ localVarParams ['serverId ' ] !== null ) {
2436+ $ pathParams ['server_id ' ] = $ localVarParams ['serverId ' ];
2437+ }
2438+ if ($ localVarParams ['body ' ] !== null ) {
2439+ $ httpBody = $ localVarParams ['body ' ];
2440+ }
2441+
2442+ if ($ multipart ) {
2443+ $ headers = $ this ->headerSelector ->selectHeadersForMultipart (
2444+ ['*/* ' , 'application/json ' ]
2445+ );
2446+ } else {
2447+ $ headers = $ this ->headerSelector ->selectHeaders (
2448+ ['*/* ' , 'application/json ' ],
2449+ ['application/json;charset=UTF-8 ' ]
2450+ );
2451+ }
2452+ $ headers = array_merge (
2453+ $ headerParams ,
2454+ $ headers
2455+ );
2456+
2457+ return $ this ->callApi (
2458+ $ method ='POST ' ,
2459+ $ resourcePath ,
2460+ $ pathParams ,
2461+ $ queryParams ,
2462+ $ headerParams =$ headers ,
2463+ $ body =$ httpBody ,
2464+ $ multipart = $ multipart ,
2465+ $ postParams =$ formParams ,
2466+ $ responseType ='\G42Cloud\SDK\Ecs\V2\Model\NovaAttachInterfaceResponse ' ,
2467+ $ collectionFormats =$ collection_formats ,
2468+ $ requestType ='\G42Cloud\SDK\Ecs\V2\Model\NovaAttachInterfaceRequest ' ,
2469+ $ asyncRequest = true );
2470+ }
2471+
24042472 /**
24052473 * 创建和导入SSH密钥
24062474 *
0 commit comments