You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

client.go 266 kB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187
  1. // Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package v20180525
  15. import (
  16. "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server"
  17. "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter"
  18. "code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
  19. "code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
  20. "context"
  21. "errors"
  22. "flag"
  23. "github.com/golang/glog"
  24. "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
  25. tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http"
  26. "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
  27. "strconv"
  28. )
  29. const APIVersion = "2018-05-25"
  30. type Client struct {
  31. common.Client
  32. }
  33. // Deprecated
  34. func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) {
  35. cpf := profile.NewClientProfile()
  36. client = &Client{}
  37. client.Init(region).WithSecretId(secretId, secretKey).WithProfile(cpf)
  38. return
  39. }
  40. func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error) {
  41. client = &Client{}
  42. client.Init(region).
  43. WithCredential(credential).
  44. WithProfile(clientProfile)
  45. return
  46. }
  47. func NewAcquireClusterAdminRoleRequest() (request *AcquireClusterAdminRoleRequest) {
  48. request = &AcquireClusterAdminRoleRequest{
  49. BaseRequest: &tchttp.BaseRequest{},
  50. }
  51. request.Init().WithApiInfo("tke", APIVersion, "AcquireClusterAdminRole")
  52. return
  53. }
  54. func NewAcquireClusterAdminRoleResponse() (response *AcquireClusterAdminRoleResponse) {
  55. response = &AcquireClusterAdminRoleResponse{
  56. BaseResponse: &tchttp.BaseResponse{},
  57. }
  58. return
  59. }
  60. // AcquireClusterAdminRole
  61. // 通过此接口,可以获取集群的tke:admin的ClusterRole,即管理员角色,可以用于CAM侧高权限的用户,通过CAM策略给予子账户此接口权限,进而可以通过此接口直接获取到kubernetes集群内的管理员角色。
  62. //
  63. // 可能返回的错误码:
  64. //
  65. // INTERNALERROR = "InternalError"
  66. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  67. // INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError"
  68. // INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError"
  69. // INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError"
  70. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  71. // INVALIDPARAMETER = "InvalidParameter"
  72. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  73. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  74. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  75. // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
  76. // UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist"
  77. func (c *Client) AcquireClusterAdminRole(request *AcquireClusterAdminRoleRequest) (response *AcquireClusterAdminRoleResponse, err error) {
  78. return c.AcquireClusterAdminRoleWithContext(context.Background(), request)
  79. }
  80. // AcquireClusterAdminRole
  81. // 通过此接口,可以获取集群的tke:admin的ClusterRole,即管理员角色,可以用于CAM侧高权限的用户,通过CAM策略给予子账户此接口权限,进而可以通过此接口直接获取到kubernetes集群内的管理员角色。
  82. //
  83. // 可能返回的错误码:
  84. //
  85. // INTERNALERROR = "InternalError"
  86. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  87. // INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError"
  88. // INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError"
  89. // INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError"
  90. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  91. // INVALIDPARAMETER = "InvalidParameter"
  92. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  93. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  94. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  95. // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
  96. // UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist"
  97. func (c *Client) AcquireClusterAdminRoleWithContext(ctx context.Context, request *AcquireClusterAdminRoleRequest) (response *AcquireClusterAdminRoleResponse, err error) {
  98. if request == nil {
  99. request = NewAcquireClusterAdminRoleRequest()
  100. }
  101. if c.GetCredential() == nil {
  102. return nil, errors.New("AcquireClusterAdminRole require credential")
  103. }
  104. request.SetContext(ctx)
  105. response = NewAcquireClusterAdminRoleResponse()
  106. err = c.Send(request, response)
  107. return
  108. }
  109. func NewAddClusterCIDRRequest() (request *AddClusterCIDRRequest) {
  110. request = &AddClusterCIDRRequest{
  111. BaseRequest: &tchttp.BaseRequest{},
  112. }
  113. request.Init().WithApiInfo("tke", APIVersion, "AddClusterCIDR")
  114. return
  115. }
  116. func NewAddClusterCIDRResponse() (response *AddClusterCIDRResponse) {
  117. response = &AddClusterCIDRResponse{
  118. BaseResponse: &tchttp.BaseResponse{},
  119. }
  120. return
  121. }
  122. // AddClusterCIDR
  123. // 给GR集群增加可用的ClusterCIDR
  124. //
  125. // 可能返回的错误码:
  126. //
  127. // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate"
  128. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  129. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  130. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  131. // INVALIDPARAMETER = "InvalidParameter"
  132. // INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange"
  133. // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster"
  134. // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
  135. // INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr"
  136. // INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute"
  137. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  138. func (c *Client) AddClusterCIDR(request *AddClusterCIDRRequest) (response *AddClusterCIDRResponse, err error) {
  139. return c.AddClusterCIDRWithContext(context.Background(), request)
  140. }
  141. // AddClusterCIDR
  142. // 给GR集群增加可用的ClusterCIDR
  143. //
  144. // 可能返回的错误码:
  145. //
  146. // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate"
  147. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  148. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  149. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  150. // INVALIDPARAMETER = "InvalidParameter"
  151. // INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange"
  152. // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster"
  153. // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
  154. // INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr"
  155. // INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute"
  156. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  157. func (c *Client) AddClusterCIDRWithContext(ctx context.Context, request *AddClusterCIDRRequest) (response *AddClusterCIDRResponse, err error) {
  158. if request == nil {
  159. request = NewAddClusterCIDRRequest()
  160. }
  161. if c.GetCredential() == nil {
  162. return nil, errors.New("AddClusterCIDR require credential")
  163. }
  164. request.SetContext(ctx)
  165. response = NewAddClusterCIDRResponse()
  166. err = c.Send(request, response)
  167. return
  168. }
  169. func NewAddExistedInstancesRequest() (request *AddExistedInstancesRequest) {
  170. request = &AddExistedInstancesRequest{
  171. BaseRequest: &tchttp.BaseRequest{},
  172. }
  173. request.Init().WithApiInfo("tke", APIVersion, "AddExistedInstances")
  174. return
  175. }
  176. func NewAddExistedInstancesResponse() (response *AddExistedInstancesResponse) {
  177. response = &AddExistedInstancesResponse{
  178. BaseResponse: &tchttp.BaseResponse{},
  179. }
  180. return
  181. }
  182. // AddExistedInstances
  183. // 添加已经存在的实例到集群
  184. //
  185. // 可能返回的错误码:
  186. //
  187. // INTERNALERROR = "InternalError"
  188. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  189. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  190. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  191. // INTERNALERROR_DB = "InternalError.Db"
  192. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  193. // INTERNALERROR_PARAM = "InternalError.Param"
  194. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  195. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  196. // INVALIDPARAMETER = "InvalidParameter"
  197. // LIMITEXCEEDED = "LimitExceeded"
  198. func (c *Client) AddExistedInstances(request *AddExistedInstancesRequest) (response *AddExistedInstancesResponse, err error) {
  199. return c.AddExistedInstancesWithContext(context.Background(), request)
  200. }
  201. // AddExistedInstances
  202. // 添加已经存在的实例到集群
  203. //
  204. // 可能返回的错误码:
  205. //
  206. // INTERNALERROR = "InternalError"
  207. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  208. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  209. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  210. // INTERNALERROR_DB = "InternalError.Db"
  211. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  212. // INTERNALERROR_PARAM = "InternalError.Param"
  213. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  214. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  215. // INVALIDPARAMETER = "InvalidParameter"
  216. // LIMITEXCEEDED = "LimitExceeded"
  217. func (c *Client) AddExistedInstancesWithContext(ctx context.Context, request *AddExistedInstancesRequest) (response *AddExistedInstancesResponse, err error) {
  218. if request == nil {
  219. request = NewAddExistedInstancesRequest()
  220. }
  221. if c.GetCredential() == nil {
  222. return nil, errors.New("AddExistedInstances require credential")
  223. }
  224. request.SetContext(ctx)
  225. response = NewAddExistedInstancesResponse()
  226. err = c.Send(request, response)
  227. return
  228. }
  229. func NewAddNodeToNodePoolRequest() (request *AddNodeToNodePoolRequest) {
  230. request = &AddNodeToNodePoolRequest{
  231. BaseRequest: &tchttp.BaseRequest{},
  232. }
  233. request.Init().WithApiInfo("tke", APIVersion, "AddNodeToNodePool")
  234. return
  235. }
  236. func NewAddNodeToNodePoolResponse() (response *AddNodeToNodePoolResponse) {
  237. response = &AddNodeToNodePoolResponse{
  238. BaseResponse: &tchttp.BaseResponse{},
  239. }
  240. return
  241. }
  242. // AddNodeToNodePool
  243. // 将集群内节点移入节点池
  244. //
  245. // 可能返回的错误码:
  246. //
  247. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  248. func (c *Client) AddNodeToNodePool(request *AddNodeToNodePoolRequest) (response *AddNodeToNodePoolResponse, err error) {
  249. return c.AddNodeToNodePoolWithContext(context.Background(), request)
  250. }
  251. // AddNodeToNodePool
  252. // 将集群内节点移入节点池
  253. //
  254. // 可能返回的错误码:
  255. //
  256. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  257. func (c *Client) AddNodeToNodePoolWithContext(ctx context.Context, request *AddNodeToNodePoolRequest) (response *AddNodeToNodePoolResponse, err error) {
  258. if request == nil {
  259. request = NewAddNodeToNodePoolRequest()
  260. }
  261. if c.GetCredential() == nil {
  262. return nil, errors.New("AddNodeToNodePool require credential")
  263. }
  264. request.SetContext(ctx)
  265. response = NewAddNodeToNodePoolResponse()
  266. err = c.Send(request, response)
  267. return
  268. }
  269. func NewAddVpcCniSubnetsRequest() (request *AddVpcCniSubnetsRequest) {
  270. request = &AddVpcCniSubnetsRequest{
  271. BaseRequest: &tchttp.BaseRequest{},
  272. }
  273. request.Init().WithApiInfo("tke", APIVersion, "AddVpcCniSubnets")
  274. return
  275. }
  276. func NewAddVpcCniSubnetsResponse() (response *AddVpcCniSubnetsResponse) {
  277. response = &AddVpcCniSubnetsResponse{
  278. BaseResponse: &tchttp.BaseResponse{},
  279. }
  280. return
  281. }
  282. // AddVpcCniSubnets
  283. // 针对VPC-CNI模式的集群,增加集群容器网络可使用的子网
  284. //
  285. // 可能返回的错误码:
  286. //
  287. // INTERNALERROR = "InternalError"
  288. // INTERNALERROR_DB = "InternalError.Db"
  289. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  290. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  291. // INTERNALERROR_PARAM = "InternalError.Param"
  292. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  293. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  294. // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
  295. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  296. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  297. func (c *Client) AddVpcCniSubnets(request *AddVpcCniSubnetsRequest) (response *AddVpcCniSubnetsResponse, err error) {
  298. return c.AddVpcCniSubnetsWithContext(context.Background(), request)
  299. }
  300. // AddVpcCniSubnets
  301. // 针对VPC-CNI模式的集群,增加集群容器网络可使用的子网
  302. //
  303. // 可能返回的错误码:
  304. //
  305. // INTERNALERROR = "InternalError"
  306. // INTERNALERROR_DB = "InternalError.Db"
  307. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  308. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  309. // INTERNALERROR_PARAM = "InternalError.Param"
  310. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  311. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  312. // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
  313. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  314. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  315. func (c *Client) AddVpcCniSubnetsWithContext(ctx context.Context, request *AddVpcCniSubnetsRequest) (response *AddVpcCniSubnetsResponse, err error) {
  316. if request == nil {
  317. request = NewAddVpcCniSubnetsRequest()
  318. }
  319. if c.GetCredential() == nil {
  320. return nil, errors.New("AddVpcCniSubnets require credential")
  321. }
  322. request.SetContext(ctx)
  323. response = NewAddVpcCniSubnetsResponse()
  324. err = c.Send(request, response)
  325. return
  326. }
  327. func NewCheckInstancesUpgradeAbleRequest() (request *CheckInstancesUpgradeAbleRequest) {
  328. request = &CheckInstancesUpgradeAbleRequest{
  329. BaseRequest: &tchttp.BaseRequest{},
  330. }
  331. request.Init().WithApiInfo("tke", APIVersion, "CheckInstancesUpgradeAble")
  332. return
  333. }
  334. func NewCheckInstancesUpgradeAbleResponse() (response *CheckInstancesUpgradeAbleResponse) {
  335. response = &CheckInstancesUpgradeAbleResponse{
  336. BaseResponse: &tchttp.BaseResponse{},
  337. }
  338. return
  339. }
  340. // CheckInstancesUpgradeAble
  341. // 检查给定节点列表中哪些是可升级的
  342. //
  343. // 可能返回的错误码:
  344. //
  345. // INTERNALERROR = "InternalError"
  346. // INTERNALERROR_DB = "InternalError.Db"
  347. // INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection"
  348. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  349. // INTERNALERROR_PARAM = "InternalError.Param"
  350. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  351. // INVALIDPARAMETER = "InvalidParameter"
  352. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  353. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  354. func (c *Client) CheckInstancesUpgradeAble(request *CheckInstancesUpgradeAbleRequest) (response *CheckInstancesUpgradeAbleResponse, err error) {
  355. return c.CheckInstancesUpgradeAbleWithContext(context.Background(), request)
  356. }
  357. // CheckInstancesUpgradeAble
  358. // 检查给定节点列表中哪些是可升级的
  359. //
  360. // 可能返回的错误码:
  361. //
  362. // INTERNALERROR = "InternalError"
  363. // INTERNALERROR_DB = "InternalError.Db"
  364. // INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection"
  365. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  366. // INTERNALERROR_PARAM = "InternalError.Param"
  367. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  368. // INVALIDPARAMETER = "InvalidParameter"
  369. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  370. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  371. func (c *Client) CheckInstancesUpgradeAbleWithContext(ctx context.Context, request *CheckInstancesUpgradeAbleRequest) (response *CheckInstancesUpgradeAbleResponse, err error) {
  372. if request == nil {
  373. request = NewCheckInstancesUpgradeAbleRequest()
  374. }
  375. if c.GetCredential() == nil {
  376. return nil, errors.New("CheckInstancesUpgradeAble require credential")
  377. }
  378. request.SetContext(ctx)
  379. response = NewCheckInstancesUpgradeAbleResponse()
  380. err = c.Send(request, response)
  381. return
  382. }
  383. func NewCreateClusterRequest() (request *CreateClusterRequest) {
  384. request = &CreateClusterRequest{
  385. BaseRequest: &tchttp.BaseRequest{},
  386. }
  387. request.Init().WithApiInfo("tke", APIVersion, "CreateCluster")
  388. return
  389. }
  390. func NewCreateClusterResponse() (response *CreateClusterResponse) {
  391. response = &CreateClusterResponse{
  392. BaseResponse: &tchttp.BaseResponse{},
  393. }
  394. return
  395. }
  396. // CreateCluster
  397. // 创建集群
  398. //
  399. // 可能返回的错误码:
  400. //
  401. // INTERNALERROR = "InternalError"
  402. // INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon"
  403. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  404. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  405. // INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster"
  406. // INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute"
  407. // INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr"
  408. // INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute"
  409. // INTERNALERROR_CIDRINVALI = "InternalError.CidrInvali"
  410. // INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange"
  411. // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
  412. // INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed"
  413. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  414. // INTERNALERROR_CVMNUMBERNOTMATCH = "InternalError.CvmNumberNotMatch"
  415. // INTERNALERROR_CVMSTATUS = "InternalError.CvmStatus"
  416. // INTERNALERROR_DB = "InternalError.Db"
  417. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  418. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  419. // INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount"
  420. // INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota"
  421. // INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed"
  422. // INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr"
  423. // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
  424. // INTERNALERROR_PARAM = "InternalError.Param"
  425. // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
  426. // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
  427. // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
  428. // INTERNALERROR_QUOTAUSGLIMIT = "InternalError.QuotaUSGLimit"
  429. // INTERNALERROR_TASKCREATEFAILED = "InternalError.TaskCreateFailed"
  430. // INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon"
  431. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  432. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  433. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  434. // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
  435. // INVALIDPARAMETER = "InvalidParameter"
  436. // INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange"
  437. // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster"
  438. // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
  439. // INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr"
  440. // INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute"
  441. // INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid"
  442. // INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR"
  443. // LIMITEXCEEDED = "LimitExceeded"
  444. func (c *Client) CreateCluster(request *CreateClusterRequest) (response *CreateClusterResponse, err error) {
  445. return c.CreateClusterWithContext(context.Background(), request)
  446. }
  447. // CreateCluster
  448. // 创建集群
  449. //
  450. // 可能返回的错误码:
  451. //
  452. // INTERNALERROR = "InternalError"
  453. // INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon"
  454. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  455. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  456. // INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster"
  457. // INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute"
  458. // INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr"
  459. // INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute"
  460. // INTERNALERROR_CIDRINVALI = "InternalError.CidrInvali"
  461. // INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange"
  462. // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
  463. // INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed"
  464. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  465. // INTERNALERROR_CVMNUMBERNOTMATCH = "InternalError.CvmNumberNotMatch"
  466. // INTERNALERROR_CVMSTATUS = "InternalError.CvmStatus"
  467. // INTERNALERROR_DB = "InternalError.Db"
  468. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  469. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  470. // INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount"
  471. // INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota"
  472. // INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed"
  473. // INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr"
  474. // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
  475. // INTERNALERROR_PARAM = "InternalError.Param"
  476. // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
  477. // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
  478. // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
  479. // INTERNALERROR_QUOTAUSGLIMIT = "InternalError.QuotaUSGLimit"
  480. // INTERNALERROR_TASKCREATEFAILED = "InternalError.TaskCreateFailed"
  481. // INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon"
  482. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  483. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  484. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  485. // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
  486. // INVALIDPARAMETER = "InvalidParameter"
  487. // INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange"
  488. // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster"
  489. // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
  490. // INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr"
  491. // INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute"
  492. // INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid"
  493. // INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR"
  494. // LIMITEXCEEDED = "LimitExceeded"
  495. func (c *Client) CreateClusterWithContext(ctx context.Context, request *CreateClusterRequest) (response *CreateClusterResponse, err error) {
  496. if request == nil {
  497. request = NewCreateClusterRequest()
  498. }
  499. if c.GetCredential() == nil {
  500. return nil, errors.New("CreateCluster require credential")
  501. }
  502. request.SetContext(ctx)
  503. response = NewCreateClusterResponse()
  504. err = c.Send(request, response)
  505. return
  506. }
  507. func NewCreateClusterAsGroupRequest() (request *CreateClusterAsGroupRequest) {
  508. request = &CreateClusterAsGroupRequest{
  509. BaseRequest: &tchttp.BaseRequest{},
  510. }
  511. request.Init().WithApiInfo("tke", APIVersion, "CreateClusterAsGroup")
  512. return
  513. }
  514. func NewCreateClusterAsGroupResponse() (response *CreateClusterAsGroupResponse) {
  515. response = &CreateClusterAsGroupResponse{
  516. BaseResponse: &tchttp.BaseResponse{},
  517. }
  518. return
  519. }
  520. // CreateClusterAsGroup
  521. // 为已经存在的集群创建伸缩组
  522. //
  523. // 可能返回的错误码:
  524. //
  525. // FAILEDOPERATION = "FailedOperation"
  526. // INTERNALERROR = "InternalError"
  527. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  528. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  529. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  530. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  531. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  532. // INTERNALERROR_DB = "InternalError.Db"
  533. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  534. // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
  535. // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
  536. // INTERNALERROR_PARAM = "InternalError.Param"
  537. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  538. // INVALIDPARAMETER = "InvalidParameter"
  539. // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
  540. // LIMITEXCEEDED = "LimitExceeded"
  541. // MISSINGPARAMETER = "MissingParameter"
  542. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  543. func (c *Client) CreateClusterAsGroup(request *CreateClusterAsGroupRequest) (response *CreateClusterAsGroupResponse, err error) {
  544. return c.CreateClusterAsGroupWithContext(context.Background(), request)
  545. }
  546. // CreateClusterAsGroup
  547. // 为已经存在的集群创建伸缩组
  548. //
  549. // 可能返回的错误码:
  550. //
  551. // FAILEDOPERATION = "FailedOperation"
  552. // INTERNALERROR = "InternalError"
  553. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  554. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  555. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  556. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  557. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  558. // INTERNALERROR_DB = "InternalError.Db"
  559. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  560. // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
  561. // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
  562. // INTERNALERROR_PARAM = "InternalError.Param"
  563. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  564. // INVALIDPARAMETER = "InvalidParameter"
  565. // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
  566. // LIMITEXCEEDED = "LimitExceeded"
  567. // MISSINGPARAMETER = "MissingParameter"
  568. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  569. func (c *Client) CreateClusterAsGroupWithContext(ctx context.Context, request *CreateClusterAsGroupRequest) (response *CreateClusterAsGroupResponse, err error) {
  570. if request == nil {
  571. request = NewCreateClusterAsGroupRequest()
  572. }
  573. if c.GetCredential() == nil {
  574. return nil, errors.New("CreateClusterAsGroup require credential")
  575. }
  576. request.SetContext(ctx)
  577. response = NewCreateClusterAsGroupResponse()
  578. err = c.Send(request, response)
  579. return
  580. }
  581. func NewCreateClusterEndpointRequest() (request *CreateClusterEndpointRequest) {
  582. request = &CreateClusterEndpointRequest{
  583. BaseRequest: &tchttp.BaseRequest{},
  584. }
  585. request.Init().WithApiInfo("tke", APIVersion, "CreateClusterEndpoint")
  586. return
  587. }
  588. func NewCreateClusterEndpointResponse() (response *CreateClusterEndpointResponse) {
  589. response = &CreateClusterEndpointResponse{
  590. BaseResponse: &tchttp.BaseResponse{},
  591. }
  592. return
  593. }
  594. // CreateClusterEndpoint
  595. // 创建集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问)
  596. //
  597. // 可能返回的错误码:
  598. //
  599. // FAILEDOPERATION = "FailedOperation"
  600. // INTERNALERROR = "InternalError"
  601. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  602. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  603. // INTERNALERROR_DB = "InternalError.Db"
  604. // INTERNALERROR_EMPTYCLUSTERNOTSUPPORT = "InternalError.EmptyClusterNotSupport"
  605. // INTERNALERROR_PARAM = "InternalError.Param"
  606. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  607. // INVALIDPARAMETER = "InvalidParameter"
  608. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  609. // LIMITEXCEEDED = "LimitExceeded"
  610. // MISSINGPARAMETER = "MissingParameter"
  611. // OPERATIONDENIED = "OperationDenied"
  612. // RESOURCEINUSE = "ResourceInUse"
  613. // RESOURCENOTFOUND = "ResourceNotFound"
  614. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  615. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  616. // UNKNOWNPARAMETER = "UnknownParameter"
  617. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  618. func (c *Client) CreateClusterEndpoint(request *CreateClusterEndpointRequest) (response *CreateClusterEndpointResponse, err error) {
  619. return c.CreateClusterEndpointWithContext(context.Background(), request)
  620. }
  621. // CreateClusterEndpoint
  622. // 创建集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问)
  623. //
  624. // 可能返回的错误码:
  625. //
  626. // FAILEDOPERATION = "FailedOperation"
  627. // INTERNALERROR = "InternalError"
  628. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  629. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  630. // INTERNALERROR_DB = "InternalError.Db"
  631. // INTERNALERROR_EMPTYCLUSTERNOTSUPPORT = "InternalError.EmptyClusterNotSupport"
  632. // INTERNALERROR_PARAM = "InternalError.Param"
  633. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  634. // INVALIDPARAMETER = "InvalidParameter"
  635. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  636. // LIMITEXCEEDED = "LimitExceeded"
  637. // MISSINGPARAMETER = "MissingParameter"
  638. // OPERATIONDENIED = "OperationDenied"
  639. // RESOURCEINUSE = "ResourceInUse"
  640. // RESOURCENOTFOUND = "ResourceNotFound"
  641. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  642. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  643. // UNKNOWNPARAMETER = "UnknownParameter"
  644. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  645. func (c *Client) CreateClusterEndpointWithContext(ctx context.Context, request *CreateClusterEndpointRequest) (response *CreateClusterEndpointResponse, err error) {
  646. if request == nil {
  647. request = NewCreateClusterEndpointRequest()
  648. }
  649. if c.GetCredential() == nil {
  650. return nil, errors.New("CreateClusterEndpoint require credential")
  651. }
  652. request.SetContext(ctx)
  653. response = NewCreateClusterEndpointResponse()
  654. err = c.Send(request, response)
  655. return
  656. }
  657. func NewCreateClusterEndpointVipRequest() (request *CreateClusterEndpointVipRequest) {
  658. request = &CreateClusterEndpointVipRequest{
  659. BaseRequest: &tchttp.BaseRequest{},
  660. }
  661. request.Init().WithApiInfo("tke", APIVersion, "CreateClusterEndpointVip")
  662. return
  663. }
  664. func NewCreateClusterEndpointVipResponse() (response *CreateClusterEndpointVipResponse) {
  665. response = &CreateClusterEndpointVipResponse{
  666. BaseResponse: &tchttp.BaseResponse{},
  667. }
  668. return
  669. }
  670. // CreateClusterEndpointVip
  671. // 创建托管集群外网访问端口(老的方式,仅支持托管集群外网端口)
  672. //
  673. // 可能返回的错误码:
  674. //
  675. // FAILEDOPERATION = "FailedOperation"
  676. // INTERNALERROR = "InternalError"
  677. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  678. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  679. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  680. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  681. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  682. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  683. // INVALIDPARAMETER = "InvalidParameter"
  684. // LIMITEXCEEDED = "LimitExceeded"
  685. // MISSINGPARAMETER = "MissingParameter"
  686. // OPERATIONDENIED = "OperationDenied"
  687. // RESOURCEINUSE = "ResourceInUse"
  688. // RESOURCENOTFOUND = "ResourceNotFound"
  689. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  690. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  691. // UNKNOWNPARAMETER = "UnknownParameter"
  692. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  693. func (c *Client) CreateClusterEndpointVip(request *CreateClusterEndpointVipRequest) (response *CreateClusterEndpointVipResponse, err error) {
  694. return c.CreateClusterEndpointVipWithContext(context.Background(), request)
  695. }
  696. // CreateClusterEndpointVip
  697. // 创建托管集群外网访问端口(老的方式,仅支持托管集群外网端口)
  698. //
  699. // 可能返回的错误码:
  700. //
  701. // FAILEDOPERATION = "FailedOperation"
  702. // INTERNALERROR = "InternalError"
  703. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  704. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  705. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  706. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  707. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  708. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  709. // INVALIDPARAMETER = "InvalidParameter"
  710. // LIMITEXCEEDED = "LimitExceeded"
  711. // MISSINGPARAMETER = "MissingParameter"
  712. // OPERATIONDENIED = "OperationDenied"
  713. // RESOURCEINUSE = "ResourceInUse"
  714. // RESOURCENOTFOUND = "ResourceNotFound"
  715. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  716. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  717. // UNKNOWNPARAMETER = "UnknownParameter"
  718. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  719. func (c *Client) CreateClusterEndpointVipWithContext(ctx context.Context, request *CreateClusterEndpointVipRequest) (response *CreateClusterEndpointVipResponse, err error) {
  720. if request == nil {
  721. request = NewCreateClusterEndpointVipRequest()
  722. }
  723. if c.GetCredential() == nil {
  724. return nil, errors.New("CreateClusterEndpointVip require credential")
  725. }
  726. request.SetContext(ctx)
  727. response = NewCreateClusterEndpointVipResponse()
  728. err = c.Send(request, response)
  729. return
  730. }
  731. func NewCreateClusterInstancesRequest() (request *CreateClusterInstancesRequest) {
  732. request = &CreateClusterInstancesRequest{
  733. BaseRequest: &tchttp.BaseRequest{},
  734. }
  735. request.Init().WithApiInfo("tke", APIVersion, "CreateClusterInstances")
  736. return
  737. }
  738. func NewCreateClusterInstancesResponse() (response *CreateClusterInstancesResponse) {
  739. response = &CreateClusterInstancesResponse{
  740. BaseResponse: &tchttp.BaseResponse{},
  741. }
  742. return
  743. }
  744. // CreateClusterInstances
  745. // 扩展(新建)集群节点
  746. //
  747. // 可能返回的错误码:
  748. //
  749. // FAILEDOPERATION = "FailedOperation"
  750. // INTERNALERROR = "InternalError"
  751. // INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon"
  752. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  753. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  754. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  755. // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
  756. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  757. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  758. // INTERNALERROR_DB = "InternalError.Db"
  759. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  760. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  761. // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
  762. // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
  763. // INTERNALERROR_PARAM = "InternalError.Param"
  764. // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
  765. // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
  766. // INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit"
  767. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  768. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  769. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  770. // INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound"
  771. // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
  772. // INVALIDPARAMETER = "InvalidParameter"
  773. // MISSINGPARAMETER = "MissingParameter"
  774. // RESOURCEINUSE = "ResourceInUse"
  775. // RESOURCENOTFOUND = "ResourceNotFound"
  776. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  777. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  778. // UNKNOWNPARAMETER = "UnknownParameter"
  779. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  780. func (c *Client) CreateClusterInstances(request *CreateClusterInstancesRequest) (response *CreateClusterInstancesResponse, err error) {
  781. return c.CreateClusterInstancesWithContext(context.Background(), request)
  782. }
  783. // CreateClusterInstances
  784. // 扩展(新建)集群节点
  785. //
  786. // 可能返回的错误码:
  787. //
  788. // FAILEDOPERATION = "FailedOperation"
  789. // INTERNALERROR = "InternalError"
  790. // INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon"
  791. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  792. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  793. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  794. // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
  795. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  796. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  797. // INTERNALERROR_DB = "InternalError.Db"
  798. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  799. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  800. // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
  801. // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
  802. // INTERNALERROR_PARAM = "InternalError.Param"
  803. // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
  804. // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
  805. // INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit"
  806. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  807. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  808. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  809. // INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound"
  810. // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
  811. // INVALIDPARAMETER = "InvalidParameter"
  812. // MISSINGPARAMETER = "MissingParameter"
  813. // RESOURCEINUSE = "ResourceInUse"
  814. // RESOURCENOTFOUND = "ResourceNotFound"
  815. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  816. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  817. // UNKNOWNPARAMETER = "UnknownParameter"
  818. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  819. func (c *Client) CreateClusterInstancesWithContext(ctx context.Context, request *CreateClusterInstancesRequest) (response *CreateClusterInstancesResponse, err error) {
  820. if request == nil {
  821. request = NewCreateClusterInstancesRequest()
  822. }
  823. if c.GetCredential() == nil {
  824. return nil, errors.New("CreateClusterInstances require credential")
  825. }
  826. request.SetContext(ctx)
  827. response = NewCreateClusterInstancesResponse()
  828. err = c.Send(request, response)
  829. return
  830. }
  831. func NewCreateClusterNodePoolRequest() (request *CreateClusterNodePoolRequest) {
  832. request = &CreateClusterNodePoolRequest{
  833. BaseRequest: &tchttp.BaseRequest{},
  834. }
  835. request.Init().WithApiInfo("tke", APIVersion, "CreateClusterNodePool")
  836. return
  837. }
  838. func NewCreateClusterNodePoolResponse() (response *CreateClusterNodePoolResponse) {
  839. response = &CreateClusterNodePoolResponse{
  840. BaseResponse: &tchttp.BaseResponse{},
  841. }
  842. return
  843. }
  844. // CreateClusterNodePool
  845. // 创建节点池
  846. //
  847. // 可能返回的错误码:
  848. //
  849. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  850. // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp"
  851. // INTERNALERROR_DB = "InternalError.Db"
  852. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  853. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  854. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  855. // RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist"
  856. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  857. func (c *Client) CreateClusterNodePool(request *CreateClusterNodePoolRequest) (response *CreateClusterNodePoolResponse, err error) {
  858. return c.CreateClusterNodePoolWithContext(context.Background(), request)
  859. }
  860. // CreateClusterNodePool
  861. // 创建节点池
  862. //
  863. // 可能返回的错误码:
  864. //
  865. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  866. // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp"
  867. // INTERNALERROR_DB = "InternalError.Db"
  868. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  869. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  870. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  871. // RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist"
  872. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  873. func (c *Client) CreateClusterNodePoolWithContext(ctx context.Context, request *CreateClusterNodePoolRequest) (response *CreateClusterNodePoolResponse, err error) {
  874. if request == nil {
  875. request = NewCreateClusterNodePoolRequest()
  876. }
  877. if c.GetCredential() == nil {
  878. return nil, errors.New("CreateClusterNodePool require credential")
  879. }
  880. request.SetContext(ctx)
  881. response = NewCreateClusterNodePoolResponse()
  882. err = c.Send(request, response)
  883. return
  884. }
  885. func NewCreateClusterNodePoolFromExistingAsgRequest() (request *CreateClusterNodePoolFromExistingAsgRequest) {
  886. request = &CreateClusterNodePoolFromExistingAsgRequest{
  887. BaseRequest: &tchttp.BaseRequest{},
  888. }
  889. request.Init().WithApiInfo("tke", APIVersion, "CreateClusterNodePoolFromExistingAsg")
  890. return
  891. }
  892. func NewCreateClusterNodePoolFromExistingAsgResponse() (response *CreateClusterNodePoolFromExistingAsgResponse) {
  893. response = &CreateClusterNodePoolFromExistingAsgResponse{
  894. BaseResponse: &tchttp.BaseResponse{},
  895. }
  896. return
  897. }
  898. // CreateClusterNodePoolFromExistingAsg
  899. // 从伸缩组创建节点池
  900. //
  901. // 可能返回的错误码:
  902. //
  903. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  904. func (c *Client) CreateClusterNodePoolFromExistingAsg(request *CreateClusterNodePoolFromExistingAsgRequest) (response *CreateClusterNodePoolFromExistingAsgResponse, err error) {
  905. return c.CreateClusterNodePoolFromExistingAsgWithContext(context.Background(), request)
  906. }
  907. // CreateClusterNodePoolFromExistingAsg
  908. // 从伸缩组创建节点池
  909. //
  910. // 可能返回的错误码:
  911. //
  912. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  913. func (c *Client) CreateClusterNodePoolFromExistingAsgWithContext(ctx context.Context, request *CreateClusterNodePoolFromExistingAsgRequest) (response *CreateClusterNodePoolFromExistingAsgResponse, err error) {
  914. if request == nil {
  915. request = NewCreateClusterNodePoolFromExistingAsgRequest()
  916. }
  917. if c.GetCredential() == nil {
  918. return nil, errors.New("CreateClusterNodePoolFromExistingAsg require credential")
  919. }
  920. request.SetContext(ctx)
  921. response = NewCreateClusterNodePoolFromExistingAsgResponse()
  922. err = c.Send(request, response)
  923. return
  924. }
  925. func NewCreateClusterRouteRequest() (request *CreateClusterRouteRequest) {
  926. request = &CreateClusterRouteRequest{
  927. BaseRequest: &tchttp.BaseRequest{},
  928. }
  929. request.Init().WithApiInfo("tke", APIVersion, "CreateClusterRoute")
  930. return
  931. }
  932. func NewCreateClusterRouteResponse() (response *CreateClusterRouteResponse) {
  933. response = &CreateClusterRouteResponse{
  934. BaseResponse: &tchttp.BaseResponse{},
  935. }
  936. return
  937. }
  938. // CreateClusterRoute
  939. // 创建集群路由
  940. //
  941. // 可能返回的错误码:
  942. //
  943. // INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute"
  944. // INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable"
  945. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  946. // INTERNALERROR_DB = "InternalError.Db"
  947. // INTERNALERROR_GATEWAYALREADYASSOCIATEDCIDR = "InternalError.GatewayAlreadyAssociatedCidr"
  948. // INTERNALERROR_PARAM = "InternalError.Param"
  949. // INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound"
  950. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  951. // INVALIDPARAMETER = "InvalidParameter"
  952. // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
  953. // INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable"
  954. // INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr"
  955. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  956. // RESOURCENOTFOUND_ROUTETABLENOTFOUND = "ResourceNotFound.RouteTableNotFound"
  957. func (c *Client) CreateClusterRoute(request *CreateClusterRouteRequest) (response *CreateClusterRouteResponse, err error) {
  958. return c.CreateClusterRouteWithContext(context.Background(), request)
  959. }
  960. // CreateClusterRoute
  961. // 创建集群路由
  962. //
  963. // 可能返回的错误码:
  964. //
  965. // INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute"
  966. // INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable"
  967. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  968. // INTERNALERROR_DB = "InternalError.Db"
  969. // INTERNALERROR_GATEWAYALREADYASSOCIATEDCIDR = "InternalError.GatewayAlreadyAssociatedCidr"
  970. // INTERNALERROR_PARAM = "InternalError.Param"
  971. // INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound"
  972. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  973. // INVALIDPARAMETER = "InvalidParameter"
  974. // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
  975. // INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable"
  976. // INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr"
  977. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  978. // RESOURCENOTFOUND_ROUTETABLENOTFOUND = "ResourceNotFound.RouteTableNotFound"
  979. func (c *Client) CreateClusterRouteWithContext(ctx context.Context, request *CreateClusterRouteRequest) (response *CreateClusterRouteResponse, err error) {
  980. if request == nil {
  981. request = NewCreateClusterRouteRequest()
  982. }
  983. if c.GetCredential() == nil {
  984. return nil, errors.New("CreateClusterRoute require credential")
  985. }
  986. request.SetContext(ctx)
  987. response = NewCreateClusterRouteResponse()
  988. err = c.Send(request, response)
  989. return
  990. }
  991. func NewCreateClusterRouteTableRequest() (request *CreateClusterRouteTableRequest) {
  992. request = &CreateClusterRouteTableRequest{
  993. BaseRequest: &tchttp.BaseRequest{},
  994. }
  995. request.Init().WithApiInfo("tke", APIVersion, "CreateClusterRouteTable")
  996. return
  997. }
  998. func NewCreateClusterRouteTableResponse() (response *CreateClusterRouteTableResponse) {
  999. response = &CreateClusterRouteTableResponse{
  1000. BaseResponse: &tchttp.BaseResponse{},
  1001. }
  1002. return
  1003. }
  1004. // CreateClusterRouteTable
  1005. // 创建集群路由表
  1006. //
  1007. // 可能返回的错误码:
  1008. //
  1009. // FAILEDOPERATION = "FailedOperation"
  1010. // INTERNALERROR = "InternalError"
  1011. // INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster"
  1012. // INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute"
  1013. // INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr"
  1014. // INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute"
  1015. // INTERNALERROR_DB = "InternalError.Db"
  1016. // INTERNALERROR_PARAM = "InternalError.Param"
  1017. // INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit"
  1018. // INTERNALERROR_RESOURCEEXISTALREADY = "InternalError.ResourceExistAlready"
  1019. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  1020. // INVALIDPARAMETER = "InvalidParameter"
  1021. // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
  1022. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  1023. func (c *Client) CreateClusterRouteTable(request *CreateClusterRouteTableRequest) (response *CreateClusterRouteTableResponse, err error) {
  1024. return c.CreateClusterRouteTableWithContext(context.Background(), request)
  1025. }
  1026. // CreateClusterRouteTable
  1027. // 创建集群路由表
  1028. //
  1029. // 可能返回的错误码:
  1030. //
  1031. // FAILEDOPERATION = "FailedOperation"
  1032. // INTERNALERROR = "InternalError"
  1033. // INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster"
  1034. // INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute"
  1035. // INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr"
  1036. // INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute"
  1037. // INTERNALERROR_DB = "InternalError.Db"
  1038. // INTERNALERROR_PARAM = "InternalError.Param"
  1039. // INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit"
  1040. // INTERNALERROR_RESOURCEEXISTALREADY = "InternalError.ResourceExistAlready"
  1041. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  1042. // INVALIDPARAMETER = "InvalidParameter"
  1043. // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
  1044. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  1045. func (c *Client) CreateClusterRouteTableWithContext(ctx context.Context, request *CreateClusterRouteTableRequest) (response *CreateClusterRouteTableResponse, err error) {
  1046. if request == nil {
  1047. request = NewCreateClusterRouteTableRequest()
  1048. }
  1049. if c.GetCredential() == nil {
  1050. return nil, errors.New("CreateClusterRouteTable require credential")
  1051. }
  1052. request.SetContext(ctx)
  1053. response = NewCreateClusterRouteTableResponse()
  1054. err = c.Send(request, response)
  1055. return
  1056. }
  1057. func NewCreateEKSClusterRequest() (request *CreateEKSClusterRequest) {
  1058. request = &CreateEKSClusterRequest{
  1059. BaseRequest: &tchttp.BaseRequest{},
  1060. }
  1061. request.Init().WithApiInfo("tke", APIVersion, "CreateEKSCluster")
  1062. return
  1063. }
  1064. func NewCreateEKSClusterResponse() (response *CreateEKSClusterResponse) {
  1065. response = &CreateEKSClusterResponse{
  1066. BaseResponse: &tchttp.BaseResponse{},
  1067. }
  1068. return
  1069. }
  1070. // CreateEKSCluster
  1071. // 创建弹性集群
  1072. //
  1073. // 可能返回的错误码:
  1074. //
  1075. // FAILEDOPERATION = "FailedOperation"
  1076. // INTERNALERROR = "InternalError"
  1077. // INVALIDPARAMETER = "InvalidParameter"
  1078. // LIMITEXCEEDED = "LimitExceeded"
  1079. // MISSINGPARAMETER = "MissingParameter"
  1080. // RESOURCEINUSE = "ResourceInUse"
  1081. // RESOURCENOTFOUND = "ResourceNotFound"
  1082. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  1083. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  1084. // UNKNOWNPARAMETER = "UnknownParameter"
  1085. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  1086. func (c *Client) CreateEKSCluster(request *CreateEKSClusterRequest) (response *CreateEKSClusterResponse, err error) {
  1087. return c.CreateEKSClusterWithContext(context.Background(), request)
  1088. }
  1089. // CreateEKSCluster
  1090. // 创建弹性集群
  1091. //
  1092. // 可能返回的错误码:
  1093. //
  1094. // FAILEDOPERATION = "FailedOperation"
  1095. // INTERNALERROR = "InternalError"
  1096. // INVALIDPARAMETER = "InvalidParameter"
  1097. // LIMITEXCEEDED = "LimitExceeded"
  1098. // MISSINGPARAMETER = "MissingParameter"
  1099. // RESOURCEINUSE = "ResourceInUse"
  1100. // RESOURCENOTFOUND = "ResourceNotFound"
  1101. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  1102. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  1103. // UNKNOWNPARAMETER = "UnknownParameter"
  1104. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  1105. func (c *Client) CreateEKSClusterWithContext(ctx context.Context, request *CreateEKSClusterRequest) (response *CreateEKSClusterResponse, err error) {
  1106. if request == nil {
  1107. request = NewCreateEKSClusterRequest()
  1108. }
  1109. if c.GetCredential() == nil {
  1110. return nil, errors.New("CreateEKSCluster require credential")
  1111. }
  1112. request.SetContext(ctx)
  1113. response = NewCreateEKSClusterResponse()
  1114. err = c.Send(request, response)
  1115. return
  1116. }
  1117. func NewCreateEKSContainerInstancesRequest() (request *CreateEKSContainerInstancesRequest) {
  1118. request = &CreateEKSContainerInstancesRequest{
  1119. BaseRequest: &tchttp.BaseRequest{},
  1120. }
  1121. request.Init().WithApiInfo("tke", APIVersion, "CreateEKSContainerInstances")
  1122. return
  1123. }
  1124. func NewCreateEKSContainerInstancesResponse() (response *CreateEKSContainerInstancesResponse) {
  1125. response = &CreateEKSContainerInstancesResponse{
  1126. BaseResponse: &tchttp.BaseResponse{},
  1127. }
  1128. return
  1129. }
  1130. // CreateEKSContainerInstances
  1131. // 创建容器实例
  1132. //
  1133. // 可能返回的错误码:
  1134. //
  1135. // FAILEDOPERATION = "FailedOperation"
  1136. // INTERNALERROR = "InternalError"
  1137. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  1138. // INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout"
  1139. // INTERNALERROR_PARAM = "InternalError.Param"
  1140. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  1141. // INVALIDPARAMETER = "InvalidParameter"
  1142. func CreateEKSContainerInstances(request *CreateEKSContainerInstancesRequest) (response *CreateEKSContainerInstancesResponse, err error) {
  1143. provider := pbtenant.CloudProvider(request.ProviderId)
  1144. var configFile string
  1145. flag.StringVar(&configFile, "conf", "configs/config.yaml", "config.yaml")
  1146. flag.Parse()
  1147. defer glog.Flush()
  1148. if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil {
  1149. if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) {
  1150. glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err)
  1151. }
  1152. glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile)
  1153. }
  1154. glog.Infof("load tenant from file finished")
  1155. tenanters, err := tenanter.GetTenanters(provider)
  1156. var regionId int32
  1157. var cpuPod string
  1158. var memoryPod string
  1159. container := request.Containers
  1160. containerImage := container[0].Image
  1161. containerName := container[0].Name
  1162. cpuPodFloat := container[0].Cpu
  1163. memoryPodFloat := container[0].Memory
  1164. switch request.ProviderId {
  1165. case 0:
  1166. regionId, _ = tenanter.GetAliRegionId(request.RegionId)
  1167. cpuPod = strconv.FormatFloat(*cpuPodFloat, 'f', 0, 64)
  1168. memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64)
  1169. case 1:
  1170. regionId, _ = tenanter.GetTencentRegionId(request.RegionId)
  1171. cpuPod = strconv.FormatFloat(*cpuPodFloat, 'f', 0, 64)
  1172. memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64)
  1173. case 2:
  1174. //华为的CPU和内存数量要进行转换
  1175. regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId)
  1176. cpuPod = strconv.FormatFloat(*cpuPodFloat*1000, 'f', 0, 64) + "m"
  1177. memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64) + "Gi"
  1178. case 3:
  1179. regionId, _ = tenanter.GetK8SRegionId(request.RegionId)
  1180. cpuPod = strconv.FormatFloat(*cpuPodFloat*1000, 'f', 0, 64) + "m"
  1181. memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64) + "Gi"
  1182. }
  1183. requestPCM := &pbpod.CreatePodReq{
  1184. RequestSource: "tencent",
  1185. Provider: provider,
  1186. AccountName: tenanters[0].AccountName(),
  1187. PodName: *request.EksCiName,
  1188. RegionId: regionId,
  1189. ContainerImage: *containerImage,
  1190. ContainerName: *containerName,
  1191. CpuPod: cpuPod,
  1192. MemoryPod: memoryPod,
  1193. SecurityGroupId: "sg-6qlun7hd",
  1194. SubnetId: "subnet-mnwfg2fk",
  1195. VpcId: "vpc-rkwt40g5",
  1196. Namespace: "pcm",
  1197. }
  1198. resp, err := server.CreatePod(nil, requestPCM)
  1199. if err != nil {
  1200. glog.Errorf("CreatePod error %+v", err)
  1201. return
  1202. }
  1203. glog.Infof("CreatePod response %+v", resp)
  1204. response = &CreateEKSContainerInstancesResponse{
  1205. Response: (*struct {
  1206. EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"`
  1207. RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
  1208. })(&struct {
  1209. EksCiIds []*string
  1210. RequestId *string
  1211. }{
  1212. EksCiIds: []*string{&resp.PodId},
  1213. RequestId: &resp.RequestId,
  1214. }),
  1215. BaseResponse: &tchttp.BaseResponse{},
  1216. }
  1217. return response, nil
  1218. }
  1219. // CreateEKSContainerInstances
  1220. // 创建容器实例
  1221. //
  1222. // 可能返回的错误码:
  1223. //
  1224. // FAILEDOPERATION = "FailedOperation"
  1225. // INTERNALERROR = "InternalError"
  1226. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  1227. // INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout"
  1228. // INTERNALERROR_PARAM = "InternalError.Param"
  1229. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  1230. // INVALIDPARAMETER = "InvalidParameter"
  1231. func (c *Client) CreateEKSContainerInstancesWithContext(ctx context.Context, request *CreateEKSContainerInstancesRequest) (response *CreateEKSContainerInstancesResponse, err error) {
  1232. if request == nil {
  1233. request = NewCreateEKSContainerInstancesRequest()
  1234. }
  1235. if c.GetCredential() == nil {
  1236. return nil, errors.New("CreateEKSContainerInstances require credential")
  1237. }
  1238. request.SetContext(ctx)
  1239. response = NewCreateEKSContainerInstancesResponse()
  1240. err = c.Send(request, response)
  1241. return
  1242. }
  1243. func NewCreateImageCacheRequest() (request *CreateImageCacheRequest) {
  1244. request = &CreateImageCacheRequest{
  1245. BaseRequest: &tchttp.BaseRequest{},
  1246. }
  1247. request.Init().WithApiInfo("tke", APIVersion, "CreateImageCache")
  1248. return
  1249. }
  1250. func NewCreateImageCacheResponse() (response *CreateImageCacheResponse) {
  1251. response = &CreateImageCacheResponse{
  1252. BaseResponse: &tchttp.BaseResponse{},
  1253. }
  1254. return
  1255. }
  1256. // CreateImageCache
  1257. // 创建镜像缓存的接口。创建过程中,请勿删除EKSCI实例和云盘,否则镜像缓存将创建失败。
  1258. //
  1259. // 可能返回的错误码:
  1260. //
  1261. // INTERNALERROR = "InternalError"
  1262. // INVALIDPARAMETER = "InvalidParameter"
  1263. func (c *Client) CreateImageCache(request *CreateImageCacheRequest) (response *CreateImageCacheResponse, err error) {
  1264. return c.CreateImageCacheWithContext(context.Background(), request)
  1265. }
  1266. // CreateImageCache
  1267. // 创建镜像缓存的接口。创建过程中,请勿删除EKSCI实例和云盘,否则镜像缓存将创建失败。
  1268. //
  1269. // 可能返回的错误码:
  1270. //
  1271. // INTERNALERROR = "InternalError"
  1272. // INVALIDPARAMETER = "InvalidParameter"
  1273. func (c *Client) CreateImageCacheWithContext(ctx context.Context, request *CreateImageCacheRequest) (response *CreateImageCacheResponse, err error) {
  1274. if request == nil {
  1275. request = NewCreateImageCacheRequest()
  1276. }
  1277. if c.GetCredential() == nil {
  1278. return nil, errors.New("CreateImageCache require credential")
  1279. }
  1280. request.SetContext(ctx)
  1281. response = NewCreateImageCacheResponse()
  1282. err = c.Send(request, response)
  1283. return
  1284. }
  1285. func NewCreatePrometheusAlertRuleRequest() (request *CreatePrometheusAlertRuleRequest) {
  1286. request = &CreatePrometheusAlertRuleRequest{
  1287. BaseRequest: &tchttp.BaseRequest{},
  1288. }
  1289. request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusAlertRule")
  1290. return
  1291. }
  1292. func NewCreatePrometheusAlertRuleResponse() (response *CreatePrometheusAlertRuleResponse) {
  1293. response = &CreatePrometheusAlertRuleResponse{
  1294. BaseResponse: &tchttp.BaseResponse{},
  1295. }
  1296. return
  1297. }
  1298. // CreatePrometheusAlertRule
  1299. // 创建告警规则
  1300. //
  1301. // 可能返回的错误码:
  1302. //
  1303. // INTERNALERROR = "InternalError"
  1304. // INTERNALERROR_PARAM = "InternalError.Param"
  1305. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  1306. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  1307. // RESOURCENOTFOUND = "ResourceNotFound"
  1308. func (c *Client) CreatePrometheusAlertRule(request *CreatePrometheusAlertRuleRequest) (response *CreatePrometheusAlertRuleResponse, err error) {
  1309. return c.CreatePrometheusAlertRuleWithContext(context.Background(), request)
  1310. }
  1311. // CreatePrometheusAlertRule
  1312. // 创建告警规则
  1313. //
  1314. // 可能返回的错误码:
  1315. //
  1316. // INTERNALERROR = "InternalError"
  1317. // INTERNALERROR_PARAM = "InternalError.Param"
  1318. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  1319. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  1320. // RESOURCENOTFOUND = "ResourceNotFound"
  1321. func (c *Client) CreatePrometheusAlertRuleWithContext(ctx context.Context, request *CreatePrometheusAlertRuleRequest) (response *CreatePrometheusAlertRuleResponse, err error) {
  1322. if request == nil {
  1323. request = NewCreatePrometheusAlertRuleRequest()
  1324. }
  1325. if c.GetCredential() == nil {
  1326. return nil, errors.New("CreatePrometheusAlertRule require credential")
  1327. }
  1328. request.SetContext(ctx)
  1329. response = NewCreatePrometheusAlertRuleResponse()
  1330. err = c.Send(request, response)
  1331. return
  1332. }
  1333. func NewCreatePrometheusDashboardRequest() (request *CreatePrometheusDashboardRequest) {
  1334. request = &CreatePrometheusDashboardRequest{
  1335. BaseRequest: &tchttp.BaseRequest{},
  1336. }
  1337. request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusDashboard")
  1338. return
  1339. }
  1340. func NewCreatePrometheusDashboardResponse() (response *CreatePrometheusDashboardResponse) {
  1341. response = &CreatePrometheusDashboardResponse{
  1342. BaseResponse: &tchttp.BaseResponse{},
  1343. }
  1344. return
  1345. }
  1346. // CreatePrometheusDashboard
  1347. // 创建grafana监控面板
  1348. //
  1349. // 可能返回的错误码:
  1350. //
  1351. // INTERNALERROR = "InternalError"
  1352. // INTERNALERROR_PARAM = "InternalError.Param"
  1353. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  1354. // INVALIDPARAMETER = "InvalidParameter"
  1355. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  1356. // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
  1357. func (c *Client) CreatePrometheusDashboard(request *CreatePrometheusDashboardRequest) (response *CreatePrometheusDashboardResponse, err error) {
  1358. return c.CreatePrometheusDashboardWithContext(context.Background(), request)
  1359. }
  1360. // CreatePrometheusDashboard
  1361. // 创建grafana监控面板
  1362. //
  1363. // 可能返回的错误码:
  1364. //
  1365. // INTERNALERROR = "InternalError"
  1366. // INTERNALERROR_PARAM = "InternalError.Param"
  1367. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  1368. // INVALIDPARAMETER = "InvalidParameter"
  1369. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  1370. // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
  1371. func (c *Client) CreatePrometheusDashboardWithContext(ctx context.Context, request *CreatePrometheusDashboardRequest) (response *CreatePrometheusDashboardResponse, err error) {
  1372. if request == nil {
  1373. request = NewCreatePrometheusDashboardRequest()
  1374. }
  1375. if c.GetCredential() == nil {
  1376. return nil, errors.New("CreatePrometheusDashboard require credential")
  1377. }
  1378. request.SetContext(ctx)
  1379. response = NewCreatePrometheusDashboardResponse()
  1380. err = c.Send(request, response)
  1381. return
  1382. }
  1383. func NewCreatePrometheusTemplateRequest() (request *CreatePrometheusTemplateRequest) {
  1384. request = &CreatePrometheusTemplateRequest{
  1385. BaseRequest: &tchttp.BaseRequest{},
  1386. }
  1387. request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusTemplate")
  1388. return
  1389. }
  1390. func NewCreatePrometheusTemplateResponse() (response *CreatePrometheusTemplateResponse) {
  1391. response = &CreatePrometheusTemplateResponse{
  1392. BaseResponse: &tchttp.BaseResponse{},
  1393. }
  1394. return
  1395. }
  1396. // CreatePrometheusTemplate
  1397. // 创建一个云原生Prometheus模板实例
  1398. //
  1399. // 可能返回的错误码:
  1400. //
  1401. // INTERNALERROR = "InternalError"
  1402. // INTERNALERROR_PARAM = "InternalError.Param"
  1403. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  1404. func (c *Client) CreatePrometheusTemplate(request *CreatePrometheusTemplateRequest) (response *CreatePrometheusTemplateResponse, err error) {
  1405. return c.CreatePrometheusTemplateWithContext(context.Background(), request)
  1406. }
  1407. // CreatePrometheusTemplate
  1408. // 创建一个云原生Prometheus模板实例
  1409. //
  1410. // 可能返回的错误码:
  1411. //
  1412. // INTERNALERROR = "InternalError"
  1413. // INTERNALERROR_PARAM = "InternalError.Param"
  1414. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  1415. func (c *Client) CreatePrometheusTemplateWithContext(ctx context.Context, request *CreatePrometheusTemplateRequest) (response *CreatePrometheusTemplateResponse, err error) {
  1416. if request == nil {
  1417. request = NewCreatePrometheusTemplateRequest()
  1418. }
  1419. if c.GetCredential() == nil {
  1420. return nil, errors.New("CreatePrometheusTemplate require credential")
  1421. }
  1422. request.SetContext(ctx)
  1423. response = NewCreatePrometheusTemplateResponse()
  1424. err = c.Send(request, response)
  1425. return
  1426. }
  1427. func NewDeleteClusterRequest() (request *DeleteClusterRequest) {
  1428. request = &DeleteClusterRequest{
  1429. BaseRequest: &tchttp.BaseRequest{},
  1430. }
  1431. request.Init().WithApiInfo("tke", APIVersion, "DeleteCluster")
  1432. return
  1433. }
  1434. func NewDeleteClusterResponse() (response *DeleteClusterResponse) {
  1435. response = &DeleteClusterResponse{
  1436. BaseResponse: &tchttp.BaseResponse{},
  1437. }
  1438. return
  1439. }
  1440. // DeleteCluster
  1441. // 删除集群(YUNAPI V3版本)
  1442. //
  1443. // 可能返回的错误码:
  1444. //
  1445. // FAILEDOPERATION = "FailedOperation"
  1446. // INTERNALERROR = "InternalError"
  1447. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  1448. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  1449. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  1450. // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
  1451. // INTERNALERROR_PARAM = "InternalError.Param"
  1452. // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
  1453. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  1454. // INVALIDPARAMETER = "InvalidParameter"
  1455. // OPERATIONDENIED_CLUSTERINDELETIONPROTECTION = "OperationDenied.ClusterInDeletionProtection"
  1456. // RESOURCENOTFOUND = "ResourceNotFound"
  1457. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  1458. func (c *Client) DeleteCluster(request *DeleteClusterRequest) (response *DeleteClusterResponse, err error) {
  1459. return c.DeleteClusterWithContext(context.Background(), request)
  1460. }
  1461. // DeleteCluster
  1462. // 删除集群(YUNAPI V3版本)
  1463. //
  1464. // 可能返回的错误码:
  1465. //
  1466. // FAILEDOPERATION = "FailedOperation"
  1467. // INTERNALERROR = "InternalError"
  1468. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  1469. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  1470. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  1471. // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
  1472. // INTERNALERROR_PARAM = "InternalError.Param"
  1473. // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
  1474. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  1475. // INVALIDPARAMETER = "InvalidParameter"
  1476. // OPERATIONDENIED_CLUSTERINDELETIONPROTECTION = "OperationDenied.ClusterInDeletionProtection"
  1477. // RESOURCENOTFOUND = "ResourceNotFound"
  1478. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  1479. func (c *Client) DeleteClusterWithContext(ctx context.Context, request *DeleteClusterRequest) (response *DeleteClusterResponse, err error) {
  1480. if request == nil {
  1481. request = NewDeleteClusterRequest()
  1482. }
  1483. if c.GetCredential() == nil {
  1484. return nil, errors.New("DeleteCluster require credential")
  1485. }
  1486. request.SetContext(ctx)
  1487. response = NewDeleteClusterResponse()
  1488. err = c.Send(request, response)
  1489. return
  1490. }
  1491. func NewDeleteClusterAsGroupsRequest() (request *DeleteClusterAsGroupsRequest) {
  1492. request = &DeleteClusterAsGroupsRequest{
  1493. BaseRequest: &tchttp.BaseRequest{},
  1494. }
  1495. request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterAsGroups")
  1496. return
  1497. }
  1498. func NewDeleteClusterAsGroupsResponse() (response *DeleteClusterAsGroupsResponse) {
  1499. response = &DeleteClusterAsGroupsResponse{
  1500. BaseResponse: &tchttp.BaseResponse{},
  1501. }
  1502. return
  1503. }
  1504. // DeleteClusterAsGroups
  1505. // 删除集群伸缩组
  1506. //
  1507. // 可能返回的错误码:
  1508. //
  1509. // FAILEDOPERATION = "FailedOperation"
  1510. // INTERNALERROR = "InternalError"
  1511. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  1512. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  1513. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  1514. // INTERNALERROR_PARAM = "InternalError.Param"
  1515. // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
  1516. // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
  1517. // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
  1518. // INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit"
  1519. // INVALIDPARAMETER = "InvalidParameter"
  1520. // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
  1521. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  1522. // LIMITEXCEEDED = "LimitExceeded"
  1523. // RESOURCEINUSE = "ResourceInUse"
  1524. // RESOURCENOTFOUND = "ResourceNotFound"
  1525. // UNKNOWNPARAMETER = "UnknownParameter"
  1526. func (c *Client) DeleteClusterAsGroups(request *DeleteClusterAsGroupsRequest) (response *DeleteClusterAsGroupsResponse, err error) {
  1527. return c.DeleteClusterAsGroupsWithContext(context.Background(), request)
  1528. }
  1529. // DeleteClusterAsGroups
  1530. // 删除集群伸缩组
  1531. //
  1532. // 可能返回的错误码:
  1533. //
  1534. // FAILEDOPERATION = "FailedOperation"
  1535. // INTERNALERROR = "InternalError"
  1536. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  1537. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  1538. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  1539. // INTERNALERROR_PARAM = "InternalError.Param"
  1540. // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
  1541. // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
  1542. // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
  1543. // INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit"
  1544. // INVALIDPARAMETER = "InvalidParameter"
  1545. // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
  1546. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  1547. // LIMITEXCEEDED = "LimitExceeded"
  1548. // RESOURCEINUSE = "ResourceInUse"
  1549. // RESOURCENOTFOUND = "ResourceNotFound"
  1550. // UNKNOWNPARAMETER = "UnknownParameter"
  1551. func (c *Client) DeleteClusterAsGroupsWithContext(ctx context.Context, request *DeleteClusterAsGroupsRequest) (response *DeleteClusterAsGroupsResponse, err error) {
  1552. if request == nil {
  1553. request = NewDeleteClusterAsGroupsRequest()
  1554. }
  1555. if c.GetCredential() == nil {
  1556. return nil, errors.New("DeleteClusterAsGroups require credential")
  1557. }
  1558. request.SetContext(ctx)
  1559. response = NewDeleteClusterAsGroupsResponse()
  1560. err = c.Send(request, response)
  1561. return
  1562. }
  1563. func NewDeleteClusterEndpointRequest() (request *DeleteClusterEndpointRequest) {
  1564. request = &DeleteClusterEndpointRequest{
  1565. BaseRequest: &tchttp.BaseRequest{},
  1566. }
  1567. request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterEndpoint")
  1568. return
  1569. }
  1570. func NewDeleteClusterEndpointResponse() (response *DeleteClusterEndpointResponse) {
  1571. response = &DeleteClusterEndpointResponse{
  1572. BaseResponse: &tchttp.BaseResponse{},
  1573. }
  1574. return
  1575. }
  1576. // DeleteClusterEndpoint
  1577. // 删除集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问)
  1578. //
  1579. // 可能返回的错误码:
  1580. //
  1581. // FAILEDOPERATION = "FailedOperation"
  1582. // INTERNALERROR = "InternalError"
  1583. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  1584. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  1585. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  1586. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  1587. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  1588. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  1589. // INTERNALERROR_DB = "InternalError.Db"
  1590. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  1591. // INTERNALERROR_PARAM = "InternalError.Param"
  1592. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  1593. // INVALIDPARAMETER = "InvalidParameter"
  1594. // LIMITEXCEEDED = "LimitExceeded"
  1595. // MISSINGPARAMETER = "MissingParameter"
  1596. // OPERATIONDENIED = "OperationDenied"
  1597. // RESOURCEINUSE = "ResourceInUse"
  1598. // RESOURCENOTFOUND = "ResourceNotFound"
  1599. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  1600. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  1601. // UNKNOWNPARAMETER = "UnknownParameter"
  1602. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  1603. func (c *Client) DeleteClusterEndpoint(request *DeleteClusterEndpointRequest) (response *DeleteClusterEndpointResponse, err error) {
  1604. return c.DeleteClusterEndpointWithContext(context.Background(), request)
  1605. }
  1606. // DeleteClusterEndpoint
  1607. // 删除集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问)
  1608. //
  1609. // 可能返回的错误码:
  1610. //
  1611. // FAILEDOPERATION = "FailedOperation"
  1612. // INTERNALERROR = "InternalError"
  1613. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  1614. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  1615. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  1616. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  1617. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  1618. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  1619. // INTERNALERROR_DB = "InternalError.Db"
  1620. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  1621. // INTERNALERROR_PARAM = "InternalError.Param"
  1622. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  1623. // INVALIDPARAMETER = "InvalidParameter"
  1624. // LIMITEXCEEDED = "LimitExceeded"
  1625. // MISSINGPARAMETER = "MissingParameter"
  1626. // OPERATIONDENIED = "OperationDenied"
  1627. // RESOURCEINUSE = "ResourceInUse"
  1628. // RESOURCENOTFOUND = "ResourceNotFound"
  1629. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  1630. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  1631. // UNKNOWNPARAMETER = "UnknownParameter"
  1632. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  1633. func (c *Client) DeleteClusterEndpointWithContext(ctx context.Context, request *DeleteClusterEndpointRequest) (response *DeleteClusterEndpointResponse, err error) {
  1634. if request == nil {
  1635. request = NewDeleteClusterEndpointRequest()
  1636. }
  1637. if c.GetCredential() == nil {
  1638. return nil, errors.New("DeleteClusterEndpoint require credential")
  1639. }
  1640. request.SetContext(ctx)
  1641. response = NewDeleteClusterEndpointResponse()
  1642. err = c.Send(request, response)
  1643. return
  1644. }
  1645. func NewDeleteClusterEndpointVipRequest() (request *DeleteClusterEndpointVipRequest) {
  1646. request = &DeleteClusterEndpointVipRequest{
  1647. BaseRequest: &tchttp.BaseRequest{},
  1648. }
  1649. request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterEndpointVip")
  1650. return
  1651. }
  1652. func NewDeleteClusterEndpointVipResponse() (response *DeleteClusterEndpointVipResponse) {
  1653. response = &DeleteClusterEndpointVipResponse{
  1654. BaseResponse: &tchttp.BaseResponse{},
  1655. }
  1656. return
  1657. }
  1658. // DeleteClusterEndpointVip
  1659. // 删除托管集群外网访问端口(老的方式,仅支持托管集群外网端口)
  1660. //
  1661. // 可能返回的错误码:
  1662. //
  1663. // FAILEDOPERATION = "FailedOperation"
  1664. // INTERNALERROR = "InternalError"
  1665. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  1666. // INTERNALERROR_DB = "InternalError.Db"
  1667. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  1668. // INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount"
  1669. // INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota"
  1670. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  1671. // INVALIDPARAMETER = "InvalidParameter"
  1672. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  1673. // LIMITEXCEEDED = "LimitExceeded"
  1674. // MISSINGPARAMETER = "MissingParameter"
  1675. // OPERATIONDENIED = "OperationDenied"
  1676. // RESOURCEINUSE = "ResourceInUse"
  1677. // RESOURCENOTFOUND = "ResourceNotFound"
  1678. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  1679. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  1680. // UNKNOWNPARAMETER = "UnknownParameter"
  1681. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  1682. func (c *Client) DeleteClusterEndpointVip(request *DeleteClusterEndpointVipRequest) (response *DeleteClusterEndpointVipResponse, err error) {
  1683. return c.DeleteClusterEndpointVipWithContext(context.Background(), request)
  1684. }
  1685. // DeleteClusterEndpointVip
  1686. // 删除托管集群外网访问端口(老的方式,仅支持托管集群外网端口)
  1687. //
  1688. // 可能返回的错误码:
  1689. //
  1690. // FAILEDOPERATION = "FailedOperation"
  1691. // INTERNALERROR = "InternalError"
  1692. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  1693. // INTERNALERROR_DB = "InternalError.Db"
  1694. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  1695. // INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount"
  1696. // INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota"
  1697. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  1698. // INVALIDPARAMETER = "InvalidParameter"
  1699. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  1700. // LIMITEXCEEDED = "LimitExceeded"
  1701. // MISSINGPARAMETER = "MissingParameter"
  1702. // OPERATIONDENIED = "OperationDenied"
  1703. // RESOURCEINUSE = "ResourceInUse"
  1704. // RESOURCENOTFOUND = "ResourceNotFound"
  1705. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  1706. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  1707. // UNKNOWNPARAMETER = "UnknownParameter"
  1708. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  1709. func (c *Client) DeleteClusterEndpointVipWithContext(ctx context.Context, request *DeleteClusterEndpointVipRequest) (response *DeleteClusterEndpointVipResponse, err error) {
  1710. if request == nil {
  1711. request = NewDeleteClusterEndpointVipRequest()
  1712. }
  1713. if c.GetCredential() == nil {
  1714. return nil, errors.New("DeleteClusterEndpointVip require credential")
  1715. }
  1716. request.SetContext(ctx)
  1717. response = NewDeleteClusterEndpointVipResponse()
  1718. err = c.Send(request, response)
  1719. return
  1720. }
  1721. func NewDeleteClusterInstancesRequest() (request *DeleteClusterInstancesRequest) {
  1722. request = &DeleteClusterInstancesRequest{
  1723. BaseRequest: &tchttp.BaseRequest{},
  1724. }
  1725. request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterInstances")
  1726. return
  1727. }
  1728. func NewDeleteClusterInstancesResponse() (response *DeleteClusterInstancesResponse) {
  1729. response = &DeleteClusterInstancesResponse{
  1730. BaseResponse: &tchttp.BaseResponse{},
  1731. }
  1732. return
  1733. }
  1734. // DeleteClusterInstances
  1735. // 删除集群中的实例
  1736. //
  1737. // 可能返回的错误码:
  1738. //
  1739. // INTERNALERROR = "InternalError"
  1740. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  1741. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  1742. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  1743. // INTERNALERROR_DB = "InternalError.Db"
  1744. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  1745. // INTERNALERROR_PARAM = "InternalError.Param"
  1746. // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
  1747. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  1748. // INVALIDPARAMETER = "InvalidParameter"
  1749. // LIMITEXCEEDED = "LimitExceeded"
  1750. func (c *Client) DeleteClusterInstances(request *DeleteClusterInstancesRequest) (response *DeleteClusterInstancesResponse, err error) {
  1751. return c.DeleteClusterInstancesWithContext(context.Background(), request)
  1752. }
  1753. // DeleteClusterInstances
  1754. // 删除集群中的实例
  1755. //
  1756. // 可能返回的错误码:
  1757. //
  1758. // INTERNALERROR = "InternalError"
  1759. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  1760. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  1761. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  1762. // INTERNALERROR_DB = "InternalError.Db"
  1763. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  1764. // INTERNALERROR_PARAM = "InternalError.Param"
  1765. // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
  1766. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  1767. // INVALIDPARAMETER = "InvalidParameter"
  1768. // LIMITEXCEEDED = "LimitExceeded"
  1769. func (c *Client) DeleteClusterInstancesWithContext(ctx context.Context, request *DeleteClusterInstancesRequest) (response *DeleteClusterInstancesResponse, err error) {
  1770. if request == nil {
  1771. request = NewDeleteClusterInstancesRequest()
  1772. }
  1773. if c.GetCredential() == nil {
  1774. return nil, errors.New("DeleteClusterInstances require credential")
  1775. }
  1776. request.SetContext(ctx)
  1777. response = NewDeleteClusterInstancesResponse()
  1778. err = c.Send(request, response)
  1779. return
  1780. }
  1781. func NewDeleteClusterNodePoolRequest() (request *DeleteClusterNodePoolRequest) {
  1782. request = &DeleteClusterNodePoolRequest{
  1783. BaseRequest: &tchttp.BaseRequest{},
  1784. }
  1785. request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterNodePool")
  1786. return
  1787. }
  1788. func NewDeleteClusterNodePoolResponse() (response *DeleteClusterNodePoolResponse) {
  1789. response = &DeleteClusterNodePoolResponse{
  1790. BaseResponse: &tchttp.BaseResponse{},
  1791. }
  1792. return
  1793. }
  1794. // DeleteClusterNodePool
  1795. // 删除节点池
  1796. //
  1797. // 可能返回的错误码:
  1798. //
  1799. // INTERNALERROR_DB = "InternalError.Db"
  1800. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  1801. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  1802. func (c *Client) DeleteClusterNodePool(request *DeleteClusterNodePoolRequest) (response *DeleteClusterNodePoolResponse, err error) {
  1803. return c.DeleteClusterNodePoolWithContext(context.Background(), request)
  1804. }
  1805. // DeleteClusterNodePool
  1806. // 删除节点池
  1807. //
  1808. // 可能返回的错误码:
  1809. //
  1810. // INTERNALERROR_DB = "InternalError.Db"
  1811. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  1812. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  1813. func (c *Client) DeleteClusterNodePoolWithContext(ctx context.Context, request *DeleteClusterNodePoolRequest) (response *DeleteClusterNodePoolResponse, err error) {
  1814. if request == nil {
  1815. request = NewDeleteClusterNodePoolRequest()
  1816. }
  1817. if c.GetCredential() == nil {
  1818. return nil, errors.New("DeleteClusterNodePool require credential")
  1819. }
  1820. request.SetContext(ctx)
  1821. response = NewDeleteClusterNodePoolResponse()
  1822. err = c.Send(request, response)
  1823. return
  1824. }
  1825. func NewDeleteClusterRouteRequest() (request *DeleteClusterRouteRequest) {
  1826. request = &DeleteClusterRouteRequest{
  1827. BaseRequest: &tchttp.BaseRequest{},
  1828. }
  1829. request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterRoute")
  1830. return
  1831. }
  1832. func NewDeleteClusterRouteResponse() (response *DeleteClusterRouteResponse) {
  1833. response = &DeleteClusterRouteResponse{
  1834. BaseResponse: &tchttp.BaseResponse{},
  1835. }
  1836. return
  1837. }
  1838. // DeleteClusterRoute
  1839. // 删除集群路由
  1840. //
  1841. // 可能返回的错误码:
  1842. //
  1843. // INTERNALERROR = "InternalError"
  1844. // INTERNALERROR_DB = "InternalError.Db"
  1845. // INTERNALERROR_PARAM = "InternalError.Param"
  1846. // INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound"
  1847. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  1848. // INVALIDPARAMETER = "InvalidParameter"
  1849. func (c *Client) DeleteClusterRoute(request *DeleteClusterRouteRequest) (response *DeleteClusterRouteResponse, err error) {
  1850. return c.DeleteClusterRouteWithContext(context.Background(), request)
  1851. }
  1852. // DeleteClusterRoute
  1853. // 删除集群路由
  1854. //
  1855. // 可能返回的错误码:
  1856. //
  1857. // INTERNALERROR = "InternalError"
  1858. // INTERNALERROR_DB = "InternalError.Db"
  1859. // INTERNALERROR_PARAM = "InternalError.Param"
  1860. // INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound"
  1861. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  1862. // INVALIDPARAMETER = "InvalidParameter"
  1863. func (c *Client) DeleteClusterRouteWithContext(ctx context.Context, request *DeleteClusterRouteRequest) (response *DeleteClusterRouteResponse, err error) {
  1864. if request == nil {
  1865. request = NewDeleteClusterRouteRequest()
  1866. }
  1867. if c.GetCredential() == nil {
  1868. return nil, errors.New("DeleteClusterRoute require credential")
  1869. }
  1870. request.SetContext(ctx)
  1871. response = NewDeleteClusterRouteResponse()
  1872. err = c.Send(request, response)
  1873. return
  1874. }
  1875. func NewDeleteClusterRouteTableRequest() (request *DeleteClusterRouteTableRequest) {
  1876. request = &DeleteClusterRouteTableRequest{
  1877. BaseRequest: &tchttp.BaseRequest{},
  1878. }
  1879. request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterRouteTable")
  1880. return
  1881. }
  1882. func NewDeleteClusterRouteTableResponse() (response *DeleteClusterRouteTableResponse) {
  1883. response = &DeleteClusterRouteTableResponse{
  1884. BaseResponse: &tchttp.BaseResponse{},
  1885. }
  1886. return
  1887. }
  1888. // DeleteClusterRouteTable
  1889. // 删除集群路由表
  1890. //
  1891. // 可能返回的错误码:
  1892. //
  1893. // FAILEDOPERATION = "FailedOperation"
  1894. // INTERNALERROR = "InternalError"
  1895. // INTERNALERROR_DB = "InternalError.Db"
  1896. // INTERNALERROR_ROUTETABLENOTEMPTY = "InternalError.RouteTableNotEmpty"
  1897. // INVALIDPARAMETER = "InvalidParameter"
  1898. // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
  1899. func (c *Client) DeleteClusterRouteTable(request *DeleteClusterRouteTableRequest) (response *DeleteClusterRouteTableResponse, err error) {
  1900. return c.DeleteClusterRouteTableWithContext(context.Background(), request)
  1901. }
  1902. // DeleteClusterRouteTable
  1903. // 删除集群路由表
  1904. //
  1905. // 可能返回的错误码:
  1906. //
  1907. // FAILEDOPERATION = "FailedOperation"
  1908. // INTERNALERROR = "InternalError"
  1909. // INTERNALERROR_DB = "InternalError.Db"
  1910. // INTERNALERROR_ROUTETABLENOTEMPTY = "InternalError.RouteTableNotEmpty"
  1911. // INVALIDPARAMETER = "InvalidParameter"
  1912. // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
  1913. func (c *Client) DeleteClusterRouteTableWithContext(ctx context.Context, request *DeleteClusterRouteTableRequest) (response *DeleteClusterRouteTableResponse, err error) {
  1914. if request == nil {
  1915. request = NewDeleteClusterRouteTableRequest()
  1916. }
  1917. if c.GetCredential() == nil {
  1918. return nil, errors.New("DeleteClusterRouteTable require credential")
  1919. }
  1920. request.SetContext(ctx)
  1921. response = NewDeleteClusterRouteTableResponse()
  1922. err = c.Send(request, response)
  1923. return
  1924. }
  1925. func NewDeleteEKSClusterRequest() (request *DeleteEKSClusterRequest) {
  1926. request = &DeleteEKSClusterRequest{
  1927. BaseRequest: &tchttp.BaseRequest{},
  1928. }
  1929. request.Init().WithApiInfo("tke", APIVersion, "DeleteEKSCluster")
  1930. return
  1931. }
  1932. func NewDeleteEKSClusterResponse() (response *DeleteEKSClusterResponse) {
  1933. response = &DeleteEKSClusterResponse{
  1934. BaseResponse: &tchttp.BaseResponse{},
  1935. }
  1936. return
  1937. }
  1938. // DeleteEKSCluster
  1939. // 删除弹性集群(yunapiv3)
  1940. //
  1941. // 可能返回的错误码:
  1942. //
  1943. // FAILEDOPERATION = "FailedOperation"
  1944. // INTERNALERROR = "InternalError"
  1945. // INVALIDPARAMETER = "InvalidParameter"
  1946. // LIMITEXCEEDED = "LimitExceeded"
  1947. // MISSINGPARAMETER = "MissingParameter"
  1948. // RESOURCEINUSE = "ResourceInUse"
  1949. // RESOURCENOTFOUND = "ResourceNotFound"
  1950. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  1951. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  1952. // UNKNOWNPARAMETER = "UnknownParameter"
  1953. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  1954. func (c *Client) DeleteEKSCluster(request *DeleteEKSClusterRequest) (response *DeleteEKSClusterResponse, err error) {
  1955. return c.DeleteEKSClusterWithContext(context.Background(), request)
  1956. }
  1957. // DeleteEKSCluster
  1958. // 删除弹性集群(yunapiv3)
  1959. //
  1960. // 可能返回的错误码:
  1961. //
  1962. // FAILEDOPERATION = "FailedOperation"
  1963. // INTERNALERROR = "InternalError"
  1964. // INVALIDPARAMETER = "InvalidParameter"
  1965. // LIMITEXCEEDED = "LimitExceeded"
  1966. // MISSINGPARAMETER = "MissingParameter"
  1967. // RESOURCEINUSE = "ResourceInUse"
  1968. // RESOURCENOTFOUND = "ResourceNotFound"
  1969. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  1970. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  1971. // UNKNOWNPARAMETER = "UnknownParameter"
  1972. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  1973. func (c *Client) DeleteEKSClusterWithContext(ctx context.Context, request *DeleteEKSClusterRequest) (response *DeleteEKSClusterResponse, err error) {
  1974. if request == nil {
  1975. request = NewDeleteEKSClusterRequest()
  1976. }
  1977. if c.GetCredential() == nil {
  1978. return nil, errors.New("DeleteEKSCluster require credential")
  1979. }
  1980. request.SetContext(ctx)
  1981. response = NewDeleteEKSClusterResponse()
  1982. err = c.Send(request, response)
  1983. return
  1984. }
  1985. func NewDeleteEKSContainerInstancesRequest() (request *DeleteEKSContainerInstancesRequest) {
  1986. request = &DeleteEKSContainerInstancesRequest{
  1987. BaseRequest: &tchttp.BaseRequest{},
  1988. }
  1989. request.Init().WithApiInfo("tke", APIVersion, "DeleteEKSContainerInstances")
  1990. return
  1991. }
  1992. func NewDeleteEKSContainerInstancesResponse() (response *DeleteEKSContainerInstancesResponse) {
  1993. response = &DeleteEKSContainerInstancesResponse{
  1994. BaseResponse: &tchttp.BaseResponse{},
  1995. }
  1996. return
  1997. }
  1998. // DeleteEKSContainerInstances
  1999. // 删除容器实例,可批量删除
  2000. //
  2001. // 可能返回的错误码:
  2002. //
  2003. // FAILEDOPERATION = "FailedOperation"
  2004. // INTERNALERROR = "InternalError"
  2005. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  2006. // INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound"
  2007. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  2008. // INVALIDPARAMETER = "InvalidParameter"
  2009. // LIMITEXCEEDED = "LimitExceeded"
  2010. // RESOURCENOTFOUND = "ResourceNotFound"
  2011. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  2012. func DeleteEKSContainerInstances(request *DeleteEKSContainerInstancesRequest) (response *DeleteEKSContainerInstancesResponse, err error) {
  2013. provider := pbtenant.CloudProvider(request.ProviderId)
  2014. var configFile string
  2015. flag.StringVar(&configFile, "conf-tencent", "configs/config.yaml", "config.yaml")
  2016. flag.Parse()
  2017. defer glog.Flush()
  2018. if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil {
  2019. if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) {
  2020. glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err)
  2021. }
  2022. glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile)
  2023. }
  2024. glog.Infof("load tenant from file finished")
  2025. var regionId int32
  2026. var pcmId string
  2027. podId := request.EksCiIds[0]
  2028. podName := request.ContainerGroupName
  2029. switch request.ProviderId {
  2030. case 0:
  2031. regionId, _ = tenanter.GetAliRegionId(request.RegionId)
  2032. pcmId = *podId
  2033. case 1:
  2034. regionId, _ = tenanter.GetTencentRegionId(request.RegionId)
  2035. pcmId = *podId
  2036. case 2:
  2037. regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId)
  2038. pcmId = podName
  2039. case 3:
  2040. regionId, _ = tenanter.GetK8SRegionId(request.RegionId)
  2041. pcmId = podName
  2042. }
  2043. requestPCM := &pbpod.DeletePodReq{
  2044. RequestSource: "tencent",
  2045. Provider: provider,
  2046. AccountName: request.AccountName,
  2047. PcmId: pcmId,
  2048. PodId: *podId,
  2049. PodName: podName,
  2050. Namespace: request.Namespace,
  2051. RegionId: regionId,
  2052. }
  2053. resp, err := server.DeletePod(nil, requestPCM)
  2054. glog.Infof("CreatePod response %+v", resp)
  2055. response = &DeleteEKSContainerInstancesResponse{
  2056. Response: (*struct {
  2057. RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
  2058. })(&struct {
  2059. RequestId *string
  2060. }{
  2061. RequestId: &resp.RequestId,
  2062. }),
  2063. BaseResponse: &tchttp.BaseResponse{},
  2064. }
  2065. return response, nil
  2066. }
  2067. // DeleteEKSContainerInstances
  2068. // 删除容器实例,可批量删除
  2069. //
  2070. // 可能返回的错误码:
  2071. //
  2072. // FAILEDOPERATION = "FailedOperation"
  2073. // INTERNALERROR = "InternalError"
  2074. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  2075. // INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound"
  2076. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  2077. // INVALIDPARAMETER = "InvalidParameter"
  2078. // LIMITEXCEEDED = "LimitExceeded"
  2079. // RESOURCENOTFOUND = "ResourceNotFound"
  2080. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  2081. func (c *Client) DeleteEKSContainerInstancesWithContext(ctx context.Context, request *DeleteEKSContainerInstancesRequest) (response *DeleteEKSContainerInstancesResponse, err error) {
  2082. if request == nil {
  2083. request = NewDeleteEKSContainerInstancesRequest()
  2084. }
  2085. if c.GetCredential() == nil {
  2086. return nil, errors.New("DeleteEKSContainerInstances require credential")
  2087. }
  2088. request.SetContext(ctx)
  2089. response = NewDeleteEKSContainerInstancesResponse()
  2090. err = c.Send(request, response)
  2091. return
  2092. }
  2093. func NewDeleteImageCachesRequest() (request *DeleteImageCachesRequest) {
  2094. request = &DeleteImageCachesRequest{
  2095. BaseRequest: &tchttp.BaseRequest{},
  2096. }
  2097. request.Init().WithApiInfo("tke", APIVersion, "DeleteImageCaches")
  2098. return
  2099. }
  2100. func NewDeleteImageCachesResponse() (response *DeleteImageCachesResponse) {
  2101. response = &DeleteImageCachesResponse{
  2102. BaseResponse: &tchttp.BaseResponse{},
  2103. }
  2104. return
  2105. }
  2106. // DeleteImageCaches
  2107. // 批量删除镜像缓存
  2108. //
  2109. // 可能返回的错误码:
  2110. //
  2111. // INTERNALERROR = "InternalError"
  2112. // INVALIDPARAMETER = "InvalidParameter"
  2113. // RESOURCENOTFOUND = "ResourceNotFound"
  2114. func (c *Client) DeleteImageCaches(request *DeleteImageCachesRequest) (response *DeleteImageCachesResponse, err error) {
  2115. return c.DeleteImageCachesWithContext(context.Background(), request)
  2116. }
  2117. // DeleteImageCaches
  2118. // 批量删除镜像缓存
  2119. //
  2120. // 可能返回的错误码:
  2121. //
  2122. // INTERNALERROR = "InternalError"
  2123. // INVALIDPARAMETER = "InvalidParameter"
  2124. // RESOURCENOTFOUND = "ResourceNotFound"
  2125. func (c *Client) DeleteImageCachesWithContext(ctx context.Context, request *DeleteImageCachesRequest) (response *DeleteImageCachesResponse, err error) {
  2126. if request == nil {
  2127. request = NewDeleteImageCachesRequest()
  2128. }
  2129. if c.GetCredential() == nil {
  2130. return nil, errors.New("DeleteImageCaches require credential")
  2131. }
  2132. request.SetContext(ctx)
  2133. response = NewDeleteImageCachesResponse()
  2134. err = c.Send(request, response)
  2135. return
  2136. }
  2137. func NewDeletePrometheusAlertRuleRequest() (request *DeletePrometheusAlertRuleRequest) {
  2138. request = &DeletePrometheusAlertRuleRequest{
  2139. BaseRequest: &tchttp.BaseRequest{},
  2140. }
  2141. request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusAlertRule")
  2142. return
  2143. }
  2144. func NewDeletePrometheusAlertRuleResponse() (response *DeletePrometheusAlertRuleResponse) {
  2145. response = &DeletePrometheusAlertRuleResponse{
  2146. BaseResponse: &tchttp.BaseResponse{},
  2147. }
  2148. return
  2149. }
  2150. // DeletePrometheusAlertRule
  2151. // 删除告警规则
  2152. //
  2153. // 可能返回的错误码:
  2154. //
  2155. // INTERNALERROR = "InternalError"
  2156. // INTERNALERROR_PARAM = "InternalError.Param"
  2157. // INVALIDPARAMETER = "InvalidParameter"
  2158. // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
  2159. func (c *Client) DeletePrometheusAlertRule(request *DeletePrometheusAlertRuleRequest) (response *DeletePrometheusAlertRuleResponse, err error) {
  2160. return c.DeletePrometheusAlertRuleWithContext(context.Background(), request)
  2161. }
  2162. // DeletePrometheusAlertRule
  2163. // 删除告警规则
  2164. //
  2165. // 可能返回的错误码:
  2166. //
  2167. // INTERNALERROR = "InternalError"
  2168. // INTERNALERROR_PARAM = "InternalError.Param"
  2169. // INVALIDPARAMETER = "InvalidParameter"
  2170. // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
  2171. func (c *Client) DeletePrometheusAlertRuleWithContext(ctx context.Context, request *DeletePrometheusAlertRuleRequest) (response *DeletePrometheusAlertRuleResponse, err error) {
  2172. if request == nil {
  2173. request = NewDeletePrometheusAlertRuleRequest()
  2174. }
  2175. if c.GetCredential() == nil {
  2176. return nil, errors.New("DeletePrometheusAlertRule require credential")
  2177. }
  2178. request.SetContext(ctx)
  2179. response = NewDeletePrometheusAlertRuleResponse()
  2180. err = c.Send(request, response)
  2181. return
  2182. }
  2183. func NewDeletePrometheusTemplateRequest() (request *DeletePrometheusTemplateRequest) {
  2184. request = &DeletePrometheusTemplateRequest{
  2185. BaseRequest: &tchttp.BaseRequest{},
  2186. }
  2187. request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusTemplate")
  2188. return
  2189. }
  2190. func NewDeletePrometheusTemplateResponse() (response *DeletePrometheusTemplateResponse) {
  2191. response = &DeletePrometheusTemplateResponse{
  2192. BaseResponse: &tchttp.BaseResponse{},
  2193. }
  2194. return
  2195. }
  2196. // DeletePrometheusTemplate
  2197. // 删除一个云原生Prometheus配置模板
  2198. //
  2199. // 可能返回的错误码:
  2200. //
  2201. // INTERNALERROR = "InternalError"
  2202. // INTERNALERROR_PARAM = "InternalError.Param"
  2203. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2204. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2205. // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
  2206. func (c *Client) DeletePrometheusTemplate(request *DeletePrometheusTemplateRequest) (response *DeletePrometheusTemplateResponse, err error) {
  2207. return c.DeletePrometheusTemplateWithContext(context.Background(), request)
  2208. }
  2209. // DeletePrometheusTemplate
  2210. // 删除一个云原生Prometheus配置模板
  2211. //
  2212. // 可能返回的错误码:
  2213. //
  2214. // INTERNALERROR = "InternalError"
  2215. // INTERNALERROR_PARAM = "InternalError.Param"
  2216. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2217. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2218. // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
  2219. func (c *Client) DeletePrometheusTemplateWithContext(ctx context.Context, request *DeletePrometheusTemplateRequest) (response *DeletePrometheusTemplateResponse, err error) {
  2220. if request == nil {
  2221. request = NewDeletePrometheusTemplateRequest()
  2222. }
  2223. if c.GetCredential() == nil {
  2224. return nil, errors.New("DeletePrometheusTemplate require credential")
  2225. }
  2226. request.SetContext(ctx)
  2227. response = NewDeletePrometheusTemplateResponse()
  2228. err = c.Send(request, response)
  2229. return
  2230. }
  2231. func NewDeletePrometheusTemplateSyncRequest() (request *DeletePrometheusTemplateSyncRequest) {
  2232. request = &DeletePrometheusTemplateSyncRequest{
  2233. BaseRequest: &tchttp.BaseRequest{},
  2234. }
  2235. request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusTemplateSync")
  2236. return
  2237. }
  2238. func NewDeletePrometheusTemplateSyncResponse() (response *DeletePrometheusTemplateSyncResponse) {
  2239. response = &DeletePrometheusTemplateSyncResponse{
  2240. BaseResponse: &tchttp.BaseResponse{},
  2241. }
  2242. return
  2243. }
  2244. // DeletePrometheusTemplateSync
  2245. // 取消模板同步,这将会删除目标中该模板所生产的配置
  2246. //
  2247. // 可能返回的错误码:
  2248. //
  2249. // INTERNALERROR = "InternalError"
  2250. // INTERNALERROR_DB = "InternalError.Db"
  2251. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  2252. // INTERNALERROR_PARAM = "InternalError.Param"
  2253. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2254. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2255. // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
  2256. func (c *Client) DeletePrometheusTemplateSync(request *DeletePrometheusTemplateSyncRequest) (response *DeletePrometheusTemplateSyncResponse, err error) {
  2257. return c.DeletePrometheusTemplateSyncWithContext(context.Background(), request)
  2258. }
  2259. // DeletePrometheusTemplateSync
  2260. // 取消模板同步,这将会删除目标中该模板所生产的配置
  2261. //
  2262. // 可能返回的错误码:
  2263. //
  2264. // INTERNALERROR = "InternalError"
  2265. // INTERNALERROR_DB = "InternalError.Db"
  2266. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  2267. // INTERNALERROR_PARAM = "InternalError.Param"
  2268. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2269. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2270. // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
  2271. func (c *Client) DeletePrometheusTemplateSyncWithContext(ctx context.Context, request *DeletePrometheusTemplateSyncRequest) (response *DeletePrometheusTemplateSyncResponse, err error) {
  2272. if request == nil {
  2273. request = NewDeletePrometheusTemplateSyncRequest()
  2274. }
  2275. if c.GetCredential() == nil {
  2276. return nil, errors.New("DeletePrometheusTemplateSync require credential")
  2277. }
  2278. request.SetContext(ctx)
  2279. response = NewDeletePrometheusTemplateSyncResponse()
  2280. err = c.Send(request, response)
  2281. return
  2282. }
  2283. func NewDescribeAvailableClusterVersionRequest() (request *DescribeAvailableClusterVersionRequest) {
  2284. request = &DescribeAvailableClusterVersionRequest{
  2285. BaseRequest: &tchttp.BaseRequest{},
  2286. }
  2287. request.Init().WithApiInfo("tke", APIVersion, "DescribeAvailableClusterVersion")
  2288. return
  2289. }
  2290. func NewDescribeAvailableClusterVersionResponse() (response *DescribeAvailableClusterVersionResponse) {
  2291. response = &DescribeAvailableClusterVersionResponse{
  2292. BaseResponse: &tchttp.BaseResponse{},
  2293. }
  2294. return
  2295. }
  2296. // DescribeAvailableClusterVersion
  2297. // 获取集群可以升级的所有版本
  2298. //
  2299. // 可能返回的错误码:
  2300. //
  2301. // INTERNALERROR = "InternalError"
  2302. // INTERNALERROR_PARAM = "InternalError.Param"
  2303. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2304. // INVALIDPARAMETER = "InvalidParameter"
  2305. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2306. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  2307. func (c *Client) DescribeAvailableClusterVersion(request *DescribeAvailableClusterVersionRequest) (response *DescribeAvailableClusterVersionResponse, err error) {
  2308. return c.DescribeAvailableClusterVersionWithContext(context.Background(), request)
  2309. }
  2310. // DescribeAvailableClusterVersion
  2311. // 获取集群可以升级的所有版本
  2312. //
  2313. // 可能返回的错误码:
  2314. //
  2315. // INTERNALERROR = "InternalError"
  2316. // INTERNALERROR_PARAM = "InternalError.Param"
  2317. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2318. // INVALIDPARAMETER = "InvalidParameter"
  2319. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2320. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  2321. func (c *Client) DescribeAvailableClusterVersionWithContext(ctx context.Context, request *DescribeAvailableClusterVersionRequest) (response *DescribeAvailableClusterVersionResponse, err error) {
  2322. if request == nil {
  2323. request = NewDescribeAvailableClusterVersionRequest()
  2324. }
  2325. if c.GetCredential() == nil {
  2326. return nil, errors.New("DescribeAvailableClusterVersion require credential")
  2327. }
  2328. request.SetContext(ctx)
  2329. response = NewDescribeAvailableClusterVersionResponse()
  2330. err = c.Send(request, response)
  2331. return
  2332. }
  2333. func NewDescribeClusterAsGroupOptionRequest() (request *DescribeClusterAsGroupOptionRequest) {
  2334. request = &DescribeClusterAsGroupOptionRequest{
  2335. BaseRequest: &tchttp.BaseRequest{},
  2336. }
  2337. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAsGroupOption")
  2338. return
  2339. }
  2340. func NewDescribeClusterAsGroupOptionResponse() (response *DescribeClusterAsGroupOptionResponse) {
  2341. response = &DescribeClusterAsGroupOptionResponse{
  2342. BaseResponse: &tchttp.BaseResponse{},
  2343. }
  2344. return
  2345. }
  2346. // DescribeClusterAsGroupOption
  2347. // 集群弹性伸缩配置
  2348. //
  2349. // 可能返回的错误码:
  2350. //
  2351. // FAILEDOPERATION = "FailedOperation"
  2352. // INTERNALERROR = "InternalError"
  2353. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  2354. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  2355. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  2356. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  2357. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  2358. // INTERNALERROR_PARAM = "InternalError.Param"
  2359. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  2360. // UNKNOWNPARAMETER = "UnknownParameter"
  2361. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  2362. func (c *Client) DescribeClusterAsGroupOption(request *DescribeClusterAsGroupOptionRequest) (response *DescribeClusterAsGroupOptionResponse, err error) {
  2363. return c.DescribeClusterAsGroupOptionWithContext(context.Background(), request)
  2364. }
  2365. // DescribeClusterAsGroupOption
  2366. // 集群弹性伸缩配置
  2367. //
  2368. // 可能返回的错误码:
  2369. //
  2370. // FAILEDOPERATION = "FailedOperation"
  2371. // INTERNALERROR = "InternalError"
  2372. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  2373. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  2374. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  2375. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  2376. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  2377. // INTERNALERROR_PARAM = "InternalError.Param"
  2378. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  2379. // UNKNOWNPARAMETER = "UnknownParameter"
  2380. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  2381. func (c *Client) DescribeClusterAsGroupOptionWithContext(ctx context.Context, request *DescribeClusterAsGroupOptionRequest) (response *DescribeClusterAsGroupOptionResponse, err error) {
  2382. if request == nil {
  2383. request = NewDescribeClusterAsGroupOptionRequest()
  2384. }
  2385. if c.GetCredential() == nil {
  2386. return nil, errors.New("DescribeClusterAsGroupOption require credential")
  2387. }
  2388. request.SetContext(ctx)
  2389. response = NewDescribeClusterAsGroupOptionResponse()
  2390. err = c.Send(request, response)
  2391. return
  2392. }
  2393. func NewDescribeClusterAsGroupsRequest() (request *DescribeClusterAsGroupsRequest) {
  2394. request = &DescribeClusterAsGroupsRequest{
  2395. BaseRequest: &tchttp.BaseRequest{},
  2396. }
  2397. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAsGroups")
  2398. return
  2399. }
  2400. func NewDescribeClusterAsGroupsResponse() (response *DescribeClusterAsGroupsResponse) {
  2401. response = &DescribeClusterAsGroupsResponse{
  2402. BaseResponse: &tchttp.BaseResponse{},
  2403. }
  2404. return
  2405. }
  2406. // DescribeClusterAsGroups
  2407. // 集群关联的伸缩组列表
  2408. //
  2409. // 可能返回的错误码:
  2410. //
  2411. // FAILEDOPERATION = "FailedOperation"
  2412. // INTERNALERROR = "InternalError"
  2413. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  2414. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  2415. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  2416. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  2417. // INTERNALERROR_DB = "InternalError.Db"
  2418. // INTERNALERROR_PARAM = "InternalError.Param"
  2419. // INTERNALERROR_PODNOTFOUND = "InternalError.PodNotFound"
  2420. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  2421. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  2422. // INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound"
  2423. // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
  2424. func (c *Client) DescribeClusterAsGroups(request *DescribeClusterAsGroupsRequest) (response *DescribeClusterAsGroupsResponse, err error) {
  2425. return c.DescribeClusterAsGroupsWithContext(context.Background(), request)
  2426. }
  2427. // DescribeClusterAsGroups
  2428. // 集群关联的伸缩组列表
  2429. //
  2430. // 可能返回的错误码:
  2431. //
  2432. // FAILEDOPERATION = "FailedOperation"
  2433. // INTERNALERROR = "InternalError"
  2434. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  2435. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  2436. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  2437. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  2438. // INTERNALERROR_DB = "InternalError.Db"
  2439. // INTERNALERROR_PARAM = "InternalError.Param"
  2440. // INTERNALERROR_PODNOTFOUND = "InternalError.PodNotFound"
  2441. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  2442. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  2443. // INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound"
  2444. // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
  2445. func (c *Client) DescribeClusterAsGroupsWithContext(ctx context.Context, request *DescribeClusterAsGroupsRequest) (response *DescribeClusterAsGroupsResponse, err error) {
  2446. if request == nil {
  2447. request = NewDescribeClusterAsGroupsRequest()
  2448. }
  2449. if c.GetCredential() == nil {
  2450. return nil, errors.New("DescribeClusterAsGroups require credential")
  2451. }
  2452. request.SetContext(ctx)
  2453. response = NewDescribeClusterAsGroupsResponse()
  2454. err = c.Send(request, response)
  2455. return
  2456. }
  2457. func NewDescribeClusterAuthenticationOptionsRequest() (request *DescribeClusterAuthenticationOptionsRequest) {
  2458. request = &DescribeClusterAuthenticationOptionsRequest{
  2459. BaseRequest: &tchttp.BaseRequest{},
  2460. }
  2461. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAuthenticationOptions")
  2462. return
  2463. }
  2464. func NewDescribeClusterAuthenticationOptionsResponse() (response *DescribeClusterAuthenticationOptionsResponse) {
  2465. response = &DescribeClusterAuthenticationOptionsResponse{
  2466. BaseResponse: &tchttp.BaseResponse{},
  2467. }
  2468. return
  2469. }
  2470. // DescribeClusterAuthenticationOptions
  2471. // 查看集群认证配置
  2472. //
  2473. // 可能返回的错误码:
  2474. //
  2475. // INTERNALERROR = "InternalError"
  2476. // INVALIDPARAMETER = "InvalidParameter"
  2477. // OPERATIONDENIED = "OperationDenied"
  2478. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  2479. func (c *Client) DescribeClusterAuthenticationOptions(request *DescribeClusterAuthenticationOptionsRequest) (response *DescribeClusterAuthenticationOptionsResponse, err error) {
  2480. return c.DescribeClusterAuthenticationOptionsWithContext(context.Background(), request)
  2481. }
  2482. // DescribeClusterAuthenticationOptions
  2483. // 查看集群认证配置
  2484. //
  2485. // 可能返回的错误码:
  2486. //
  2487. // INTERNALERROR = "InternalError"
  2488. // INVALIDPARAMETER = "InvalidParameter"
  2489. // OPERATIONDENIED = "OperationDenied"
  2490. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  2491. func (c *Client) DescribeClusterAuthenticationOptionsWithContext(ctx context.Context, request *DescribeClusterAuthenticationOptionsRequest) (response *DescribeClusterAuthenticationOptionsResponse, err error) {
  2492. if request == nil {
  2493. request = NewDescribeClusterAuthenticationOptionsRequest()
  2494. }
  2495. if c.GetCredential() == nil {
  2496. return nil, errors.New("DescribeClusterAuthenticationOptions require credential")
  2497. }
  2498. request.SetContext(ctx)
  2499. response = NewDescribeClusterAuthenticationOptionsResponse()
  2500. err = c.Send(request, response)
  2501. return
  2502. }
  2503. func NewDescribeClusterCommonNamesRequest() (request *DescribeClusterCommonNamesRequest) {
  2504. request = &DescribeClusterCommonNamesRequest{
  2505. BaseRequest: &tchttp.BaseRequest{},
  2506. }
  2507. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterCommonNames")
  2508. return
  2509. }
  2510. func NewDescribeClusterCommonNamesResponse() (response *DescribeClusterCommonNamesResponse) {
  2511. response = &DescribeClusterCommonNamesResponse{
  2512. BaseResponse: &tchttp.BaseResponse{},
  2513. }
  2514. return
  2515. }
  2516. // DescribeClusterCommonNames
  2517. // 获取指定子账户在RBAC授权模式中对应kube-apiserver客户端证书的CommonName字段,如果没有客户端证书,将会签发一个,此接口有最大传入子账户数量上限,当前为50
  2518. //
  2519. // 可能返回的错误码:
  2520. //
  2521. // INTERNALERROR = "InternalError"
  2522. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2523. // INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError"
  2524. // INVALIDPARAMETER = "InvalidParameter"
  2525. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2526. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  2527. // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
  2528. // UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist"
  2529. func (c *Client) DescribeClusterCommonNames(request *DescribeClusterCommonNamesRequest) (response *DescribeClusterCommonNamesResponse, err error) {
  2530. return c.DescribeClusterCommonNamesWithContext(context.Background(), request)
  2531. }
  2532. // DescribeClusterCommonNames
  2533. // 获取指定子账户在RBAC授权模式中对应kube-apiserver客户端证书的CommonName字段,如果没有客户端证书,将会签发一个,此接口有最大传入子账户数量上限,当前为50
  2534. //
  2535. // 可能返回的错误码:
  2536. //
  2537. // INTERNALERROR = "InternalError"
  2538. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2539. // INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError"
  2540. // INVALIDPARAMETER = "InvalidParameter"
  2541. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2542. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  2543. // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
  2544. // UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist"
  2545. func (c *Client) DescribeClusterCommonNamesWithContext(ctx context.Context, request *DescribeClusterCommonNamesRequest) (response *DescribeClusterCommonNamesResponse, err error) {
  2546. if request == nil {
  2547. request = NewDescribeClusterCommonNamesRequest()
  2548. }
  2549. if c.GetCredential() == nil {
  2550. return nil, errors.New("DescribeClusterCommonNames require credential")
  2551. }
  2552. request.SetContext(ctx)
  2553. response = NewDescribeClusterCommonNamesResponse()
  2554. err = c.Send(request, response)
  2555. return
  2556. }
  2557. func NewDescribeClusterControllersRequest() (request *DescribeClusterControllersRequest) {
  2558. request = &DescribeClusterControllersRequest{
  2559. BaseRequest: &tchttp.BaseRequest{},
  2560. }
  2561. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterControllers")
  2562. return
  2563. }
  2564. func NewDescribeClusterControllersResponse() (response *DescribeClusterControllersResponse) {
  2565. response = &DescribeClusterControllersResponse{
  2566. BaseResponse: &tchttp.BaseResponse{},
  2567. }
  2568. return
  2569. }
  2570. // DescribeClusterControllers
  2571. // 用于查询Kubernetes的各个原生控制器是否开启
  2572. //
  2573. // 可能返回的错误码:
  2574. //
  2575. // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate"
  2576. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  2577. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  2578. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2579. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2580. func (c *Client) DescribeClusterControllers(request *DescribeClusterControllersRequest) (response *DescribeClusterControllersResponse, err error) {
  2581. return c.DescribeClusterControllersWithContext(context.Background(), request)
  2582. }
  2583. // DescribeClusterControllers
  2584. // 用于查询Kubernetes的各个原生控制器是否开启
  2585. //
  2586. // 可能返回的错误码:
  2587. //
  2588. // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate"
  2589. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  2590. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  2591. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2592. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2593. func (c *Client) DescribeClusterControllersWithContext(ctx context.Context, request *DescribeClusterControllersRequest) (response *DescribeClusterControllersResponse, err error) {
  2594. if request == nil {
  2595. request = NewDescribeClusterControllersRequest()
  2596. }
  2597. if c.GetCredential() == nil {
  2598. return nil, errors.New("DescribeClusterControllers require credential")
  2599. }
  2600. request.SetContext(ctx)
  2601. response = NewDescribeClusterControllersResponse()
  2602. err = c.Send(request, response)
  2603. return
  2604. }
  2605. func NewDescribeClusterEndpointStatusRequest() (request *DescribeClusterEndpointStatusRequest) {
  2606. request = &DescribeClusterEndpointStatusRequest{
  2607. BaseRequest: &tchttp.BaseRequest{},
  2608. }
  2609. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterEndpointStatus")
  2610. return
  2611. }
  2612. func NewDescribeClusterEndpointStatusResponse() (response *DescribeClusterEndpointStatusResponse) {
  2613. response = &DescribeClusterEndpointStatusResponse{
  2614. BaseResponse: &tchttp.BaseResponse{},
  2615. }
  2616. return
  2617. }
  2618. // DescribeClusterEndpointStatus
  2619. // 查询集群访问端口状态(独立集群开启内网/外网访问,托管集群支持开启内网访问)
  2620. //
  2621. // 可能返回的错误码:
  2622. //
  2623. // FAILEDOPERATION = "FailedOperation"
  2624. // INTERNALERROR = "InternalError"
  2625. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  2626. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  2627. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  2628. // INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection"
  2629. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  2630. // INTERNALERROR_KUBERNETESINTERNAL = "InternalError.KubernetesInternal"
  2631. // INTERNALERROR_PARAM = "InternalError.Param"
  2632. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2633. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  2634. // INVALIDPARAMETER = "InvalidParameter"
  2635. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2636. // LIMITEXCEEDED = "LimitExceeded"
  2637. // MISSINGPARAMETER = "MissingParameter"
  2638. // OPERATIONDENIED = "OperationDenied"
  2639. // RESOURCEINUSE = "ResourceInUse"
  2640. // RESOURCENOTFOUND = "ResourceNotFound"
  2641. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  2642. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  2643. // UNKNOWNPARAMETER = "UnknownParameter"
  2644. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  2645. func (c *Client) DescribeClusterEndpointStatus(request *DescribeClusterEndpointStatusRequest) (response *DescribeClusterEndpointStatusResponse, err error) {
  2646. return c.DescribeClusterEndpointStatusWithContext(context.Background(), request)
  2647. }
  2648. // DescribeClusterEndpointStatus
  2649. // 查询集群访问端口状态(独立集群开启内网/外网访问,托管集群支持开启内网访问)
  2650. //
  2651. // 可能返回的错误码:
  2652. //
  2653. // FAILEDOPERATION = "FailedOperation"
  2654. // INTERNALERROR = "InternalError"
  2655. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  2656. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  2657. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  2658. // INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection"
  2659. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  2660. // INTERNALERROR_KUBERNETESINTERNAL = "InternalError.KubernetesInternal"
  2661. // INTERNALERROR_PARAM = "InternalError.Param"
  2662. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2663. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  2664. // INVALIDPARAMETER = "InvalidParameter"
  2665. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2666. // LIMITEXCEEDED = "LimitExceeded"
  2667. // MISSINGPARAMETER = "MissingParameter"
  2668. // OPERATIONDENIED = "OperationDenied"
  2669. // RESOURCEINUSE = "ResourceInUse"
  2670. // RESOURCENOTFOUND = "ResourceNotFound"
  2671. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  2672. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  2673. // UNKNOWNPARAMETER = "UnknownParameter"
  2674. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  2675. func (c *Client) DescribeClusterEndpointStatusWithContext(ctx context.Context, request *DescribeClusterEndpointStatusRequest) (response *DescribeClusterEndpointStatusResponse, err error) {
  2676. if request == nil {
  2677. request = NewDescribeClusterEndpointStatusRequest()
  2678. }
  2679. if c.GetCredential() == nil {
  2680. return nil, errors.New("DescribeClusterEndpointStatus require credential")
  2681. }
  2682. request.SetContext(ctx)
  2683. response = NewDescribeClusterEndpointStatusResponse()
  2684. err = c.Send(request, response)
  2685. return
  2686. }
  2687. func NewDescribeClusterEndpointVipStatusRequest() (request *DescribeClusterEndpointVipStatusRequest) {
  2688. request = &DescribeClusterEndpointVipStatusRequest{
  2689. BaseRequest: &tchttp.BaseRequest{},
  2690. }
  2691. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterEndpointVipStatus")
  2692. return
  2693. }
  2694. func NewDescribeClusterEndpointVipStatusResponse() (response *DescribeClusterEndpointVipStatusResponse) {
  2695. response = &DescribeClusterEndpointVipStatusResponse{
  2696. BaseResponse: &tchttp.BaseResponse{},
  2697. }
  2698. return
  2699. }
  2700. // DescribeClusterEndpointVipStatus
  2701. // 查询集群开启端口流程状态(仅支持托管集群外网端口)
  2702. //
  2703. // 可能返回的错误码:
  2704. //
  2705. // FAILEDOPERATION = "FailedOperation"
  2706. // INTERNALERROR = "InternalError"
  2707. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  2708. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  2709. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  2710. // INTERNALERROR_DB = "InternalError.Db"
  2711. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  2712. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  2713. // INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount"
  2714. // INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota"
  2715. // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
  2716. // INTERNALERROR_PARAM = "InternalError.Param"
  2717. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  2718. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2719. // INVALIDPARAMETER = "InvalidParameter"
  2720. // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
  2721. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2722. // OPERATIONDENIED = "OperationDenied"
  2723. // RESOURCEINUSE = "ResourceInUse"
  2724. // RESOURCENOTFOUND = "ResourceNotFound"
  2725. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  2726. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  2727. func (c *Client) DescribeClusterEndpointVipStatus(request *DescribeClusterEndpointVipStatusRequest) (response *DescribeClusterEndpointVipStatusResponse, err error) {
  2728. return c.DescribeClusterEndpointVipStatusWithContext(context.Background(), request)
  2729. }
  2730. // DescribeClusterEndpointVipStatus
  2731. // 查询集群开启端口流程状态(仅支持托管集群外网端口)
  2732. //
  2733. // 可能返回的错误码:
  2734. //
  2735. // FAILEDOPERATION = "FailedOperation"
  2736. // INTERNALERROR = "InternalError"
  2737. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  2738. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  2739. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  2740. // INTERNALERROR_DB = "InternalError.Db"
  2741. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  2742. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  2743. // INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount"
  2744. // INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota"
  2745. // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
  2746. // INTERNALERROR_PARAM = "InternalError.Param"
  2747. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  2748. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2749. // INVALIDPARAMETER = "InvalidParameter"
  2750. // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
  2751. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2752. // OPERATIONDENIED = "OperationDenied"
  2753. // RESOURCEINUSE = "ResourceInUse"
  2754. // RESOURCENOTFOUND = "ResourceNotFound"
  2755. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  2756. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  2757. func (c *Client) DescribeClusterEndpointVipStatusWithContext(ctx context.Context, request *DescribeClusterEndpointVipStatusRequest) (response *DescribeClusterEndpointVipStatusResponse, err error) {
  2758. if request == nil {
  2759. request = NewDescribeClusterEndpointVipStatusRequest()
  2760. }
  2761. if c.GetCredential() == nil {
  2762. return nil, errors.New("DescribeClusterEndpointVipStatus require credential")
  2763. }
  2764. request.SetContext(ctx)
  2765. response = NewDescribeClusterEndpointVipStatusResponse()
  2766. err = c.Send(request, response)
  2767. return
  2768. }
  2769. func NewDescribeClusterInstancesRequest() (request *DescribeClusterInstancesRequest) {
  2770. request = &DescribeClusterInstancesRequest{
  2771. BaseRequest: &tchttp.BaseRequest{},
  2772. }
  2773. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterInstances")
  2774. return
  2775. }
  2776. func NewDescribeClusterInstancesResponse() (response *DescribeClusterInstancesResponse) {
  2777. response = &DescribeClusterInstancesResponse{
  2778. BaseResponse: &tchttp.BaseResponse{},
  2779. }
  2780. return
  2781. }
  2782. // DescribeClusterInstances
  2783. //
  2784. // 查询集群下节点实例信息
  2785. //
  2786. // 可能返回的错误码:
  2787. //
  2788. // FAILEDOPERATION = "FailedOperation"
  2789. // INTERNALERROR = "InternalError"
  2790. // INTERNALERROR_DB = "InternalError.Db"
  2791. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  2792. // INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed"
  2793. // INTERNALERROR_PARAM = "InternalError.Param"
  2794. // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
  2795. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  2796. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  2797. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2798. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  2799. func (c *Client) DescribeClusterInstances(request *DescribeClusterInstancesRequest) (response *DescribeClusterInstancesResponse, err error) {
  2800. return c.DescribeClusterInstancesWithContext(context.Background(), request)
  2801. }
  2802. // DescribeClusterInstances
  2803. //
  2804. // 查询集群下节点实例信息
  2805. //
  2806. // 可能返回的错误码:
  2807. //
  2808. // FAILEDOPERATION = "FailedOperation"
  2809. // INTERNALERROR = "InternalError"
  2810. // INTERNALERROR_DB = "InternalError.Db"
  2811. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  2812. // INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed"
  2813. // INTERNALERROR_PARAM = "InternalError.Param"
  2814. // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
  2815. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  2816. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  2817. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2818. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  2819. func (c *Client) DescribeClusterInstancesWithContext(ctx context.Context, request *DescribeClusterInstancesRequest) (response *DescribeClusterInstancesResponse, err error) {
  2820. if request == nil {
  2821. request = NewDescribeClusterInstancesRequest()
  2822. }
  2823. if c.GetCredential() == nil {
  2824. return nil, errors.New("DescribeClusterInstances require credential")
  2825. }
  2826. request.SetContext(ctx)
  2827. response = NewDescribeClusterInstancesResponse()
  2828. err = c.Send(request, response)
  2829. return
  2830. }
  2831. func NewDescribeClusterKubeconfigRequest() (request *DescribeClusterKubeconfigRequest) {
  2832. request = &DescribeClusterKubeconfigRequest{
  2833. BaseRequest: &tchttp.BaseRequest{},
  2834. }
  2835. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterKubeconfig")
  2836. return
  2837. }
  2838. func NewDescribeClusterKubeconfigResponse() (response *DescribeClusterKubeconfigResponse) {
  2839. response = &DescribeClusterKubeconfigResponse{
  2840. BaseResponse: &tchttp.BaseResponse{},
  2841. }
  2842. return
  2843. }
  2844. // DescribeClusterKubeconfig
  2845. // 获取集群的kubeconfig文件,不同子账户获取自己的kubeconfig文件,该文件中有每个子账户自己的kube-apiserver的客户端证书,默认首次调此接口时候创建客户端证书,时效20年,未授予任何权限,如果是集群所有者或者主账户,则默认是cluster-admin权限。
  2846. //
  2847. // 可能返回的错误码:
  2848. //
  2849. // INTERNALERROR = "InternalError"
  2850. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  2851. // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp"
  2852. // INTERNALERROR_DB = "InternalError.Db"
  2853. // INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection"
  2854. // INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError"
  2855. // INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError"
  2856. // INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError"
  2857. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2858. // INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError"
  2859. // INVALIDPARAMETER = "InvalidParameter"
  2860. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  2861. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2862. // RESOURCENOTFOUND = "ResourceNotFound"
  2863. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  2864. // RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound"
  2865. // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
  2866. func (c *Client) DescribeClusterKubeconfig(request *DescribeClusterKubeconfigRequest) (response *DescribeClusterKubeconfigResponse, err error) {
  2867. return c.DescribeClusterKubeconfigWithContext(context.Background(), request)
  2868. }
  2869. // DescribeClusterKubeconfig
  2870. // 获取集群的kubeconfig文件,不同子账户获取自己的kubeconfig文件,该文件中有每个子账户自己的kube-apiserver的客户端证书,默认首次调此接口时候创建客户端证书,时效20年,未授予任何权限,如果是集群所有者或者主账户,则默认是cluster-admin权限。
  2871. //
  2872. // 可能返回的错误码:
  2873. //
  2874. // INTERNALERROR = "InternalError"
  2875. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  2876. // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp"
  2877. // INTERNALERROR_DB = "InternalError.Db"
  2878. // INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection"
  2879. // INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError"
  2880. // INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError"
  2881. // INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError"
  2882. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2883. // INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError"
  2884. // INVALIDPARAMETER = "InvalidParameter"
  2885. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  2886. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2887. // RESOURCENOTFOUND = "ResourceNotFound"
  2888. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  2889. // RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound"
  2890. // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
  2891. func (c *Client) DescribeClusterKubeconfigWithContext(ctx context.Context, request *DescribeClusterKubeconfigRequest) (response *DescribeClusterKubeconfigResponse, err error) {
  2892. if request == nil {
  2893. request = NewDescribeClusterKubeconfigRequest()
  2894. }
  2895. if c.GetCredential() == nil {
  2896. return nil, errors.New("DescribeClusterKubeconfig require credential")
  2897. }
  2898. request.SetContext(ctx)
  2899. response = NewDescribeClusterKubeconfigResponse()
  2900. err = c.Send(request, response)
  2901. return
  2902. }
  2903. func NewDescribeClusterNodePoolDetailRequest() (request *DescribeClusterNodePoolDetailRequest) {
  2904. request = &DescribeClusterNodePoolDetailRequest{
  2905. BaseRequest: &tchttp.BaseRequest{},
  2906. }
  2907. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterNodePoolDetail")
  2908. return
  2909. }
  2910. func NewDescribeClusterNodePoolDetailResponse() (response *DescribeClusterNodePoolDetailResponse) {
  2911. response = &DescribeClusterNodePoolDetailResponse{
  2912. BaseResponse: &tchttp.BaseResponse{},
  2913. }
  2914. return
  2915. }
  2916. // DescribeClusterNodePoolDetail
  2917. // 查询节点池详情
  2918. //
  2919. // 可能返回的错误码:
  2920. //
  2921. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  2922. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  2923. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2924. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2925. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  2926. func (c *Client) DescribeClusterNodePoolDetail(request *DescribeClusterNodePoolDetailRequest) (response *DescribeClusterNodePoolDetailResponse, err error) {
  2927. return c.DescribeClusterNodePoolDetailWithContext(context.Background(), request)
  2928. }
  2929. // DescribeClusterNodePoolDetail
  2930. // 查询节点池详情
  2931. //
  2932. // 可能返回的错误码:
  2933. //
  2934. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  2935. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  2936. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2937. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2938. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  2939. func (c *Client) DescribeClusterNodePoolDetailWithContext(ctx context.Context, request *DescribeClusterNodePoolDetailRequest) (response *DescribeClusterNodePoolDetailResponse, err error) {
  2940. if request == nil {
  2941. request = NewDescribeClusterNodePoolDetailRequest()
  2942. }
  2943. if c.GetCredential() == nil {
  2944. return nil, errors.New("DescribeClusterNodePoolDetail require credential")
  2945. }
  2946. request.SetContext(ctx)
  2947. response = NewDescribeClusterNodePoolDetailResponse()
  2948. err = c.Send(request, response)
  2949. return
  2950. }
  2951. func NewDescribeClusterNodePoolsRequest() (request *DescribeClusterNodePoolsRequest) {
  2952. request = &DescribeClusterNodePoolsRequest{
  2953. BaseRequest: &tchttp.BaseRequest{},
  2954. }
  2955. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterNodePools")
  2956. return
  2957. }
  2958. func NewDescribeClusterNodePoolsResponse() (response *DescribeClusterNodePoolsResponse) {
  2959. response = &DescribeClusterNodePoolsResponse{
  2960. BaseResponse: &tchttp.BaseResponse{},
  2961. }
  2962. return
  2963. }
  2964. // DescribeClusterNodePools
  2965. // 查询节点池列表
  2966. //
  2967. // 可能返回的错误码:
  2968. //
  2969. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  2970. // INTERNALERROR_PARAM = "InternalError.Param"
  2971. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2972. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2973. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  2974. func (c *Client) DescribeClusterNodePools(request *DescribeClusterNodePoolsRequest) (response *DescribeClusterNodePoolsResponse, err error) {
  2975. return c.DescribeClusterNodePoolsWithContext(context.Background(), request)
  2976. }
  2977. // DescribeClusterNodePools
  2978. // 查询节点池列表
  2979. //
  2980. // 可能返回的错误码:
  2981. //
  2982. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  2983. // INTERNALERROR_PARAM = "InternalError.Param"
  2984. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  2985. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  2986. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  2987. func (c *Client) DescribeClusterNodePoolsWithContext(ctx context.Context, request *DescribeClusterNodePoolsRequest) (response *DescribeClusterNodePoolsResponse, err error) {
  2988. if request == nil {
  2989. request = NewDescribeClusterNodePoolsRequest()
  2990. }
  2991. if c.GetCredential() == nil {
  2992. return nil, errors.New("DescribeClusterNodePools require credential")
  2993. }
  2994. request.SetContext(ctx)
  2995. response = NewDescribeClusterNodePoolsResponse()
  2996. err = c.Send(request, response)
  2997. return
  2998. }
  2999. func NewDescribeClusterRouteTablesRequest() (request *DescribeClusterRouteTablesRequest) {
  3000. request = &DescribeClusterRouteTablesRequest{
  3001. BaseRequest: &tchttp.BaseRequest{},
  3002. }
  3003. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterRouteTables")
  3004. return
  3005. }
  3006. func NewDescribeClusterRouteTablesResponse() (response *DescribeClusterRouteTablesResponse) {
  3007. response = &DescribeClusterRouteTablesResponse{
  3008. BaseResponse: &tchttp.BaseResponse{},
  3009. }
  3010. return
  3011. }
  3012. // DescribeClusterRouteTables
  3013. // 查询集群路由表
  3014. //
  3015. // 可能返回的错误码:
  3016. //
  3017. // INTERNALERROR_DB = "InternalError.Db"
  3018. func (c *Client) DescribeClusterRouteTables(request *DescribeClusterRouteTablesRequest) (response *DescribeClusterRouteTablesResponse, err error) {
  3019. return c.DescribeClusterRouteTablesWithContext(context.Background(), request)
  3020. }
  3021. // DescribeClusterRouteTables
  3022. // 查询集群路由表
  3023. //
  3024. // 可能返回的错误码:
  3025. //
  3026. // INTERNALERROR_DB = "InternalError.Db"
  3027. func (c *Client) DescribeClusterRouteTablesWithContext(ctx context.Context, request *DescribeClusterRouteTablesRequest) (response *DescribeClusterRouteTablesResponse, err error) {
  3028. if request == nil {
  3029. request = NewDescribeClusterRouteTablesRequest()
  3030. }
  3031. if c.GetCredential() == nil {
  3032. return nil, errors.New("DescribeClusterRouteTables require credential")
  3033. }
  3034. request.SetContext(ctx)
  3035. response = NewDescribeClusterRouteTablesResponse()
  3036. err = c.Send(request, response)
  3037. return
  3038. }
  3039. func NewDescribeClusterRoutesRequest() (request *DescribeClusterRoutesRequest) {
  3040. request = &DescribeClusterRoutesRequest{
  3041. BaseRequest: &tchttp.BaseRequest{},
  3042. }
  3043. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterRoutes")
  3044. return
  3045. }
  3046. func NewDescribeClusterRoutesResponse() (response *DescribeClusterRoutesResponse) {
  3047. response = &DescribeClusterRoutesResponse{
  3048. BaseResponse: &tchttp.BaseResponse{},
  3049. }
  3050. return
  3051. }
  3052. // DescribeClusterRoutes
  3053. // 查询集群路由
  3054. //
  3055. // 可能返回的错误码:
  3056. //
  3057. // INTERNALERROR_DB = "InternalError.Db"
  3058. // INTERNALERROR_PARAM = "InternalError.Param"
  3059. // INVALIDPARAMETER = "InvalidParameter"
  3060. func (c *Client) DescribeClusterRoutes(request *DescribeClusterRoutesRequest) (response *DescribeClusterRoutesResponse, err error) {
  3061. return c.DescribeClusterRoutesWithContext(context.Background(), request)
  3062. }
  3063. // DescribeClusterRoutes
  3064. // 查询集群路由
  3065. //
  3066. // 可能返回的错误码:
  3067. //
  3068. // INTERNALERROR_DB = "InternalError.Db"
  3069. // INTERNALERROR_PARAM = "InternalError.Param"
  3070. // INVALIDPARAMETER = "InvalidParameter"
  3071. func (c *Client) DescribeClusterRoutesWithContext(ctx context.Context, request *DescribeClusterRoutesRequest) (response *DescribeClusterRoutesResponse, err error) {
  3072. if request == nil {
  3073. request = NewDescribeClusterRoutesRequest()
  3074. }
  3075. if c.GetCredential() == nil {
  3076. return nil, errors.New("DescribeClusterRoutes require credential")
  3077. }
  3078. request.SetContext(ctx)
  3079. response = NewDescribeClusterRoutesResponse()
  3080. err = c.Send(request, response)
  3081. return
  3082. }
  3083. func NewDescribeClusterSecurityRequest() (request *DescribeClusterSecurityRequest) {
  3084. request = &DescribeClusterSecurityRequest{
  3085. BaseRequest: &tchttp.BaseRequest{},
  3086. }
  3087. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterSecurity")
  3088. return
  3089. }
  3090. func NewDescribeClusterSecurityResponse() (response *DescribeClusterSecurityResponse) {
  3091. response = &DescribeClusterSecurityResponse{
  3092. BaseResponse: &tchttp.BaseResponse{},
  3093. }
  3094. return
  3095. }
  3096. // DescribeClusterSecurity
  3097. // 集群的密钥信息
  3098. //
  3099. // 可能返回的错误码:
  3100. //
  3101. // FAILEDOPERATION = "FailedOperation"
  3102. // INTERNALERROR = "InternalError"
  3103. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  3104. // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp"
  3105. // INTERNALERROR_DB = "InternalError.Db"
  3106. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  3107. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  3108. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  3109. // INTERNALERROR_LBCOMMON = "InternalError.LbCommon"
  3110. // INTERNALERROR_PARAM = "InternalError.Param"
  3111. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  3112. // INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid"
  3113. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  3114. // LIMITEXCEEDED = "LimitExceeded"
  3115. // MISSINGPARAMETER = "MissingParameter"
  3116. // RESOURCEINUSE = "ResourceInUse"
  3117. // RESOURCENOTFOUND = "ResourceNotFound"
  3118. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  3119. // RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound"
  3120. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  3121. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  3122. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  3123. // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
  3124. // UNKNOWNPARAMETER = "UnknownParameter"
  3125. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  3126. func (c *Client) DescribeClusterSecurity(request *DescribeClusterSecurityRequest) (response *DescribeClusterSecurityResponse, err error) {
  3127. return c.DescribeClusterSecurityWithContext(context.Background(), request)
  3128. }
  3129. // DescribeClusterSecurity
  3130. // 集群的密钥信息
  3131. //
  3132. // 可能返回的错误码:
  3133. //
  3134. // FAILEDOPERATION = "FailedOperation"
  3135. // INTERNALERROR = "InternalError"
  3136. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  3137. // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp"
  3138. // INTERNALERROR_DB = "InternalError.Db"
  3139. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  3140. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  3141. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  3142. // INTERNALERROR_LBCOMMON = "InternalError.LbCommon"
  3143. // INTERNALERROR_PARAM = "InternalError.Param"
  3144. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  3145. // INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid"
  3146. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  3147. // LIMITEXCEEDED = "LimitExceeded"
  3148. // MISSINGPARAMETER = "MissingParameter"
  3149. // RESOURCEINUSE = "ResourceInUse"
  3150. // RESOURCENOTFOUND = "ResourceNotFound"
  3151. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  3152. // RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound"
  3153. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  3154. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  3155. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  3156. // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
  3157. // UNKNOWNPARAMETER = "UnknownParameter"
  3158. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  3159. func (c *Client) DescribeClusterSecurityWithContext(ctx context.Context, request *DescribeClusterSecurityRequest) (response *DescribeClusterSecurityResponse, err error) {
  3160. if request == nil {
  3161. request = NewDescribeClusterSecurityRequest()
  3162. }
  3163. if c.GetCredential() == nil {
  3164. return nil, errors.New("DescribeClusterSecurity require credential")
  3165. }
  3166. request.SetContext(ctx)
  3167. response = NewDescribeClusterSecurityResponse()
  3168. err = c.Send(request, response)
  3169. return
  3170. }
  3171. func NewDescribeClusterStatusRequest() (request *DescribeClusterStatusRequest) {
  3172. request = &DescribeClusterStatusRequest{
  3173. BaseRequest: &tchttp.BaseRequest{},
  3174. }
  3175. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterStatus")
  3176. return
  3177. }
  3178. func NewDescribeClusterStatusResponse() (response *DescribeClusterStatusResponse) {
  3179. response = &DescribeClusterStatusResponse{
  3180. BaseResponse: &tchttp.BaseResponse{},
  3181. }
  3182. return
  3183. }
  3184. // DescribeClusterStatus
  3185. // 查看集群状态列表
  3186. //
  3187. // 可能返回的错误码:
  3188. //
  3189. // FAILEDOPERATION = "FailedOperation"
  3190. // INTERNALERROR = "InternalError"
  3191. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3192. // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
  3193. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  3194. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  3195. // INTERNALERROR_DB = "InternalError.Db"
  3196. // INTERNALERROR_PARAM = "InternalError.Param"
  3197. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  3198. // INVALIDPARAMETER = "InvalidParameter"
  3199. // MISSINGPARAMETER = "MissingParameter"
  3200. // UNKNOWNPARAMETER = "UnknownParameter"
  3201. func (c *Client) DescribeClusterStatus(request *DescribeClusterStatusRequest) (response *DescribeClusterStatusResponse, err error) {
  3202. return c.DescribeClusterStatusWithContext(context.Background(), request)
  3203. }
  3204. // DescribeClusterStatus
  3205. // 查看集群状态列表
  3206. //
  3207. // 可能返回的错误码:
  3208. //
  3209. // FAILEDOPERATION = "FailedOperation"
  3210. // INTERNALERROR = "InternalError"
  3211. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3212. // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
  3213. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  3214. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  3215. // INTERNALERROR_DB = "InternalError.Db"
  3216. // INTERNALERROR_PARAM = "InternalError.Param"
  3217. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  3218. // INVALIDPARAMETER = "InvalidParameter"
  3219. // MISSINGPARAMETER = "MissingParameter"
  3220. // UNKNOWNPARAMETER = "UnknownParameter"
  3221. func (c *Client) DescribeClusterStatusWithContext(ctx context.Context, request *DescribeClusterStatusRequest) (response *DescribeClusterStatusResponse, err error) {
  3222. if request == nil {
  3223. request = NewDescribeClusterStatusRequest()
  3224. }
  3225. if c.GetCredential() == nil {
  3226. return nil, errors.New("DescribeClusterStatus require credential")
  3227. }
  3228. request.SetContext(ctx)
  3229. response = NewDescribeClusterStatusResponse()
  3230. err = c.Send(request, response)
  3231. return
  3232. }
  3233. func NewDescribeClustersRequest() (request *DescribeClustersRequest) {
  3234. request = &DescribeClustersRequest{
  3235. BaseRequest: &tchttp.BaseRequest{},
  3236. }
  3237. request.Init().WithApiInfo("tke", APIVersion, "DescribeClusters")
  3238. return
  3239. }
  3240. func NewDescribeClustersResponse() (response *DescribeClustersResponse) {
  3241. response = &DescribeClustersResponse{
  3242. BaseResponse: &tchttp.BaseResponse{},
  3243. }
  3244. return
  3245. }
  3246. // DescribeClusters
  3247. // 查询集群列表
  3248. //
  3249. // 可能返回的错误码:
  3250. //
  3251. // INTERNALERROR = "InternalError"
  3252. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3253. // INTERNALERROR_DB = "InternalError.Db"
  3254. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  3255. // INTERNALERROR_PARAM = "InternalError.Param"
  3256. // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
  3257. // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
  3258. // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
  3259. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  3260. // INVALIDPARAMETER = "InvalidParameter"
  3261. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  3262. // LIMITEXCEEDED = "LimitExceeded"
  3263. // RESOURCENOTFOUND = "ResourceNotFound"
  3264. // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
  3265. func (c *Client) DescribeClusters(request *DescribeClustersRequest) (response *DescribeClustersResponse, err error) {
  3266. return c.DescribeClustersWithContext(context.Background(), request)
  3267. }
  3268. // DescribeClusters
  3269. // 查询集群列表
  3270. //
  3271. // 可能返回的错误码:
  3272. //
  3273. // INTERNALERROR = "InternalError"
  3274. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3275. // INTERNALERROR_DB = "InternalError.Db"
  3276. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  3277. // INTERNALERROR_PARAM = "InternalError.Param"
  3278. // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
  3279. // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
  3280. // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
  3281. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  3282. // INVALIDPARAMETER = "InvalidParameter"
  3283. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  3284. // LIMITEXCEEDED = "LimitExceeded"
  3285. // RESOURCENOTFOUND = "ResourceNotFound"
  3286. // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
  3287. func (c *Client) DescribeClustersWithContext(ctx context.Context, request *DescribeClustersRequest) (response *DescribeClustersResponse, err error) {
  3288. if request == nil {
  3289. request = NewDescribeClustersRequest()
  3290. }
  3291. if c.GetCredential() == nil {
  3292. return nil, errors.New("DescribeClusters require credential")
  3293. }
  3294. request.SetContext(ctx)
  3295. response = NewDescribeClustersResponse()
  3296. err = c.Send(request, response)
  3297. return
  3298. }
  3299. func NewDescribeEKSClusterCredentialRequest() (request *DescribeEKSClusterCredentialRequest) {
  3300. request = &DescribeEKSClusterCredentialRequest{
  3301. BaseRequest: &tchttp.BaseRequest{},
  3302. }
  3303. request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSClusterCredential")
  3304. return
  3305. }
  3306. func NewDescribeEKSClusterCredentialResponse() (response *DescribeEKSClusterCredentialResponse) {
  3307. response = &DescribeEKSClusterCredentialResponse{
  3308. BaseResponse: &tchttp.BaseResponse{},
  3309. }
  3310. return
  3311. }
  3312. // DescribeEKSClusterCredential
  3313. // 获取弹性容器集群的接入认证信息
  3314. //
  3315. // 可能返回的错误码:
  3316. //
  3317. // FAILEDOPERATION = "FailedOperation"
  3318. // INTERNALERROR = "InternalError"
  3319. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3320. // INVALIDPARAMETER = "InvalidParameter"
  3321. // LIMITEXCEEDED = "LimitExceeded"
  3322. // MISSINGPARAMETER = "MissingParameter"
  3323. // RESOURCEINUSE = "ResourceInUse"
  3324. // RESOURCENOTFOUND = "ResourceNotFound"
  3325. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  3326. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  3327. // UNKNOWNPARAMETER = "UnknownParameter"
  3328. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  3329. func (c *Client) DescribeEKSClusterCredential(request *DescribeEKSClusterCredentialRequest) (response *DescribeEKSClusterCredentialResponse, err error) {
  3330. return c.DescribeEKSClusterCredentialWithContext(context.Background(), request)
  3331. }
  3332. // DescribeEKSClusterCredential
  3333. // 获取弹性容器集群的接入认证信息
  3334. //
  3335. // 可能返回的错误码:
  3336. //
  3337. // FAILEDOPERATION = "FailedOperation"
  3338. // INTERNALERROR = "InternalError"
  3339. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3340. // INVALIDPARAMETER = "InvalidParameter"
  3341. // LIMITEXCEEDED = "LimitExceeded"
  3342. // MISSINGPARAMETER = "MissingParameter"
  3343. // RESOURCEINUSE = "ResourceInUse"
  3344. // RESOURCENOTFOUND = "ResourceNotFound"
  3345. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  3346. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  3347. // UNKNOWNPARAMETER = "UnknownParameter"
  3348. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  3349. func (c *Client) DescribeEKSClusterCredentialWithContext(ctx context.Context, request *DescribeEKSClusterCredentialRequest) (response *DescribeEKSClusterCredentialResponse, err error) {
  3350. if request == nil {
  3351. request = NewDescribeEKSClusterCredentialRequest()
  3352. }
  3353. if c.GetCredential() == nil {
  3354. return nil, errors.New("DescribeEKSClusterCredential require credential")
  3355. }
  3356. request.SetContext(ctx)
  3357. response = NewDescribeEKSClusterCredentialResponse()
  3358. err = c.Send(request, response)
  3359. return
  3360. }
  3361. func NewDescribeEKSClustersRequest() (request *DescribeEKSClustersRequest) {
  3362. request = &DescribeEKSClustersRequest{
  3363. BaseRequest: &tchttp.BaseRequest{},
  3364. }
  3365. request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSClusters")
  3366. return
  3367. }
  3368. func NewDescribeEKSClustersResponse() (response *DescribeEKSClustersResponse) {
  3369. response = &DescribeEKSClustersResponse{
  3370. BaseResponse: &tchttp.BaseResponse{},
  3371. }
  3372. return
  3373. }
  3374. // DescribeEKSClusters
  3375. // 查询弹性集群列表
  3376. //
  3377. // 可能返回的错误码:
  3378. //
  3379. // FAILEDOPERATION = "FailedOperation"
  3380. // INTERNALERROR = "InternalError"
  3381. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3382. // INVALIDPARAMETER = "InvalidParameter"
  3383. // LIMITEXCEEDED = "LimitExceeded"
  3384. // MISSINGPARAMETER = "MissingParameter"
  3385. // RESOURCEINUSE = "ResourceInUse"
  3386. // RESOURCENOTFOUND = "ResourceNotFound"
  3387. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  3388. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  3389. // UNKNOWNPARAMETER = "UnknownParameter"
  3390. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  3391. func (c *Client) DescribeEKSClusters(request *DescribeEKSClustersRequest) (response *DescribeEKSClustersResponse, err error) {
  3392. return c.DescribeEKSClustersWithContext(context.Background(), request)
  3393. }
  3394. // DescribeEKSClusters
  3395. // 查询弹性集群列表
  3396. //
  3397. // 可能返回的错误码:
  3398. //
  3399. // FAILEDOPERATION = "FailedOperation"
  3400. // INTERNALERROR = "InternalError"
  3401. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3402. // INVALIDPARAMETER = "InvalidParameter"
  3403. // LIMITEXCEEDED = "LimitExceeded"
  3404. // MISSINGPARAMETER = "MissingParameter"
  3405. // RESOURCEINUSE = "ResourceInUse"
  3406. // RESOURCENOTFOUND = "ResourceNotFound"
  3407. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  3408. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  3409. // UNKNOWNPARAMETER = "UnknownParameter"
  3410. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  3411. func (c *Client) DescribeEKSClustersWithContext(ctx context.Context, request *DescribeEKSClustersRequest) (response *DescribeEKSClustersResponse, err error) {
  3412. if request == nil {
  3413. request = NewDescribeEKSClustersRequest()
  3414. }
  3415. if c.GetCredential() == nil {
  3416. return nil, errors.New("DescribeEKSClusters require credential")
  3417. }
  3418. request.SetContext(ctx)
  3419. response = NewDescribeEKSClustersResponse()
  3420. err = c.Send(request, response)
  3421. return
  3422. }
  3423. func NewDescribeEKSContainerInstanceEventRequest() (request *DescribeEKSContainerInstanceEventRequest) {
  3424. request = &DescribeEKSContainerInstanceEventRequest{
  3425. BaseRequest: &tchttp.BaseRequest{},
  3426. }
  3427. request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstanceEvent")
  3428. return
  3429. }
  3430. func NewDescribeEKSContainerInstanceEventResponse() (response *DescribeEKSContainerInstanceEventResponse) {
  3431. response = &DescribeEKSContainerInstanceEventResponse{
  3432. BaseResponse: &tchttp.BaseResponse{},
  3433. }
  3434. return
  3435. }
  3436. // DescribeEKSContainerInstanceEvent
  3437. // 查询容器实例的事件
  3438. //
  3439. // 可能返回的错误码:
  3440. //
  3441. // INTERNALERROR = "InternalError"
  3442. // INVALIDPARAMETER = "InvalidParameter"
  3443. // LIMITEXCEEDED = "LimitExceeded"
  3444. // RESOURCEINSUFFICIENT = "ResourceInsufficient"
  3445. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  3446. // RESOURCESSOLDOUT = "ResourcesSoldOut"
  3447. // UNKNOWNPARAMETER = "UnknownParameter"
  3448. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  3449. func (c *Client) DescribeEKSContainerInstanceEvent(request *DescribeEKSContainerInstanceEventRequest) (response *DescribeEKSContainerInstanceEventResponse, err error) {
  3450. return c.DescribeEKSContainerInstanceEventWithContext(context.Background(), request)
  3451. }
  3452. // DescribeEKSContainerInstanceEvent
  3453. // 查询容器实例的事件
  3454. //
  3455. // 可能返回的错误码:
  3456. //
  3457. // INTERNALERROR = "InternalError"
  3458. // INVALIDPARAMETER = "InvalidParameter"
  3459. // LIMITEXCEEDED = "LimitExceeded"
  3460. // RESOURCEINSUFFICIENT = "ResourceInsufficient"
  3461. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  3462. // RESOURCESSOLDOUT = "ResourcesSoldOut"
  3463. // UNKNOWNPARAMETER = "UnknownParameter"
  3464. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  3465. func (c *Client) DescribeEKSContainerInstanceEventWithContext(ctx context.Context, request *DescribeEKSContainerInstanceEventRequest) (response *DescribeEKSContainerInstanceEventResponse, err error) {
  3466. if request == nil {
  3467. request = NewDescribeEKSContainerInstanceEventRequest()
  3468. }
  3469. if c.GetCredential() == nil {
  3470. return nil, errors.New("DescribeEKSContainerInstanceEvent require credential")
  3471. }
  3472. request.SetContext(ctx)
  3473. response = NewDescribeEKSContainerInstanceEventResponse()
  3474. err = c.Send(request, response)
  3475. return
  3476. }
  3477. func NewDescribeEKSContainerInstanceRegionsRequest() (request *DescribeEKSContainerInstanceRegionsRequest) {
  3478. request = &DescribeEKSContainerInstanceRegionsRequest{
  3479. BaseRequest: &tchttp.BaseRequest{},
  3480. }
  3481. request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstanceRegions")
  3482. return
  3483. }
  3484. func NewDescribeEKSContainerInstanceRegionsResponse() (response *DescribeEKSContainerInstanceRegionsResponse) {
  3485. response = &DescribeEKSContainerInstanceRegionsResponse{
  3486. BaseResponse: &tchttp.BaseResponse{},
  3487. }
  3488. return
  3489. }
  3490. // DescribeEKSContainerInstanceRegions
  3491. // 查询容器实例支持的地域
  3492. //
  3493. // 可能返回的错误码:
  3494. //
  3495. // FAILEDOPERATION = "FailedOperation"
  3496. // INTERNALERROR = "InternalError"
  3497. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  3498. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3499. // INTERNALERROR_DB = "InternalError.Db"
  3500. // INTERNALERROR_PARAM = "InternalError.Param"
  3501. // INVALIDPARAMETER = "InvalidParameter"
  3502. func (c *Client) DescribeEKSContainerInstanceRegions(request *DescribeEKSContainerInstanceRegionsRequest) (response *DescribeEKSContainerInstanceRegionsResponse, err error) {
  3503. return c.DescribeEKSContainerInstanceRegionsWithContext(context.Background(), request)
  3504. }
  3505. // DescribeEKSContainerInstanceRegions
  3506. // 查询容器实例支持的地域
  3507. //
  3508. // 可能返回的错误码:
  3509. //
  3510. // FAILEDOPERATION = "FailedOperation"
  3511. // INTERNALERROR = "InternalError"
  3512. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  3513. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3514. // INTERNALERROR_DB = "InternalError.Db"
  3515. // INTERNALERROR_PARAM = "InternalError.Param"
  3516. // INVALIDPARAMETER = "InvalidParameter"
  3517. func (c *Client) DescribeEKSContainerInstanceRegionsWithContext(ctx context.Context, request *DescribeEKSContainerInstanceRegionsRequest) (response *DescribeEKSContainerInstanceRegionsResponse, err error) {
  3518. if request == nil {
  3519. request = NewDescribeEKSContainerInstanceRegionsRequest()
  3520. }
  3521. if c.GetCredential() == nil {
  3522. return nil, errors.New("DescribeEKSContainerInstanceRegions require credential")
  3523. }
  3524. request.SetContext(ctx)
  3525. response = NewDescribeEKSContainerInstanceRegionsResponse()
  3526. err = c.Send(request, response)
  3527. return
  3528. }
  3529. func NewDescribeEKSContainerInstancesRequest() (request *DescribeEKSContainerInstancesRequest) {
  3530. request = &DescribeEKSContainerInstancesRequest{
  3531. BaseRequest: &tchttp.BaseRequest{},
  3532. }
  3533. request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstances")
  3534. return
  3535. }
  3536. func NewDescribeEKSContainerInstancesResponse() (response *DescribeEKSContainerInstancesResponse) {
  3537. response = &DescribeEKSContainerInstancesResponse{
  3538. BaseResponse: &tchttp.BaseResponse{},
  3539. }
  3540. return
  3541. }
  3542. // DescribeEKSContainerInstances
  3543. // 查询容器实例
  3544. //
  3545. // 可能返回的错误码:
  3546. //
  3547. // FAILEDOPERATION = "FailedOperation"
  3548. // FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden"
  3549. // INTERNALERROR = "InternalError"
  3550. // INVALIDPARAMETER = "InvalidParameter"
  3551. // RESOURCENOTFOUND = "ResourceNotFound"
  3552. func DescribeEKSContainerInstances(request *DescribeEKSContainerInstancesRequest) (response *DescribeEKSContainerInstancesResponse, err error) {
  3553. provider := pbtenant.CloudProvider(request.ProviderId)
  3554. EksCis := make([]*EksCi, 0)
  3555. //trans Tencent request to PCM request
  3556. requestPCM := &pbpod.ListPodReq{
  3557. RequestSource: "tencent",
  3558. Provider: provider,
  3559. Namespace: "pcm",
  3560. }
  3561. resp, err := server.ListPod(nil, requestPCM)
  3562. if err != nil {
  3563. return nil, err
  3564. }
  3565. //trans PCM response pod set to Tencent EksCis set
  3566. for k := range resp.Pods {
  3567. EksCi := new(EksCi)
  3568. EksCi.EksCiId = &resp.Pods[k].PodId
  3569. EksCi.EksCiName = &resp.Pods[k].PodName
  3570. EksCis = append(EksCis, EksCi)
  3571. }
  3572. _totalCount := uint64(len(resp.Pods))
  3573. _requestId := ""
  3574. response = &DescribeEKSContainerInstancesResponse{
  3575. Response: (*struct {
  3576. TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
  3577. EksCis []*EksCi `json:"EksCis,omitempty" name:"EksCis"`
  3578. RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
  3579. })(&struct {
  3580. TotalCount *uint64
  3581. EksCis []*EksCi
  3582. RequestId *string
  3583. }{
  3584. TotalCount: &_totalCount,
  3585. EksCis: EksCis,
  3586. RequestId: &_requestId,
  3587. }),
  3588. BaseResponse: &tchttp.BaseResponse{},
  3589. }
  3590. return response, nil
  3591. }
  3592. // DescribeEKSContainerInstances
  3593. // 查询容器实例
  3594. //
  3595. // 可能返回的错误码:
  3596. //
  3597. // FAILEDOPERATION = "FailedOperation"
  3598. // FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden"
  3599. // INTERNALERROR = "InternalError"
  3600. // INVALIDPARAMETER = "InvalidParameter"
  3601. // RESOURCENOTFOUND = "ResourceNotFound"
  3602. func (c *Client) DescribeEKSContainerInstancesWithContext(ctx context.Context, request *DescribeEKSContainerInstancesRequest) (response *DescribeEKSContainerInstancesResponse, err error) {
  3603. if request == nil {
  3604. request = NewDescribeEKSContainerInstancesRequest()
  3605. }
  3606. if c.GetCredential() == nil {
  3607. return nil, errors.New("DescribeEKSContainerInstances require credential")
  3608. }
  3609. request.SetContext(ctx)
  3610. response = NewDescribeEKSContainerInstancesResponse()
  3611. err = c.Send(request, response)
  3612. return
  3613. }
  3614. func NewDescribeEksContainerInstanceLogRequest() (request *DescribeEksContainerInstanceLogRequest) {
  3615. request = &DescribeEksContainerInstanceLogRequest{
  3616. BaseRequest: &tchttp.BaseRequest{},
  3617. }
  3618. request.Init().WithApiInfo("tke", APIVersion, "DescribeEksContainerInstanceLog")
  3619. return
  3620. }
  3621. func NewDescribeEksContainerInstanceLogResponse() (response *DescribeEksContainerInstanceLogResponse) {
  3622. response = &DescribeEksContainerInstanceLogResponse{
  3623. BaseResponse: &tchttp.BaseResponse{},
  3624. }
  3625. return
  3626. }
  3627. // DescribeEksContainerInstanceLog
  3628. // 查询容器实例中容器日志
  3629. //
  3630. // 可能返回的错误码:
  3631. //
  3632. // INTERNALERROR = "InternalError"
  3633. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3634. // INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound"
  3635. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  3636. // RESOURCENOTFOUND = "ResourceNotFound"
  3637. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  3638. // RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus"
  3639. func (c *Client) DescribeEksContainerInstanceLog(request *DescribeEksContainerInstanceLogRequest) (response *DescribeEksContainerInstanceLogResponse, err error) {
  3640. return c.DescribeEksContainerInstanceLogWithContext(context.Background(), request)
  3641. }
  3642. // DescribeEksContainerInstanceLog
  3643. // 查询容器实例中容器日志
  3644. //
  3645. // 可能返回的错误码:
  3646. //
  3647. // INTERNALERROR = "InternalError"
  3648. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3649. // INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound"
  3650. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  3651. // RESOURCENOTFOUND = "ResourceNotFound"
  3652. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  3653. // RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus"
  3654. func (c *Client) DescribeEksContainerInstanceLogWithContext(ctx context.Context, request *DescribeEksContainerInstanceLogRequest) (response *DescribeEksContainerInstanceLogResponse, err error) {
  3655. if request == nil {
  3656. request = NewDescribeEksContainerInstanceLogRequest()
  3657. }
  3658. if c.GetCredential() == nil {
  3659. return nil, errors.New("DescribeEksContainerInstanceLog require credential")
  3660. }
  3661. request.SetContext(ctx)
  3662. response = NewDescribeEksContainerInstanceLogResponse()
  3663. err = c.Send(request, response)
  3664. return
  3665. }
  3666. func NewDescribeEnableVpcCniProgressRequest() (request *DescribeEnableVpcCniProgressRequest) {
  3667. request = &DescribeEnableVpcCniProgressRequest{
  3668. BaseRequest: &tchttp.BaseRequest{},
  3669. }
  3670. request.Init().WithApiInfo("tke", APIVersion, "DescribeEnableVpcCniProgress")
  3671. return
  3672. }
  3673. func NewDescribeEnableVpcCniProgressResponse() (response *DescribeEnableVpcCniProgressResponse) {
  3674. response = &DescribeEnableVpcCniProgressResponse{
  3675. BaseResponse: &tchttp.BaseResponse{},
  3676. }
  3677. return
  3678. }
  3679. // DescribeEnableVpcCniProgress
  3680. // 本接口用于查询开启vpc-cni模式的任务进度
  3681. //
  3682. // 可能返回的错误码:
  3683. //
  3684. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  3685. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  3686. func (c *Client) DescribeEnableVpcCniProgress(request *DescribeEnableVpcCniProgressRequest) (response *DescribeEnableVpcCniProgressResponse, err error) {
  3687. return c.DescribeEnableVpcCniProgressWithContext(context.Background(), request)
  3688. }
  3689. // DescribeEnableVpcCniProgress
  3690. // 本接口用于查询开启vpc-cni模式的任务进度
  3691. //
  3692. // 可能返回的错误码:
  3693. //
  3694. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  3695. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  3696. func (c *Client) DescribeEnableVpcCniProgressWithContext(ctx context.Context, request *DescribeEnableVpcCniProgressRequest) (response *DescribeEnableVpcCniProgressResponse, err error) {
  3697. if request == nil {
  3698. request = NewDescribeEnableVpcCniProgressRequest()
  3699. }
  3700. if c.GetCredential() == nil {
  3701. return nil, errors.New("DescribeEnableVpcCniProgress require credential")
  3702. }
  3703. request.SetContext(ctx)
  3704. response = NewDescribeEnableVpcCniProgressResponse()
  3705. err = c.Send(request, response)
  3706. return
  3707. }
  3708. func NewDescribeExistedInstancesRequest() (request *DescribeExistedInstancesRequest) {
  3709. request = &DescribeExistedInstancesRequest{
  3710. BaseRequest: &tchttp.BaseRequest{},
  3711. }
  3712. request.Init().WithApiInfo("tke", APIVersion, "DescribeExistedInstances")
  3713. return
  3714. }
  3715. func NewDescribeExistedInstancesResponse() (response *DescribeExistedInstancesResponse) {
  3716. response = &DescribeExistedInstancesResponse{
  3717. BaseResponse: &tchttp.BaseResponse{},
  3718. }
  3719. return
  3720. }
  3721. // DescribeExistedInstances
  3722. // 查询已经存在的节点,判断是否可以加入集群
  3723. //
  3724. // 可能返回的错误码:
  3725. //
  3726. // FAILEDOPERATION = "FailedOperation"
  3727. // INTERNALERROR = "InternalError"
  3728. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  3729. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  3730. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  3731. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  3732. // INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed"
  3733. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  3734. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  3735. // INTERNALERROR_DB = "InternalError.Db"
  3736. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  3737. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  3738. // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
  3739. // INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed"
  3740. // INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr"
  3741. // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
  3742. // INTERNALERROR_PARAM = "InternalError.Param"
  3743. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  3744. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  3745. // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
  3746. // INVALIDPARAMETER = "InvalidParameter"
  3747. // LIMITEXCEEDED = "LimitExceeded"
  3748. // MISSINGPARAMETER = "MissingParameter"
  3749. // RESOURCEINUSE = "ResourceInUse"
  3750. // RESOURCENOTFOUND = "ResourceNotFound"
  3751. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  3752. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  3753. // UNKNOWNPARAMETER = "UnknownParameter"
  3754. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  3755. func (c *Client) DescribeExistedInstances(request *DescribeExistedInstancesRequest) (response *DescribeExistedInstancesResponse, err error) {
  3756. return c.DescribeExistedInstancesWithContext(context.Background(), request)
  3757. }
  3758. // DescribeExistedInstances
  3759. // 查询已经存在的节点,判断是否可以加入集群
  3760. //
  3761. // 可能返回的错误码:
  3762. //
  3763. // FAILEDOPERATION = "FailedOperation"
  3764. // INTERNALERROR = "InternalError"
  3765. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  3766. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  3767. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  3768. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  3769. // INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed"
  3770. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  3771. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  3772. // INTERNALERROR_DB = "InternalError.Db"
  3773. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  3774. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  3775. // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
  3776. // INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed"
  3777. // INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr"
  3778. // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
  3779. // INTERNALERROR_PARAM = "InternalError.Param"
  3780. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  3781. // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
  3782. // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
  3783. // INVALIDPARAMETER = "InvalidParameter"
  3784. // LIMITEXCEEDED = "LimitExceeded"
  3785. // MISSINGPARAMETER = "MissingParameter"
  3786. // RESOURCEINUSE = "ResourceInUse"
  3787. // RESOURCENOTFOUND = "ResourceNotFound"
  3788. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  3789. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  3790. // UNKNOWNPARAMETER = "UnknownParameter"
  3791. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  3792. func (c *Client) DescribeExistedInstancesWithContext(ctx context.Context, request *DescribeExistedInstancesRequest) (response *DescribeExistedInstancesResponse, err error) {
  3793. if request == nil {
  3794. request = NewDescribeExistedInstancesRequest()
  3795. }
  3796. if c.GetCredential() == nil {
  3797. return nil, errors.New("DescribeExistedInstances require credential")
  3798. }
  3799. request.SetContext(ctx)
  3800. response = NewDescribeExistedInstancesResponse()
  3801. err = c.Send(request, response)
  3802. return
  3803. }
  3804. func NewDescribeExternalClusterSpecRequest() (request *DescribeExternalClusterSpecRequest) {
  3805. request = &DescribeExternalClusterSpecRequest{
  3806. BaseRequest: &tchttp.BaseRequest{},
  3807. }
  3808. request.Init().WithApiInfo("tke", APIVersion, "DescribeExternalClusterSpec")
  3809. return
  3810. }
  3811. func NewDescribeExternalClusterSpecResponse() (response *DescribeExternalClusterSpecResponse) {
  3812. response = &DescribeExternalClusterSpecResponse{
  3813. BaseResponse: &tchttp.BaseResponse{},
  3814. }
  3815. return
  3816. }
  3817. // DescribeExternalClusterSpec
  3818. // 获取导入第三方集群YAML定义
  3819. //
  3820. // 可能返回的错误码:
  3821. //
  3822. // INTERNALERROR = "InternalError"
  3823. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3824. // INTERNALERROR_DB = "InternalError.Db"
  3825. // INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError"
  3826. // INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError"
  3827. // INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError"
  3828. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  3829. // INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError"
  3830. // INVALIDPARAMETER = "InvalidParameter"
  3831. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  3832. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  3833. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  3834. // RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound"
  3835. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  3836. // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
  3837. func (c *Client) DescribeExternalClusterSpec(request *DescribeExternalClusterSpecRequest) (response *DescribeExternalClusterSpecResponse, err error) {
  3838. return c.DescribeExternalClusterSpecWithContext(context.Background(), request)
  3839. }
  3840. // DescribeExternalClusterSpec
  3841. // 获取导入第三方集群YAML定义
  3842. //
  3843. // 可能返回的错误码:
  3844. //
  3845. // INTERNALERROR = "InternalError"
  3846. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3847. // INTERNALERROR_DB = "InternalError.Db"
  3848. // INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError"
  3849. // INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError"
  3850. // INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError"
  3851. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  3852. // INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError"
  3853. // INVALIDPARAMETER = "InvalidParameter"
  3854. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  3855. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  3856. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  3857. // RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound"
  3858. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  3859. // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
  3860. func (c *Client) DescribeExternalClusterSpecWithContext(ctx context.Context, request *DescribeExternalClusterSpecRequest) (response *DescribeExternalClusterSpecResponse, err error) {
  3861. if request == nil {
  3862. request = NewDescribeExternalClusterSpecRequest()
  3863. }
  3864. if c.GetCredential() == nil {
  3865. return nil, errors.New("DescribeExternalClusterSpec require credential")
  3866. }
  3867. request.SetContext(ctx)
  3868. response = NewDescribeExternalClusterSpecResponse()
  3869. err = c.Send(request, response)
  3870. return
  3871. }
  3872. func NewDescribeImageCachesRequest() (request *DescribeImageCachesRequest) {
  3873. request = &DescribeImageCachesRequest{
  3874. BaseRequest: &tchttp.BaseRequest{},
  3875. }
  3876. request.Init().WithApiInfo("tke", APIVersion, "DescribeImageCaches")
  3877. return
  3878. }
  3879. func NewDescribeImageCachesResponse() (response *DescribeImageCachesResponse) {
  3880. response = &DescribeImageCachesResponse{
  3881. BaseResponse: &tchttp.BaseResponse{},
  3882. }
  3883. return
  3884. }
  3885. // DescribeImageCaches
  3886. // 查询镜像缓存信息接口
  3887. //
  3888. // 可能返回的错误码:
  3889. //
  3890. // INTERNALERROR = "InternalError"
  3891. // INVALIDPARAMETER = "InvalidParameter"
  3892. func (c *Client) DescribeImageCaches(request *DescribeImageCachesRequest) (response *DescribeImageCachesResponse, err error) {
  3893. return c.DescribeImageCachesWithContext(context.Background(), request)
  3894. }
  3895. // DescribeImageCaches
  3896. // 查询镜像缓存信息接口
  3897. //
  3898. // 可能返回的错误码:
  3899. //
  3900. // INTERNALERROR = "InternalError"
  3901. // INVALIDPARAMETER = "InvalidParameter"
  3902. func (c *Client) DescribeImageCachesWithContext(ctx context.Context, request *DescribeImageCachesRequest) (response *DescribeImageCachesResponse, err error) {
  3903. if request == nil {
  3904. request = NewDescribeImageCachesRequest()
  3905. }
  3906. if c.GetCredential() == nil {
  3907. return nil, errors.New("DescribeImageCaches require credential")
  3908. }
  3909. request.SetContext(ctx)
  3910. response = NewDescribeImageCachesResponse()
  3911. err = c.Send(request, response)
  3912. return
  3913. }
  3914. func NewDescribeImagesRequest() (request *DescribeImagesRequest) {
  3915. request = &DescribeImagesRequest{
  3916. BaseRequest: &tchttp.BaseRequest{},
  3917. }
  3918. request.Init().WithApiInfo("tke", APIVersion, "DescribeImages")
  3919. return
  3920. }
  3921. func NewDescribeImagesResponse() (response *DescribeImagesResponse) {
  3922. response = &DescribeImagesResponse{
  3923. BaseResponse: &tchttp.BaseResponse{},
  3924. }
  3925. return
  3926. }
  3927. // DescribeImages
  3928. // 获取镜像信息
  3929. //
  3930. // 可能返回的错误码:
  3931. //
  3932. // FAILEDOPERATION = "FailedOperation"
  3933. // INTERNALERROR = "InternalError"
  3934. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3935. // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
  3936. // INTERNALERROR_DB = "InternalError.Db"
  3937. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  3938. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  3939. // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
  3940. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  3941. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  3942. // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
  3943. // LIMITEXCEEDED = "LimitExceeded"
  3944. // MISSINGPARAMETER = "MissingParameter"
  3945. // RESOURCEINUSE = "ResourceInUse"
  3946. // RESOURCENOTFOUND = "ResourceNotFound"
  3947. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  3948. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  3949. // UNKNOWNPARAMETER = "UnknownParameter"
  3950. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  3951. func (c *Client) DescribeImages(request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) {
  3952. return c.DescribeImagesWithContext(context.Background(), request)
  3953. }
  3954. // DescribeImages
  3955. // 获取镜像信息
  3956. //
  3957. // 可能返回的错误码:
  3958. //
  3959. // FAILEDOPERATION = "FailedOperation"
  3960. // INTERNALERROR = "InternalError"
  3961. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  3962. // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
  3963. // INTERNALERROR_DB = "InternalError.Db"
  3964. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  3965. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  3966. // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
  3967. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  3968. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  3969. // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
  3970. // LIMITEXCEEDED = "LimitExceeded"
  3971. // MISSINGPARAMETER = "MissingParameter"
  3972. // RESOURCEINUSE = "ResourceInUse"
  3973. // RESOURCENOTFOUND = "ResourceNotFound"
  3974. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  3975. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  3976. // UNKNOWNPARAMETER = "UnknownParameter"
  3977. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  3978. func (c *Client) DescribeImagesWithContext(ctx context.Context, request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) {
  3979. if request == nil {
  3980. request = NewDescribeImagesRequest()
  3981. }
  3982. if c.GetCredential() == nil {
  3983. return nil, errors.New("DescribeImages require credential")
  3984. }
  3985. request.SetContext(ctx)
  3986. response = NewDescribeImagesResponse()
  3987. err = c.Send(request, response)
  3988. return
  3989. }
  3990. func NewDescribePrometheusAgentInstancesRequest() (request *DescribePrometheusAgentInstancesRequest) {
  3991. request = &DescribePrometheusAgentInstancesRequest{
  3992. BaseRequest: &tchttp.BaseRequest{},
  3993. }
  3994. request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAgentInstances")
  3995. return
  3996. }
  3997. func NewDescribePrometheusAgentInstancesResponse() (response *DescribePrometheusAgentInstancesResponse) {
  3998. response = &DescribePrometheusAgentInstancesResponse{
  3999. BaseResponse: &tchttp.BaseResponse{},
  4000. }
  4001. return
  4002. }
  4003. // DescribePrometheusAgentInstances
  4004. // 获取关联目标集群的实例列表
  4005. //
  4006. // 可能返回的错误码:
  4007. //
  4008. // INTERNALERROR = "InternalError"
  4009. // INTERNALERROR_DB = "InternalError.Db"
  4010. // INTERNALERROR_PARAM = "InternalError.Param"
  4011. // INVALIDPARAMETER = "InvalidParameter"
  4012. func (c *Client) DescribePrometheusAgentInstances(request *DescribePrometheusAgentInstancesRequest) (response *DescribePrometheusAgentInstancesResponse, err error) {
  4013. return c.DescribePrometheusAgentInstancesWithContext(context.Background(), request)
  4014. }
  4015. // DescribePrometheusAgentInstances
  4016. // 获取关联目标集群的实例列表
  4017. //
  4018. // 可能返回的错误码:
  4019. //
  4020. // INTERNALERROR = "InternalError"
  4021. // INTERNALERROR_DB = "InternalError.Db"
  4022. // INTERNALERROR_PARAM = "InternalError.Param"
  4023. // INVALIDPARAMETER = "InvalidParameter"
  4024. func (c *Client) DescribePrometheusAgentInstancesWithContext(ctx context.Context, request *DescribePrometheusAgentInstancesRequest) (response *DescribePrometheusAgentInstancesResponse, err error) {
  4025. if request == nil {
  4026. request = NewDescribePrometheusAgentInstancesRequest()
  4027. }
  4028. if c.GetCredential() == nil {
  4029. return nil, errors.New("DescribePrometheusAgentInstances require credential")
  4030. }
  4031. request.SetContext(ctx)
  4032. response = NewDescribePrometheusAgentInstancesResponse()
  4033. err = c.Send(request, response)
  4034. return
  4035. }
  4036. func NewDescribePrometheusAgentsRequest() (request *DescribePrometheusAgentsRequest) {
  4037. request = &DescribePrometheusAgentsRequest{
  4038. BaseRequest: &tchttp.BaseRequest{},
  4039. }
  4040. request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAgents")
  4041. return
  4042. }
  4043. func NewDescribePrometheusAgentsResponse() (response *DescribePrometheusAgentsResponse) {
  4044. response = &DescribePrometheusAgentsResponse{
  4045. BaseResponse: &tchttp.BaseResponse{},
  4046. }
  4047. return
  4048. }
  4049. // DescribePrometheusAgents
  4050. // 获取被关联集群列表
  4051. //
  4052. // 可能返回的错误码:
  4053. //
  4054. // INTERNALERROR = "InternalError"
  4055. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4056. // INVALIDPARAMETER = "InvalidParameter"
  4057. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4058. func (c *Client) DescribePrometheusAgents(request *DescribePrometheusAgentsRequest) (response *DescribePrometheusAgentsResponse, err error) {
  4059. return c.DescribePrometheusAgentsWithContext(context.Background(), request)
  4060. }
  4061. // DescribePrometheusAgents
  4062. // 获取被关联集群列表
  4063. //
  4064. // 可能返回的错误码:
  4065. //
  4066. // INTERNALERROR = "InternalError"
  4067. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4068. // INVALIDPARAMETER = "InvalidParameter"
  4069. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4070. func (c *Client) DescribePrometheusAgentsWithContext(ctx context.Context, request *DescribePrometheusAgentsRequest) (response *DescribePrometheusAgentsResponse, err error) {
  4071. if request == nil {
  4072. request = NewDescribePrometheusAgentsRequest()
  4073. }
  4074. if c.GetCredential() == nil {
  4075. return nil, errors.New("DescribePrometheusAgents require credential")
  4076. }
  4077. request.SetContext(ctx)
  4078. response = NewDescribePrometheusAgentsResponse()
  4079. err = c.Send(request, response)
  4080. return
  4081. }
  4082. func NewDescribePrometheusAlertHistoryRequest() (request *DescribePrometheusAlertHistoryRequest) {
  4083. request = &DescribePrometheusAlertHistoryRequest{
  4084. BaseRequest: &tchttp.BaseRequest{},
  4085. }
  4086. request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAlertHistory")
  4087. return
  4088. }
  4089. func NewDescribePrometheusAlertHistoryResponse() (response *DescribePrometheusAlertHistoryResponse) {
  4090. response = &DescribePrometheusAlertHistoryResponse{
  4091. BaseResponse: &tchttp.BaseResponse{},
  4092. }
  4093. return
  4094. }
  4095. // DescribePrometheusAlertHistory
  4096. // 获取告警历史
  4097. //
  4098. // 可能返回的错误码:
  4099. //
  4100. // INTERNALERROR = "InternalError"
  4101. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  4102. // INTERNALERROR_PARAM = "InternalError.Param"
  4103. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4104. // INVALIDPARAMETER = "InvalidParameter"
  4105. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  4106. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4107. // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
  4108. func (c *Client) DescribePrometheusAlertHistory(request *DescribePrometheusAlertHistoryRequest) (response *DescribePrometheusAlertHistoryResponse, err error) {
  4109. return c.DescribePrometheusAlertHistoryWithContext(context.Background(), request)
  4110. }
  4111. // DescribePrometheusAlertHistory
  4112. // 获取告警历史
  4113. //
  4114. // 可能返回的错误码:
  4115. //
  4116. // INTERNALERROR = "InternalError"
  4117. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  4118. // INTERNALERROR_PARAM = "InternalError.Param"
  4119. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4120. // INVALIDPARAMETER = "InvalidParameter"
  4121. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  4122. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4123. // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
  4124. func (c *Client) DescribePrometheusAlertHistoryWithContext(ctx context.Context, request *DescribePrometheusAlertHistoryRequest) (response *DescribePrometheusAlertHistoryResponse, err error) {
  4125. if request == nil {
  4126. request = NewDescribePrometheusAlertHistoryRequest()
  4127. }
  4128. if c.GetCredential() == nil {
  4129. return nil, errors.New("DescribePrometheusAlertHistory require credential")
  4130. }
  4131. request.SetContext(ctx)
  4132. response = NewDescribePrometheusAlertHistoryResponse()
  4133. err = c.Send(request, response)
  4134. return
  4135. }
  4136. func NewDescribePrometheusAlertRuleRequest() (request *DescribePrometheusAlertRuleRequest) {
  4137. request = &DescribePrometheusAlertRuleRequest{
  4138. BaseRequest: &tchttp.BaseRequest{},
  4139. }
  4140. request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAlertRule")
  4141. return
  4142. }
  4143. func NewDescribePrometheusAlertRuleResponse() (response *DescribePrometheusAlertRuleResponse) {
  4144. response = &DescribePrometheusAlertRuleResponse{
  4145. BaseResponse: &tchttp.BaseResponse{},
  4146. }
  4147. return
  4148. }
  4149. // DescribePrometheusAlertRule
  4150. // 获取告警规则列表
  4151. //
  4152. // 可能返回的错误码:
  4153. //
  4154. // INTERNALERROR = "InternalError"
  4155. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  4156. // INTERNALERROR_PARAM = "InternalError.Param"
  4157. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4158. // INVALIDPARAMETER = "InvalidParameter"
  4159. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  4160. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4161. // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
  4162. func (c *Client) DescribePrometheusAlertRule(request *DescribePrometheusAlertRuleRequest) (response *DescribePrometheusAlertRuleResponse, err error) {
  4163. return c.DescribePrometheusAlertRuleWithContext(context.Background(), request)
  4164. }
  4165. // DescribePrometheusAlertRule
  4166. // 获取告警规则列表
  4167. //
  4168. // 可能返回的错误码:
  4169. //
  4170. // INTERNALERROR = "InternalError"
  4171. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  4172. // INTERNALERROR_PARAM = "InternalError.Param"
  4173. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4174. // INVALIDPARAMETER = "InvalidParameter"
  4175. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  4176. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4177. // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
  4178. func (c *Client) DescribePrometheusAlertRuleWithContext(ctx context.Context, request *DescribePrometheusAlertRuleRequest) (response *DescribePrometheusAlertRuleResponse, err error) {
  4179. if request == nil {
  4180. request = NewDescribePrometheusAlertRuleRequest()
  4181. }
  4182. if c.GetCredential() == nil {
  4183. return nil, errors.New("DescribePrometheusAlertRule require credential")
  4184. }
  4185. request.SetContext(ctx)
  4186. response = NewDescribePrometheusAlertRuleResponse()
  4187. err = c.Send(request, response)
  4188. return
  4189. }
  4190. func NewDescribePrometheusInstanceRequest() (request *DescribePrometheusInstanceRequest) {
  4191. request = &DescribePrometheusInstanceRequest{
  4192. BaseRequest: &tchttp.BaseRequest{},
  4193. }
  4194. request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusInstance")
  4195. return
  4196. }
  4197. func NewDescribePrometheusInstanceResponse() (response *DescribePrometheusInstanceResponse) {
  4198. response = &DescribePrometheusInstanceResponse{
  4199. BaseResponse: &tchttp.BaseResponse{},
  4200. }
  4201. return
  4202. }
  4203. // DescribePrometheusInstance
  4204. // 获取实例详细信息
  4205. //
  4206. // 可能返回的错误码:
  4207. //
  4208. // INTERNALERROR = "InternalError"
  4209. // INTERNALERROR_DB = "InternalError.Db"
  4210. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  4211. // INTERNALERROR_PARAM = "InternalError.Param"
  4212. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4213. // INVALIDPARAMETER = "InvalidParameter"
  4214. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  4215. // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
  4216. func (c *Client) DescribePrometheusInstance(request *DescribePrometheusInstanceRequest) (response *DescribePrometheusInstanceResponse, err error) {
  4217. return c.DescribePrometheusInstanceWithContext(context.Background(), request)
  4218. }
  4219. // DescribePrometheusInstance
  4220. // 获取实例详细信息
  4221. //
  4222. // 可能返回的错误码:
  4223. //
  4224. // INTERNALERROR = "InternalError"
  4225. // INTERNALERROR_DB = "InternalError.Db"
  4226. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  4227. // INTERNALERROR_PARAM = "InternalError.Param"
  4228. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4229. // INVALIDPARAMETER = "InvalidParameter"
  4230. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  4231. // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
  4232. func (c *Client) DescribePrometheusInstanceWithContext(ctx context.Context, request *DescribePrometheusInstanceRequest) (response *DescribePrometheusInstanceResponse, err error) {
  4233. if request == nil {
  4234. request = NewDescribePrometheusInstanceRequest()
  4235. }
  4236. if c.GetCredential() == nil {
  4237. return nil, errors.New("DescribePrometheusInstance require credential")
  4238. }
  4239. request.SetContext(ctx)
  4240. response = NewDescribePrometheusInstanceResponse()
  4241. err = c.Send(request, response)
  4242. return
  4243. }
  4244. func NewDescribePrometheusOverviewsRequest() (request *DescribePrometheusOverviewsRequest) {
  4245. request = &DescribePrometheusOverviewsRequest{
  4246. BaseRequest: &tchttp.BaseRequest{},
  4247. }
  4248. request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusOverviews")
  4249. return
  4250. }
  4251. func NewDescribePrometheusOverviewsResponse() (response *DescribePrometheusOverviewsResponse) {
  4252. response = &DescribePrometheusOverviewsResponse{
  4253. BaseResponse: &tchttp.BaseResponse{},
  4254. }
  4255. return
  4256. }
  4257. // DescribePrometheusOverviews
  4258. // 获取实例列表
  4259. //
  4260. // 可能返回的错误码:
  4261. //
  4262. // INTERNALERROR = "InternalError"
  4263. // INTERNALERROR_DB = "InternalError.Db"
  4264. // INTERNALERROR_PARAM = "InternalError.Param"
  4265. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4266. func (c *Client) DescribePrometheusOverviews(request *DescribePrometheusOverviewsRequest) (response *DescribePrometheusOverviewsResponse, err error) {
  4267. return c.DescribePrometheusOverviewsWithContext(context.Background(), request)
  4268. }
  4269. // DescribePrometheusOverviews
  4270. // 获取实例列表
  4271. //
  4272. // 可能返回的错误码:
  4273. //
  4274. // INTERNALERROR = "InternalError"
  4275. // INTERNALERROR_DB = "InternalError.Db"
  4276. // INTERNALERROR_PARAM = "InternalError.Param"
  4277. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4278. func (c *Client) DescribePrometheusOverviewsWithContext(ctx context.Context, request *DescribePrometheusOverviewsRequest) (response *DescribePrometheusOverviewsResponse, err error) {
  4279. if request == nil {
  4280. request = NewDescribePrometheusOverviewsRequest()
  4281. }
  4282. if c.GetCredential() == nil {
  4283. return nil, errors.New("DescribePrometheusOverviews require credential")
  4284. }
  4285. request.SetContext(ctx)
  4286. response = NewDescribePrometheusOverviewsResponse()
  4287. err = c.Send(request, response)
  4288. return
  4289. }
  4290. func NewDescribePrometheusTargetsRequest() (request *DescribePrometheusTargetsRequest) {
  4291. request = &DescribePrometheusTargetsRequest{
  4292. BaseRequest: &tchttp.BaseRequest{},
  4293. }
  4294. request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTargets")
  4295. return
  4296. }
  4297. func NewDescribePrometheusTargetsResponse() (response *DescribePrometheusTargetsResponse) {
  4298. response = &DescribePrometheusTargetsResponse{
  4299. BaseResponse: &tchttp.BaseResponse{},
  4300. }
  4301. return
  4302. }
  4303. // DescribePrometheusTargets
  4304. // 获取targets信息
  4305. //
  4306. // 可能返回的错误码:
  4307. //
  4308. // INTERNALERROR = "InternalError"
  4309. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  4310. // INTERNALERROR_PARAM = "InternalError.Param"
  4311. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4312. // INVALIDPARAMETER = "InvalidParameter"
  4313. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  4314. // INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound"
  4315. // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
  4316. func (c *Client) DescribePrometheusTargets(request *DescribePrometheusTargetsRequest) (response *DescribePrometheusTargetsResponse, err error) {
  4317. return c.DescribePrometheusTargetsWithContext(context.Background(), request)
  4318. }
  4319. // DescribePrometheusTargets
  4320. // 获取targets信息
  4321. //
  4322. // 可能返回的错误码:
  4323. //
  4324. // INTERNALERROR = "InternalError"
  4325. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  4326. // INTERNALERROR_PARAM = "InternalError.Param"
  4327. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4328. // INVALIDPARAMETER = "InvalidParameter"
  4329. // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
  4330. // INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound"
  4331. // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
  4332. func (c *Client) DescribePrometheusTargetsWithContext(ctx context.Context, request *DescribePrometheusTargetsRequest) (response *DescribePrometheusTargetsResponse, err error) {
  4333. if request == nil {
  4334. request = NewDescribePrometheusTargetsRequest()
  4335. }
  4336. if c.GetCredential() == nil {
  4337. return nil, errors.New("DescribePrometheusTargets require credential")
  4338. }
  4339. request.SetContext(ctx)
  4340. response = NewDescribePrometheusTargetsResponse()
  4341. err = c.Send(request, response)
  4342. return
  4343. }
  4344. func NewDescribePrometheusTemplateSyncRequest() (request *DescribePrometheusTemplateSyncRequest) {
  4345. request = &DescribePrometheusTemplateSyncRequest{
  4346. BaseRequest: &tchttp.BaseRequest{},
  4347. }
  4348. request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTemplateSync")
  4349. return
  4350. }
  4351. func NewDescribePrometheusTemplateSyncResponse() (response *DescribePrometheusTemplateSyncResponse) {
  4352. response = &DescribePrometheusTemplateSyncResponse{
  4353. BaseResponse: &tchttp.BaseResponse{},
  4354. }
  4355. return
  4356. }
  4357. // DescribePrometheusTemplateSync
  4358. // 获取模板同步信息
  4359. //
  4360. // 可能返回的错误码:
  4361. //
  4362. // INTERNALERROR = "InternalError"
  4363. // INTERNALERROR_DB = "InternalError.Db"
  4364. // INTERNALERROR_PARAM = "InternalError.Param"
  4365. // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
  4366. func (c *Client) DescribePrometheusTemplateSync(request *DescribePrometheusTemplateSyncRequest) (response *DescribePrometheusTemplateSyncResponse, err error) {
  4367. return c.DescribePrometheusTemplateSyncWithContext(context.Background(), request)
  4368. }
  4369. // DescribePrometheusTemplateSync
  4370. // 获取模板同步信息
  4371. //
  4372. // 可能返回的错误码:
  4373. //
  4374. // INTERNALERROR = "InternalError"
  4375. // INTERNALERROR_DB = "InternalError.Db"
  4376. // INTERNALERROR_PARAM = "InternalError.Param"
  4377. // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
  4378. func (c *Client) DescribePrometheusTemplateSyncWithContext(ctx context.Context, request *DescribePrometheusTemplateSyncRequest) (response *DescribePrometheusTemplateSyncResponse, err error) {
  4379. if request == nil {
  4380. request = NewDescribePrometheusTemplateSyncRequest()
  4381. }
  4382. if c.GetCredential() == nil {
  4383. return nil, errors.New("DescribePrometheusTemplateSync require credential")
  4384. }
  4385. request.SetContext(ctx)
  4386. response = NewDescribePrometheusTemplateSyncResponse()
  4387. err = c.Send(request, response)
  4388. return
  4389. }
  4390. func NewDescribePrometheusTemplatesRequest() (request *DescribePrometheusTemplatesRequest) {
  4391. request = &DescribePrometheusTemplatesRequest{
  4392. BaseRequest: &tchttp.BaseRequest{},
  4393. }
  4394. request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTemplates")
  4395. return
  4396. }
  4397. func NewDescribePrometheusTemplatesResponse() (response *DescribePrometheusTemplatesResponse) {
  4398. response = &DescribePrometheusTemplatesResponse{
  4399. BaseResponse: &tchttp.BaseResponse{},
  4400. }
  4401. return
  4402. }
  4403. // DescribePrometheusTemplates
  4404. // 拉取模板列表,默认模板将总是在最前面
  4405. //
  4406. // 可能返回的错误码:
  4407. //
  4408. // INTERNALERROR_DB = "InternalError.Db"
  4409. // INTERNALERROR_PARAM = "InternalError.Param"
  4410. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4411. func (c *Client) DescribePrometheusTemplates(request *DescribePrometheusTemplatesRequest) (response *DescribePrometheusTemplatesResponse, err error) {
  4412. return c.DescribePrometheusTemplatesWithContext(context.Background(), request)
  4413. }
  4414. // DescribePrometheusTemplates
  4415. // 拉取模板列表,默认模板将总是在最前面
  4416. //
  4417. // 可能返回的错误码:
  4418. //
  4419. // INTERNALERROR_DB = "InternalError.Db"
  4420. // INTERNALERROR_PARAM = "InternalError.Param"
  4421. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4422. func (c *Client) DescribePrometheusTemplatesWithContext(ctx context.Context, request *DescribePrometheusTemplatesRequest) (response *DescribePrometheusTemplatesResponse, err error) {
  4423. if request == nil {
  4424. request = NewDescribePrometheusTemplatesRequest()
  4425. }
  4426. if c.GetCredential() == nil {
  4427. return nil, errors.New("DescribePrometheusTemplates require credential")
  4428. }
  4429. request.SetContext(ctx)
  4430. response = NewDescribePrometheusTemplatesResponse()
  4431. err = c.Send(request, response)
  4432. return
  4433. }
  4434. func NewDescribeRegionsRequest() (request *DescribeRegionsRequest) {
  4435. request = &DescribeRegionsRequest{
  4436. BaseRequest: &tchttp.BaseRequest{},
  4437. }
  4438. request.Init().WithApiInfo("tke", APIVersion, "DescribeRegions")
  4439. return
  4440. }
  4441. func NewDescribeRegionsResponse() (response *DescribeRegionsResponse) {
  4442. response = &DescribeRegionsResponse{
  4443. BaseResponse: &tchttp.BaseResponse{},
  4444. }
  4445. return
  4446. }
  4447. // DescribeRegions
  4448. // 获取容器服务支持的所有地域
  4449. //
  4450. // 可能返回的错误码:
  4451. //
  4452. // FAILEDOPERATION = "FailedOperation"
  4453. // INTERNALERROR = "InternalError"
  4454. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  4455. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  4456. // INTERNALERROR_DB = "InternalError.Db"
  4457. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  4458. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  4459. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4460. // LIMITEXCEEDED = "LimitExceeded"
  4461. // MISSINGPARAMETER = "MissingParameter"
  4462. // RESOURCEINUSE = "ResourceInUse"
  4463. // RESOURCENOTFOUND = "ResourceNotFound"
  4464. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  4465. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  4466. // UNKNOWNPARAMETER = "UnknownParameter"
  4467. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  4468. func (c *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) {
  4469. return c.DescribeRegionsWithContext(context.Background(), request)
  4470. }
  4471. // DescribeRegions
  4472. // 获取容器服务支持的所有地域
  4473. //
  4474. // 可能返回的错误码:
  4475. //
  4476. // FAILEDOPERATION = "FailedOperation"
  4477. // INTERNALERROR = "InternalError"
  4478. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  4479. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  4480. // INTERNALERROR_DB = "InternalError.Db"
  4481. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  4482. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  4483. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4484. // LIMITEXCEEDED = "LimitExceeded"
  4485. // MISSINGPARAMETER = "MissingParameter"
  4486. // RESOURCEINUSE = "ResourceInUse"
  4487. // RESOURCENOTFOUND = "ResourceNotFound"
  4488. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  4489. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  4490. // UNKNOWNPARAMETER = "UnknownParameter"
  4491. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  4492. func (c *Client) DescribeRegionsWithContext(ctx context.Context, request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) {
  4493. if request == nil {
  4494. request = NewDescribeRegionsRequest()
  4495. }
  4496. if c.GetCredential() == nil {
  4497. return nil, errors.New("DescribeRegions require credential")
  4498. }
  4499. request.SetContext(ctx)
  4500. response = NewDescribeRegionsResponse()
  4501. err = c.Send(request, response)
  4502. return
  4503. }
  4504. func NewDescribeRouteTableConflictsRequest() (request *DescribeRouteTableConflictsRequest) {
  4505. request = &DescribeRouteTableConflictsRequest{
  4506. BaseRequest: &tchttp.BaseRequest{},
  4507. }
  4508. request.Init().WithApiInfo("tke", APIVersion, "DescribeRouteTableConflicts")
  4509. return
  4510. }
  4511. func NewDescribeRouteTableConflictsResponse() (response *DescribeRouteTableConflictsResponse) {
  4512. response = &DescribeRouteTableConflictsResponse{
  4513. BaseResponse: &tchttp.BaseResponse{},
  4514. }
  4515. return
  4516. }
  4517. // DescribeRouteTableConflicts
  4518. // 查询路由表冲突列表
  4519. //
  4520. // 可能返回的错误码:
  4521. //
  4522. // INTERNALERROR = "InternalError"
  4523. // INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange"
  4524. // INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr"
  4525. // INTERNALERROR_PARAM = "InternalError.Param"
  4526. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4527. // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
  4528. // INVALIDPARAMETER = "InvalidParameter"
  4529. func (c *Client) DescribeRouteTableConflicts(request *DescribeRouteTableConflictsRequest) (response *DescribeRouteTableConflictsResponse, err error) {
  4530. return c.DescribeRouteTableConflictsWithContext(context.Background(), request)
  4531. }
  4532. // DescribeRouteTableConflicts
  4533. // 查询路由表冲突列表
  4534. //
  4535. // 可能返回的错误码:
  4536. //
  4537. // INTERNALERROR = "InternalError"
  4538. // INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange"
  4539. // INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr"
  4540. // INTERNALERROR_PARAM = "InternalError.Param"
  4541. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4542. // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
  4543. // INVALIDPARAMETER = "InvalidParameter"
  4544. func (c *Client) DescribeRouteTableConflictsWithContext(ctx context.Context, request *DescribeRouteTableConflictsRequest) (response *DescribeRouteTableConflictsResponse, err error) {
  4545. if request == nil {
  4546. request = NewDescribeRouteTableConflictsRequest()
  4547. }
  4548. if c.GetCredential() == nil {
  4549. return nil, errors.New("DescribeRouteTableConflicts require credential")
  4550. }
  4551. request.SetContext(ctx)
  4552. response = NewDescribeRouteTableConflictsResponse()
  4553. err = c.Send(request, response)
  4554. return
  4555. }
  4556. func NewDescribeTKEEdgeScriptRequest() (request *DescribeTKEEdgeScriptRequest) {
  4557. request = &DescribeTKEEdgeScriptRequest{
  4558. BaseRequest: &tchttp.BaseRequest{},
  4559. }
  4560. request.Init().WithApiInfo("tke", APIVersion, "DescribeTKEEdgeScript")
  4561. return
  4562. }
  4563. func NewDescribeTKEEdgeScriptResponse() (response *DescribeTKEEdgeScriptResponse) {
  4564. response = &DescribeTKEEdgeScriptResponse{
  4565. BaseResponse: &tchttp.BaseResponse{},
  4566. }
  4567. return
  4568. }
  4569. // DescribeTKEEdgeScript
  4570. // 获取边缘脚本链接
  4571. //
  4572. // 可能返回的错误码:
  4573. //
  4574. // FAILEDOPERATION = "FailedOperation"
  4575. // INTERNALERROR = "InternalError"
  4576. // INVALIDPARAMETER = "InvalidParameter"
  4577. // LIMITEXCEEDED = "LimitExceeded"
  4578. // MISSINGPARAMETER = "MissingParameter"
  4579. // RESOURCEINUSE = "ResourceInUse"
  4580. // RESOURCENOTFOUND = "ResourceNotFound"
  4581. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  4582. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  4583. // UNKNOWNPARAMETER = "UnknownParameter"
  4584. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  4585. func (c *Client) DescribeTKEEdgeScript(request *DescribeTKEEdgeScriptRequest) (response *DescribeTKEEdgeScriptResponse, err error) {
  4586. return c.DescribeTKEEdgeScriptWithContext(context.Background(), request)
  4587. }
  4588. // DescribeTKEEdgeScript
  4589. // 获取边缘脚本链接
  4590. //
  4591. // 可能返回的错误码:
  4592. //
  4593. // FAILEDOPERATION = "FailedOperation"
  4594. // INTERNALERROR = "InternalError"
  4595. // INVALIDPARAMETER = "InvalidParameter"
  4596. // LIMITEXCEEDED = "LimitExceeded"
  4597. // MISSINGPARAMETER = "MissingParameter"
  4598. // RESOURCEINUSE = "ResourceInUse"
  4599. // RESOURCENOTFOUND = "ResourceNotFound"
  4600. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  4601. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  4602. // UNKNOWNPARAMETER = "UnknownParameter"
  4603. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  4604. func (c *Client) DescribeTKEEdgeScriptWithContext(ctx context.Context, request *DescribeTKEEdgeScriptRequest) (response *DescribeTKEEdgeScriptResponse, err error) {
  4605. if request == nil {
  4606. request = NewDescribeTKEEdgeScriptRequest()
  4607. }
  4608. if c.GetCredential() == nil {
  4609. return nil, errors.New("DescribeTKEEdgeScript require credential")
  4610. }
  4611. request.SetContext(ctx)
  4612. response = NewDescribeTKEEdgeScriptResponse()
  4613. err = c.Send(request, response)
  4614. return
  4615. }
  4616. func NewDescribeVersionsRequest() (request *DescribeVersionsRequest) {
  4617. request = &DescribeVersionsRequest{
  4618. BaseRequest: &tchttp.BaseRequest{},
  4619. }
  4620. request.Init().WithApiInfo("tke", APIVersion, "DescribeVersions")
  4621. return
  4622. }
  4623. func NewDescribeVersionsResponse() (response *DescribeVersionsResponse) {
  4624. response = &DescribeVersionsResponse{
  4625. BaseResponse: &tchttp.BaseResponse{},
  4626. }
  4627. return
  4628. }
  4629. // DescribeVersions
  4630. // 获取集群版本信息
  4631. //
  4632. // 可能返回的错误码:
  4633. //
  4634. // INTERNALERROR = "InternalError"
  4635. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  4636. // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
  4637. // INTERNALERROR_DB = "InternalError.Db"
  4638. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  4639. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  4640. // INTERNALERROR_PARAM = "InternalError.Param"
  4641. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4642. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4643. // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
  4644. // LIMITEXCEEDED = "LimitExceeded"
  4645. // MISSINGPARAMETER = "MissingParameter"
  4646. // RESOURCEINUSE = "ResourceInUse"
  4647. // RESOURCENOTFOUND = "ResourceNotFound"
  4648. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  4649. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  4650. // UNKNOWNPARAMETER = "UnknownParameter"
  4651. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  4652. func (c *Client) DescribeVersions(request *DescribeVersionsRequest) (response *DescribeVersionsResponse, err error) {
  4653. return c.DescribeVersionsWithContext(context.Background(), request)
  4654. }
  4655. // DescribeVersions
  4656. // 获取集群版本信息
  4657. //
  4658. // 可能返回的错误码:
  4659. //
  4660. // INTERNALERROR = "InternalError"
  4661. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  4662. // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
  4663. // INTERNALERROR_DB = "InternalError.Db"
  4664. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  4665. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  4666. // INTERNALERROR_PARAM = "InternalError.Param"
  4667. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4668. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4669. // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
  4670. // LIMITEXCEEDED = "LimitExceeded"
  4671. // MISSINGPARAMETER = "MissingParameter"
  4672. // RESOURCEINUSE = "ResourceInUse"
  4673. // RESOURCENOTFOUND = "ResourceNotFound"
  4674. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  4675. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  4676. // UNKNOWNPARAMETER = "UnknownParameter"
  4677. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  4678. func (c *Client) DescribeVersionsWithContext(ctx context.Context, request *DescribeVersionsRequest) (response *DescribeVersionsResponse, err error) {
  4679. if request == nil {
  4680. request = NewDescribeVersionsRequest()
  4681. }
  4682. if c.GetCredential() == nil {
  4683. return nil, errors.New("DescribeVersions require credential")
  4684. }
  4685. request.SetContext(ctx)
  4686. response = NewDescribeVersionsResponse()
  4687. err = c.Send(request, response)
  4688. return
  4689. }
  4690. func NewDescribeVpcCniPodLimitsRequest() (request *DescribeVpcCniPodLimitsRequest) {
  4691. request = &DescribeVpcCniPodLimitsRequest{
  4692. BaseRequest: &tchttp.BaseRequest{},
  4693. }
  4694. request.Init().WithApiInfo("tke", APIVersion, "DescribeVpcCniPodLimits")
  4695. return
  4696. }
  4697. func NewDescribeVpcCniPodLimitsResponse() (response *DescribeVpcCniPodLimitsResponse) {
  4698. response = &DescribeVpcCniPodLimitsResponse{
  4699. BaseResponse: &tchttp.BaseResponse{},
  4700. }
  4701. return
  4702. }
  4703. // DescribeVpcCniPodLimits
  4704. // 本接口查询当前用户和地域在指定可用区下的机型可支持的最大 TKE VPC-CNI 网络模式的 Pod 数量
  4705. //
  4706. // 可能返回的错误码:
  4707. //
  4708. // FAILEDOPERATION = "FailedOperation"
  4709. // INTERNALERROR = "InternalError"
  4710. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  4711. // INTERNALERROR_DB = "InternalError.Db"
  4712. // INTERNALERROR_PARAM = "InternalError.Param"
  4713. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4714. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4715. // INVALIDPARAMETER = "InvalidParameter"
  4716. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4717. // MISSINGPARAMETER = "MissingParameter"
  4718. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  4719. // UNKNOWNPARAMETER = "UnknownParameter"
  4720. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  4721. func (c *Client) DescribeVpcCniPodLimits(request *DescribeVpcCniPodLimitsRequest) (response *DescribeVpcCniPodLimitsResponse, err error) {
  4722. return c.DescribeVpcCniPodLimitsWithContext(context.Background(), request)
  4723. }
  4724. // DescribeVpcCniPodLimits
  4725. // 本接口查询当前用户和地域在指定可用区下的机型可支持的最大 TKE VPC-CNI 网络模式的 Pod 数量
  4726. //
  4727. // 可能返回的错误码:
  4728. //
  4729. // FAILEDOPERATION = "FailedOperation"
  4730. // INTERNALERROR = "InternalError"
  4731. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  4732. // INTERNALERROR_DB = "InternalError.Db"
  4733. // INTERNALERROR_PARAM = "InternalError.Param"
  4734. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4735. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4736. // INVALIDPARAMETER = "InvalidParameter"
  4737. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4738. // MISSINGPARAMETER = "MissingParameter"
  4739. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  4740. // UNKNOWNPARAMETER = "UnknownParameter"
  4741. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  4742. func (c *Client) DescribeVpcCniPodLimitsWithContext(ctx context.Context, request *DescribeVpcCniPodLimitsRequest) (response *DescribeVpcCniPodLimitsResponse, err error) {
  4743. if request == nil {
  4744. request = NewDescribeVpcCniPodLimitsRequest()
  4745. }
  4746. if c.GetCredential() == nil {
  4747. return nil, errors.New("DescribeVpcCniPodLimits require credential")
  4748. }
  4749. request.SetContext(ctx)
  4750. response = NewDescribeVpcCniPodLimitsResponse()
  4751. err = c.Send(request, response)
  4752. return
  4753. }
  4754. func NewDisableClusterDeletionProtectionRequest() (request *DisableClusterDeletionProtectionRequest) {
  4755. request = &DisableClusterDeletionProtectionRequest{
  4756. BaseRequest: &tchttp.BaseRequest{},
  4757. }
  4758. request.Init().WithApiInfo("tke", APIVersion, "DisableClusterDeletionProtection")
  4759. return
  4760. }
  4761. func NewDisableClusterDeletionProtectionResponse() (response *DisableClusterDeletionProtectionResponse) {
  4762. response = &DisableClusterDeletionProtectionResponse{
  4763. BaseResponse: &tchttp.BaseResponse{},
  4764. }
  4765. return
  4766. }
  4767. // DisableClusterDeletionProtection
  4768. // 关闭集群删除保护
  4769. //
  4770. // 可能返回的错误码:
  4771. //
  4772. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4773. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4774. func (c *Client) DisableClusterDeletionProtection(request *DisableClusterDeletionProtectionRequest) (response *DisableClusterDeletionProtectionResponse, err error) {
  4775. return c.DisableClusterDeletionProtectionWithContext(context.Background(), request)
  4776. }
  4777. // DisableClusterDeletionProtection
  4778. // 关闭集群删除保护
  4779. //
  4780. // 可能返回的错误码:
  4781. //
  4782. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4783. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4784. func (c *Client) DisableClusterDeletionProtectionWithContext(ctx context.Context, request *DisableClusterDeletionProtectionRequest) (response *DisableClusterDeletionProtectionResponse, err error) {
  4785. if request == nil {
  4786. request = NewDisableClusterDeletionProtectionRequest()
  4787. }
  4788. if c.GetCredential() == nil {
  4789. return nil, errors.New("DisableClusterDeletionProtection require credential")
  4790. }
  4791. request.SetContext(ctx)
  4792. response = NewDisableClusterDeletionProtectionResponse()
  4793. err = c.Send(request, response)
  4794. return
  4795. }
  4796. func NewDisableVpcCniNetworkTypeRequest() (request *DisableVpcCniNetworkTypeRequest) {
  4797. request = &DisableVpcCniNetworkTypeRequest{
  4798. BaseRequest: &tchttp.BaseRequest{},
  4799. }
  4800. request.Init().WithApiInfo("tke", APIVersion, "DisableVpcCniNetworkType")
  4801. return
  4802. }
  4803. func NewDisableVpcCniNetworkTypeResponse() (response *DisableVpcCniNetworkTypeResponse) {
  4804. response = &DisableVpcCniNetworkTypeResponse{
  4805. BaseResponse: &tchttp.BaseResponse{},
  4806. }
  4807. return
  4808. }
  4809. // DisableVpcCniNetworkType
  4810. // 提供给附加了VPC-CNI能力的Global-Route集群关闭VPC-CNI
  4811. //
  4812. // 可能返回的错误码:
  4813. //
  4814. // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate"
  4815. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  4816. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4817. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4818. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4819. func (c *Client) DisableVpcCniNetworkType(request *DisableVpcCniNetworkTypeRequest) (response *DisableVpcCniNetworkTypeResponse, err error) {
  4820. return c.DisableVpcCniNetworkTypeWithContext(context.Background(), request)
  4821. }
  4822. // DisableVpcCniNetworkType
  4823. // 提供给附加了VPC-CNI能力的Global-Route集群关闭VPC-CNI
  4824. //
  4825. // 可能返回的错误码:
  4826. //
  4827. // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate"
  4828. // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
  4829. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4830. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4831. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4832. func (c *Client) DisableVpcCniNetworkTypeWithContext(ctx context.Context, request *DisableVpcCniNetworkTypeRequest) (response *DisableVpcCniNetworkTypeResponse, err error) {
  4833. if request == nil {
  4834. request = NewDisableVpcCniNetworkTypeRequest()
  4835. }
  4836. if c.GetCredential() == nil {
  4837. return nil, errors.New("DisableVpcCniNetworkType require credential")
  4838. }
  4839. request.SetContext(ctx)
  4840. response = NewDisableVpcCniNetworkTypeResponse()
  4841. err = c.Send(request, response)
  4842. return
  4843. }
  4844. func NewEnableClusterDeletionProtectionRequest() (request *EnableClusterDeletionProtectionRequest) {
  4845. request = &EnableClusterDeletionProtectionRequest{
  4846. BaseRequest: &tchttp.BaseRequest{},
  4847. }
  4848. request.Init().WithApiInfo("tke", APIVersion, "EnableClusterDeletionProtection")
  4849. return
  4850. }
  4851. func NewEnableClusterDeletionProtectionResponse() (response *EnableClusterDeletionProtectionResponse) {
  4852. response = &EnableClusterDeletionProtectionResponse{
  4853. BaseResponse: &tchttp.BaseResponse{},
  4854. }
  4855. return
  4856. }
  4857. // EnableClusterDeletionProtection
  4858. // 启用集群删除保护
  4859. //
  4860. // 可能返回的错误码:
  4861. //
  4862. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4863. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4864. func (c *Client) EnableClusterDeletionProtection(request *EnableClusterDeletionProtectionRequest) (response *EnableClusterDeletionProtectionResponse, err error) {
  4865. return c.EnableClusterDeletionProtectionWithContext(context.Background(), request)
  4866. }
  4867. // EnableClusterDeletionProtection
  4868. // 启用集群删除保护
  4869. //
  4870. // 可能返回的错误码:
  4871. //
  4872. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4873. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4874. func (c *Client) EnableClusterDeletionProtectionWithContext(ctx context.Context, request *EnableClusterDeletionProtectionRequest) (response *EnableClusterDeletionProtectionResponse, err error) {
  4875. if request == nil {
  4876. request = NewEnableClusterDeletionProtectionRequest()
  4877. }
  4878. if c.GetCredential() == nil {
  4879. return nil, errors.New("EnableClusterDeletionProtection require credential")
  4880. }
  4881. request.SetContext(ctx)
  4882. response = NewEnableClusterDeletionProtectionResponse()
  4883. err = c.Send(request, response)
  4884. return
  4885. }
  4886. func NewEnableVpcCniNetworkTypeRequest() (request *EnableVpcCniNetworkTypeRequest) {
  4887. request = &EnableVpcCniNetworkTypeRequest{
  4888. BaseRequest: &tchttp.BaseRequest{},
  4889. }
  4890. request.Init().WithApiInfo("tke", APIVersion, "EnableVpcCniNetworkType")
  4891. return
  4892. }
  4893. func NewEnableVpcCniNetworkTypeResponse() (response *EnableVpcCniNetworkTypeResponse) {
  4894. response = &EnableVpcCniNetworkTypeResponse{
  4895. BaseResponse: &tchttp.BaseResponse{},
  4896. }
  4897. return
  4898. }
  4899. // EnableVpcCniNetworkType
  4900. // GR集群可以通过本接口附加vpc-cni容器网络插件,开启vpc-cni容器网络能力
  4901. //
  4902. // 可能返回的错误码:
  4903. //
  4904. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4905. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4906. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4907. func (c *Client) EnableVpcCniNetworkType(request *EnableVpcCniNetworkTypeRequest) (response *EnableVpcCniNetworkTypeResponse, err error) {
  4908. return c.EnableVpcCniNetworkTypeWithContext(context.Background(), request)
  4909. }
  4910. // EnableVpcCniNetworkType
  4911. // GR集群可以通过本接口附加vpc-cni容器网络插件,开启vpc-cni容器网络能力
  4912. //
  4913. // 可能返回的错误码:
  4914. //
  4915. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  4916. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  4917. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  4918. func (c *Client) EnableVpcCniNetworkTypeWithContext(ctx context.Context, request *EnableVpcCniNetworkTypeRequest) (response *EnableVpcCniNetworkTypeResponse, err error) {
  4919. if request == nil {
  4920. request = NewEnableVpcCniNetworkTypeRequest()
  4921. }
  4922. if c.GetCredential() == nil {
  4923. return nil, errors.New("EnableVpcCniNetworkType require credential")
  4924. }
  4925. request.SetContext(ctx)
  4926. response = NewEnableVpcCniNetworkTypeResponse()
  4927. err = c.Send(request, response)
  4928. return
  4929. }
  4930. func NewForwardApplicationRequestV3Request() (request *ForwardApplicationRequestV3Request) {
  4931. request = &ForwardApplicationRequestV3Request{
  4932. BaseRequest: &tchttp.BaseRequest{},
  4933. }
  4934. request.Init().WithApiInfo("tke", APIVersion, "ForwardApplicationRequestV3")
  4935. return
  4936. }
  4937. func NewForwardApplicationRequestV3Response() (response *ForwardApplicationRequestV3Response) {
  4938. response = &ForwardApplicationRequestV3Response{
  4939. BaseResponse: &tchttp.BaseResponse{},
  4940. }
  4941. return
  4942. }
  4943. // ForwardApplicationRequestV3
  4944. // 操作TKE集群的addon
  4945. //
  4946. // 可能返回的错误码:
  4947. //
  4948. // FAILEDOPERATION = "FailedOperation"
  4949. // FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden"
  4950. // INTERNALERROR = "InternalError"
  4951. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  4952. // INVALIDPARAMETER = "InvalidParameter"
  4953. // LIMITEXCEEDED = "LimitExceeded"
  4954. // MISSINGPARAMETER = "MissingParameter"
  4955. // RESOURCEINUSE = "ResourceInUse"
  4956. // RESOURCENOTFOUND = "ResourceNotFound"
  4957. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  4958. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  4959. // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
  4960. // UNKNOWNPARAMETER = "UnknownParameter"
  4961. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  4962. // UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist"
  4963. func (c *Client) ForwardApplicationRequestV3(request *ForwardApplicationRequestV3Request) (response *ForwardApplicationRequestV3Response, err error) {
  4964. return c.ForwardApplicationRequestV3WithContext(context.Background(), request)
  4965. }
  4966. // ForwardApplicationRequestV3
  4967. // 操作TKE集群的addon
  4968. //
  4969. // 可能返回的错误码:
  4970. //
  4971. // FAILEDOPERATION = "FailedOperation"
  4972. // FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden"
  4973. // INTERNALERROR = "InternalError"
  4974. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  4975. // INVALIDPARAMETER = "InvalidParameter"
  4976. // LIMITEXCEEDED = "LimitExceeded"
  4977. // MISSINGPARAMETER = "MissingParameter"
  4978. // RESOURCEINUSE = "ResourceInUse"
  4979. // RESOURCENOTFOUND = "ResourceNotFound"
  4980. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  4981. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  4982. // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
  4983. // UNKNOWNPARAMETER = "UnknownParameter"
  4984. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  4985. // UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist"
  4986. func (c *Client) ForwardApplicationRequestV3WithContext(ctx context.Context, request *ForwardApplicationRequestV3Request) (response *ForwardApplicationRequestV3Response, err error) {
  4987. if request == nil {
  4988. request = NewForwardApplicationRequestV3Request()
  4989. }
  4990. if c.GetCredential() == nil {
  4991. return nil, errors.New("ForwardApplicationRequestV3 require credential")
  4992. }
  4993. request.SetContext(ctx)
  4994. response = NewForwardApplicationRequestV3Response()
  4995. err = c.Send(request, response)
  4996. return
  4997. }
  4998. func NewGetMostSuitableImageCacheRequest() (request *GetMostSuitableImageCacheRequest) {
  4999. request = &GetMostSuitableImageCacheRequest{
  5000. BaseRequest: &tchttp.BaseRequest{},
  5001. }
  5002. request.Init().WithApiInfo("tke", APIVersion, "GetMostSuitableImageCache")
  5003. return
  5004. }
  5005. func NewGetMostSuitableImageCacheResponse() (response *GetMostSuitableImageCacheResponse) {
  5006. response = &GetMostSuitableImageCacheResponse{
  5007. BaseResponse: &tchttp.BaseResponse{},
  5008. }
  5009. return
  5010. }
  5011. // GetMostSuitableImageCache
  5012. // 根据镜像列表,查询匹配的镜像缓存
  5013. //
  5014. // 可能返回的错误码:
  5015. //
  5016. // INTERNALERROR = "InternalError"
  5017. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  5018. // INVALIDPARAMETER = "InvalidParameter"
  5019. func (c *Client) GetMostSuitableImageCache(request *GetMostSuitableImageCacheRequest) (response *GetMostSuitableImageCacheResponse, err error) {
  5020. return c.GetMostSuitableImageCacheWithContext(context.Background(), request)
  5021. }
  5022. // GetMostSuitableImageCache
  5023. // 根据镜像列表,查询匹配的镜像缓存
  5024. //
  5025. // 可能返回的错误码:
  5026. //
  5027. // INTERNALERROR = "InternalError"
  5028. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  5029. // INVALIDPARAMETER = "InvalidParameter"
  5030. func (c *Client) GetMostSuitableImageCacheWithContext(ctx context.Context, request *GetMostSuitableImageCacheRequest) (response *GetMostSuitableImageCacheResponse, err error) {
  5031. if request == nil {
  5032. request = NewGetMostSuitableImageCacheRequest()
  5033. }
  5034. if c.GetCredential() == nil {
  5035. return nil, errors.New("GetMostSuitableImageCache require credential")
  5036. }
  5037. request.SetContext(ctx)
  5038. response = NewGetMostSuitableImageCacheResponse()
  5039. err = c.Send(request, response)
  5040. return
  5041. }
  5042. func NewGetTkeAppChartListRequest() (request *GetTkeAppChartListRequest) {
  5043. request = &GetTkeAppChartListRequest{
  5044. BaseRequest: &tchttp.BaseRequest{},
  5045. }
  5046. request.Init().WithApiInfo("tke", APIVersion, "GetTkeAppChartList")
  5047. return
  5048. }
  5049. func NewGetTkeAppChartListResponse() (response *GetTkeAppChartListResponse) {
  5050. response = &GetTkeAppChartListResponse{
  5051. BaseResponse: &tchttp.BaseResponse{},
  5052. }
  5053. return
  5054. }
  5055. // GetTkeAppChartList
  5056. // 获取TKE支持的App列表
  5057. //
  5058. // 可能返回的错误码:
  5059. //
  5060. // INTERNALERROR = "InternalError"
  5061. // INVALIDPARAMETER = "InvalidParameter"
  5062. func (c *Client) GetTkeAppChartList(request *GetTkeAppChartListRequest) (response *GetTkeAppChartListResponse, err error) {
  5063. return c.GetTkeAppChartListWithContext(context.Background(), request)
  5064. }
  5065. // GetTkeAppChartList
  5066. // 获取TKE支持的App列表
  5067. //
  5068. // 可能返回的错误码:
  5069. //
  5070. // INTERNALERROR = "InternalError"
  5071. // INVALIDPARAMETER = "InvalidParameter"
  5072. func (c *Client) GetTkeAppChartListWithContext(ctx context.Context, request *GetTkeAppChartListRequest) (response *GetTkeAppChartListResponse, err error) {
  5073. if request == nil {
  5074. request = NewGetTkeAppChartListRequest()
  5075. }
  5076. if c.GetCredential() == nil {
  5077. return nil, errors.New("GetTkeAppChartList require credential")
  5078. }
  5079. request.SetContext(ctx)
  5080. response = NewGetTkeAppChartListResponse()
  5081. err = c.Send(request, response)
  5082. return
  5083. }
  5084. func NewGetUpgradeInstanceProgressRequest() (request *GetUpgradeInstanceProgressRequest) {
  5085. request = &GetUpgradeInstanceProgressRequest{
  5086. BaseRequest: &tchttp.BaseRequest{},
  5087. }
  5088. request.Init().WithApiInfo("tke", APIVersion, "GetUpgradeInstanceProgress")
  5089. return
  5090. }
  5091. func NewGetUpgradeInstanceProgressResponse() (response *GetUpgradeInstanceProgressResponse) {
  5092. response = &GetUpgradeInstanceProgressResponse{
  5093. BaseResponse: &tchttp.BaseResponse{},
  5094. }
  5095. return
  5096. }
  5097. // GetUpgradeInstanceProgress
  5098. // 获得节点升级当前的进度
  5099. //
  5100. // 可能返回的错误码:
  5101. //
  5102. // INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound"
  5103. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5104. func (c *Client) GetUpgradeInstanceProgress(request *GetUpgradeInstanceProgressRequest) (response *GetUpgradeInstanceProgressResponse, err error) {
  5105. return c.GetUpgradeInstanceProgressWithContext(context.Background(), request)
  5106. }
  5107. // GetUpgradeInstanceProgress
  5108. // 获得节点升级当前的进度
  5109. //
  5110. // 可能返回的错误码:
  5111. //
  5112. // INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound"
  5113. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5114. func (c *Client) GetUpgradeInstanceProgressWithContext(ctx context.Context, request *GetUpgradeInstanceProgressRequest) (response *GetUpgradeInstanceProgressResponse, err error) {
  5115. if request == nil {
  5116. request = NewGetUpgradeInstanceProgressRequest()
  5117. }
  5118. if c.GetCredential() == nil {
  5119. return nil, errors.New("GetUpgradeInstanceProgress require credential")
  5120. }
  5121. request.SetContext(ctx)
  5122. response = NewGetUpgradeInstanceProgressResponse()
  5123. err = c.Send(request, response)
  5124. return
  5125. }
  5126. func NewModifyClusterAsGroupAttributeRequest() (request *ModifyClusterAsGroupAttributeRequest) {
  5127. request = &ModifyClusterAsGroupAttributeRequest{
  5128. BaseRequest: &tchttp.BaseRequest{},
  5129. }
  5130. request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAsGroupAttribute")
  5131. return
  5132. }
  5133. func NewModifyClusterAsGroupAttributeResponse() (response *ModifyClusterAsGroupAttributeResponse) {
  5134. response = &ModifyClusterAsGroupAttributeResponse{
  5135. BaseResponse: &tchttp.BaseResponse{},
  5136. }
  5137. return
  5138. }
  5139. // ModifyClusterAsGroupAttribute
  5140. // 修改集群伸缩组属性
  5141. //
  5142. // 可能返回的错误码:
  5143. //
  5144. // FAILEDOPERATION = "FailedOperation"
  5145. // INTERNALERROR = "InternalError"
  5146. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  5147. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  5148. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  5149. // INTERNALERROR_PARAM = "InternalError.Param"
  5150. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  5151. // INVALIDPARAMETER = "InvalidParameter"
  5152. // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
  5153. // INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable"
  5154. // INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr"
  5155. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5156. // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
  5157. // LIMITEXCEEDED = "LimitExceeded"
  5158. // MISSINGPARAMETER = "MissingParameter"
  5159. // RESOURCEINUSE = "ResourceInUse"
  5160. // RESOURCENOTFOUND = "ResourceNotFound"
  5161. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  5162. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  5163. // UNKNOWNPARAMETER = "UnknownParameter"
  5164. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  5165. func (c *Client) ModifyClusterAsGroupAttribute(request *ModifyClusterAsGroupAttributeRequest) (response *ModifyClusterAsGroupAttributeResponse, err error) {
  5166. return c.ModifyClusterAsGroupAttributeWithContext(context.Background(), request)
  5167. }
  5168. // ModifyClusterAsGroupAttribute
  5169. // 修改集群伸缩组属性
  5170. //
  5171. // 可能返回的错误码:
  5172. //
  5173. // FAILEDOPERATION = "FailedOperation"
  5174. // INTERNALERROR = "InternalError"
  5175. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  5176. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  5177. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  5178. // INTERNALERROR_PARAM = "InternalError.Param"
  5179. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  5180. // INVALIDPARAMETER = "InvalidParameter"
  5181. // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
  5182. // INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable"
  5183. // INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr"
  5184. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5185. // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
  5186. // LIMITEXCEEDED = "LimitExceeded"
  5187. // MISSINGPARAMETER = "MissingParameter"
  5188. // RESOURCEINUSE = "ResourceInUse"
  5189. // RESOURCENOTFOUND = "ResourceNotFound"
  5190. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  5191. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  5192. // UNKNOWNPARAMETER = "UnknownParameter"
  5193. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  5194. func (c *Client) ModifyClusterAsGroupAttributeWithContext(ctx context.Context, request *ModifyClusterAsGroupAttributeRequest) (response *ModifyClusterAsGroupAttributeResponse, err error) {
  5195. if request == nil {
  5196. request = NewModifyClusterAsGroupAttributeRequest()
  5197. }
  5198. if c.GetCredential() == nil {
  5199. return nil, errors.New("ModifyClusterAsGroupAttribute require credential")
  5200. }
  5201. request.SetContext(ctx)
  5202. response = NewModifyClusterAsGroupAttributeResponse()
  5203. err = c.Send(request, response)
  5204. return
  5205. }
  5206. func NewModifyClusterAsGroupOptionAttributeRequest() (request *ModifyClusterAsGroupOptionAttributeRequest) {
  5207. request = &ModifyClusterAsGroupOptionAttributeRequest{
  5208. BaseRequest: &tchttp.BaseRequest{},
  5209. }
  5210. request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAsGroupOptionAttribute")
  5211. return
  5212. }
  5213. func NewModifyClusterAsGroupOptionAttributeResponse() (response *ModifyClusterAsGroupOptionAttributeResponse) {
  5214. response = &ModifyClusterAsGroupOptionAttributeResponse{
  5215. BaseResponse: &tchttp.BaseResponse{},
  5216. }
  5217. return
  5218. }
  5219. // ModifyClusterAsGroupOptionAttribute
  5220. // 修改集群弹性伸缩属性
  5221. //
  5222. // 可能返回的错误码:
  5223. //
  5224. // INTERNALERROR = "InternalError"
  5225. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  5226. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  5227. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  5228. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  5229. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  5230. // INTERNALERROR_DB = "InternalError.Db"
  5231. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  5232. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5233. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5234. // MISSINGPARAMETER = "MissingParameter"
  5235. // RESOURCEINUSE = "ResourceInUse"
  5236. // RESOURCENOTFOUND = "ResourceNotFound"
  5237. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  5238. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  5239. // UNKNOWNPARAMETER = "UnknownParameter"
  5240. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  5241. func (c *Client) ModifyClusterAsGroupOptionAttribute(request *ModifyClusterAsGroupOptionAttributeRequest) (response *ModifyClusterAsGroupOptionAttributeResponse, err error) {
  5242. return c.ModifyClusterAsGroupOptionAttributeWithContext(context.Background(), request)
  5243. }
  5244. // ModifyClusterAsGroupOptionAttribute
  5245. // 修改集群弹性伸缩属性
  5246. //
  5247. // 可能返回的错误码:
  5248. //
  5249. // INTERNALERROR = "InternalError"
  5250. // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
  5251. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  5252. // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
  5253. // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
  5254. // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
  5255. // INTERNALERROR_DB = "InternalError.Db"
  5256. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  5257. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5258. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5259. // MISSINGPARAMETER = "MissingParameter"
  5260. // RESOURCEINUSE = "ResourceInUse"
  5261. // RESOURCENOTFOUND = "ResourceNotFound"
  5262. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  5263. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  5264. // UNKNOWNPARAMETER = "UnknownParameter"
  5265. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  5266. func (c *Client) ModifyClusterAsGroupOptionAttributeWithContext(ctx context.Context, request *ModifyClusterAsGroupOptionAttributeRequest) (response *ModifyClusterAsGroupOptionAttributeResponse, err error) {
  5267. if request == nil {
  5268. request = NewModifyClusterAsGroupOptionAttributeRequest()
  5269. }
  5270. if c.GetCredential() == nil {
  5271. return nil, errors.New("ModifyClusterAsGroupOptionAttribute require credential")
  5272. }
  5273. request.SetContext(ctx)
  5274. response = NewModifyClusterAsGroupOptionAttributeResponse()
  5275. err = c.Send(request, response)
  5276. return
  5277. }
  5278. func NewModifyClusterAttributeRequest() (request *ModifyClusterAttributeRequest) {
  5279. request = &ModifyClusterAttributeRequest{
  5280. BaseRequest: &tchttp.BaseRequest{},
  5281. }
  5282. request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAttribute")
  5283. return
  5284. }
  5285. func NewModifyClusterAttributeResponse() (response *ModifyClusterAttributeResponse) {
  5286. response = &ModifyClusterAttributeResponse{
  5287. BaseResponse: &tchttp.BaseResponse{},
  5288. }
  5289. return
  5290. }
  5291. // ModifyClusterAttribute
  5292. // 修改集群属性
  5293. //
  5294. // 可能返回的错误码:
  5295. //
  5296. // INTERNALERROR = "InternalError"
  5297. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  5298. // INTERNALERROR_DB = "InternalError.Db"
  5299. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  5300. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  5301. // INTERNALERROR_PARAM = "InternalError.Param"
  5302. // INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon"
  5303. // INTERNALERROR_TRADEINSUFFICIENTBALANCE = "InternalError.TradeInsufficientBalance"
  5304. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5305. // MISSINGPARAMETER = "MissingParameter"
  5306. // RESOURCEINUSE = "ResourceInUse"
  5307. // RESOURCENOTFOUND = "ResourceNotFound"
  5308. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  5309. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  5310. func (c *Client) ModifyClusterAttribute(request *ModifyClusterAttributeRequest) (response *ModifyClusterAttributeResponse, err error) {
  5311. return c.ModifyClusterAttributeWithContext(context.Background(), request)
  5312. }
  5313. // ModifyClusterAttribute
  5314. // 修改集群属性
  5315. //
  5316. // 可能返回的错误码:
  5317. //
  5318. // INTERNALERROR = "InternalError"
  5319. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  5320. // INTERNALERROR_DB = "InternalError.Db"
  5321. // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
  5322. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  5323. // INTERNALERROR_PARAM = "InternalError.Param"
  5324. // INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon"
  5325. // INTERNALERROR_TRADEINSUFFICIENTBALANCE = "InternalError.TradeInsufficientBalance"
  5326. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5327. // MISSINGPARAMETER = "MissingParameter"
  5328. // RESOURCEINUSE = "ResourceInUse"
  5329. // RESOURCENOTFOUND = "ResourceNotFound"
  5330. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  5331. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  5332. func (c *Client) ModifyClusterAttributeWithContext(ctx context.Context, request *ModifyClusterAttributeRequest) (response *ModifyClusterAttributeResponse, err error) {
  5333. if request == nil {
  5334. request = NewModifyClusterAttributeRequest()
  5335. }
  5336. if c.GetCredential() == nil {
  5337. return nil, errors.New("ModifyClusterAttribute require credential")
  5338. }
  5339. request.SetContext(ctx)
  5340. response = NewModifyClusterAttributeResponse()
  5341. err = c.Send(request, response)
  5342. return
  5343. }
  5344. func NewModifyClusterAuthenticationOptionsRequest() (request *ModifyClusterAuthenticationOptionsRequest) {
  5345. request = &ModifyClusterAuthenticationOptionsRequest{
  5346. BaseRequest: &tchttp.BaseRequest{},
  5347. }
  5348. request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAuthenticationOptions")
  5349. return
  5350. }
  5351. func NewModifyClusterAuthenticationOptionsResponse() (response *ModifyClusterAuthenticationOptionsResponse) {
  5352. response = &ModifyClusterAuthenticationOptionsResponse{
  5353. BaseResponse: &tchttp.BaseResponse{},
  5354. }
  5355. return
  5356. }
  5357. // ModifyClusterAuthenticationOptions
  5358. // 修改集群认证配置
  5359. //
  5360. // 可能返回的错误码:
  5361. //
  5362. // INTERNALERROR = "InternalError"
  5363. // INVALIDPARAMETER = "InvalidParameter"
  5364. // OPERATIONDENIED = "OperationDenied"
  5365. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  5366. func (c *Client) ModifyClusterAuthenticationOptions(request *ModifyClusterAuthenticationOptionsRequest) (response *ModifyClusterAuthenticationOptionsResponse, err error) {
  5367. return c.ModifyClusterAuthenticationOptionsWithContext(context.Background(), request)
  5368. }
  5369. // ModifyClusterAuthenticationOptions
  5370. // 修改集群认证配置
  5371. //
  5372. // 可能返回的错误码:
  5373. //
  5374. // INTERNALERROR = "InternalError"
  5375. // INVALIDPARAMETER = "InvalidParameter"
  5376. // OPERATIONDENIED = "OperationDenied"
  5377. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  5378. func (c *Client) ModifyClusterAuthenticationOptionsWithContext(ctx context.Context, request *ModifyClusterAuthenticationOptionsRequest) (response *ModifyClusterAuthenticationOptionsResponse, err error) {
  5379. if request == nil {
  5380. request = NewModifyClusterAuthenticationOptionsRequest()
  5381. }
  5382. if c.GetCredential() == nil {
  5383. return nil, errors.New("ModifyClusterAuthenticationOptions require credential")
  5384. }
  5385. request.SetContext(ctx)
  5386. response = NewModifyClusterAuthenticationOptionsResponse()
  5387. err = c.Send(request, response)
  5388. return
  5389. }
  5390. func NewModifyClusterEndpointSPRequest() (request *ModifyClusterEndpointSPRequest) {
  5391. request = &ModifyClusterEndpointSPRequest{
  5392. BaseRequest: &tchttp.BaseRequest{},
  5393. }
  5394. request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterEndpointSP")
  5395. return
  5396. }
  5397. func NewModifyClusterEndpointSPResponse() (response *ModifyClusterEndpointSPResponse) {
  5398. response = &ModifyClusterEndpointSPResponse{
  5399. BaseResponse: &tchttp.BaseResponse{},
  5400. }
  5401. return
  5402. }
  5403. // ModifyClusterEndpointSP
  5404. // 修改托管集群外网端口的安全策略(老的方式,仅支持托管集群外网端口)
  5405. //
  5406. // 可能返回的错误码:
  5407. //
  5408. // FAILEDOPERATION = "FailedOperation"
  5409. // INTERNALERROR = "InternalError"
  5410. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  5411. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  5412. // INTERNALERROR_DB = "InternalError.Db"
  5413. // INTERNALERROR_PARAM = "InternalError.Param"
  5414. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  5415. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5416. // INTERNALERROR_VPCUNEXPECTEDERROR = "InternalError.VPCUnexpectedError"
  5417. // INVALIDPARAMETER = "InvalidParameter"
  5418. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5419. // LIMITEXCEEDED = "LimitExceeded"
  5420. // MISSINGPARAMETER = "MissingParameter"
  5421. // OPERATIONDENIED = "OperationDenied"
  5422. // RESOURCEINUSE = "ResourceInUse"
  5423. // RESOURCENOTFOUND = "ResourceNotFound"
  5424. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  5425. // UNKNOWNPARAMETER = "UnknownParameter"
  5426. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  5427. func (c *Client) ModifyClusterEndpointSP(request *ModifyClusterEndpointSPRequest) (response *ModifyClusterEndpointSPResponse, err error) {
  5428. return c.ModifyClusterEndpointSPWithContext(context.Background(), request)
  5429. }
  5430. // ModifyClusterEndpointSP
  5431. // 修改托管集群外网端口的安全策略(老的方式,仅支持托管集群外网端口)
  5432. //
  5433. // 可能返回的错误码:
  5434. //
  5435. // FAILEDOPERATION = "FailedOperation"
  5436. // INTERNALERROR = "InternalError"
  5437. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  5438. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  5439. // INTERNALERROR_DB = "InternalError.Db"
  5440. // INTERNALERROR_PARAM = "InternalError.Param"
  5441. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  5442. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5443. // INTERNALERROR_VPCUNEXPECTEDERROR = "InternalError.VPCUnexpectedError"
  5444. // INVALIDPARAMETER = "InvalidParameter"
  5445. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5446. // LIMITEXCEEDED = "LimitExceeded"
  5447. // MISSINGPARAMETER = "MissingParameter"
  5448. // OPERATIONDENIED = "OperationDenied"
  5449. // RESOURCEINUSE = "ResourceInUse"
  5450. // RESOURCENOTFOUND = "ResourceNotFound"
  5451. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  5452. // UNKNOWNPARAMETER = "UnknownParameter"
  5453. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  5454. func (c *Client) ModifyClusterEndpointSPWithContext(ctx context.Context, request *ModifyClusterEndpointSPRequest) (response *ModifyClusterEndpointSPResponse, err error) {
  5455. if request == nil {
  5456. request = NewModifyClusterEndpointSPRequest()
  5457. }
  5458. if c.GetCredential() == nil {
  5459. return nil, errors.New("ModifyClusterEndpointSP require credential")
  5460. }
  5461. request.SetContext(ctx)
  5462. response = NewModifyClusterEndpointSPResponse()
  5463. err = c.Send(request, response)
  5464. return
  5465. }
  5466. func NewModifyClusterNodePoolRequest() (request *ModifyClusterNodePoolRequest) {
  5467. request = &ModifyClusterNodePoolRequest{
  5468. BaseRequest: &tchttp.BaseRequest{},
  5469. }
  5470. request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterNodePool")
  5471. return
  5472. }
  5473. func NewModifyClusterNodePoolResponse() (response *ModifyClusterNodePoolResponse) {
  5474. response = &ModifyClusterNodePoolResponse{
  5475. BaseResponse: &tchttp.BaseResponse{},
  5476. }
  5477. return
  5478. }
  5479. // ModifyClusterNodePool
  5480. // 编辑节点池
  5481. //
  5482. // 可能返回的错误码:
  5483. //
  5484. // INTERNALERROR_DB = "InternalError.Db"
  5485. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5486. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5487. // OPERATIONDENIED = "OperationDenied"
  5488. // UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed"
  5489. func (c *Client) ModifyClusterNodePool(request *ModifyClusterNodePoolRequest) (response *ModifyClusterNodePoolResponse, err error) {
  5490. return c.ModifyClusterNodePoolWithContext(context.Background(), request)
  5491. }
  5492. // ModifyClusterNodePool
  5493. // 编辑节点池
  5494. //
  5495. // 可能返回的错误码:
  5496. //
  5497. // INTERNALERROR_DB = "InternalError.Db"
  5498. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5499. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5500. // OPERATIONDENIED = "OperationDenied"
  5501. // UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed"
  5502. func (c *Client) ModifyClusterNodePoolWithContext(ctx context.Context, request *ModifyClusterNodePoolRequest) (response *ModifyClusterNodePoolResponse, err error) {
  5503. if request == nil {
  5504. request = NewModifyClusterNodePoolRequest()
  5505. }
  5506. if c.GetCredential() == nil {
  5507. return nil, errors.New("ModifyClusterNodePool require credential")
  5508. }
  5509. request.SetContext(ctx)
  5510. response = NewModifyClusterNodePoolResponse()
  5511. err = c.Send(request, response)
  5512. return
  5513. }
  5514. func NewModifyNodePoolDesiredCapacityAboutAsgRequest() (request *ModifyNodePoolDesiredCapacityAboutAsgRequest) {
  5515. request = &ModifyNodePoolDesiredCapacityAboutAsgRequest{
  5516. BaseRequest: &tchttp.BaseRequest{},
  5517. }
  5518. request.Init().WithApiInfo("tke", APIVersion, "ModifyNodePoolDesiredCapacityAboutAsg")
  5519. return
  5520. }
  5521. func NewModifyNodePoolDesiredCapacityAboutAsgResponse() (response *ModifyNodePoolDesiredCapacityAboutAsgResponse) {
  5522. response = &ModifyNodePoolDesiredCapacityAboutAsgResponse{
  5523. BaseResponse: &tchttp.BaseResponse{},
  5524. }
  5525. return
  5526. }
  5527. // ModifyNodePoolDesiredCapacityAboutAsg
  5528. // 修改节点池关联伸缩组的期望实例数
  5529. //
  5530. // 可能返回的错误码:
  5531. //
  5532. // INTERNALERROR = "InternalError"
  5533. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  5534. // INTERNALERROR_DB = "InternalError.Db"
  5535. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  5536. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5537. // INVALIDPARAMETER = "InvalidParameter"
  5538. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5539. // RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist"
  5540. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  5541. // UNKNOWNPARAMETER = "UnknownParameter"
  5542. func (c *Client) ModifyNodePoolDesiredCapacityAboutAsg(request *ModifyNodePoolDesiredCapacityAboutAsgRequest) (response *ModifyNodePoolDesiredCapacityAboutAsgResponse, err error) {
  5543. return c.ModifyNodePoolDesiredCapacityAboutAsgWithContext(context.Background(), request)
  5544. }
  5545. // ModifyNodePoolDesiredCapacityAboutAsg
  5546. // 修改节点池关联伸缩组的期望实例数
  5547. //
  5548. // 可能返回的错误码:
  5549. //
  5550. // INTERNALERROR = "InternalError"
  5551. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  5552. // INTERNALERROR_DB = "InternalError.Db"
  5553. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  5554. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5555. // INVALIDPARAMETER = "InvalidParameter"
  5556. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5557. // RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist"
  5558. // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
  5559. // UNKNOWNPARAMETER = "UnknownParameter"
  5560. func (c *Client) ModifyNodePoolDesiredCapacityAboutAsgWithContext(ctx context.Context, request *ModifyNodePoolDesiredCapacityAboutAsgRequest) (response *ModifyNodePoolDesiredCapacityAboutAsgResponse, err error) {
  5561. if request == nil {
  5562. request = NewModifyNodePoolDesiredCapacityAboutAsgRequest()
  5563. }
  5564. if c.GetCredential() == nil {
  5565. return nil, errors.New("ModifyNodePoolDesiredCapacityAboutAsg require credential")
  5566. }
  5567. request.SetContext(ctx)
  5568. response = NewModifyNodePoolDesiredCapacityAboutAsgResponse()
  5569. err = c.Send(request, response)
  5570. return
  5571. }
  5572. func NewModifyNodePoolInstanceTypesRequest() (request *ModifyNodePoolInstanceTypesRequest) {
  5573. request = &ModifyNodePoolInstanceTypesRequest{
  5574. BaseRequest: &tchttp.BaseRequest{},
  5575. }
  5576. request.Init().WithApiInfo("tke", APIVersion, "ModifyNodePoolInstanceTypes")
  5577. return
  5578. }
  5579. func NewModifyNodePoolInstanceTypesResponse() (response *ModifyNodePoolInstanceTypesResponse) {
  5580. response = &ModifyNodePoolInstanceTypesResponse{
  5581. BaseResponse: &tchttp.BaseResponse{},
  5582. }
  5583. return
  5584. }
  5585. // ModifyNodePoolInstanceTypes
  5586. // 修改节点池的机型配置
  5587. //
  5588. // 可能返回的错误码:
  5589. //
  5590. // INTERNALERROR = "InternalError"
  5591. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  5592. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  5593. // INTERNALERROR_DB = "InternalError.Db"
  5594. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  5595. // INTERNALERROR_PARAM = "InternalError.Param"
  5596. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  5597. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5598. // INVALIDPARAMETER = "InvalidParameter"
  5599. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5600. func (c *Client) ModifyNodePoolInstanceTypes(request *ModifyNodePoolInstanceTypesRequest) (response *ModifyNodePoolInstanceTypesResponse, err error) {
  5601. return c.ModifyNodePoolInstanceTypesWithContext(context.Background(), request)
  5602. }
  5603. // ModifyNodePoolInstanceTypes
  5604. // 修改节点池的机型配置
  5605. //
  5606. // 可能返回的错误码:
  5607. //
  5608. // INTERNALERROR = "InternalError"
  5609. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  5610. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  5611. // INTERNALERROR_DB = "InternalError.Db"
  5612. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  5613. // INTERNALERROR_PARAM = "InternalError.Param"
  5614. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  5615. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5616. // INVALIDPARAMETER = "InvalidParameter"
  5617. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5618. func (c *Client) ModifyNodePoolInstanceTypesWithContext(ctx context.Context, request *ModifyNodePoolInstanceTypesRequest) (response *ModifyNodePoolInstanceTypesResponse, err error) {
  5619. if request == nil {
  5620. request = NewModifyNodePoolInstanceTypesRequest()
  5621. }
  5622. if c.GetCredential() == nil {
  5623. return nil, errors.New("ModifyNodePoolInstanceTypes require credential")
  5624. }
  5625. request.SetContext(ctx)
  5626. response = NewModifyNodePoolInstanceTypesResponse()
  5627. err = c.Send(request, response)
  5628. return
  5629. }
  5630. func NewModifyPrometheusAlertRuleRequest() (request *ModifyPrometheusAlertRuleRequest) {
  5631. request = &ModifyPrometheusAlertRuleRequest{
  5632. BaseRequest: &tchttp.BaseRequest{},
  5633. }
  5634. request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusAlertRule")
  5635. return
  5636. }
  5637. func NewModifyPrometheusAlertRuleResponse() (response *ModifyPrometheusAlertRuleResponse) {
  5638. response = &ModifyPrometheusAlertRuleResponse{
  5639. BaseResponse: &tchttp.BaseResponse{},
  5640. }
  5641. return
  5642. }
  5643. // ModifyPrometheusAlertRule
  5644. // 修改告警规则
  5645. //
  5646. // 可能返回的错误码:
  5647. //
  5648. // INTERNALERROR = "InternalError"
  5649. // INTERNALERROR_PARAM = "InternalError.Param"
  5650. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5651. // INVALIDPARAMETER = "InvalidParameter"
  5652. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5653. func (c *Client) ModifyPrometheusAlertRule(request *ModifyPrometheusAlertRuleRequest) (response *ModifyPrometheusAlertRuleResponse, err error) {
  5654. return c.ModifyPrometheusAlertRuleWithContext(context.Background(), request)
  5655. }
  5656. // ModifyPrometheusAlertRule
  5657. // 修改告警规则
  5658. //
  5659. // 可能返回的错误码:
  5660. //
  5661. // INTERNALERROR = "InternalError"
  5662. // INTERNALERROR_PARAM = "InternalError.Param"
  5663. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5664. // INVALIDPARAMETER = "InvalidParameter"
  5665. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5666. func (c *Client) ModifyPrometheusAlertRuleWithContext(ctx context.Context, request *ModifyPrometheusAlertRuleRequest) (response *ModifyPrometheusAlertRuleResponse, err error) {
  5667. if request == nil {
  5668. request = NewModifyPrometheusAlertRuleRequest()
  5669. }
  5670. if c.GetCredential() == nil {
  5671. return nil, errors.New("ModifyPrometheusAlertRule require credential")
  5672. }
  5673. request.SetContext(ctx)
  5674. response = NewModifyPrometheusAlertRuleResponse()
  5675. err = c.Send(request, response)
  5676. return
  5677. }
  5678. func NewModifyPrometheusTemplateRequest() (request *ModifyPrometheusTemplateRequest) {
  5679. request = &ModifyPrometheusTemplateRequest{
  5680. BaseRequest: &tchttp.BaseRequest{},
  5681. }
  5682. request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusTemplate")
  5683. return
  5684. }
  5685. func NewModifyPrometheusTemplateResponse() (response *ModifyPrometheusTemplateResponse) {
  5686. response = &ModifyPrometheusTemplateResponse{
  5687. BaseResponse: &tchttp.BaseResponse{},
  5688. }
  5689. return
  5690. }
  5691. // ModifyPrometheusTemplate
  5692. // 修改模板内容
  5693. //
  5694. // 可能返回的错误码:
  5695. //
  5696. // INTERNALERROR = "InternalError"
  5697. // INTERNALERROR_DB = "InternalError.Db"
  5698. // INTERNALERROR_PARAM = "InternalError.Param"
  5699. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5700. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5701. // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
  5702. func (c *Client) ModifyPrometheusTemplate(request *ModifyPrometheusTemplateRequest) (response *ModifyPrometheusTemplateResponse, err error) {
  5703. return c.ModifyPrometheusTemplateWithContext(context.Background(), request)
  5704. }
  5705. // ModifyPrometheusTemplate
  5706. // 修改模板内容
  5707. //
  5708. // 可能返回的错误码:
  5709. //
  5710. // INTERNALERROR = "InternalError"
  5711. // INTERNALERROR_DB = "InternalError.Db"
  5712. // INTERNALERROR_PARAM = "InternalError.Param"
  5713. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5714. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5715. // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
  5716. func (c *Client) ModifyPrometheusTemplateWithContext(ctx context.Context, request *ModifyPrometheusTemplateRequest) (response *ModifyPrometheusTemplateResponse, err error) {
  5717. if request == nil {
  5718. request = NewModifyPrometheusTemplateRequest()
  5719. }
  5720. if c.GetCredential() == nil {
  5721. return nil, errors.New("ModifyPrometheusTemplate require credential")
  5722. }
  5723. request.SetContext(ctx)
  5724. response = NewModifyPrometheusTemplateResponse()
  5725. err = c.Send(request, response)
  5726. return
  5727. }
  5728. func NewRemoveNodeFromNodePoolRequest() (request *RemoveNodeFromNodePoolRequest) {
  5729. request = &RemoveNodeFromNodePoolRequest{
  5730. BaseRequest: &tchttp.BaseRequest{},
  5731. }
  5732. request.Init().WithApiInfo("tke", APIVersion, "RemoveNodeFromNodePool")
  5733. return
  5734. }
  5735. func NewRemoveNodeFromNodePoolResponse() (response *RemoveNodeFromNodePoolResponse) {
  5736. response = &RemoveNodeFromNodePoolResponse{
  5737. BaseResponse: &tchttp.BaseResponse{},
  5738. }
  5739. return
  5740. }
  5741. // RemoveNodeFromNodePool
  5742. // 移出节点池节点,但保留在集群内
  5743. //
  5744. // 可能返回的错误码:
  5745. //
  5746. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5747. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5748. func (c *Client) RemoveNodeFromNodePool(request *RemoveNodeFromNodePoolRequest) (response *RemoveNodeFromNodePoolResponse, err error) {
  5749. return c.RemoveNodeFromNodePoolWithContext(context.Background(), request)
  5750. }
  5751. // RemoveNodeFromNodePool
  5752. // 移出节点池节点,但保留在集群内
  5753. //
  5754. // 可能返回的错误码:
  5755. //
  5756. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5757. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5758. func (c *Client) RemoveNodeFromNodePoolWithContext(ctx context.Context, request *RemoveNodeFromNodePoolRequest) (response *RemoveNodeFromNodePoolResponse, err error) {
  5759. if request == nil {
  5760. request = NewRemoveNodeFromNodePoolRequest()
  5761. }
  5762. if c.GetCredential() == nil {
  5763. return nil, errors.New("RemoveNodeFromNodePool require credential")
  5764. }
  5765. request.SetContext(ctx)
  5766. response = NewRemoveNodeFromNodePoolResponse()
  5767. err = c.Send(request, response)
  5768. return
  5769. }
  5770. func NewRestartEKSContainerInstancesRequest() (request *RestartEKSContainerInstancesRequest) {
  5771. request = &RestartEKSContainerInstancesRequest{
  5772. BaseRequest: &tchttp.BaseRequest{},
  5773. }
  5774. request.Init().WithApiInfo("tke", APIVersion, "RestartEKSContainerInstances")
  5775. return
  5776. }
  5777. func NewRestartEKSContainerInstancesResponse() (response *RestartEKSContainerInstancesResponse) {
  5778. response = &RestartEKSContainerInstancesResponse{
  5779. BaseResponse: &tchttp.BaseResponse{},
  5780. }
  5781. return
  5782. }
  5783. // RestartEKSContainerInstances
  5784. // 重启弹性容器实例,支持批量操作
  5785. //
  5786. // 可能返回的错误码:
  5787. //
  5788. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  5789. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5790. // RESOURCENOTFOUND = "ResourceNotFound"
  5791. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  5792. func (c *Client) RestartEKSContainerInstances(request *RestartEKSContainerInstancesRequest) (response *RestartEKSContainerInstancesResponse, err error) {
  5793. return c.RestartEKSContainerInstancesWithContext(context.Background(), request)
  5794. }
  5795. // RestartEKSContainerInstances
  5796. // 重启弹性容器实例,支持批量操作
  5797. //
  5798. // 可能返回的错误码:
  5799. //
  5800. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  5801. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5802. // RESOURCENOTFOUND = "ResourceNotFound"
  5803. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  5804. func (c *Client) RestartEKSContainerInstancesWithContext(ctx context.Context, request *RestartEKSContainerInstancesRequest) (response *RestartEKSContainerInstancesResponse, err error) {
  5805. if request == nil {
  5806. request = NewRestartEKSContainerInstancesRequest()
  5807. }
  5808. if c.GetCredential() == nil {
  5809. return nil, errors.New("RestartEKSContainerInstances require credential")
  5810. }
  5811. request.SetContext(ctx)
  5812. response = NewRestartEKSContainerInstancesResponse()
  5813. err = c.Send(request, response)
  5814. return
  5815. }
  5816. func NewScaleInClusterMasterRequest() (request *ScaleInClusterMasterRequest) {
  5817. request = &ScaleInClusterMasterRequest{
  5818. BaseRequest: &tchttp.BaseRequest{},
  5819. }
  5820. request.Init().WithApiInfo("tke", APIVersion, "ScaleInClusterMaster")
  5821. return
  5822. }
  5823. func NewScaleInClusterMasterResponse() (response *ScaleInClusterMasterResponse) {
  5824. response = &ScaleInClusterMasterResponse{
  5825. BaseResponse: &tchttp.BaseResponse{},
  5826. }
  5827. return
  5828. }
  5829. // ScaleInClusterMaster
  5830. // 缩容独立集群master节点
  5831. //
  5832. // 可能返回的错误码:
  5833. //
  5834. // INTERNALERROR = "InternalError"
  5835. // OPERATIONDENIED = "OperationDenied"
  5836. func (c *Client) ScaleInClusterMaster(request *ScaleInClusterMasterRequest) (response *ScaleInClusterMasterResponse, err error) {
  5837. return c.ScaleInClusterMasterWithContext(context.Background(), request)
  5838. }
  5839. // ScaleInClusterMaster
  5840. // 缩容独立集群master节点
  5841. //
  5842. // 可能返回的错误码:
  5843. //
  5844. // INTERNALERROR = "InternalError"
  5845. // OPERATIONDENIED = "OperationDenied"
  5846. func (c *Client) ScaleInClusterMasterWithContext(ctx context.Context, request *ScaleInClusterMasterRequest) (response *ScaleInClusterMasterResponse, err error) {
  5847. if request == nil {
  5848. request = NewScaleInClusterMasterRequest()
  5849. }
  5850. if c.GetCredential() == nil {
  5851. return nil, errors.New("ScaleInClusterMaster require credential")
  5852. }
  5853. request.SetContext(ctx)
  5854. response = NewScaleInClusterMasterResponse()
  5855. err = c.Send(request, response)
  5856. return
  5857. }
  5858. func NewScaleOutClusterMasterRequest() (request *ScaleOutClusterMasterRequest) {
  5859. request = &ScaleOutClusterMasterRequest{
  5860. BaseRequest: &tchttp.BaseRequest{},
  5861. }
  5862. request.Init().WithApiInfo("tke", APIVersion, "ScaleOutClusterMaster")
  5863. return
  5864. }
  5865. func NewScaleOutClusterMasterResponse() (response *ScaleOutClusterMasterResponse) {
  5866. response = &ScaleOutClusterMasterResponse{
  5867. BaseResponse: &tchttp.BaseResponse{},
  5868. }
  5869. return
  5870. }
  5871. // ScaleOutClusterMaster
  5872. // 扩容独立集群master节点
  5873. //
  5874. // 可能返回的错误码:
  5875. //
  5876. // INTERNALERROR = "InternalError"
  5877. // OPERATIONDENIED = "OperationDenied"
  5878. func (c *Client) ScaleOutClusterMaster(request *ScaleOutClusterMasterRequest) (response *ScaleOutClusterMasterResponse, err error) {
  5879. return c.ScaleOutClusterMasterWithContext(context.Background(), request)
  5880. }
  5881. // ScaleOutClusterMaster
  5882. // 扩容独立集群master节点
  5883. //
  5884. // 可能返回的错误码:
  5885. //
  5886. // INTERNALERROR = "InternalError"
  5887. // OPERATIONDENIED = "OperationDenied"
  5888. func (c *Client) ScaleOutClusterMasterWithContext(ctx context.Context, request *ScaleOutClusterMasterRequest) (response *ScaleOutClusterMasterResponse, err error) {
  5889. if request == nil {
  5890. request = NewScaleOutClusterMasterRequest()
  5891. }
  5892. if c.GetCredential() == nil {
  5893. return nil, errors.New("ScaleOutClusterMaster require credential")
  5894. }
  5895. request.SetContext(ctx)
  5896. response = NewScaleOutClusterMasterResponse()
  5897. err = c.Send(request, response)
  5898. return
  5899. }
  5900. func NewSetNodePoolNodeProtectionRequest() (request *SetNodePoolNodeProtectionRequest) {
  5901. request = &SetNodePoolNodeProtectionRequest{
  5902. BaseRequest: &tchttp.BaseRequest{},
  5903. }
  5904. request.Init().WithApiInfo("tke", APIVersion, "SetNodePoolNodeProtection")
  5905. return
  5906. }
  5907. func NewSetNodePoolNodeProtectionResponse() (response *SetNodePoolNodeProtectionResponse) {
  5908. response = &SetNodePoolNodeProtectionResponse{
  5909. BaseResponse: &tchttp.BaseResponse{},
  5910. }
  5911. return
  5912. }
  5913. // SetNodePoolNodeProtection
  5914. // 仅能设置节点池中处于伸缩组的节点
  5915. //
  5916. // 可能返回的错误码:
  5917. //
  5918. // INTERNALERROR = "InternalError"
  5919. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  5920. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  5921. // INTERNALERROR_DB = "InternalError.Db"
  5922. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  5923. // INTERNALERROR_PARAM = "InternalError.Param"
  5924. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  5925. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5926. // INVALIDPARAMETER = "InvalidParameter"
  5927. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5928. func (c *Client) SetNodePoolNodeProtection(request *SetNodePoolNodeProtectionRequest) (response *SetNodePoolNodeProtectionResponse, err error) {
  5929. return c.SetNodePoolNodeProtectionWithContext(context.Background(), request)
  5930. }
  5931. // SetNodePoolNodeProtection
  5932. // 仅能设置节点池中处于伸缩组的节点
  5933. //
  5934. // 可能返回的错误码:
  5935. //
  5936. // INTERNALERROR = "InternalError"
  5937. // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
  5938. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  5939. // INTERNALERROR_DB = "InternalError.Db"
  5940. // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
  5941. // INTERNALERROR_PARAM = "InternalError.Param"
  5942. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  5943. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5944. // INVALIDPARAMETER = "InvalidParameter"
  5945. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5946. func (c *Client) SetNodePoolNodeProtectionWithContext(ctx context.Context, request *SetNodePoolNodeProtectionRequest) (response *SetNodePoolNodeProtectionResponse, err error) {
  5947. if request == nil {
  5948. request = NewSetNodePoolNodeProtectionRequest()
  5949. }
  5950. if c.GetCredential() == nil {
  5951. return nil, errors.New("SetNodePoolNodeProtection require credential")
  5952. }
  5953. request.SetContext(ctx)
  5954. response = NewSetNodePoolNodeProtectionResponse()
  5955. err = c.Send(request, response)
  5956. return
  5957. }
  5958. func NewSyncPrometheusTemplateRequest() (request *SyncPrometheusTemplateRequest) {
  5959. request = &SyncPrometheusTemplateRequest{
  5960. BaseRequest: &tchttp.BaseRequest{},
  5961. }
  5962. request.Init().WithApiInfo("tke", APIVersion, "SyncPrometheusTemplate")
  5963. return
  5964. }
  5965. func NewSyncPrometheusTemplateResponse() (response *SyncPrometheusTemplateResponse) {
  5966. response = &SyncPrometheusTemplateResponse{
  5967. BaseResponse: &tchttp.BaseResponse{},
  5968. }
  5969. return
  5970. }
  5971. // SyncPrometheusTemplate
  5972. // 同步模板到实例或者集群
  5973. //
  5974. // 可能返回的错误码:
  5975. //
  5976. // INTERNALERROR_DB = "InternalError.Db"
  5977. // INTERNALERROR_PARAM = "InternalError.Param"
  5978. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5979. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5980. // INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound"
  5981. // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
  5982. // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
  5983. func (c *Client) SyncPrometheusTemplate(request *SyncPrometheusTemplateRequest) (response *SyncPrometheusTemplateResponse, err error) {
  5984. return c.SyncPrometheusTemplateWithContext(context.Background(), request)
  5985. }
  5986. // SyncPrometheusTemplate
  5987. // 同步模板到实例或者集群
  5988. //
  5989. // 可能返回的错误码:
  5990. //
  5991. // INTERNALERROR_DB = "InternalError.Db"
  5992. // INTERNALERROR_PARAM = "InternalError.Param"
  5993. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  5994. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  5995. // INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound"
  5996. // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
  5997. // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
  5998. func (c *Client) SyncPrometheusTemplateWithContext(ctx context.Context, request *SyncPrometheusTemplateRequest) (response *SyncPrometheusTemplateResponse, err error) {
  5999. if request == nil {
  6000. request = NewSyncPrometheusTemplateRequest()
  6001. }
  6002. if c.GetCredential() == nil {
  6003. return nil, errors.New("SyncPrometheusTemplate require credential")
  6004. }
  6005. request.SetContext(ctx)
  6006. response = NewSyncPrometheusTemplateResponse()
  6007. err = c.Send(request, response)
  6008. return
  6009. }
  6010. func NewUpdateClusterVersionRequest() (request *UpdateClusterVersionRequest) {
  6011. request = &UpdateClusterVersionRequest{
  6012. BaseRequest: &tchttp.BaseRequest{},
  6013. }
  6014. request.Init().WithApiInfo("tke", APIVersion, "UpdateClusterVersion")
  6015. return
  6016. }
  6017. func NewUpdateClusterVersionResponse() (response *UpdateClusterVersionResponse) {
  6018. response = &UpdateClusterVersionResponse{
  6019. BaseResponse: &tchttp.BaseResponse{},
  6020. }
  6021. return
  6022. }
  6023. // UpdateClusterVersion
  6024. // 升级集群 Master 组件到指定版本
  6025. //
  6026. // 可能返回的错误码:
  6027. //
  6028. // INTERNALERROR = "InternalError"
  6029. // INTERNALERROR_CLUSTERUPGRADENODEVERSION = "InternalError.ClusterUpgradeNodeVersion"
  6030. // INTERNALERROR_PARAM = "InternalError.Param"
  6031. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  6032. // INVALIDPARAMETER = "InvalidParameter"
  6033. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  6034. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  6035. func (c *Client) UpdateClusterVersion(request *UpdateClusterVersionRequest) (response *UpdateClusterVersionResponse, err error) {
  6036. return c.UpdateClusterVersionWithContext(context.Background(), request)
  6037. }
  6038. // UpdateClusterVersion
  6039. // 升级集群 Master 组件到指定版本
  6040. //
  6041. // 可能返回的错误码:
  6042. //
  6043. // INTERNALERROR = "InternalError"
  6044. // INTERNALERROR_CLUSTERUPGRADENODEVERSION = "InternalError.ClusterUpgradeNodeVersion"
  6045. // INTERNALERROR_PARAM = "InternalError.Param"
  6046. // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
  6047. // INVALIDPARAMETER = "InvalidParameter"
  6048. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  6049. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  6050. func (c *Client) UpdateClusterVersionWithContext(ctx context.Context, request *UpdateClusterVersionRequest) (response *UpdateClusterVersionResponse, err error) {
  6051. if request == nil {
  6052. request = NewUpdateClusterVersionRequest()
  6053. }
  6054. if c.GetCredential() == nil {
  6055. return nil, errors.New("UpdateClusterVersion require credential")
  6056. }
  6057. request.SetContext(ctx)
  6058. response = NewUpdateClusterVersionResponse()
  6059. err = c.Send(request, response)
  6060. return
  6061. }
  6062. func NewUpdateEKSClusterRequest() (request *UpdateEKSClusterRequest) {
  6063. request = &UpdateEKSClusterRequest{
  6064. BaseRequest: &tchttp.BaseRequest{},
  6065. }
  6066. request.Init().WithApiInfo("tke", APIVersion, "UpdateEKSCluster")
  6067. return
  6068. }
  6069. func NewUpdateEKSClusterResponse() (response *UpdateEKSClusterResponse) {
  6070. response = &UpdateEKSClusterResponse{
  6071. BaseResponse: &tchttp.BaseResponse{},
  6072. }
  6073. return
  6074. }
  6075. // UpdateEKSCluster
  6076. // 修改弹性集群名称等属性
  6077. //
  6078. // 可能返回的错误码:
  6079. //
  6080. // FAILEDOPERATION = "FailedOperation"
  6081. // INTERNALERROR = "InternalError"
  6082. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  6083. // INVALIDPARAMETER = "InvalidParameter"
  6084. // LIMITEXCEEDED = "LimitExceeded"
  6085. // MISSINGPARAMETER = "MissingParameter"
  6086. // RESOURCEINUSE = "ResourceInUse"
  6087. // RESOURCENOTFOUND = "ResourceNotFound"
  6088. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  6089. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  6090. // UNKNOWNPARAMETER = "UnknownParameter"
  6091. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  6092. func (c *Client) UpdateEKSCluster(request *UpdateEKSClusterRequest) (response *UpdateEKSClusterResponse, err error) {
  6093. return c.UpdateEKSClusterWithContext(context.Background(), request)
  6094. }
  6095. // UpdateEKSCluster
  6096. // 修改弹性集群名称等属性
  6097. //
  6098. // 可能返回的错误码:
  6099. //
  6100. // FAILEDOPERATION = "FailedOperation"
  6101. // INTERNALERROR = "InternalError"
  6102. // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
  6103. // INVALIDPARAMETER = "InvalidParameter"
  6104. // LIMITEXCEEDED = "LimitExceeded"
  6105. // MISSINGPARAMETER = "MissingParameter"
  6106. // RESOURCEINUSE = "ResourceInUse"
  6107. // RESOURCENOTFOUND = "ResourceNotFound"
  6108. // RESOURCEUNAVAILABLE = "ResourceUnavailable"
  6109. // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
  6110. // UNKNOWNPARAMETER = "UnknownParameter"
  6111. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  6112. func (c *Client) UpdateEKSClusterWithContext(ctx context.Context, request *UpdateEKSClusterRequest) (response *UpdateEKSClusterResponse, err error) {
  6113. if request == nil {
  6114. request = NewUpdateEKSClusterRequest()
  6115. }
  6116. if c.GetCredential() == nil {
  6117. return nil, errors.New("UpdateEKSCluster require credential")
  6118. }
  6119. request.SetContext(ctx)
  6120. response = NewUpdateEKSClusterResponse()
  6121. err = c.Send(request, response)
  6122. return
  6123. }
  6124. func NewUpdateEKSContainerInstanceRequest() (request *UpdateEKSContainerInstanceRequest) {
  6125. request = &UpdateEKSContainerInstanceRequest{
  6126. BaseRequest: &tchttp.BaseRequest{},
  6127. }
  6128. request.Init().WithApiInfo("tke", APIVersion, "UpdateEKSContainerInstance")
  6129. return
  6130. }
  6131. func NewUpdateEKSContainerInstanceResponse() (response *UpdateEKSContainerInstanceResponse) {
  6132. response = &UpdateEKSContainerInstanceResponse{
  6133. BaseResponse: &tchttp.BaseResponse{},
  6134. }
  6135. return
  6136. }
  6137. // UpdateEKSContainerInstance
  6138. // 更新容器实例
  6139. //
  6140. // 可能返回的错误码:
  6141. //
  6142. // INTERNALERROR = "InternalError"
  6143. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  6144. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  6145. func UpdateEKSContainerInstance(request *UpdateEKSContainerInstanceRequest) (response *UpdateEKSContainerInstanceResponse, err error) {
  6146. provider := pbtenant.CloudProvider(request.ProviderId)
  6147. var configFile string
  6148. flag.StringVar(&configFile, "conf-tencent", "configs/config.yaml", "config.yaml")
  6149. flag.Parse()
  6150. defer glog.Flush()
  6151. if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil {
  6152. if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) {
  6153. glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err)
  6154. }
  6155. glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile)
  6156. }
  6157. glog.Infof("load tenant from file finished")
  6158. var regionId int32
  6159. switch request.ProviderId {
  6160. case 0:
  6161. regionId, _ = tenanter.GetAliRegionId(request.RegionId)
  6162. case 1:
  6163. regionId, _ = tenanter.GetTencentRegionId(request.RegionId)
  6164. case 2:
  6165. regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId)
  6166. case 3:
  6167. regionId, _ = tenanter.GetK8SRegionId(request.RegionId)
  6168. }
  6169. containers := request.Containers
  6170. requestPCM := &pbpod.UpdatePodReq{
  6171. RequestSource: "tencent",
  6172. Provider: provider,
  6173. AccountName: request.AccountName,
  6174. PcmId: *request.EksCiId,
  6175. PodId: *request.EksCiId,
  6176. PodName: *request.Name,
  6177. Namespace: request.Namespace,
  6178. RegionId: regionId,
  6179. ContainerImage: *containers[0].Image,
  6180. ContainerName: *containers[0].Name,
  6181. CpuPod: strconv.FormatFloat(*containers[0].Cpu, 'E', -1, 64),
  6182. MemoryPod: strconv.FormatFloat(*containers[0].Memory, 'E', -1, 64),
  6183. RestartPolicy: *request.RestartPolicy,
  6184. Labels: "",
  6185. }
  6186. resp, err := server.UpdatePod(nil, requestPCM)
  6187. if err != nil {
  6188. glog.Errorf("CreatePod error %+v", err)
  6189. return
  6190. }
  6191. glog.Infof("CreatePod response %+v", resp)
  6192. response = &UpdateEKSContainerInstanceResponse{
  6193. Response: (*struct {
  6194. EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"`
  6195. RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
  6196. })(&struct {
  6197. EksCiId *string
  6198. RequestId *string
  6199. }{
  6200. EksCiId: &resp.PodId,
  6201. RequestId: &resp.RequestId,
  6202. }),
  6203. BaseResponse: &tchttp.BaseResponse{},
  6204. }
  6205. return response, nil
  6206. }
  6207. // UpdateEKSContainerInstance
  6208. // 更新容器实例
  6209. //
  6210. // 可能返回的错误码:
  6211. //
  6212. // INTERNALERROR = "InternalError"
  6213. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  6214. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  6215. func (c *Client) UpdateEKSContainerInstanceWithContext(ctx context.Context, request *UpdateEKSContainerInstanceRequest) (response *UpdateEKSContainerInstanceResponse, err error) {
  6216. if request == nil {
  6217. request = NewUpdateEKSContainerInstanceRequest()
  6218. }
  6219. if c.GetCredential() == nil {
  6220. return nil, errors.New("UpdateEKSContainerInstance require credential")
  6221. }
  6222. request.SetContext(ctx)
  6223. response = NewUpdateEKSContainerInstanceResponse()
  6224. err = c.Send(request, response)
  6225. return
  6226. }
  6227. func NewUpdateImageCacheRequest() (request *UpdateImageCacheRequest) {
  6228. request = &UpdateImageCacheRequest{
  6229. BaseRequest: &tchttp.BaseRequest{},
  6230. }
  6231. request.Init().WithApiInfo("tke", APIVersion, "UpdateImageCache")
  6232. return
  6233. }
  6234. func NewUpdateImageCacheResponse() (response *UpdateImageCacheResponse) {
  6235. response = &UpdateImageCacheResponse{
  6236. BaseResponse: &tchttp.BaseResponse{},
  6237. }
  6238. return
  6239. }
  6240. // UpdateImageCache
  6241. // 更新镜像缓存接口
  6242. //
  6243. // 可能返回的错误码:
  6244. //
  6245. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  6246. func (c *Client) UpdateImageCache(request *UpdateImageCacheRequest) (response *UpdateImageCacheResponse, err error) {
  6247. return c.UpdateImageCacheWithContext(context.Background(), request)
  6248. }
  6249. // UpdateImageCache
  6250. // 更新镜像缓存接口
  6251. //
  6252. // 可能返回的错误码:
  6253. //
  6254. // UNSUPPORTEDOPERATION = "UnsupportedOperation"
  6255. func (c *Client) UpdateImageCacheWithContext(ctx context.Context, request *UpdateImageCacheRequest) (response *UpdateImageCacheResponse, err error) {
  6256. if request == nil {
  6257. request = NewUpdateImageCacheRequest()
  6258. }
  6259. if c.GetCredential() == nil {
  6260. return nil, errors.New("UpdateImageCache require credential")
  6261. }
  6262. request.SetContext(ctx)
  6263. response = NewUpdateImageCacheResponse()
  6264. err = c.Send(request, response)
  6265. return
  6266. }
  6267. func NewUpgradeClusterInstancesRequest() (request *UpgradeClusterInstancesRequest) {
  6268. request = &UpgradeClusterInstancesRequest{
  6269. BaseRequest: &tchttp.BaseRequest{},
  6270. }
  6271. request.Init().WithApiInfo("tke", APIVersion, "UpgradeClusterInstances")
  6272. return
  6273. }
  6274. func NewUpgradeClusterInstancesResponse() (response *UpgradeClusterInstancesResponse) {
  6275. response = &UpgradeClusterInstancesResponse{
  6276. BaseResponse: &tchttp.BaseResponse{},
  6277. }
  6278. return
  6279. }
  6280. // UpgradeClusterInstances
  6281. // 给集群的一批work节点进行升级
  6282. //
  6283. // 可能返回的错误码:
  6284. //
  6285. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  6286. // INTERNALERROR_PARAM = "InternalError.Param"
  6287. // INTERNALERROR_TASKALREADYRUNNING = "InternalError.TaskAlreadyRunning"
  6288. // INTERNALERROR_TASKLIFESTATEERROR = "InternalError.TaskLifeStateError"
  6289. // INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound"
  6290. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  6291. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  6292. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  6293. func (c *Client) UpgradeClusterInstances(request *UpgradeClusterInstancesRequest) (response *UpgradeClusterInstancesResponse, err error) {
  6294. return c.UpgradeClusterInstancesWithContext(context.Background(), request)
  6295. }
  6296. // UpgradeClusterInstances
  6297. // 给集群的一批work节点进行升级
  6298. //
  6299. // 可能返回的错误码:
  6300. //
  6301. // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
  6302. // INTERNALERROR_PARAM = "InternalError.Param"
  6303. // INTERNALERROR_TASKALREADYRUNNING = "InternalError.TaskAlreadyRunning"
  6304. // INTERNALERROR_TASKLIFESTATEERROR = "InternalError.TaskLifeStateError"
  6305. // INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound"
  6306. // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
  6307. // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
  6308. // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
  6309. func (c *Client) UpgradeClusterInstancesWithContext(ctx context.Context, request *UpgradeClusterInstancesRequest) (response *UpgradeClusterInstancesResponse, err error) {
  6310. if request == nil {
  6311. request = NewUpgradeClusterInstancesRequest()
  6312. }
  6313. if c.GetCredential() == nil {
  6314. return nil, errors.New("UpgradeClusterInstances require credential")
  6315. }
  6316. request.SetContext(ctx)
  6317. response = NewUpgradeClusterInstancesResponse()
  6318. err = c.Send(request, response)
  6319. return
  6320. }

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.