|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187 |
- // Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- package v20180525
-
- import (
- "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server"
- "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter"
- "code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
- "code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
- "context"
- "errors"
- "flag"
- "github.com/golang/glog"
- "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
- tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http"
- "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
- "strconv"
- )
-
- const APIVersion = "2018-05-25"
-
- type Client struct {
- common.Client
- }
-
- // Deprecated
- func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) {
- cpf := profile.NewClientProfile()
- client = &Client{}
- client.Init(region).WithSecretId(secretId, secretKey).WithProfile(cpf)
- return
- }
-
- func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error) {
- client = &Client{}
- client.Init(region).
- WithCredential(credential).
- WithProfile(clientProfile)
- return
- }
-
- func NewAcquireClusterAdminRoleRequest() (request *AcquireClusterAdminRoleRequest) {
- request = &AcquireClusterAdminRoleRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "AcquireClusterAdminRole")
-
- return
- }
-
- func NewAcquireClusterAdminRoleResponse() (response *AcquireClusterAdminRoleResponse) {
- response = &AcquireClusterAdminRoleResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // AcquireClusterAdminRole
- // 通过此接口,可以获取集群的tke:admin的ClusterRole,即管理员角色,可以用于CAM侧高权限的用户,通过CAM策略给予子账户此接口权限,进而可以通过此接口直接获取到kubernetes集群内的管理员角色。
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError"
- // INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError"
- // INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
- // UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist"
- func (c *Client) AcquireClusterAdminRole(request *AcquireClusterAdminRoleRequest) (response *AcquireClusterAdminRoleResponse, err error) {
- return c.AcquireClusterAdminRoleWithContext(context.Background(), request)
- }
-
- // AcquireClusterAdminRole
- // 通过此接口,可以获取集群的tke:admin的ClusterRole,即管理员角色,可以用于CAM侧高权限的用户,通过CAM策略给予子账户此接口权限,进而可以通过此接口直接获取到kubernetes集群内的管理员角色。
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError"
- // INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError"
- // INTERNALERROR_KUBERNETESGETOPERATIONERROR = "InternalError.KubernetesGetOperationError"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
- // UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist"
- func (c *Client) AcquireClusterAdminRoleWithContext(ctx context.Context, request *AcquireClusterAdminRoleRequest) (response *AcquireClusterAdminRoleResponse, err error) {
- if request == nil {
- request = NewAcquireClusterAdminRoleRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("AcquireClusterAdminRole require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewAcquireClusterAdminRoleResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewAddClusterCIDRRequest() (request *AddClusterCIDRRequest) {
- request = &AddClusterCIDRRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "AddClusterCIDR")
-
- return
- }
-
- func NewAddClusterCIDRResponse() (response *AddClusterCIDRResponse) {
- response = &AddClusterCIDRResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // AddClusterCIDR
- // 给GR集群增加可用的ClusterCIDR
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange"
- // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster"
- // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
- // INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr"
- // INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) AddClusterCIDR(request *AddClusterCIDRRequest) (response *AddClusterCIDRResponse, err error) {
- return c.AddClusterCIDRWithContext(context.Background(), request)
- }
-
- // AddClusterCIDR
- // 给GR集群增加可用的ClusterCIDR
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange"
- // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster"
- // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
- // INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr"
- // INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) AddClusterCIDRWithContext(ctx context.Context, request *AddClusterCIDRRequest) (response *AddClusterCIDRResponse, err error) {
- if request == nil {
- request = NewAddClusterCIDRRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("AddClusterCIDR require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewAddClusterCIDRResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewAddExistedInstancesRequest() (request *AddExistedInstancesRequest) {
- request = &AddExistedInstancesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "AddExistedInstances")
-
- return
- }
-
- func NewAddExistedInstancesResponse() (response *AddExistedInstancesResponse) {
- response = &AddExistedInstancesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // AddExistedInstances
- // 添加已经存在的实例到集群
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- func (c *Client) AddExistedInstances(request *AddExistedInstancesRequest) (response *AddExistedInstancesResponse, err error) {
- return c.AddExistedInstancesWithContext(context.Background(), request)
- }
-
- // AddExistedInstances
- // 添加已经存在的实例到集群
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- func (c *Client) AddExistedInstancesWithContext(ctx context.Context, request *AddExistedInstancesRequest) (response *AddExistedInstancesResponse, err error) {
- if request == nil {
- request = NewAddExistedInstancesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("AddExistedInstances require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewAddExistedInstancesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewAddNodeToNodePoolRequest() (request *AddNodeToNodePoolRequest) {
- request = &AddNodeToNodePoolRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "AddNodeToNodePool")
-
- return
- }
-
- func NewAddNodeToNodePoolResponse() (response *AddNodeToNodePoolResponse) {
- response = &AddNodeToNodePoolResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // AddNodeToNodePool
- // 将集群内节点移入节点池
- //
- // 可能返回的错误码:
- //
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) AddNodeToNodePool(request *AddNodeToNodePoolRequest) (response *AddNodeToNodePoolResponse, err error) {
- return c.AddNodeToNodePoolWithContext(context.Background(), request)
- }
-
- // AddNodeToNodePool
- // 将集群内节点移入节点池
- //
- // 可能返回的错误码:
- //
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) AddNodeToNodePoolWithContext(ctx context.Context, request *AddNodeToNodePoolRequest) (response *AddNodeToNodePoolResponse, err error) {
- if request == nil {
- request = NewAddNodeToNodePoolRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("AddNodeToNodePool require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewAddNodeToNodePoolResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewAddVpcCniSubnetsRequest() (request *AddVpcCniSubnetsRequest) {
- request = &AddVpcCniSubnetsRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "AddVpcCniSubnets")
-
- return
- }
-
- func NewAddVpcCniSubnetsResponse() (response *AddVpcCniSubnetsResponse) {
- response = &AddVpcCniSubnetsResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // AddVpcCniSubnets
- // 针对VPC-CNI模式的集群,增加集群容器网络可使用的子网
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) AddVpcCniSubnets(request *AddVpcCniSubnetsRequest) (response *AddVpcCniSubnetsResponse, err error) {
- return c.AddVpcCniSubnetsWithContext(context.Background(), request)
- }
-
- // AddVpcCniSubnets
- // 针对VPC-CNI模式的集群,增加集群容器网络可使用的子网
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) AddVpcCniSubnetsWithContext(ctx context.Context, request *AddVpcCniSubnetsRequest) (response *AddVpcCniSubnetsResponse, err error) {
- if request == nil {
- request = NewAddVpcCniSubnetsRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("AddVpcCniSubnets require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewAddVpcCniSubnetsResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCheckInstancesUpgradeAbleRequest() (request *CheckInstancesUpgradeAbleRequest) {
- request = &CheckInstancesUpgradeAbleRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CheckInstancesUpgradeAble")
-
- return
- }
-
- func NewCheckInstancesUpgradeAbleResponse() (response *CheckInstancesUpgradeAbleResponse) {
- response = &CheckInstancesUpgradeAbleResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CheckInstancesUpgradeAble
- // 检查给定节点列表中哪些是可升级的
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- func (c *Client) CheckInstancesUpgradeAble(request *CheckInstancesUpgradeAbleRequest) (response *CheckInstancesUpgradeAbleResponse, err error) {
- return c.CheckInstancesUpgradeAbleWithContext(context.Background(), request)
- }
-
- // CheckInstancesUpgradeAble
- // 检查给定节点列表中哪些是可升级的
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- func (c *Client) CheckInstancesUpgradeAbleWithContext(ctx context.Context, request *CheckInstancesUpgradeAbleRequest) (response *CheckInstancesUpgradeAbleResponse, err error) {
- if request == nil {
- request = NewCheckInstancesUpgradeAbleRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CheckInstancesUpgradeAble require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCheckInstancesUpgradeAbleResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreateClusterRequest() (request *CreateClusterRequest) {
- request = &CreateClusterRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreateCluster")
-
- return
- }
-
- func NewCreateClusterResponse() (response *CreateClusterResponse) {
- response = &CreateClusterResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreateCluster
- // 创建集群
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster"
- // INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute"
- // INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr"
- // INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute"
- // INTERNALERROR_CIDRINVALI = "InternalError.CidrInvali"
- // INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange"
- // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
- // INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNUMBERNOTMATCH = "InternalError.CvmNumberNotMatch"
- // INTERNALERROR_CVMSTATUS = "InternalError.CvmStatus"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount"
- // INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota"
- // INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed"
- // INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr"
- // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
- // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
- // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
- // INTERNALERROR_QUOTAUSGLIMIT = "InternalError.QuotaUSGLimit"
- // INTERNALERROR_TASKCREATEFAILED = "InternalError.TaskCreateFailed"
- // INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange"
- // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster"
- // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
- // INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr"
- // INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute"
- // INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid"
- // INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR"
- // LIMITEXCEEDED = "LimitExceeded"
- func (c *Client) CreateCluster(request *CreateClusterRequest) (response *CreateClusterResponse, err error) {
- return c.CreateClusterWithContext(context.Background(), request)
- }
-
- // CreateCluster
- // 创建集群
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster"
- // INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute"
- // INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr"
- // INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute"
- // INTERNALERROR_CIDRINVALI = "InternalError.CidrInvali"
- // INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange"
- // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
- // INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNUMBERNOTMATCH = "InternalError.CvmNumberNotMatch"
- // INTERNALERROR_CVMSTATUS = "InternalError.CvmStatus"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount"
- // INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota"
- // INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed"
- // INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr"
- // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
- // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
- // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
- // INTERNALERROR_QUOTAUSGLIMIT = "InternalError.QuotaUSGLimit"
- // INTERNALERROR_TASKCREATEFAILED = "InternalError.TaskCreateFailed"
- // INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CIDRMASKSIZEOUTOFRANGE = "InvalidParameter.CIDRMaskSizeOutOfRange"
- // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERCLUSTER = "InvalidParameter.CidrConflictWithOtherCluster"
- // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
- // INVALIDPARAMETER_CIDRCONFLICTWITHVPCCIDR = "InvalidParameter.CidrConflictWithVpcCidr"
- // INVALIDPARAMETER_CIDRCONFLICTWITHVPCGLOBALROUTE = "InvalidParameter.CidrConflictWithVpcGlobalRoute"
- // INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid"
- // INVALIDPARAMETER_INVALIDPRIVATENETWORKCIDR = "InvalidParameter.InvalidPrivateNetworkCIDR"
- // LIMITEXCEEDED = "LimitExceeded"
- func (c *Client) CreateClusterWithContext(ctx context.Context, request *CreateClusterRequest) (response *CreateClusterResponse, err error) {
- if request == nil {
- request = NewCreateClusterRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreateCluster require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreateClusterResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreateClusterAsGroupRequest() (request *CreateClusterAsGroupRequest) {
- request = &CreateClusterAsGroupRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreateClusterAsGroup")
-
- return
- }
-
- func NewCreateClusterAsGroupResponse() (response *CreateClusterAsGroupResponse) {
- response = &CreateClusterAsGroupResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreateClusterAsGroup
- // 为已经存在的集群创建伸缩组
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
- // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) CreateClusterAsGroup(request *CreateClusterAsGroupRequest) (response *CreateClusterAsGroupResponse, err error) {
- return c.CreateClusterAsGroupWithContext(context.Background(), request)
- }
-
- // CreateClusterAsGroup
- // 为已经存在的集群创建伸缩组
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
- // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) CreateClusterAsGroupWithContext(ctx context.Context, request *CreateClusterAsGroupRequest) (response *CreateClusterAsGroupResponse, err error) {
- if request == nil {
- request = NewCreateClusterAsGroupRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreateClusterAsGroup require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreateClusterAsGroupResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreateClusterEndpointRequest() (request *CreateClusterEndpointRequest) {
- request = &CreateClusterEndpointRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreateClusterEndpoint")
-
- return
- }
-
- func NewCreateClusterEndpointResponse() (response *CreateClusterEndpointResponse) {
- response = &CreateClusterEndpointResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreateClusterEndpoint
- // 创建集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_EMPTYCLUSTERNOTSUPPORT = "InternalError.EmptyClusterNotSupport"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) CreateClusterEndpoint(request *CreateClusterEndpointRequest) (response *CreateClusterEndpointResponse, err error) {
- return c.CreateClusterEndpointWithContext(context.Background(), request)
- }
-
- // CreateClusterEndpoint
- // 创建集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_EMPTYCLUSTERNOTSUPPORT = "InternalError.EmptyClusterNotSupport"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) CreateClusterEndpointWithContext(ctx context.Context, request *CreateClusterEndpointRequest) (response *CreateClusterEndpointResponse, err error) {
- if request == nil {
- request = NewCreateClusterEndpointRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreateClusterEndpoint require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreateClusterEndpointResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreateClusterEndpointVipRequest() (request *CreateClusterEndpointVipRequest) {
- request = &CreateClusterEndpointVipRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreateClusterEndpointVip")
-
- return
- }
-
- func NewCreateClusterEndpointVipResponse() (response *CreateClusterEndpointVipResponse) {
- response = &CreateClusterEndpointVipResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreateClusterEndpointVip
- // 创建托管集群外网访问端口(老的方式,仅支持托管集群外网端口)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) CreateClusterEndpointVip(request *CreateClusterEndpointVipRequest) (response *CreateClusterEndpointVipResponse, err error) {
- return c.CreateClusterEndpointVipWithContext(context.Background(), request)
- }
-
- // CreateClusterEndpointVip
- // 创建托管集群外网访问端口(老的方式,仅支持托管集群外网端口)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) CreateClusterEndpointVipWithContext(ctx context.Context, request *CreateClusterEndpointVipRequest) (response *CreateClusterEndpointVipResponse, err error) {
- if request == nil {
- request = NewCreateClusterEndpointVipRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreateClusterEndpointVip require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreateClusterEndpointVipResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreateClusterInstancesRequest() (request *CreateClusterInstancesRequest) {
- request = &CreateClusterInstancesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreateClusterInstances")
-
- return
- }
-
- func NewCreateClusterInstancesResponse() (response *CreateClusterInstancesResponse) {
- response = &CreateClusterInstancesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreateClusterInstances
- // 扩展(新建)集群节点
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
- // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
- // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
- // INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound"
- // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
- // INVALIDPARAMETER = "InvalidParameter"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) CreateClusterInstances(request *CreateClusterInstancesRequest) (response *CreateClusterInstancesResponse, err error) {
- return c.CreateClusterInstancesWithContext(context.Background(), request)
- }
-
- // CreateClusterInstances
- // 扩展(新建)集群节点
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTCOMMON = "InternalError.AccountCommon"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
- // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
- // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
- // INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound"
- // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
- // INVALIDPARAMETER = "InvalidParameter"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) CreateClusterInstancesWithContext(ctx context.Context, request *CreateClusterInstancesRequest) (response *CreateClusterInstancesResponse, err error) {
- if request == nil {
- request = NewCreateClusterInstancesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreateClusterInstances require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreateClusterInstancesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreateClusterNodePoolRequest() (request *CreateClusterNodePoolRequest) {
- request = &CreateClusterNodePoolRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreateClusterNodePool")
-
- return
- }
-
- func NewCreateClusterNodePoolResponse() (response *CreateClusterNodePoolResponse) {
- response = &CreateClusterNodePoolResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreateClusterNodePool
- // 创建节点池
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- func (c *Client) CreateClusterNodePool(request *CreateClusterNodePoolRequest) (response *CreateClusterNodePoolResponse, err error) {
- return c.CreateClusterNodePoolWithContext(context.Background(), request)
- }
-
- // CreateClusterNodePool
- // 创建节点池
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- func (c *Client) CreateClusterNodePoolWithContext(ctx context.Context, request *CreateClusterNodePoolRequest) (response *CreateClusterNodePoolResponse, err error) {
- if request == nil {
- request = NewCreateClusterNodePoolRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreateClusterNodePool require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreateClusterNodePoolResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreateClusterNodePoolFromExistingAsgRequest() (request *CreateClusterNodePoolFromExistingAsgRequest) {
- request = &CreateClusterNodePoolFromExistingAsgRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreateClusterNodePoolFromExistingAsg")
-
- return
- }
-
- func NewCreateClusterNodePoolFromExistingAsgResponse() (response *CreateClusterNodePoolFromExistingAsgResponse) {
- response = &CreateClusterNodePoolFromExistingAsgResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreateClusterNodePoolFromExistingAsg
- // 从伸缩组创建节点池
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- func (c *Client) CreateClusterNodePoolFromExistingAsg(request *CreateClusterNodePoolFromExistingAsgRequest) (response *CreateClusterNodePoolFromExistingAsgResponse, err error) {
- return c.CreateClusterNodePoolFromExistingAsgWithContext(context.Background(), request)
- }
-
- // CreateClusterNodePoolFromExistingAsg
- // 从伸缩组创建节点池
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- func (c *Client) CreateClusterNodePoolFromExistingAsgWithContext(ctx context.Context, request *CreateClusterNodePoolFromExistingAsgRequest) (response *CreateClusterNodePoolFromExistingAsgResponse, err error) {
- if request == nil {
- request = NewCreateClusterNodePoolFromExistingAsgRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreateClusterNodePoolFromExistingAsg require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreateClusterNodePoolFromExistingAsgResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreateClusterRouteRequest() (request *CreateClusterRouteRequest) {
- request = &CreateClusterRouteRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreateClusterRoute")
-
- return
- }
-
- func NewCreateClusterRouteResponse() (response *CreateClusterRouteResponse) {
- response = &CreateClusterRouteResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreateClusterRoute
- // 创建集群路由
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute"
- // INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_GATEWAYALREADYASSOCIATEDCIDR = "InternalError.GatewayAlreadyAssociatedCidr"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
- // INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable"
- // INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_ROUTETABLENOTFOUND = "ResourceNotFound.RouteTableNotFound"
- func (c *Client) CreateClusterRoute(request *CreateClusterRouteRequest) (response *CreateClusterRouteResponse, err error) {
- return c.CreateClusterRouteWithContext(context.Background(), request)
- }
-
- // CreateClusterRoute
- // 创建集群路由
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute"
- // INTERNALERROR_CIDROUTOFROUTETABLE = "InternalError.CidrOutOfRouteTable"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_GATEWAYALREADYASSOCIATEDCIDR = "InternalError.GatewayAlreadyAssociatedCidr"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
- // INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable"
- // INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_ROUTETABLENOTFOUND = "ResourceNotFound.RouteTableNotFound"
- func (c *Client) CreateClusterRouteWithContext(ctx context.Context, request *CreateClusterRouteRequest) (response *CreateClusterRouteResponse, err error) {
- if request == nil {
- request = NewCreateClusterRouteRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreateClusterRoute require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreateClusterRouteResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreateClusterRouteTableRequest() (request *CreateClusterRouteTableRequest) {
- request = &CreateClusterRouteTableRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreateClusterRouteTable")
-
- return
- }
-
- func NewCreateClusterRouteTableResponse() (response *CreateClusterRouteTableResponse) {
- response = &CreateClusterRouteTableResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreateClusterRouteTable
- // 创建集群路由表
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster"
- // INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute"
- // INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr"
- // INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit"
- // INTERNALERROR_RESOURCEEXISTALREADY = "InternalError.ResourceExistAlready"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) CreateClusterRouteTable(request *CreateClusterRouteTableRequest) (response *CreateClusterRouteTableResponse, err error) {
- return c.CreateClusterRouteTableWithContext(context.Background(), request)
- }
-
- // CreateClusterRouteTable
- // 创建集群路由表
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CIDRCONFLICTWITHOTHERCLUSTER = "InternalError.CidrConflictWithOtherCluster"
- // INTERNALERROR_CIDRCONFLICTWITHOTHERROUTE = "InternalError.CidrConflictWithOtherRoute"
- // INTERNALERROR_CIDRCONFLICTWITHVPCCIDR = "InternalError.CidrConflictWithVpcCidr"
- // INTERNALERROR_CIDRCONFLICTWITHVPCGLOBALROUTE = "InternalError.CidrConflictWithVpcGlobalRoute"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit"
- // INTERNALERROR_RESOURCEEXISTALREADY = "InternalError.ResourceExistAlready"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CIDRCONFLICTWITHOTHERROUTE = "InvalidParameter.CidrConflictWithOtherRoute"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) CreateClusterRouteTableWithContext(ctx context.Context, request *CreateClusterRouteTableRequest) (response *CreateClusterRouteTableResponse, err error) {
- if request == nil {
- request = NewCreateClusterRouteTableRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreateClusterRouteTable require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreateClusterRouteTableResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreateEKSClusterRequest() (request *CreateEKSClusterRequest) {
- request = &CreateEKSClusterRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreateEKSCluster")
-
- return
- }
-
- func NewCreateEKSClusterResponse() (response *CreateEKSClusterResponse) {
- response = &CreateEKSClusterResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreateEKSCluster
- // 创建弹性集群
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) CreateEKSCluster(request *CreateEKSClusterRequest) (response *CreateEKSClusterResponse, err error) {
- return c.CreateEKSClusterWithContext(context.Background(), request)
- }
-
- // CreateEKSCluster
- // 创建弹性集群
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) CreateEKSClusterWithContext(ctx context.Context, request *CreateEKSClusterRequest) (response *CreateEKSClusterResponse, err error) {
- if request == nil {
- request = NewCreateEKSClusterRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreateEKSCluster require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreateEKSClusterResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreateEKSContainerInstancesRequest() (request *CreateEKSContainerInstancesRequest) {
- request = &CreateEKSContainerInstancesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreateEKSContainerInstances")
-
- return
- }
-
- func NewCreateEKSContainerInstancesResponse() (response *CreateEKSContainerInstancesResponse) {
- response = &CreateEKSContainerInstancesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreateEKSContainerInstances
- // 创建容器实例
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- func CreateEKSContainerInstances(request *CreateEKSContainerInstancesRequest) (response *CreateEKSContainerInstancesResponse, err error) {
- provider := pbtenant.CloudProvider(request.ProviderId)
-
- var configFile string
- flag.StringVar(&configFile, "conf", "configs/config.yaml", "config.yaml")
- flag.Parse()
- defer glog.Flush()
-
- if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil {
- if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) {
- glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err)
- }
- glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile)
- }
-
- glog.Infof("load tenant from file finished")
- tenanters, err := tenanter.GetTenanters(provider)
- var regionId int32
- var cpuPod string
- var memoryPod string
- container := request.Containers
- containerImage := container[0].Image
- containerName := container[0].Name
- cpuPodFloat := container[0].Cpu
- memoryPodFloat := container[0].Memory
- switch request.ProviderId {
- case 0:
- regionId, _ = tenanter.GetAliRegionId(request.RegionId)
- cpuPod = strconv.FormatFloat(*cpuPodFloat, 'f', 0, 64)
- memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64)
- case 1:
- regionId, _ = tenanter.GetTencentRegionId(request.RegionId)
- cpuPod = strconv.FormatFloat(*cpuPodFloat, 'f', 0, 64)
- memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64)
- case 2:
- //华为的CPU和内存数量要进行转换
- regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId)
- cpuPod = strconv.FormatFloat(*cpuPodFloat*1000, 'f', 0, 64) + "m"
- memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64) + "Gi"
- case 3:
- regionId, _ = tenanter.GetK8SRegionId(request.RegionId)
- cpuPod = strconv.FormatFloat(*cpuPodFloat*1000, 'f', 0, 64) + "m"
- memoryPod = strconv.FormatFloat(*memoryPodFloat, 'f', 0, 64) + "Gi"
- }
-
- requestPCM := &pbpod.CreatePodReq{
- RequestSource: "tencent",
- Provider: provider,
- AccountName: tenanters[0].AccountName(),
- PodName: *request.EksCiName,
- RegionId: regionId,
- ContainerImage: *containerImage,
- ContainerName: *containerName,
- CpuPod: cpuPod,
- MemoryPod: memoryPod,
- SecurityGroupId: "sg-6qlun7hd",
- SubnetId: "subnet-mnwfg2fk",
- VpcId: "vpc-rkwt40g5",
- Namespace: "pcm",
- }
-
- resp, err := server.CreatePod(nil, requestPCM)
- if err != nil {
- glog.Errorf("CreatePod error %+v", err)
- return
- }
- glog.Infof("CreatePod response %+v", resp)
- response = &CreateEKSContainerInstancesResponse{
- Response: (*struct {
- EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"`
- RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
- })(&struct {
- EksCiIds []*string
- RequestId *string
- }{
- EksCiIds: []*string{&resp.PodId},
- RequestId: &resp.RequestId,
- }),
- BaseResponse: &tchttp.BaseResponse{},
- }
- return response, nil
- }
-
- // CreateEKSContainerInstances
- // 创建容器实例
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) CreateEKSContainerInstancesWithContext(ctx context.Context, request *CreateEKSContainerInstancesRequest) (response *CreateEKSContainerInstancesResponse, err error) {
- if request == nil {
- request = NewCreateEKSContainerInstancesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreateEKSContainerInstances require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreateEKSContainerInstancesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreateImageCacheRequest() (request *CreateImageCacheRequest) {
- request = &CreateImageCacheRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreateImageCache")
-
- return
- }
-
- func NewCreateImageCacheResponse() (response *CreateImageCacheResponse) {
- response = &CreateImageCacheResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreateImageCache
- // 创建镜像缓存的接口。创建过程中,请勿删除EKSCI实例和云盘,否则镜像缓存将创建失败。
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) CreateImageCache(request *CreateImageCacheRequest) (response *CreateImageCacheResponse, err error) {
- return c.CreateImageCacheWithContext(context.Background(), request)
- }
-
- // CreateImageCache
- // 创建镜像缓存的接口。创建过程中,请勿删除EKSCI实例和云盘,否则镜像缓存将创建失败。
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) CreateImageCacheWithContext(ctx context.Context, request *CreateImageCacheRequest) (response *CreateImageCacheResponse, err error) {
- if request == nil {
- request = NewCreateImageCacheRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreateImageCache require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreateImageCacheResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreatePrometheusAlertRuleRequest() (request *CreatePrometheusAlertRuleRequest) {
- request = &CreatePrometheusAlertRuleRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusAlertRule")
-
- return
- }
-
- func NewCreatePrometheusAlertRuleResponse() (response *CreatePrometheusAlertRuleResponse) {
- response = &CreatePrometheusAlertRuleResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreatePrometheusAlertRule
- // 创建告警规则
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND = "ResourceNotFound"
- func (c *Client) CreatePrometheusAlertRule(request *CreatePrometheusAlertRuleRequest) (response *CreatePrometheusAlertRuleResponse, err error) {
- return c.CreatePrometheusAlertRuleWithContext(context.Background(), request)
- }
-
- // CreatePrometheusAlertRule
- // 创建告警规则
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND = "ResourceNotFound"
- func (c *Client) CreatePrometheusAlertRuleWithContext(ctx context.Context, request *CreatePrometheusAlertRuleRequest) (response *CreatePrometheusAlertRuleResponse, err error) {
- if request == nil {
- request = NewCreatePrometheusAlertRuleRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreatePrometheusAlertRule require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreatePrometheusAlertRuleResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreatePrometheusDashboardRequest() (request *CreatePrometheusDashboardRequest) {
- request = &CreatePrometheusDashboardRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusDashboard")
-
- return
- }
-
- func NewCreatePrometheusDashboardResponse() (response *CreatePrometheusDashboardResponse) {
- response = &CreatePrometheusDashboardResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreatePrometheusDashboard
- // 创建grafana监控面板
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
- func (c *Client) CreatePrometheusDashboard(request *CreatePrometheusDashboardRequest) (response *CreatePrometheusDashboardResponse, err error) {
- return c.CreatePrometheusDashboardWithContext(context.Background(), request)
- }
-
- // CreatePrometheusDashboard
- // 创建grafana监控面板
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
- func (c *Client) CreatePrometheusDashboardWithContext(ctx context.Context, request *CreatePrometheusDashboardRequest) (response *CreatePrometheusDashboardResponse, err error) {
- if request == nil {
- request = NewCreatePrometheusDashboardRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreatePrometheusDashboard require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreatePrometheusDashboardResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewCreatePrometheusTemplateRequest() (request *CreatePrometheusTemplateRequest) {
- request = &CreatePrometheusTemplateRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "CreatePrometheusTemplate")
-
- return
- }
-
- func NewCreatePrometheusTemplateResponse() (response *CreatePrometheusTemplateResponse) {
- response = &CreatePrometheusTemplateResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // CreatePrometheusTemplate
- // 创建一个云原生Prometheus模板实例
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) CreatePrometheusTemplate(request *CreatePrometheusTemplateRequest) (response *CreatePrometheusTemplateResponse, err error) {
- return c.CreatePrometheusTemplateWithContext(context.Background(), request)
- }
-
- // CreatePrometheusTemplate
- // 创建一个云原生Prometheus模板实例
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) CreatePrometheusTemplateWithContext(ctx context.Context, request *CreatePrometheusTemplateRequest) (response *CreatePrometheusTemplateResponse, err error) {
- if request == nil {
- request = NewCreatePrometheusTemplateRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("CreatePrometheusTemplate require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewCreatePrometheusTemplateResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDeleteClusterRequest() (request *DeleteClusterRequest) {
- request = &DeleteClusterRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DeleteCluster")
-
- return
- }
-
- func NewDeleteClusterResponse() (response *DeleteClusterResponse) {
- response = &DeleteClusterResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DeleteCluster
- // 删除集群(YUNAPI V3版本)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // OPERATIONDENIED_CLUSTERINDELETIONPROTECTION = "OperationDenied.ClusterInDeletionProtection"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- func (c *Client) DeleteCluster(request *DeleteClusterRequest) (response *DeleteClusterResponse, err error) {
- return c.DeleteClusterWithContext(context.Background(), request)
- }
-
- // DeleteCluster
- // 删除集群(YUNAPI V3版本)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // OPERATIONDENIED_CLUSTERINDELETIONPROTECTION = "OperationDenied.ClusterInDeletionProtection"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- func (c *Client) DeleteClusterWithContext(ctx context.Context, request *DeleteClusterRequest) (response *DeleteClusterResponse, err error) {
- if request == nil {
- request = NewDeleteClusterRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DeleteCluster require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDeleteClusterResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDeleteClusterAsGroupsRequest() (request *DeleteClusterAsGroupsRequest) {
- request = &DeleteClusterAsGroupsRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterAsGroups")
-
- return
- }
-
- func NewDeleteClusterAsGroupsResponse() (response *DeleteClusterAsGroupsResponse) {
- response = &DeleteClusterAsGroupsResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DeleteClusterAsGroups
- // 删除集群伸缩组
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
- // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
- // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
- // INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // LIMITEXCEEDED = "LimitExceeded"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // UNKNOWNPARAMETER = "UnknownParameter"
- func (c *Client) DeleteClusterAsGroups(request *DeleteClusterAsGroupsRequest) (response *DeleteClusterAsGroupsResponse, err error) {
- return c.DeleteClusterAsGroupsWithContext(context.Background(), request)
- }
-
- // DeleteClusterAsGroups
- // 删除集群伸缩组
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
- // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
- // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
- // INTERNALERROR_QUOTAMAXRTLIMIT = "InternalError.QuotaMaxRtLimit"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // LIMITEXCEEDED = "LimitExceeded"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // UNKNOWNPARAMETER = "UnknownParameter"
- func (c *Client) DeleteClusterAsGroupsWithContext(ctx context.Context, request *DeleteClusterAsGroupsRequest) (response *DeleteClusterAsGroupsResponse, err error) {
- if request == nil {
- request = NewDeleteClusterAsGroupsRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DeleteClusterAsGroups require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDeleteClusterAsGroupsResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDeleteClusterEndpointRequest() (request *DeleteClusterEndpointRequest) {
- request = &DeleteClusterEndpointRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterEndpoint")
-
- return
- }
-
- func NewDeleteClusterEndpointResponse() (response *DeleteClusterEndpointResponse) {
- response = &DeleteClusterEndpointResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DeleteClusterEndpoint
- // 删除集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DeleteClusterEndpoint(request *DeleteClusterEndpointRequest) (response *DeleteClusterEndpointResponse, err error) {
- return c.DeleteClusterEndpointWithContext(context.Background(), request)
- }
-
- // DeleteClusterEndpoint
- // 删除集群访问端口(独立集群开启内网/外网访问,托管集群支持开启内网访问)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DeleteClusterEndpointWithContext(ctx context.Context, request *DeleteClusterEndpointRequest) (response *DeleteClusterEndpointResponse, err error) {
- if request == nil {
- request = NewDeleteClusterEndpointRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DeleteClusterEndpoint require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDeleteClusterEndpointResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDeleteClusterEndpointVipRequest() (request *DeleteClusterEndpointVipRequest) {
- request = &DeleteClusterEndpointVipRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterEndpointVip")
-
- return
- }
-
- func NewDeleteClusterEndpointVipResponse() (response *DeleteClusterEndpointVipResponse) {
- response = &DeleteClusterEndpointVipResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DeleteClusterEndpointVip
- // 删除托管集群外网访问端口(老的方式,仅支持托管集群外网端口)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount"
- // INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DeleteClusterEndpointVip(request *DeleteClusterEndpointVipRequest) (response *DeleteClusterEndpointVipResponse, err error) {
- return c.DeleteClusterEndpointVipWithContext(context.Background(), request)
- }
-
- // DeleteClusterEndpointVip
- // 删除托管集群外网访问端口(老的方式,仅支持托管集群外网端口)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount"
- // INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DeleteClusterEndpointVipWithContext(ctx context.Context, request *DeleteClusterEndpointVipRequest) (response *DeleteClusterEndpointVipResponse, err error) {
- if request == nil {
- request = NewDeleteClusterEndpointVipRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DeleteClusterEndpointVip require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDeleteClusterEndpointVipResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDeleteClusterInstancesRequest() (request *DeleteClusterInstancesRequest) {
- request = &DeleteClusterInstancesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterInstances")
-
- return
- }
-
- func NewDeleteClusterInstancesResponse() (response *DeleteClusterInstancesResponse) {
- response = &DeleteClusterInstancesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DeleteClusterInstances
- // 删除集群中的实例
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- func (c *Client) DeleteClusterInstances(request *DeleteClusterInstancesRequest) (response *DeleteClusterInstancesResponse, err error) {
- return c.DeleteClusterInstancesWithContext(context.Background(), request)
- }
-
- // DeleteClusterInstances
- // 删除集群中的实例
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- func (c *Client) DeleteClusterInstancesWithContext(ctx context.Context, request *DeleteClusterInstancesRequest) (response *DeleteClusterInstancesResponse, err error) {
- if request == nil {
- request = NewDeleteClusterInstancesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DeleteClusterInstances require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDeleteClusterInstancesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDeleteClusterNodePoolRequest() (request *DeleteClusterNodePoolRequest) {
- request = &DeleteClusterNodePoolRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterNodePool")
-
- return
- }
-
- func NewDeleteClusterNodePoolResponse() (response *DeleteClusterNodePoolResponse) {
- response = &DeleteClusterNodePoolResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DeleteClusterNodePool
- // 删除节点池
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) DeleteClusterNodePool(request *DeleteClusterNodePoolRequest) (response *DeleteClusterNodePoolResponse, err error) {
- return c.DeleteClusterNodePoolWithContext(context.Background(), request)
- }
-
- // DeleteClusterNodePool
- // 删除节点池
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) DeleteClusterNodePoolWithContext(ctx context.Context, request *DeleteClusterNodePoolRequest) (response *DeleteClusterNodePoolResponse, err error) {
- if request == nil {
- request = NewDeleteClusterNodePoolRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DeleteClusterNodePool require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDeleteClusterNodePoolResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDeleteClusterRouteRequest() (request *DeleteClusterRouteRequest) {
- request = &DeleteClusterRouteRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterRoute")
-
- return
- }
-
- func NewDeleteClusterRouteResponse() (response *DeleteClusterRouteResponse) {
- response = &DeleteClusterRouteResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DeleteClusterRoute
- // 删除集群路由
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) DeleteClusterRoute(request *DeleteClusterRouteRequest) (response *DeleteClusterRouteResponse, err error) {
- return c.DeleteClusterRouteWithContext(context.Background(), request)
- }
-
- // DeleteClusterRoute
- // 删除集群路由
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_ROUTETABLENOTFOUND = "InternalError.RouteTableNotFound"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) DeleteClusterRouteWithContext(ctx context.Context, request *DeleteClusterRouteRequest) (response *DeleteClusterRouteResponse, err error) {
- if request == nil {
- request = NewDeleteClusterRouteRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DeleteClusterRoute require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDeleteClusterRouteResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDeleteClusterRouteTableRequest() (request *DeleteClusterRouteTableRequest) {
- request = &DeleteClusterRouteTableRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DeleteClusterRouteTable")
-
- return
- }
-
- func NewDeleteClusterRouteTableResponse() (response *DeleteClusterRouteTableResponse) {
- response = &DeleteClusterRouteTableResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DeleteClusterRouteTable
- // 删除集群路由表
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_ROUTETABLENOTEMPTY = "InternalError.RouteTableNotEmpty"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
- func (c *Client) DeleteClusterRouteTable(request *DeleteClusterRouteTableRequest) (response *DeleteClusterRouteTableResponse, err error) {
- return c.DeleteClusterRouteTableWithContext(context.Background(), request)
- }
-
- // DeleteClusterRouteTable
- // 删除集群路由表
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_ROUTETABLENOTEMPTY = "InternalError.RouteTableNotEmpty"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
- func (c *Client) DeleteClusterRouteTableWithContext(ctx context.Context, request *DeleteClusterRouteTableRequest) (response *DeleteClusterRouteTableResponse, err error) {
- if request == nil {
- request = NewDeleteClusterRouteTableRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DeleteClusterRouteTable require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDeleteClusterRouteTableResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDeleteEKSClusterRequest() (request *DeleteEKSClusterRequest) {
- request = &DeleteEKSClusterRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DeleteEKSCluster")
-
- return
- }
-
- func NewDeleteEKSClusterResponse() (response *DeleteEKSClusterResponse) {
- response = &DeleteEKSClusterResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DeleteEKSCluster
- // 删除弹性集群(yunapiv3)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DeleteEKSCluster(request *DeleteEKSClusterRequest) (response *DeleteEKSClusterResponse, err error) {
- return c.DeleteEKSClusterWithContext(context.Background(), request)
- }
-
- // DeleteEKSCluster
- // 删除弹性集群(yunapiv3)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DeleteEKSClusterWithContext(ctx context.Context, request *DeleteEKSClusterRequest) (response *DeleteEKSClusterResponse, err error) {
- if request == nil {
- request = NewDeleteEKSClusterRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DeleteEKSCluster require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDeleteEKSClusterResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDeleteEKSContainerInstancesRequest() (request *DeleteEKSContainerInstancesRequest) {
- request = &DeleteEKSContainerInstancesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DeleteEKSContainerInstances")
-
- return
- }
-
- func NewDeleteEKSContainerInstancesResponse() (response *DeleteEKSContainerInstancesResponse) {
- response = &DeleteEKSContainerInstancesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DeleteEKSContainerInstances
- // 删除容器实例,可批量删除
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func DeleteEKSContainerInstances(request *DeleteEKSContainerInstancesRequest) (response *DeleteEKSContainerInstancesResponse, err error) {
- provider := pbtenant.CloudProvider(request.ProviderId)
- var configFile string
- flag.StringVar(&configFile, "conf-tencent", "configs/config.yaml", "config.yaml")
- flag.Parse()
- defer glog.Flush()
-
- if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil {
- if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) {
- glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err)
- }
- glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile)
- }
-
- glog.Infof("load tenant from file finished")
- var regionId int32
- var pcmId string
- podId := request.EksCiIds[0]
- podName := request.ContainerGroupName
- switch request.ProviderId {
- case 0:
- regionId, _ = tenanter.GetAliRegionId(request.RegionId)
- pcmId = *podId
- case 1:
- regionId, _ = tenanter.GetTencentRegionId(request.RegionId)
- pcmId = *podId
- case 2:
- regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId)
- pcmId = podName
- case 3:
- regionId, _ = tenanter.GetK8SRegionId(request.RegionId)
- pcmId = podName
- }
-
- requestPCM := &pbpod.DeletePodReq{
- RequestSource: "tencent",
- Provider: provider,
- AccountName: request.AccountName,
- PcmId: pcmId,
- PodId: *podId,
- PodName: podName,
- Namespace: request.Namespace,
- RegionId: regionId,
- }
-
- resp, err := server.DeletePod(nil, requestPCM)
- glog.Infof("CreatePod response %+v", resp)
- response = &DeleteEKSContainerInstancesResponse{
- Response: (*struct {
- RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
- })(&struct {
- RequestId *string
- }{
- RequestId: &resp.RequestId,
- }),
- BaseResponse: &tchttp.BaseResponse{},
- }
- return response, nil
- }
-
- // DeleteEKSContainerInstances
- // 删除容器实例,可批量删除
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DeleteEKSContainerInstancesWithContext(ctx context.Context, request *DeleteEKSContainerInstancesRequest) (response *DeleteEKSContainerInstancesResponse, err error) {
- if request == nil {
- request = NewDeleteEKSContainerInstancesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DeleteEKSContainerInstances require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDeleteEKSContainerInstancesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDeleteImageCachesRequest() (request *DeleteImageCachesRequest) {
- request = &DeleteImageCachesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DeleteImageCaches")
-
- return
- }
-
- func NewDeleteImageCachesResponse() (response *DeleteImageCachesResponse) {
- response = &DeleteImageCachesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DeleteImageCaches
- // 批量删除镜像缓存
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // RESOURCENOTFOUND = "ResourceNotFound"
- func (c *Client) DeleteImageCaches(request *DeleteImageCachesRequest) (response *DeleteImageCachesResponse, err error) {
- return c.DeleteImageCachesWithContext(context.Background(), request)
- }
-
- // DeleteImageCaches
- // 批量删除镜像缓存
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // RESOURCENOTFOUND = "ResourceNotFound"
- func (c *Client) DeleteImageCachesWithContext(ctx context.Context, request *DeleteImageCachesRequest) (response *DeleteImageCachesResponse, err error) {
- if request == nil {
- request = NewDeleteImageCachesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DeleteImageCaches require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDeleteImageCachesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDeletePrometheusAlertRuleRequest() (request *DeletePrometheusAlertRuleRequest) {
- request = &DeletePrometheusAlertRuleRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusAlertRule")
-
- return
- }
-
- func NewDeletePrometheusAlertRuleResponse() (response *DeletePrometheusAlertRuleResponse) {
- response = &DeletePrometheusAlertRuleResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DeletePrometheusAlertRule
- // 删除告警规则
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
- func (c *Client) DeletePrometheusAlertRule(request *DeletePrometheusAlertRuleRequest) (response *DeletePrometheusAlertRuleResponse, err error) {
- return c.DeletePrometheusAlertRuleWithContext(context.Background(), request)
- }
-
- // DeletePrometheusAlertRule
- // 删除告警规则
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
- func (c *Client) DeletePrometheusAlertRuleWithContext(ctx context.Context, request *DeletePrometheusAlertRuleRequest) (response *DeletePrometheusAlertRuleResponse, err error) {
- if request == nil {
- request = NewDeletePrometheusAlertRuleRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DeletePrometheusAlertRule require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDeletePrometheusAlertRuleResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDeletePrometheusTemplateRequest() (request *DeletePrometheusTemplateRequest) {
- request = &DeletePrometheusTemplateRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusTemplate")
-
- return
- }
-
- func NewDeletePrometheusTemplateResponse() (response *DeletePrometheusTemplateResponse) {
- response = &DeletePrometheusTemplateResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DeletePrometheusTemplate
- // 删除一个云原生Prometheus配置模板
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
- func (c *Client) DeletePrometheusTemplate(request *DeletePrometheusTemplateRequest) (response *DeletePrometheusTemplateResponse, err error) {
- return c.DeletePrometheusTemplateWithContext(context.Background(), request)
- }
-
- // DeletePrometheusTemplate
- // 删除一个云原生Prometheus配置模板
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
- func (c *Client) DeletePrometheusTemplateWithContext(ctx context.Context, request *DeletePrometheusTemplateRequest) (response *DeletePrometheusTemplateResponse, err error) {
- if request == nil {
- request = NewDeletePrometheusTemplateRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DeletePrometheusTemplate require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDeletePrometheusTemplateResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDeletePrometheusTemplateSyncRequest() (request *DeletePrometheusTemplateSyncRequest) {
- request = &DeletePrometheusTemplateSyncRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DeletePrometheusTemplateSync")
-
- return
- }
-
- func NewDeletePrometheusTemplateSyncResponse() (response *DeletePrometheusTemplateSyncResponse) {
- response = &DeletePrometheusTemplateSyncResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DeletePrometheusTemplateSync
- // 取消模板同步,这将会删除目标中该模板所生产的配置
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
- func (c *Client) DeletePrometheusTemplateSync(request *DeletePrometheusTemplateSyncRequest) (response *DeletePrometheusTemplateSyncResponse, err error) {
- return c.DeletePrometheusTemplateSyncWithContext(context.Background(), request)
- }
-
- // DeletePrometheusTemplateSync
- // 取消模板同步,这将会删除目标中该模板所生产的配置
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
- func (c *Client) DeletePrometheusTemplateSyncWithContext(ctx context.Context, request *DeletePrometheusTemplateSyncRequest) (response *DeletePrometheusTemplateSyncResponse, err error) {
- if request == nil {
- request = NewDeletePrometheusTemplateSyncRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DeletePrometheusTemplateSync require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDeletePrometheusTemplateSyncResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeAvailableClusterVersionRequest() (request *DescribeAvailableClusterVersionRequest) {
- request = &DescribeAvailableClusterVersionRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeAvailableClusterVersion")
-
- return
- }
-
- func NewDescribeAvailableClusterVersionResponse() (response *DescribeAvailableClusterVersionResponse) {
- response = &DescribeAvailableClusterVersionResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeAvailableClusterVersion
- // 获取集群可以升级的所有版本
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- func (c *Client) DescribeAvailableClusterVersion(request *DescribeAvailableClusterVersionRequest) (response *DescribeAvailableClusterVersionResponse, err error) {
- return c.DescribeAvailableClusterVersionWithContext(context.Background(), request)
- }
-
- // DescribeAvailableClusterVersion
- // 获取集群可以升级的所有版本
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- func (c *Client) DescribeAvailableClusterVersionWithContext(ctx context.Context, request *DescribeAvailableClusterVersionRequest) (response *DescribeAvailableClusterVersionResponse, err error) {
- if request == nil {
- request = NewDescribeAvailableClusterVersionRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeAvailableClusterVersion require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeAvailableClusterVersionResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterAsGroupOptionRequest() (request *DescribeClusterAsGroupOptionRequest) {
- request = &DescribeClusterAsGroupOptionRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAsGroupOption")
-
- return
- }
-
- func NewDescribeClusterAsGroupOptionResponse() (response *DescribeClusterAsGroupOptionResponse) {
- response = &DescribeClusterAsGroupOptionResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterAsGroupOption
- // 集群弹性伸缩配置
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeClusterAsGroupOption(request *DescribeClusterAsGroupOptionRequest) (response *DescribeClusterAsGroupOptionResponse, err error) {
- return c.DescribeClusterAsGroupOptionWithContext(context.Background(), request)
- }
-
- // DescribeClusterAsGroupOption
- // 集群弹性伸缩配置
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeClusterAsGroupOptionWithContext(ctx context.Context, request *DescribeClusterAsGroupOptionRequest) (response *DescribeClusterAsGroupOptionResponse, err error) {
- if request == nil {
- request = NewDescribeClusterAsGroupOptionRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterAsGroupOption require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterAsGroupOptionResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterAsGroupsRequest() (request *DescribeClusterAsGroupsRequest) {
- request = &DescribeClusterAsGroupsRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAsGroups")
-
- return
- }
-
- func NewDescribeClusterAsGroupsResponse() (response *DescribeClusterAsGroupsResponse) {
- response = &DescribeClusterAsGroupsResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterAsGroups
- // 集群关联的伸缩组列表
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_PODNOTFOUND = "InternalError.PodNotFound"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound"
- // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
- func (c *Client) DescribeClusterAsGroups(request *DescribeClusterAsGroupsRequest) (response *DescribeClusterAsGroupsResponse, err error) {
- return c.DescribeClusterAsGroupsWithContext(context.Background(), request)
- }
-
- // DescribeClusterAsGroups
- // 集群关联的伸缩组列表
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_PODNOTFOUND = "InternalError.PodNotFound"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INTERNALERROR_VPCPEERNOTFOUND = "InternalError.VpcPeerNotFound"
- // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
- func (c *Client) DescribeClusterAsGroupsWithContext(ctx context.Context, request *DescribeClusterAsGroupsRequest) (response *DescribeClusterAsGroupsResponse, err error) {
- if request == nil {
- request = NewDescribeClusterAsGroupsRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterAsGroups require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterAsGroupsResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterAuthenticationOptionsRequest() (request *DescribeClusterAuthenticationOptionsRequest) {
- request = &DescribeClusterAuthenticationOptionsRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAuthenticationOptions")
-
- return
- }
-
- func NewDescribeClusterAuthenticationOptionsResponse() (response *DescribeClusterAuthenticationOptionsResponse) {
- response = &DescribeClusterAuthenticationOptionsResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterAuthenticationOptions
- // 查看集群认证配置
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- func (c *Client) DescribeClusterAuthenticationOptions(request *DescribeClusterAuthenticationOptionsRequest) (response *DescribeClusterAuthenticationOptionsResponse, err error) {
- return c.DescribeClusterAuthenticationOptionsWithContext(context.Background(), request)
- }
-
- // DescribeClusterAuthenticationOptions
- // 查看集群认证配置
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- func (c *Client) DescribeClusterAuthenticationOptionsWithContext(ctx context.Context, request *DescribeClusterAuthenticationOptionsRequest) (response *DescribeClusterAuthenticationOptionsResponse, err error) {
- if request == nil {
- request = NewDescribeClusterAuthenticationOptionsRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterAuthenticationOptions require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterAuthenticationOptionsResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterCommonNamesRequest() (request *DescribeClusterCommonNamesRequest) {
- request = &DescribeClusterCommonNamesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterCommonNames")
-
- return
- }
-
- func NewDescribeClusterCommonNamesResponse() (response *DescribeClusterCommonNamesResponse) {
- response = &DescribeClusterCommonNamesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterCommonNames
- // 获取指定子账户在RBAC授权模式中对应kube-apiserver客户端证书的CommonName字段,如果没有客户端证书,将会签发一个,此接口有最大传入子账户数量上限,当前为50
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
- // UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist"
- func (c *Client) DescribeClusterCommonNames(request *DescribeClusterCommonNamesRequest) (response *DescribeClusterCommonNamesResponse, err error) {
- return c.DescribeClusterCommonNamesWithContext(context.Background(), request)
- }
-
- // DescribeClusterCommonNames
- // 获取指定子账户在RBAC授权模式中对应kube-apiserver客户端证书的CommonName字段,如果没有客户端证书,将会签发一个,此接口有最大传入子账户数量上限,当前为50
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
- // UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist"
- func (c *Client) DescribeClusterCommonNamesWithContext(ctx context.Context, request *DescribeClusterCommonNamesRequest) (response *DescribeClusterCommonNamesResponse, err error) {
- if request == nil {
- request = NewDescribeClusterCommonNamesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterCommonNames require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterCommonNamesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterControllersRequest() (request *DescribeClusterControllersRequest) {
- request = &DescribeClusterControllersRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterControllers")
-
- return
- }
-
- func NewDescribeClusterControllersResponse() (response *DescribeClusterControllersResponse) {
- response = &DescribeClusterControllersResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterControllers
- // 用于查询Kubernetes的各个原生控制器是否开启
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) DescribeClusterControllers(request *DescribeClusterControllersRequest) (response *DescribeClusterControllersResponse, err error) {
- return c.DescribeClusterControllersWithContext(context.Background(), request)
- }
-
- // DescribeClusterControllers
- // 用于查询Kubernetes的各个原生控制器是否开启
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) DescribeClusterControllersWithContext(ctx context.Context, request *DescribeClusterControllersRequest) (response *DescribeClusterControllersResponse, err error) {
- if request == nil {
- request = NewDescribeClusterControllersRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterControllers require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterControllersResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterEndpointStatusRequest() (request *DescribeClusterEndpointStatusRequest) {
- request = &DescribeClusterEndpointStatusRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterEndpointStatus")
-
- return
- }
-
- func NewDescribeClusterEndpointStatusResponse() (response *DescribeClusterEndpointStatusResponse) {
- response = &DescribeClusterEndpointStatusResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterEndpointStatus
- // 查询集群访问端口状态(独立集群开启内网/外网访问,托管集群支持开启内网访问)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_KUBERNETESINTERNAL = "InternalError.KubernetesInternal"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeClusterEndpointStatus(request *DescribeClusterEndpointStatusRequest) (response *DescribeClusterEndpointStatusResponse, err error) {
- return c.DescribeClusterEndpointStatusWithContext(context.Background(), request)
- }
-
- // DescribeClusterEndpointStatus
- // 查询集群访问端口状态(独立集群开启内网/外网访问,托管集群支持开启内网访问)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_KUBERNETESINTERNAL = "InternalError.KubernetesInternal"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeClusterEndpointStatusWithContext(ctx context.Context, request *DescribeClusterEndpointStatusRequest) (response *DescribeClusterEndpointStatusResponse, err error) {
- if request == nil {
- request = NewDescribeClusterEndpointStatusRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterEndpointStatus require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterEndpointStatusResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterEndpointVipStatusRequest() (request *DescribeClusterEndpointVipStatusRequest) {
- request = &DescribeClusterEndpointVipStatusRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterEndpointVipStatus")
-
- return
- }
-
- func NewDescribeClusterEndpointVipStatusResponse() (response *DescribeClusterEndpointVipStatusResponse) {
- response = &DescribeClusterEndpointVipStatusResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterEndpointVipStatus
- // 查询集群开启端口流程状态(仅支持托管集群外网端口)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount"
- // INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota"
- // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeClusterEndpointVipStatus(request *DescribeClusterEndpointVipStatusRequest) (response *DescribeClusterEndpointVipStatusResponse, err error) {
- return c.DescribeClusterEndpointVipStatusWithContext(context.Background(), request)
- }
-
- // DescribeClusterEndpointVipStatus
- // 查询集群开启端口流程状态(仅支持托管集群外网端口)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_DFWGETUSGCOUNT = "InternalError.DfwGetUSGCount"
- // INTERNALERROR_DFWGETUSGQUOTA = "InternalError.DfwGetUSGQuota"
- // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeClusterEndpointVipStatusWithContext(ctx context.Context, request *DescribeClusterEndpointVipStatusRequest) (response *DescribeClusterEndpointVipStatusResponse, err error) {
- if request == nil {
- request = NewDescribeClusterEndpointVipStatusRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterEndpointVipStatus require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterEndpointVipStatusResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterInstancesRequest() (request *DescribeClusterInstancesRequest) {
- request = &DescribeClusterInstancesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterInstances")
-
- return
- }
-
- func NewDescribeClusterInstancesResponse() (response *DescribeClusterInstancesResponse) {
- response = &DescribeClusterInstancesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterInstances
- //
- // 查询集群下节点实例信息
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- func (c *Client) DescribeClusterInstances(request *DescribeClusterInstancesRequest) (response *DescribeClusterInstancesResponse, err error) {
- return c.DescribeClusterInstancesWithContext(context.Background(), request)
- }
-
- // DescribeClusterInstances
- //
- // 查询集群下节点实例信息
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- func (c *Client) DescribeClusterInstancesWithContext(ctx context.Context, request *DescribeClusterInstancesRequest) (response *DescribeClusterInstancesResponse, err error) {
- if request == nil {
- request = NewDescribeClusterInstancesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterInstances require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterInstancesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterKubeconfigRequest() (request *DescribeClusterKubeconfigRequest) {
- request = &DescribeClusterKubeconfigRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterKubeconfig")
-
- return
- }
-
- func NewDescribeClusterKubeconfigResponse() (response *DescribeClusterKubeconfigResponse) {
- response = &DescribeClusterKubeconfigResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterKubeconfig
- // 获取集群的kubeconfig文件,不同子账户获取自己的kubeconfig文件,该文件中有每个子账户自己的kube-apiserver的客户端证书,默认首次调此接口时候创建客户端证书,时效20年,未授予任何权限,如果是集群所有者或者主账户,则默认是cluster-admin权限。
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection"
- // INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError"
- // INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError"
- // INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- // RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound"
- // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
- func (c *Client) DescribeClusterKubeconfig(request *DescribeClusterKubeconfigRequest) (response *DescribeClusterKubeconfigResponse, err error) {
- return c.DescribeClusterKubeconfigWithContext(context.Background(), request)
- }
-
- // DescribeClusterKubeconfig
- // 获取集群的kubeconfig文件,不同子账户获取自己的kubeconfig文件,该文件中有每个子账户自己的kube-apiserver的客户端证书,默认首次调此接口时候创建客户端证书,时效20年,未授予任何权限,如果是集群所有者或者主账户,则默认是cluster-admin权限。
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_KUBECLIENTCONNECTION = "InternalError.KubeClientConnection"
- // INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError"
- // INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError"
- // INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- // RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound"
- // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
- func (c *Client) DescribeClusterKubeconfigWithContext(ctx context.Context, request *DescribeClusterKubeconfigRequest) (response *DescribeClusterKubeconfigResponse, err error) {
- if request == nil {
- request = NewDescribeClusterKubeconfigRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterKubeconfig require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterKubeconfigResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterNodePoolDetailRequest() (request *DescribeClusterNodePoolDetailRequest) {
- request = &DescribeClusterNodePoolDetailRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterNodePoolDetail")
-
- return
- }
-
- func NewDescribeClusterNodePoolDetailResponse() (response *DescribeClusterNodePoolDetailResponse) {
- response = &DescribeClusterNodePoolDetailResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterNodePoolDetail
- // 查询节点池详情
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- func (c *Client) DescribeClusterNodePoolDetail(request *DescribeClusterNodePoolDetailRequest) (response *DescribeClusterNodePoolDetailResponse, err error) {
- return c.DescribeClusterNodePoolDetailWithContext(context.Background(), request)
- }
-
- // DescribeClusterNodePoolDetail
- // 查询节点池详情
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- func (c *Client) DescribeClusterNodePoolDetailWithContext(ctx context.Context, request *DescribeClusterNodePoolDetailRequest) (response *DescribeClusterNodePoolDetailResponse, err error) {
- if request == nil {
- request = NewDescribeClusterNodePoolDetailRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterNodePoolDetail require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterNodePoolDetailResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterNodePoolsRequest() (request *DescribeClusterNodePoolsRequest) {
- request = &DescribeClusterNodePoolsRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterNodePools")
-
- return
- }
-
- func NewDescribeClusterNodePoolsResponse() (response *DescribeClusterNodePoolsResponse) {
- response = &DescribeClusterNodePoolsResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterNodePools
- // 查询节点池列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- func (c *Client) DescribeClusterNodePools(request *DescribeClusterNodePoolsRequest) (response *DescribeClusterNodePoolsResponse, err error) {
- return c.DescribeClusterNodePoolsWithContext(context.Background(), request)
- }
-
- // DescribeClusterNodePools
- // 查询节点池列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- func (c *Client) DescribeClusterNodePoolsWithContext(ctx context.Context, request *DescribeClusterNodePoolsRequest) (response *DescribeClusterNodePoolsResponse, err error) {
- if request == nil {
- request = NewDescribeClusterNodePoolsRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterNodePools require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterNodePoolsResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterRouteTablesRequest() (request *DescribeClusterRouteTablesRequest) {
- request = &DescribeClusterRouteTablesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterRouteTables")
-
- return
- }
-
- func NewDescribeClusterRouteTablesResponse() (response *DescribeClusterRouteTablesResponse) {
- response = &DescribeClusterRouteTablesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterRouteTables
- // 查询集群路由表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_DB = "InternalError.Db"
- func (c *Client) DescribeClusterRouteTables(request *DescribeClusterRouteTablesRequest) (response *DescribeClusterRouteTablesResponse, err error) {
- return c.DescribeClusterRouteTablesWithContext(context.Background(), request)
- }
-
- // DescribeClusterRouteTables
- // 查询集群路由表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_DB = "InternalError.Db"
- func (c *Client) DescribeClusterRouteTablesWithContext(ctx context.Context, request *DescribeClusterRouteTablesRequest) (response *DescribeClusterRouteTablesResponse, err error) {
- if request == nil {
- request = NewDescribeClusterRouteTablesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterRouteTables require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterRouteTablesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterRoutesRequest() (request *DescribeClusterRoutesRequest) {
- request = &DescribeClusterRoutesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterRoutes")
-
- return
- }
-
- func NewDescribeClusterRoutesResponse() (response *DescribeClusterRoutesResponse) {
- response = &DescribeClusterRoutesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterRoutes
- // 查询集群路由
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) DescribeClusterRoutes(request *DescribeClusterRoutesRequest) (response *DescribeClusterRoutesResponse, err error) {
- return c.DescribeClusterRoutesWithContext(context.Background(), request)
- }
-
- // DescribeClusterRoutes
- // 查询集群路由
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) DescribeClusterRoutesWithContext(ctx context.Context, request *DescribeClusterRoutesRequest) (response *DescribeClusterRoutesResponse, err error) {
- if request == nil {
- request = NewDescribeClusterRoutesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterRoutes require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterRoutesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterSecurityRequest() (request *DescribeClusterSecurityRequest) {
- request = &DescribeClusterSecurityRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterSecurity")
-
- return
- }
-
- func NewDescribeClusterSecurityResponse() (response *DescribeClusterSecurityResponse) {
- response = &DescribeClusterSecurityResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterSecurity
- // 集群的密钥信息
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_LBCOMMON = "InternalError.LbCommon"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- // RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeClusterSecurity(request *DescribeClusterSecurityRequest) (response *DescribeClusterSecurityResponse, err error) {
- return c.DescribeClusterSecurityWithContext(context.Background(), request)
- }
-
- // DescribeClusterSecurity
- // 集群的密钥信息
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_LBCOMMON = "InternalError.LbCommon"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_CIDRINVALID = "InvalidParameter.CidrInvalid"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- // RESOURCENOTFOUND_KUBERESOURCENOTFOUND = "ResourceNotFound.KubeResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeClusterSecurityWithContext(ctx context.Context, request *DescribeClusterSecurityRequest) (response *DescribeClusterSecurityResponse, err error) {
- if request == nil {
- request = NewDescribeClusterSecurityRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterSecurity require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterSecurityResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClusterStatusRequest() (request *DescribeClusterStatusRequest) {
- request = &DescribeClusterStatusRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterStatus")
-
- return
- }
-
- func NewDescribeClusterStatusResponse() (response *DescribeClusterStatusResponse) {
- response = &DescribeClusterStatusResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusterStatus
- // 查看集群状态列表
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // MISSINGPARAMETER = "MissingParameter"
- // UNKNOWNPARAMETER = "UnknownParameter"
- func (c *Client) DescribeClusterStatus(request *DescribeClusterStatusRequest) (response *DescribeClusterStatusResponse, err error) {
- return c.DescribeClusterStatusWithContext(context.Background(), request)
- }
-
- // DescribeClusterStatus
- // 查看集群状态列表
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // MISSINGPARAMETER = "MissingParameter"
- // UNKNOWNPARAMETER = "UnknownParameter"
- func (c *Client) DescribeClusterStatusWithContext(ctx context.Context, request *DescribeClusterStatusRequest) (response *DescribeClusterStatusResponse, err error) {
- if request == nil {
- request = NewDescribeClusterStatusRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusterStatus require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClusterStatusResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeClustersRequest() (request *DescribeClustersRequest) {
- request = &DescribeClustersRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeClusters")
-
- return
- }
-
- func NewDescribeClustersResponse() (response *DescribeClustersResponse) {
- response = &DescribeClustersResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeClusters
- // 查询集群列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
- // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
- // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // LIMITEXCEEDED = "LimitExceeded"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
- func (c *Client) DescribeClusters(request *DescribeClustersRequest) (response *DescribeClustersResponse, err error) {
- return c.DescribeClustersWithContext(context.Background(), request)
- }
-
- // DescribeClusters
- // 查询集群列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_PUBLICCLUSTEROPNOTSUPPORT = "InternalError.PublicClusterOpNotSupport"
- // INTERNALERROR_QUOTAMAXCLSLIMIT = "InternalError.QuotaMaxClsLimit"
- // INTERNALERROR_QUOTAMAXNODLIMIT = "InternalError.QuotaMaxNodLimit"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // LIMITEXCEEDED = "LimitExceeded"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
- func (c *Client) DescribeClustersWithContext(ctx context.Context, request *DescribeClustersRequest) (response *DescribeClustersResponse, err error) {
- if request == nil {
- request = NewDescribeClustersRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeClusters require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeClustersResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeEKSClusterCredentialRequest() (request *DescribeEKSClusterCredentialRequest) {
- request = &DescribeEKSClusterCredentialRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSClusterCredential")
-
- return
- }
-
- func NewDescribeEKSClusterCredentialResponse() (response *DescribeEKSClusterCredentialResponse) {
- response = &DescribeEKSClusterCredentialResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeEKSClusterCredential
- // 获取弹性容器集群的接入认证信息
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeEKSClusterCredential(request *DescribeEKSClusterCredentialRequest) (response *DescribeEKSClusterCredentialResponse, err error) {
- return c.DescribeEKSClusterCredentialWithContext(context.Background(), request)
- }
-
- // DescribeEKSClusterCredential
- // 获取弹性容器集群的接入认证信息
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeEKSClusterCredentialWithContext(ctx context.Context, request *DescribeEKSClusterCredentialRequest) (response *DescribeEKSClusterCredentialResponse, err error) {
- if request == nil {
- request = NewDescribeEKSClusterCredentialRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeEKSClusterCredential require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeEKSClusterCredentialResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeEKSClustersRequest() (request *DescribeEKSClustersRequest) {
- request = &DescribeEKSClustersRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSClusters")
-
- return
- }
-
- func NewDescribeEKSClustersResponse() (response *DescribeEKSClustersResponse) {
- response = &DescribeEKSClustersResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeEKSClusters
- // 查询弹性集群列表
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeEKSClusters(request *DescribeEKSClustersRequest) (response *DescribeEKSClustersResponse, err error) {
- return c.DescribeEKSClustersWithContext(context.Background(), request)
- }
-
- // DescribeEKSClusters
- // 查询弹性集群列表
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeEKSClustersWithContext(ctx context.Context, request *DescribeEKSClustersRequest) (response *DescribeEKSClustersResponse, err error) {
- if request == nil {
- request = NewDescribeEKSClustersRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeEKSClusters require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeEKSClustersResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeEKSContainerInstanceEventRequest() (request *DescribeEKSContainerInstanceEventRequest) {
- request = &DescribeEKSContainerInstanceEventRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstanceEvent")
-
- return
- }
-
- func NewDescribeEKSContainerInstanceEventResponse() (response *DescribeEKSContainerInstanceEventResponse) {
- response = &DescribeEKSContainerInstanceEventResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeEKSContainerInstanceEvent
- // 查询容器实例的事件
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // RESOURCEINSUFFICIENT = "ResourceInsufficient"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // RESOURCESSOLDOUT = "ResourcesSoldOut"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeEKSContainerInstanceEvent(request *DescribeEKSContainerInstanceEventRequest) (response *DescribeEKSContainerInstanceEventResponse, err error) {
- return c.DescribeEKSContainerInstanceEventWithContext(context.Background(), request)
- }
-
- // DescribeEKSContainerInstanceEvent
- // 查询容器实例的事件
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // RESOURCEINSUFFICIENT = "ResourceInsufficient"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // RESOURCESSOLDOUT = "ResourcesSoldOut"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeEKSContainerInstanceEventWithContext(ctx context.Context, request *DescribeEKSContainerInstanceEventRequest) (response *DescribeEKSContainerInstanceEventResponse, err error) {
- if request == nil {
- request = NewDescribeEKSContainerInstanceEventRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeEKSContainerInstanceEvent require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeEKSContainerInstanceEventResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeEKSContainerInstanceRegionsRequest() (request *DescribeEKSContainerInstanceRegionsRequest) {
- request = &DescribeEKSContainerInstanceRegionsRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstanceRegions")
-
- return
- }
-
- func NewDescribeEKSContainerInstanceRegionsResponse() (response *DescribeEKSContainerInstanceRegionsResponse) {
- response = &DescribeEKSContainerInstanceRegionsResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeEKSContainerInstanceRegions
- // 查询容器实例支持的地域
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) DescribeEKSContainerInstanceRegions(request *DescribeEKSContainerInstanceRegionsRequest) (response *DescribeEKSContainerInstanceRegionsResponse, err error) {
- return c.DescribeEKSContainerInstanceRegionsWithContext(context.Background(), request)
- }
-
- // DescribeEKSContainerInstanceRegions
- // 查询容器实例支持的地域
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) DescribeEKSContainerInstanceRegionsWithContext(ctx context.Context, request *DescribeEKSContainerInstanceRegionsRequest) (response *DescribeEKSContainerInstanceRegionsResponse, err error) {
- if request == nil {
- request = NewDescribeEKSContainerInstanceRegionsRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeEKSContainerInstanceRegions require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeEKSContainerInstanceRegionsResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeEKSContainerInstancesRequest() (request *DescribeEKSContainerInstancesRequest) {
- request = &DescribeEKSContainerInstancesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstances")
-
- return
- }
-
- func NewDescribeEKSContainerInstancesResponse() (response *DescribeEKSContainerInstancesResponse) {
- response = &DescribeEKSContainerInstancesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeEKSContainerInstances
- // 查询容器实例
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden"
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // RESOURCENOTFOUND = "ResourceNotFound"
- func DescribeEKSContainerInstances(request *DescribeEKSContainerInstancesRequest) (response *DescribeEKSContainerInstancesResponse, err error) {
- provider := pbtenant.CloudProvider(request.ProviderId)
- EksCis := make([]*EksCi, 0)
- //trans Tencent request to PCM request
- requestPCM := &pbpod.ListPodReq{
- RequestSource: "tencent",
- Provider: provider,
- Namespace: "pcm",
- }
-
- resp, err := server.ListPod(nil, requestPCM)
- if err != nil {
- return nil, err
- }
- //trans PCM response pod set to Tencent EksCis set
- for k := range resp.Pods {
- EksCi := new(EksCi)
- EksCi.EksCiId = &resp.Pods[k].PodId
- EksCi.EksCiName = &resp.Pods[k].PodName
- EksCis = append(EksCis, EksCi)
- }
- _totalCount := uint64(len(resp.Pods))
- _requestId := ""
- response = &DescribeEKSContainerInstancesResponse{
- Response: (*struct {
- TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`
- EksCis []*EksCi `json:"EksCis,omitempty" name:"EksCis"`
- RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
- })(&struct {
- TotalCount *uint64
- EksCis []*EksCi
- RequestId *string
- }{
- TotalCount: &_totalCount,
- EksCis: EksCis,
- RequestId: &_requestId,
- }),
- BaseResponse: &tchttp.BaseResponse{},
- }
- return response, nil
- }
-
- // DescribeEKSContainerInstances
- // 查询容器实例
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden"
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // RESOURCENOTFOUND = "ResourceNotFound"
- func (c *Client) DescribeEKSContainerInstancesWithContext(ctx context.Context, request *DescribeEKSContainerInstancesRequest) (response *DescribeEKSContainerInstancesResponse, err error) {
- if request == nil {
- request = NewDescribeEKSContainerInstancesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeEKSContainerInstances require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeEKSContainerInstancesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeEksContainerInstanceLogRequest() (request *DescribeEksContainerInstanceLogRequest) {
- request = &DescribeEksContainerInstanceLogRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeEksContainerInstanceLog")
-
- return
- }
-
- func NewDescribeEksContainerInstanceLogResponse() (response *DescribeEksContainerInstanceLogResponse) {
- response = &DescribeEksContainerInstanceLogResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeEksContainerInstanceLog
- // 查询容器实例中容器日志
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus"
- func (c *Client) DescribeEksContainerInstanceLog(request *DescribeEksContainerInstanceLogRequest) (response *DescribeEksContainerInstanceLogResponse, err error) {
- return c.DescribeEksContainerInstanceLogWithContext(context.Background(), request)
- }
-
- // DescribeEksContainerInstanceLog
- // 查询容器实例中容器日志
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus"
- func (c *Client) DescribeEksContainerInstanceLogWithContext(ctx context.Context, request *DescribeEksContainerInstanceLogRequest) (response *DescribeEksContainerInstanceLogResponse, err error) {
- if request == nil {
- request = NewDescribeEksContainerInstanceLogRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeEksContainerInstanceLog require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeEksContainerInstanceLogResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeEnableVpcCniProgressRequest() (request *DescribeEnableVpcCniProgressRequest) {
- request = &DescribeEnableVpcCniProgressRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeEnableVpcCniProgress")
-
- return
- }
-
- func NewDescribeEnableVpcCniProgressResponse() (response *DescribeEnableVpcCniProgressResponse) {
- response = &DescribeEnableVpcCniProgressResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeEnableVpcCniProgress
- // 本接口用于查询开启vpc-cni模式的任务进度
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- func (c *Client) DescribeEnableVpcCniProgress(request *DescribeEnableVpcCniProgressRequest) (response *DescribeEnableVpcCniProgressResponse, err error) {
- return c.DescribeEnableVpcCniProgressWithContext(context.Background(), request)
- }
-
- // DescribeEnableVpcCniProgress
- // 本接口用于查询开启vpc-cni模式的任务进度
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- func (c *Client) DescribeEnableVpcCniProgressWithContext(ctx context.Context, request *DescribeEnableVpcCniProgressRequest) (response *DescribeEnableVpcCniProgressResponse, err error) {
- if request == nil {
- request = NewDescribeEnableVpcCniProgressRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeEnableVpcCniProgress require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeEnableVpcCniProgressResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeExistedInstancesRequest() (request *DescribeExistedInstancesRequest) {
- request = &DescribeExistedInstancesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeExistedInstances")
-
- return
- }
-
- func NewDescribeExistedInstancesResponse() (response *DescribeExistedInstancesResponse) {
- response = &DescribeExistedInstancesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeExistedInstances
- // 查询已经存在的节点,判断是否可以加入集群
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
- // INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed"
- // INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr"
- // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeExistedInstances(request *DescribeExistedInstancesRequest) (response *DescribeExistedInstancesResponse, err error) {
- return c.DescribeExistedInstancesWithContext(context.Background(), request)
- }
-
- // DescribeExistedInstances
- // 查询已经存在的节点,判断是否可以加入集群
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
- // INTERNALERROR_INITMASTERFAILED = "InternalError.InitMasterFailed"
- // INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr"
- // INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_VPCCOMMON = "InternalError.VpcCommon"
- // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeExistedInstancesWithContext(ctx context.Context, request *DescribeExistedInstancesRequest) (response *DescribeExistedInstancesResponse, err error) {
- if request == nil {
- request = NewDescribeExistedInstancesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeExistedInstances require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeExistedInstancesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeExternalClusterSpecRequest() (request *DescribeExternalClusterSpecRequest) {
- request = &DescribeExternalClusterSpecRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeExternalClusterSpec")
-
- return
- }
-
- func NewDescribeExternalClusterSpecResponse() (response *DescribeExternalClusterSpecResponse) {
- response = &DescribeExternalClusterSpecResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeExternalClusterSpec
- // 获取导入第三方集群YAML定义
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError"
- // INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError"
- // INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- // RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
- func (c *Client) DescribeExternalClusterSpec(request *DescribeExternalClusterSpecRequest) (response *DescribeExternalClusterSpecResponse, err error) {
- return c.DescribeExternalClusterSpecWithContext(context.Background(), request)
- }
-
- // DescribeExternalClusterSpec
- // 获取导入第三方集群YAML定义
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError"
- // INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError"
- // INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- // RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
- func (c *Client) DescribeExternalClusterSpecWithContext(ctx context.Context, request *DescribeExternalClusterSpecRequest) (response *DescribeExternalClusterSpecResponse, err error) {
- if request == nil {
- request = NewDescribeExternalClusterSpecRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeExternalClusterSpec require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeExternalClusterSpecResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeImageCachesRequest() (request *DescribeImageCachesRequest) {
- request = &DescribeImageCachesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeImageCaches")
-
- return
- }
-
- func NewDescribeImageCachesResponse() (response *DescribeImageCachesResponse) {
- response = &DescribeImageCachesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeImageCaches
- // 查询镜像缓存信息接口
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) DescribeImageCaches(request *DescribeImageCachesRequest) (response *DescribeImageCachesResponse, err error) {
- return c.DescribeImageCachesWithContext(context.Background(), request)
- }
-
- // DescribeImageCaches
- // 查询镜像缓存信息接口
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) DescribeImageCachesWithContext(ctx context.Context, request *DescribeImageCachesRequest) (response *DescribeImageCachesResponse, err error) {
- if request == nil {
- request = NewDescribeImageCachesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeImageCaches require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeImageCachesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeImagesRequest() (request *DescribeImagesRequest) {
- request = &DescribeImagesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeImages")
-
- return
- }
-
- func NewDescribeImagesResponse() (response *DescribeImagesResponse) {
- response = &DescribeImagesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeImages
- // 获取镜像信息
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeImages(request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) {
- return c.DescribeImagesWithContext(context.Background(), request)
- }
-
- // DescribeImages
- // 获取镜像信息
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeImagesWithContext(ctx context.Context, request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) {
- if request == nil {
- request = NewDescribeImagesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeImages require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeImagesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribePrometheusAgentInstancesRequest() (request *DescribePrometheusAgentInstancesRequest) {
- request = &DescribePrometheusAgentInstancesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAgentInstances")
-
- return
- }
-
- func NewDescribePrometheusAgentInstancesResponse() (response *DescribePrometheusAgentInstancesResponse) {
- response = &DescribePrometheusAgentInstancesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribePrometheusAgentInstances
- // 获取关联目标集群的实例列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) DescribePrometheusAgentInstances(request *DescribePrometheusAgentInstancesRequest) (response *DescribePrometheusAgentInstancesResponse, err error) {
- return c.DescribePrometheusAgentInstancesWithContext(context.Background(), request)
- }
-
- // DescribePrometheusAgentInstances
- // 获取关联目标集群的实例列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) DescribePrometheusAgentInstancesWithContext(ctx context.Context, request *DescribePrometheusAgentInstancesRequest) (response *DescribePrometheusAgentInstancesResponse, err error) {
- if request == nil {
- request = NewDescribePrometheusAgentInstancesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribePrometheusAgentInstances require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribePrometheusAgentInstancesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribePrometheusAgentsRequest() (request *DescribePrometheusAgentsRequest) {
- request = &DescribePrometheusAgentsRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAgents")
-
- return
- }
-
- func NewDescribePrometheusAgentsResponse() (response *DescribePrometheusAgentsResponse) {
- response = &DescribePrometheusAgentsResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribePrometheusAgents
- // 获取被关联集群列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) DescribePrometheusAgents(request *DescribePrometheusAgentsRequest) (response *DescribePrometheusAgentsResponse, err error) {
- return c.DescribePrometheusAgentsWithContext(context.Background(), request)
- }
-
- // DescribePrometheusAgents
- // 获取被关联集群列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) DescribePrometheusAgentsWithContext(ctx context.Context, request *DescribePrometheusAgentsRequest) (response *DescribePrometheusAgentsResponse, err error) {
- if request == nil {
- request = NewDescribePrometheusAgentsRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribePrometheusAgents require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribePrometheusAgentsResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribePrometheusAlertHistoryRequest() (request *DescribePrometheusAlertHistoryRequest) {
- request = &DescribePrometheusAlertHistoryRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAlertHistory")
-
- return
- }
-
- func NewDescribePrometheusAlertHistoryResponse() (response *DescribePrometheusAlertHistoryResponse) {
- response = &DescribePrometheusAlertHistoryResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribePrometheusAlertHistory
- // 获取告警历史
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
- func (c *Client) DescribePrometheusAlertHistory(request *DescribePrometheusAlertHistoryRequest) (response *DescribePrometheusAlertHistoryResponse, err error) {
- return c.DescribePrometheusAlertHistoryWithContext(context.Background(), request)
- }
-
- // DescribePrometheusAlertHistory
- // 获取告警历史
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
- func (c *Client) DescribePrometheusAlertHistoryWithContext(ctx context.Context, request *DescribePrometheusAlertHistoryRequest) (response *DescribePrometheusAlertHistoryResponse, err error) {
- if request == nil {
- request = NewDescribePrometheusAlertHistoryRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribePrometheusAlertHistory require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribePrometheusAlertHistoryResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribePrometheusAlertRuleRequest() (request *DescribePrometheusAlertRuleRequest) {
- request = &DescribePrometheusAlertRuleRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusAlertRule")
-
- return
- }
-
- func NewDescribePrometheusAlertRuleResponse() (response *DescribePrometheusAlertRuleResponse) {
- response = &DescribePrometheusAlertRuleResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribePrometheusAlertRule
- // 获取告警规则列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
- func (c *Client) DescribePrometheusAlertRule(request *DescribePrometheusAlertRuleRequest) (response *DescribePrometheusAlertRuleResponse, err error) {
- return c.DescribePrometheusAlertRuleWithContext(context.Background(), request)
- }
-
- // DescribePrometheusAlertRule
- // 获取告警规则列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
- func (c *Client) DescribePrometheusAlertRuleWithContext(ctx context.Context, request *DescribePrometheusAlertRuleRequest) (response *DescribePrometheusAlertRuleResponse, err error) {
- if request == nil {
- request = NewDescribePrometheusAlertRuleRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribePrometheusAlertRule require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribePrometheusAlertRuleResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribePrometheusInstanceRequest() (request *DescribePrometheusInstanceRequest) {
- request = &DescribePrometheusInstanceRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusInstance")
-
- return
- }
-
- func NewDescribePrometheusInstanceResponse() (response *DescribePrometheusInstanceResponse) {
- response = &DescribePrometheusInstanceResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribePrometheusInstance
- // 获取实例详细信息
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
- func (c *Client) DescribePrometheusInstance(request *DescribePrometheusInstanceRequest) (response *DescribePrometheusInstanceResponse, err error) {
- return c.DescribePrometheusInstanceWithContext(context.Background(), request)
- }
-
- // DescribePrometheusInstance
- // 获取实例详细信息
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
- func (c *Client) DescribePrometheusInstanceWithContext(ctx context.Context, request *DescribePrometheusInstanceRequest) (response *DescribePrometheusInstanceResponse, err error) {
- if request == nil {
- request = NewDescribePrometheusInstanceRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribePrometheusInstance require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribePrometheusInstanceResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribePrometheusOverviewsRequest() (request *DescribePrometheusOverviewsRequest) {
- request = &DescribePrometheusOverviewsRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusOverviews")
-
- return
- }
-
- func NewDescribePrometheusOverviewsResponse() (response *DescribePrometheusOverviewsResponse) {
- response = &DescribePrometheusOverviewsResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribePrometheusOverviews
- // 获取实例列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- func (c *Client) DescribePrometheusOverviews(request *DescribePrometheusOverviewsRequest) (response *DescribePrometheusOverviewsResponse, err error) {
- return c.DescribePrometheusOverviewsWithContext(context.Background(), request)
- }
-
- // DescribePrometheusOverviews
- // 获取实例列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- func (c *Client) DescribePrometheusOverviewsWithContext(ctx context.Context, request *DescribePrometheusOverviewsRequest) (response *DescribePrometheusOverviewsResponse, err error) {
- if request == nil {
- request = NewDescribePrometheusOverviewsRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribePrometheusOverviews require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribePrometheusOverviewsResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribePrometheusTargetsRequest() (request *DescribePrometheusTargetsRequest) {
- request = &DescribePrometheusTargetsRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTargets")
-
- return
- }
-
- func NewDescribePrometheusTargetsResponse() (response *DescribePrometheusTargetsResponse) {
- response = &DescribePrometheusTargetsResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribePrometheusTargets
- // 获取targets信息
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound"
- // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
- func (c *Client) DescribePrometheusTargets(request *DescribePrometheusTargetsRequest) (response *DescribePrometheusTargetsResponse, err error) {
- return c.DescribePrometheusTargetsWithContext(context.Background(), request)
- }
-
- // DescribePrometheusTargets
- // 获取targets信息
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound"
- // INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound"
- // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
- func (c *Client) DescribePrometheusTargetsWithContext(ctx context.Context, request *DescribePrometheusTargetsRequest) (response *DescribePrometheusTargetsResponse, err error) {
- if request == nil {
- request = NewDescribePrometheusTargetsRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribePrometheusTargets require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribePrometheusTargetsResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribePrometheusTemplateSyncRequest() (request *DescribePrometheusTemplateSyncRequest) {
- request = &DescribePrometheusTemplateSyncRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTemplateSync")
-
- return
- }
-
- func NewDescribePrometheusTemplateSyncResponse() (response *DescribePrometheusTemplateSyncResponse) {
- response = &DescribePrometheusTemplateSyncResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribePrometheusTemplateSync
- // 获取模板同步信息
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
- func (c *Client) DescribePrometheusTemplateSync(request *DescribePrometheusTemplateSyncRequest) (response *DescribePrometheusTemplateSyncResponse, err error) {
- return c.DescribePrometheusTemplateSyncWithContext(context.Background(), request)
- }
-
- // DescribePrometheusTemplateSync
- // 获取模板同步信息
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
- func (c *Client) DescribePrometheusTemplateSyncWithContext(ctx context.Context, request *DescribePrometheusTemplateSyncRequest) (response *DescribePrometheusTemplateSyncResponse, err error) {
- if request == nil {
- request = NewDescribePrometheusTemplateSyncRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribePrometheusTemplateSync require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribePrometheusTemplateSyncResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribePrometheusTemplatesRequest() (request *DescribePrometheusTemplatesRequest) {
- request = &DescribePrometheusTemplatesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribePrometheusTemplates")
-
- return
- }
-
- func NewDescribePrometheusTemplatesResponse() (response *DescribePrometheusTemplatesResponse) {
- response = &DescribePrometheusTemplatesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribePrometheusTemplates
- // 拉取模板列表,默认模板将总是在最前面
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- func (c *Client) DescribePrometheusTemplates(request *DescribePrometheusTemplatesRequest) (response *DescribePrometheusTemplatesResponse, err error) {
- return c.DescribePrometheusTemplatesWithContext(context.Background(), request)
- }
-
- // DescribePrometheusTemplates
- // 拉取模板列表,默认模板将总是在最前面
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- func (c *Client) DescribePrometheusTemplatesWithContext(ctx context.Context, request *DescribePrometheusTemplatesRequest) (response *DescribePrometheusTemplatesResponse, err error) {
- if request == nil {
- request = NewDescribePrometheusTemplatesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribePrometheusTemplates require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribePrometheusTemplatesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeRegionsRequest() (request *DescribeRegionsRequest) {
- request = &DescribeRegionsRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeRegions")
-
- return
- }
-
- func NewDescribeRegionsResponse() (response *DescribeRegionsResponse) {
- response = &DescribeRegionsResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeRegions
- // 获取容器服务支持的所有地域
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) {
- return c.DescribeRegionsWithContext(context.Background(), request)
- }
-
- // DescribeRegions
- // 获取容器服务支持的所有地域
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeRegionsWithContext(ctx context.Context, request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) {
- if request == nil {
- request = NewDescribeRegionsRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeRegions require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeRegionsResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeRouteTableConflictsRequest() (request *DescribeRouteTableConflictsRequest) {
- request = &DescribeRouteTableConflictsRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeRouteTableConflicts")
-
- return
- }
-
- func NewDescribeRouteTableConflictsResponse() (response *DescribeRouteTableConflictsResponse) {
- response = &DescribeRouteTableConflictsResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeRouteTableConflicts
- // 查询路由表冲突列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange"
- // INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) DescribeRouteTableConflicts(request *DescribeRouteTableConflictsRequest) (response *DescribeRouteTableConflictsResponse, err error) {
- return c.DescribeRouteTableConflictsWithContext(context.Background(), request)
- }
-
- // DescribeRouteTableConflicts
- // 查询路由表冲突列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CIDRMASKSIZEOUTOFRANGE = "InternalError.CidrMaskSizeOutOfRange"
- // INTERNALERROR_INVALIDPRIVATENETWORKCIDR = "InternalError.InvalidPrivateNetworkCidr"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_VPCRECODRNOTFOUND = "InternalError.VpcRecodrNotFound"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) DescribeRouteTableConflictsWithContext(ctx context.Context, request *DescribeRouteTableConflictsRequest) (response *DescribeRouteTableConflictsResponse, err error) {
- if request == nil {
- request = NewDescribeRouteTableConflictsRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeRouteTableConflicts require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeRouteTableConflictsResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeTKEEdgeScriptRequest() (request *DescribeTKEEdgeScriptRequest) {
- request = &DescribeTKEEdgeScriptRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeTKEEdgeScript")
-
- return
- }
-
- func NewDescribeTKEEdgeScriptResponse() (response *DescribeTKEEdgeScriptResponse) {
- response = &DescribeTKEEdgeScriptResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeTKEEdgeScript
- // 获取边缘脚本链接
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeTKEEdgeScript(request *DescribeTKEEdgeScriptRequest) (response *DescribeTKEEdgeScriptResponse, err error) {
- return c.DescribeTKEEdgeScriptWithContext(context.Background(), request)
- }
-
- // DescribeTKEEdgeScript
- // 获取边缘脚本链接
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeTKEEdgeScriptWithContext(ctx context.Context, request *DescribeTKEEdgeScriptRequest) (response *DescribeTKEEdgeScriptResponse, err error) {
- if request == nil {
- request = NewDescribeTKEEdgeScriptRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeTKEEdgeScript require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeTKEEdgeScriptResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeVersionsRequest() (request *DescribeVersionsRequest) {
- request = &DescribeVersionsRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeVersions")
-
- return
- }
-
- func NewDescribeVersionsResponse() (response *DescribeVersionsResponse) {
- response = &DescribeVersionsResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeVersions
- // 获取集群版本信息
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeVersions(request *DescribeVersionsRequest) (response *DescribeVersionsResponse, err error) {
- return c.DescribeVersionsWithContext(context.Background(), request)
- }
-
- // DescribeVersions
- // 获取集群版本信息
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeVersionsWithContext(ctx context.Context, request *DescribeVersionsRequest) (response *DescribeVersionsResponse, err error) {
- if request == nil {
- request = NewDescribeVersionsRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeVersions require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeVersionsResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDescribeVpcCniPodLimitsRequest() (request *DescribeVpcCniPodLimitsRequest) {
- request = &DescribeVpcCniPodLimitsRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DescribeVpcCniPodLimits")
-
- return
- }
-
- func NewDescribeVpcCniPodLimitsResponse() (response *DescribeVpcCniPodLimitsResponse) {
- response = &DescribeVpcCniPodLimitsResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DescribeVpcCniPodLimits
- // 本接口查询当前用户和地域在指定可用区下的机型可支持的最大 TKE VPC-CNI 网络模式的 Pod 数量
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // MISSINGPARAMETER = "MissingParameter"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeVpcCniPodLimits(request *DescribeVpcCniPodLimitsRequest) (response *DescribeVpcCniPodLimitsResponse, err error) {
- return c.DescribeVpcCniPodLimitsWithContext(context.Background(), request)
- }
-
- // DescribeVpcCniPodLimits
- // 本接口查询当前用户和地域在指定可用区下的机型可支持的最大 TKE VPC-CNI 网络模式的 Pod 数量
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // MISSINGPARAMETER = "MissingParameter"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) DescribeVpcCniPodLimitsWithContext(ctx context.Context, request *DescribeVpcCniPodLimitsRequest) (response *DescribeVpcCniPodLimitsResponse, err error) {
- if request == nil {
- request = NewDescribeVpcCniPodLimitsRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DescribeVpcCniPodLimits require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDescribeVpcCniPodLimitsResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDisableClusterDeletionProtectionRequest() (request *DisableClusterDeletionProtectionRequest) {
- request = &DisableClusterDeletionProtectionRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DisableClusterDeletionProtection")
-
- return
- }
-
- func NewDisableClusterDeletionProtectionResponse() (response *DisableClusterDeletionProtectionResponse) {
- response = &DisableClusterDeletionProtectionResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DisableClusterDeletionProtection
- // 关闭集群删除保护
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) DisableClusterDeletionProtection(request *DisableClusterDeletionProtectionRequest) (response *DisableClusterDeletionProtectionResponse, err error) {
- return c.DisableClusterDeletionProtectionWithContext(context.Background(), request)
- }
-
- // DisableClusterDeletionProtection
- // 关闭集群删除保护
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) DisableClusterDeletionProtectionWithContext(ctx context.Context, request *DisableClusterDeletionProtectionRequest) (response *DisableClusterDeletionProtectionResponse, err error) {
- if request == nil {
- request = NewDisableClusterDeletionProtectionRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DisableClusterDeletionProtection require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDisableClusterDeletionProtectionResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewDisableVpcCniNetworkTypeRequest() (request *DisableVpcCniNetworkTypeRequest) {
- request = &DisableVpcCniNetworkTypeRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "DisableVpcCniNetworkType")
-
- return
- }
-
- func NewDisableVpcCniNetworkTypeResponse() (response *DisableVpcCniNetworkTypeResponse) {
- response = &DisableVpcCniNetworkTypeResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // DisableVpcCniNetworkType
- // 提供给附加了VPC-CNI能力的Global-Route集群关闭VPC-CNI
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) DisableVpcCniNetworkType(request *DisableVpcCniNetworkTypeRequest) (response *DisableVpcCniNetworkTypeResponse, err error) {
- return c.DisableVpcCniNetworkTypeWithContext(context.Background(), request)
- }
-
- // DisableVpcCniNetworkType
- // 提供给附加了VPC-CNI能力的Global-Route集群关闭VPC-CNI
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_KUBECLIENTCREATE = "InternalError.KubeClientCreate"
- // INTERNALERROR_KUBECOMMON = "InternalError.KubeCommon"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) DisableVpcCniNetworkTypeWithContext(ctx context.Context, request *DisableVpcCniNetworkTypeRequest) (response *DisableVpcCniNetworkTypeResponse, err error) {
- if request == nil {
- request = NewDisableVpcCniNetworkTypeRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("DisableVpcCniNetworkType require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewDisableVpcCniNetworkTypeResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewEnableClusterDeletionProtectionRequest() (request *EnableClusterDeletionProtectionRequest) {
- request = &EnableClusterDeletionProtectionRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "EnableClusterDeletionProtection")
-
- return
- }
-
- func NewEnableClusterDeletionProtectionResponse() (response *EnableClusterDeletionProtectionResponse) {
- response = &EnableClusterDeletionProtectionResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // EnableClusterDeletionProtection
- // 启用集群删除保护
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) EnableClusterDeletionProtection(request *EnableClusterDeletionProtectionRequest) (response *EnableClusterDeletionProtectionResponse, err error) {
- return c.EnableClusterDeletionProtectionWithContext(context.Background(), request)
- }
-
- // EnableClusterDeletionProtection
- // 启用集群删除保护
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) EnableClusterDeletionProtectionWithContext(ctx context.Context, request *EnableClusterDeletionProtectionRequest) (response *EnableClusterDeletionProtectionResponse, err error) {
- if request == nil {
- request = NewEnableClusterDeletionProtectionRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("EnableClusterDeletionProtection require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewEnableClusterDeletionProtectionResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewEnableVpcCniNetworkTypeRequest() (request *EnableVpcCniNetworkTypeRequest) {
- request = &EnableVpcCniNetworkTypeRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "EnableVpcCniNetworkType")
-
- return
- }
-
- func NewEnableVpcCniNetworkTypeResponse() (response *EnableVpcCniNetworkTypeResponse) {
- response = &EnableVpcCniNetworkTypeResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // EnableVpcCniNetworkType
- // GR集群可以通过本接口附加vpc-cni容器网络插件,开启vpc-cni容器网络能力
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) EnableVpcCniNetworkType(request *EnableVpcCniNetworkTypeRequest) (response *EnableVpcCniNetworkTypeResponse, err error) {
- return c.EnableVpcCniNetworkTypeWithContext(context.Background(), request)
- }
-
- // EnableVpcCniNetworkType
- // GR集群可以通过本接口附加vpc-cni容器网络插件,开启vpc-cni容器网络能力
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) EnableVpcCniNetworkTypeWithContext(ctx context.Context, request *EnableVpcCniNetworkTypeRequest) (response *EnableVpcCniNetworkTypeResponse, err error) {
- if request == nil {
- request = NewEnableVpcCniNetworkTypeRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("EnableVpcCniNetworkType require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewEnableVpcCniNetworkTypeResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewForwardApplicationRequestV3Request() (request *ForwardApplicationRequestV3Request) {
- request = &ForwardApplicationRequestV3Request{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "ForwardApplicationRequestV3")
-
- return
- }
-
- func NewForwardApplicationRequestV3Response() (response *ForwardApplicationRequestV3Response) {
- response = &ForwardApplicationRequestV3Response{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // ForwardApplicationRequestV3
- // 操作TKE集群的addon
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- // UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist"
- func (c *Client) ForwardApplicationRequestV3(request *ForwardApplicationRequestV3Request) (response *ForwardApplicationRequestV3Response, err error) {
- return c.ForwardApplicationRequestV3WithContext(context.Background(), request)
- }
-
- // ForwardApplicationRequestV3
- // 操作TKE集群的addon
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- // UNSUPPORTEDOPERATION_NOTINWHITELIST = "UnsupportedOperation.NotInWhitelist"
- func (c *Client) ForwardApplicationRequestV3WithContext(ctx context.Context, request *ForwardApplicationRequestV3Request) (response *ForwardApplicationRequestV3Response, err error) {
- if request == nil {
- request = NewForwardApplicationRequestV3Request()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("ForwardApplicationRequestV3 require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewForwardApplicationRequestV3Response()
- err = c.Send(request, response)
- return
- }
-
- func NewGetMostSuitableImageCacheRequest() (request *GetMostSuitableImageCacheRequest) {
- request = &GetMostSuitableImageCacheRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "GetMostSuitableImageCache")
-
- return
- }
-
- func NewGetMostSuitableImageCacheResponse() (response *GetMostSuitableImageCacheResponse) {
- response = &GetMostSuitableImageCacheResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // GetMostSuitableImageCache
- // 根据镜像列表,查询匹配的镜像缓存
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) GetMostSuitableImageCache(request *GetMostSuitableImageCacheRequest) (response *GetMostSuitableImageCacheResponse, err error) {
- return c.GetMostSuitableImageCacheWithContext(context.Background(), request)
- }
-
- // GetMostSuitableImageCache
- // 根据镜像列表,查询匹配的镜像缓存
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) GetMostSuitableImageCacheWithContext(ctx context.Context, request *GetMostSuitableImageCacheRequest) (response *GetMostSuitableImageCacheResponse, err error) {
- if request == nil {
- request = NewGetMostSuitableImageCacheRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("GetMostSuitableImageCache require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewGetMostSuitableImageCacheResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewGetTkeAppChartListRequest() (request *GetTkeAppChartListRequest) {
- request = &GetTkeAppChartListRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "GetTkeAppChartList")
-
- return
- }
-
- func NewGetTkeAppChartListResponse() (response *GetTkeAppChartListResponse) {
- response = &GetTkeAppChartListResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // GetTkeAppChartList
- // 获取TKE支持的App列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) GetTkeAppChartList(request *GetTkeAppChartListRequest) (response *GetTkeAppChartListResponse, err error) {
- return c.GetTkeAppChartListWithContext(context.Background(), request)
- }
-
- // GetTkeAppChartList
- // 获取TKE支持的App列表
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- func (c *Client) GetTkeAppChartListWithContext(ctx context.Context, request *GetTkeAppChartListRequest) (response *GetTkeAppChartListResponse, err error) {
- if request == nil {
- request = NewGetTkeAppChartListRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("GetTkeAppChartList require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewGetTkeAppChartListResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewGetUpgradeInstanceProgressRequest() (request *GetUpgradeInstanceProgressRequest) {
- request = &GetUpgradeInstanceProgressRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "GetUpgradeInstanceProgress")
-
- return
- }
-
- func NewGetUpgradeInstanceProgressResponse() (response *GetUpgradeInstanceProgressResponse) {
- response = &GetUpgradeInstanceProgressResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // GetUpgradeInstanceProgress
- // 获得节点升级当前的进度
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) GetUpgradeInstanceProgress(request *GetUpgradeInstanceProgressRequest) (response *GetUpgradeInstanceProgressResponse, err error) {
- return c.GetUpgradeInstanceProgressWithContext(context.Background(), request)
- }
-
- // GetUpgradeInstanceProgress
- // 获得节点升级当前的进度
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) GetUpgradeInstanceProgressWithContext(ctx context.Context, request *GetUpgradeInstanceProgressRequest) (response *GetUpgradeInstanceProgressResponse, err error) {
- if request == nil {
- request = NewGetUpgradeInstanceProgressRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("GetUpgradeInstanceProgress require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewGetUpgradeInstanceProgressResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewModifyClusterAsGroupAttributeRequest() (request *ModifyClusterAsGroupAttributeRequest) {
- request = &ModifyClusterAsGroupAttributeRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAsGroupAttribute")
-
- return
- }
-
- func NewModifyClusterAsGroupAttributeResponse() (response *ModifyClusterAsGroupAttributeResponse) {
- response = &ModifyClusterAsGroupAttributeResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // ModifyClusterAsGroupAttribute
- // 修改集群伸缩组属性
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
- // INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable"
- // INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) ModifyClusterAsGroupAttribute(request *ModifyClusterAsGroupAttributeRequest) (response *ModifyClusterAsGroupAttributeResponse, err error) {
- return c.ModifyClusterAsGroupAttributeWithContext(context.Background(), request)
- }
-
- // ModifyClusterAsGroupAttribute
- // 修改集群伸缩组属性
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_ASCOMMONERROR = "InvalidParameter.AsCommonError"
- // INVALIDPARAMETER_CIDROUTOFROUTETABLE = "InvalidParameter.CidrOutOfRouteTable"
- // INVALIDPARAMETER_GATEWAYALREADYASSOCIATEDCIDR = "InvalidParameter.GatewayAlreadyAssociatedCidr"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_ROUTETABLENOTEMPTY = "InvalidParameter.RouteTableNotEmpty"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) ModifyClusterAsGroupAttributeWithContext(ctx context.Context, request *ModifyClusterAsGroupAttributeRequest) (response *ModifyClusterAsGroupAttributeResponse, err error) {
- if request == nil {
- request = NewModifyClusterAsGroupAttributeRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("ModifyClusterAsGroupAttribute require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewModifyClusterAsGroupAttributeResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewModifyClusterAsGroupOptionAttributeRequest() (request *ModifyClusterAsGroupOptionAttributeRequest) {
- request = &ModifyClusterAsGroupOptionAttributeRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAsGroupOptionAttribute")
-
- return
- }
-
- func NewModifyClusterAsGroupOptionAttributeResponse() (response *ModifyClusterAsGroupOptionAttributeResponse) {
- response = &ModifyClusterAsGroupOptionAttributeResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // ModifyClusterAsGroupOptionAttribute
- // 修改集群弹性伸缩属性
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) ModifyClusterAsGroupOptionAttribute(request *ModifyClusterAsGroupOptionAttributeRequest) (response *ModifyClusterAsGroupOptionAttributeResponse, err error) {
- return c.ModifyClusterAsGroupOptionAttributeWithContext(context.Background(), request)
- }
-
- // ModifyClusterAsGroupOptionAttribute
- // 修改集群弹性伸缩属性
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ASCOMMON = "InternalError.AsCommon"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_CLUSTERSTATE = "InternalError.ClusterState"
- // INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon"
- // INTERNALERROR_CVMNOTFOUND = "InternalError.CvmNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) ModifyClusterAsGroupOptionAttributeWithContext(ctx context.Context, request *ModifyClusterAsGroupOptionAttributeRequest) (response *ModifyClusterAsGroupOptionAttributeResponse, err error) {
- if request == nil {
- request = NewModifyClusterAsGroupOptionAttributeRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("ModifyClusterAsGroupOptionAttribute require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewModifyClusterAsGroupOptionAttributeResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewModifyClusterAttributeRequest() (request *ModifyClusterAttributeRequest) {
- request = &ModifyClusterAttributeRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAttribute")
-
- return
- }
-
- func NewModifyClusterAttributeResponse() (response *ModifyClusterAttributeResponse) {
- response = &ModifyClusterAttributeResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // ModifyClusterAttribute
- // 修改集群属性
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon"
- // INTERNALERROR_TRADEINSUFFICIENTBALANCE = "InternalError.TradeInsufficientBalance"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- func (c *Client) ModifyClusterAttribute(request *ModifyClusterAttributeRequest) (response *ModifyClusterAttributeResponse, err error) {
- return c.ModifyClusterAttributeWithContext(context.Background(), request)
- }
-
- // ModifyClusterAttribute
- // 修改集群属性
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBAFFECTIVEDROWS = "InternalError.DbAffectivedRows"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_TRADECOMMON = "InternalError.TradeCommon"
- // INTERNALERROR_TRADEINSUFFICIENTBALANCE = "InternalError.TradeInsufficientBalance"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- func (c *Client) ModifyClusterAttributeWithContext(ctx context.Context, request *ModifyClusterAttributeRequest) (response *ModifyClusterAttributeResponse, err error) {
- if request == nil {
- request = NewModifyClusterAttributeRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("ModifyClusterAttribute require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewModifyClusterAttributeResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewModifyClusterAuthenticationOptionsRequest() (request *ModifyClusterAuthenticationOptionsRequest) {
- request = &ModifyClusterAuthenticationOptionsRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAuthenticationOptions")
-
- return
- }
-
- func NewModifyClusterAuthenticationOptionsResponse() (response *ModifyClusterAuthenticationOptionsResponse) {
- response = &ModifyClusterAuthenticationOptionsResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // ModifyClusterAuthenticationOptions
- // 修改集群认证配置
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- func (c *Client) ModifyClusterAuthenticationOptions(request *ModifyClusterAuthenticationOptionsRequest) (response *ModifyClusterAuthenticationOptionsResponse, err error) {
- return c.ModifyClusterAuthenticationOptionsWithContext(context.Background(), request)
- }
-
- // ModifyClusterAuthenticationOptions
- // 修改集群认证配置
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER = "InvalidParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- func (c *Client) ModifyClusterAuthenticationOptionsWithContext(ctx context.Context, request *ModifyClusterAuthenticationOptionsRequest) (response *ModifyClusterAuthenticationOptionsResponse, err error) {
- if request == nil {
- request = NewModifyClusterAuthenticationOptionsRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("ModifyClusterAuthenticationOptions require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewModifyClusterAuthenticationOptionsResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewModifyClusterEndpointSPRequest() (request *ModifyClusterEndpointSPRequest) {
- request = &ModifyClusterEndpointSPRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterEndpointSP")
-
- return
- }
-
- func NewModifyClusterEndpointSPResponse() (response *ModifyClusterEndpointSPResponse) {
- response = &ModifyClusterEndpointSPResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // ModifyClusterEndpointSP
- // 修改托管集群外网端口的安全策略(老的方式,仅支持托管集群外网端口)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_VPCUNEXPECTEDERROR = "InternalError.VPCUnexpectedError"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) ModifyClusterEndpointSP(request *ModifyClusterEndpointSPRequest) (response *ModifyClusterEndpointSPResponse, err error) {
- return c.ModifyClusterEndpointSPWithContext(context.Background(), request)
- }
-
- // ModifyClusterEndpointSP
- // 修改托管集群外网端口的安全策略(老的方式,仅支持托管集群外网端口)
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INTERNALERROR_VPCUNEXPECTEDERROR = "InternalError.VPCUnexpectedError"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // OPERATIONDENIED = "OperationDenied"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) ModifyClusterEndpointSPWithContext(ctx context.Context, request *ModifyClusterEndpointSPRequest) (response *ModifyClusterEndpointSPResponse, err error) {
- if request == nil {
- request = NewModifyClusterEndpointSPRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("ModifyClusterEndpointSP require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewModifyClusterEndpointSPResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewModifyClusterNodePoolRequest() (request *ModifyClusterNodePoolRequest) {
- request = &ModifyClusterNodePoolRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterNodePool")
-
- return
- }
-
- func NewModifyClusterNodePoolResponse() (response *ModifyClusterNodePoolResponse) {
- response = &ModifyClusterNodePoolResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // ModifyClusterNodePool
- // 编辑节点池
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // OPERATIONDENIED = "OperationDenied"
- // UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed"
- func (c *Client) ModifyClusterNodePool(request *ModifyClusterNodePoolRequest) (response *ModifyClusterNodePoolResponse, err error) {
- return c.ModifyClusterNodePoolWithContext(context.Background(), request)
- }
-
- // ModifyClusterNodePool
- // 编辑节点池
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // OPERATIONDENIED = "OperationDenied"
- // UNSUPPORTEDOPERATION_CAENABLEFAILED = "UnsupportedOperation.CaEnableFailed"
- func (c *Client) ModifyClusterNodePoolWithContext(ctx context.Context, request *ModifyClusterNodePoolRequest) (response *ModifyClusterNodePoolResponse, err error) {
- if request == nil {
- request = NewModifyClusterNodePoolRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("ModifyClusterNodePool require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewModifyClusterNodePoolResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewModifyNodePoolDesiredCapacityAboutAsgRequest() (request *ModifyNodePoolDesiredCapacityAboutAsgRequest) {
- request = &ModifyNodePoolDesiredCapacityAboutAsgRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "ModifyNodePoolDesiredCapacityAboutAsg")
-
- return
- }
-
- func NewModifyNodePoolDesiredCapacityAboutAsgResponse() (response *ModifyNodePoolDesiredCapacityAboutAsgResponse) {
- response = &ModifyNodePoolDesiredCapacityAboutAsgResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // ModifyNodePoolDesiredCapacityAboutAsg
- // 修改节点池关联伸缩组的期望实例数
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- // UNKNOWNPARAMETER = "UnknownParameter"
- func (c *Client) ModifyNodePoolDesiredCapacityAboutAsg(request *ModifyNodePoolDesiredCapacityAboutAsgRequest) (response *ModifyNodePoolDesiredCapacityAboutAsgResponse, err error) {
- return c.ModifyNodePoolDesiredCapacityAboutAsgWithContext(context.Background(), request)
- }
-
- // ModifyNodePoolDesiredCapacityAboutAsg
- // 修改节点池关联伸缩组的期望实例数
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND_ASASGNOTEXIST = "ResourceNotFound.AsAsgNotExist"
- // RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound"
- // UNKNOWNPARAMETER = "UnknownParameter"
- func (c *Client) ModifyNodePoolDesiredCapacityAboutAsgWithContext(ctx context.Context, request *ModifyNodePoolDesiredCapacityAboutAsgRequest) (response *ModifyNodePoolDesiredCapacityAboutAsgResponse, err error) {
- if request == nil {
- request = NewModifyNodePoolDesiredCapacityAboutAsgRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("ModifyNodePoolDesiredCapacityAboutAsg require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewModifyNodePoolDesiredCapacityAboutAsgResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewModifyNodePoolInstanceTypesRequest() (request *ModifyNodePoolInstanceTypesRequest) {
- request = &ModifyNodePoolInstanceTypesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "ModifyNodePoolInstanceTypes")
-
- return
- }
-
- func NewModifyNodePoolInstanceTypesResponse() (response *ModifyNodePoolInstanceTypesResponse) {
- response = &ModifyNodePoolInstanceTypesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // ModifyNodePoolInstanceTypes
- // 修改节点池的机型配置
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) ModifyNodePoolInstanceTypes(request *ModifyNodePoolInstanceTypesRequest) (response *ModifyNodePoolInstanceTypesResponse, err error) {
- return c.ModifyNodePoolInstanceTypesWithContext(context.Background(), request)
- }
-
- // ModifyNodePoolInstanceTypes
- // 修改节点池的机型配置
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) ModifyNodePoolInstanceTypesWithContext(ctx context.Context, request *ModifyNodePoolInstanceTypesRequest) (response *ModifyNodePoolInstanceTypesResponse, err error) {
- if request == nil {
- request = NewModifyNodePoolInstanceTypesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("ModifyNodePoolInstanceTypes require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewModifyNodePoolInstanceTypesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewModifyPrometheusAlertRuleRequest() (request *ModifyPrometheusAlertRuleRequest) {
- request = &ModifyPrometheusAlertRuleRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusAlertRule")
-
- return
- }
-
- func NewModifyPrometheusAlertRuleResponse() (response *ModifyPrometheusAlertRuleResponse) {
- response = &ModifyPrometheusAlertRuleResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // ModifyPrometheusAlertRule
- // 修改告警规则
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) ModifyPrometheusAlertRule(request *ModifyPrometheusAlertRuleRequest) (response *ModifyPrometheusAlertRuleResponse, err error) {
- return c.ModifyPrometheusAlertRuleWithContext(context.Background(), request)
- }
-
- // ModifyPrometheusAlertRule
- // 修改告警规则
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) ModifyPrometheusAlertRuleWithContext(ctx context.Context, request *ModifyPrometheusAlertRuleRequest) (response *ModifyPrometheusAlertRuleResponse, err error) {
- if request == nil {
- request = NewModifyPrometheusAlertRuleRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("ModifyPrometheusAlertRule require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewModifyPrometheusAlertRuleResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewModifyPrometheusTemplateRequest() (request *ModifyPrometheusTemplateRequest) {
- request = &ModifyPrometheusTemplateRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "ModifyPrometheusTemplate")
-
- return
- }
-
- func NewModifyPrometheusTemplateResponse() (response *ModifyPrometheusTemplateResponse) {
- response = &ModifyPrometheusTemplateResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // ModifyPrometheusTemplate
- // 修改模板内容
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
- func (c *Client) ModifyPrometheusTemplate(request *ModifyPrometheusTemplateRequest) (response *ModifyPrometheusTemplateResponse, err error) {
- return c.ModifyPrometheusTemplateWithContext(context.Background(), request)
- }
-
- // ModifyPrometheusTemplate
- // 修改模板内容
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
- func (c *Client) ModifyPrometheusTemplateWithContext(ctx context.Context, request *ModifyPrometheusTemplateRequest) (response *ModifyPrometheusTemplateResponse, err error) {
- if request == nil {
- request = NewModifyPrometheusTemplateRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("ModifyPrometheusTemplate require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewModifyPrometheusTemplateResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewRemoveNodeFromNodePoolRequest() (request *RemoveNodeFromNodePoolRequest) {
- request = &RemoveNodeFromNodePoolRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "RemoveNodeFromNodePool")
-
- return
- }
-
- func NewRemoveNodeFromNodePoolResponse() (response *RemoveNodeFromNodePoolResponse) {
- response = &RemoveNodeFromNodePoolResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // RemoveNodeFromNodePool
- // 移出节点池节点,但保留在集群内
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) RemoveNodeFromNodePool(request *RemoveNodeFromNodePoolRequest) (response *RemoveNodeFromNodePoolResponse, err error) {
- return c.RemoveNodeFromNodePoolWithContext(context.Background(), request)
- }
-
- // RemoveNodeFromNodePool
- // 移出节点池节点,但保留在集群内
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) RemoveNodeFromNodePoolWithContext(ctx context.Context, request *RemoveNodeFromNodePoolRequest) (response *RemoveNodeFromNodePoolResponse, err error) {
- if request == nil {
- request = NewRemoveNodeFromNodePoolRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("RemoveNodeFromNodePool require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewRemoveNodeFromNodePoolResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewRestartEKSContainerInstancesRequest() (request *RestartEKSContainerInstancesRequest) {
- request = &RestartEKSContainerInstancesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "RestartEKSContainerInstances")
-
- return
- }
-
- func NewRestartEKSContainerInstancesResponse() (response *RestartEKSContainerInstancesResponse) {
- response = &RestartEKSContainerInstancesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // RestartEKSContainerInstances
- // 重启弹性容器实例,支持批量操作
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) RestartEKSContainerInstances(request *RestartEKSContainerInstancesRequest) (response *RestartEKSContainerInstancesResponse, err error) {
- return c.RestartEKSContainerInstancesWithContext(context.Background(), request)
- }
-
- // RestartEKSContainerInstances
- // 重启弹性容器实例,支持批量操作
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) RestartEKSContainerInstancesWithContext(ctx context.Context, request *RestartEKSContainerInstancesRequest) (response *RestartEKSContainerInstancesResponse, err error) {
- if request == nil {
- request = NewRestartEKSContainerInstancesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("RestartEKSContainerInstances require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewRestartEKSContainerInstancesResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewScaleInClusterMasterRequest() (request *ScaleInClusterMasterRequest) {
- request = &ScaleInClusterMasterRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "ScaleInClusterMaster")
-
- return
- }
-
- func NewScaleInClusterMasterResponse() (response *ScaleInClusterMasterResponse) {
- response = &ScaleInClusterMasterResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // ScaleInClusterMaster
- // 缩容独立集群master节点
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // OPERATIONDENIED = "OperationDenied"
- func (c *Client) ScaleInClusterMaster(request *ScaleInClusterMasterRequest) (response *ScaleInClusterMasterResponse, err error) {
- return c.ScaleInClusterMasterWithContext(context.Background(), request)
- }
-
- // ScaleInClusterMaster
- // 缩容独立集群master节点
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // OPERATIONDENIED = "OperationDenied"
- func (c *Client) ScaleInClusterMasterWithContext(ctx context.Context, request *ScaleInClusterMasterRequest) (response *ScaleInClusterMasterResponse, err error) {
- if request == nil {
- request = NewScaleInClusterMasterRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("ScaleInClusterMaster require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewScaleInClusterMasterResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewScaleOutClusterMasterRequest() (request *ScaleOutClusterMasterRequest) {
- request = &ScaleOutClusterMasterRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "ScaleOutClusterMaster")
-
- return
- }
-
- func NewScaleOutClusterMasterResponse() (response *ScaleOutClusterMasterResponse) {
- response = &ScaleOutClusterMasterResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // ScaleOutClusterMaster
- // 扩容独立集群master节点
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // OPERATIONDENIED = "OperationDenied"
- func (c *Client) ScaleOutClusterMaster(request *ScaleOutClusterMasterRequest) (response *ScaleOutClusterMasterResponse, err error) {
- return c.ScaleOutClusterMasterWithContext(context.Background(), request)
- }
-
- // ScaleOutClusterMaster
- // 扩容独立集群master节点
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // OPERATIONDENIED = "OperationDenied"
- func (c *Client) ScaleOutClusterMasterWithContext(ctx context.Context, request *ScaleOutClusterMasterRequest) (response *ScaleOutClusterMasterResponse, err error) {
- if request == nil {
- request = NewScaleOutClusterMasterRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("ScaleOutClusterMaster require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewScaleOutClusterMasterResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewSetNodePoolNodeProtectionRequest() (request *SetNodePoolNodeProtectionRequest) {
- request = &SetNodePoolNodeProtectionRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "SetNodePoolNodeProtection")
-
- return
- }
-
- func NewSetNodePoolNodeProtectionResponse() (response *SetNodePoolNodeProtectionResponse) {
- response = &SetNodePoolNodeProtectionResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // SetNodePoolNodeProtection
- // 仅能设置节点池中处于伸缩组的节点
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) SetNodePoolNodeProtection(request *SetNodePoolNodeProtectionRequest) (response *SetNodePoolNodeProtectionResponse, err error) {
- return c.SetNodePoolNodeProtectionWithContext(context.Background(), request)
- }
-
- // SetNodePoolNodeProtection
- // 仅能设置节点池中处于伸缩组的节点
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated"
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- func (c *Client) SetNodePoolNodeProtectionWithContext(ctx context.Context, request *SetNodePoolNodeProtectionRequest) (response *SetNodePoolNodeProtectionResponse, err error) {
- if request == nil {
- request = NewSetNodePoolNodeProtectionRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("SetNodePoolNodeProtection require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewSetNodePoolNodeProtectionResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewSyncPrometheusTemplateRequest() (request *SyncPrometheusTemplateRequest) {
- request = &SyncPrometheusTemplateRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "SyncPrometheusTemplate")
-
- return
- }
-
- func NewSyncPrometheusTemplateResponse() (response *SyncPrometheusTemplateResponse) {
- response = &SyncPrometheusTemplateResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // SyncPrometheusTemplate
- // 同步模板到实例或者集群
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound"
- // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
- // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
- func (c *Client) SyncPrometheusTemplate(request *SyncPrometheusTemplateRequest) (response *SyncPrometheusTemplateResponse, err error) {
- return c.SyncPrometheusTemplateWithContext(context.Background(), request)
- }
-
- // SyncPrometheusTemplate
- // 同步模板到实例或者集群
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_DB = "InternalError.Db"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound"
- // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound"
- // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound"
- func (c *Client) SyncPrometheusTemplateWithContext(ctx context.Context, request *SyncPrometheusTemplateRequest) (response *SyncPrometheusTemplateResponse, err error) {
- if request == nil {
- request = NewSyncPrometheusTemplateRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("SyncPrometheusTemplate require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewSyncPrometheusTemplateResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewUpdateClusterVersionRequest() (request *UpdateClusterVersionRequest) {
- request = &UpdateClusterVersionRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "UpdateClusterVersion")
-
- return
- }
-
- func NewUpdateClusterVersionResponse() (response *UpdateClusterVersionResponse) {
- response = &UpdateClusterVersionResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // UpdateClusterVersion
- // 升级集群 Master 组件到指定版本
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CLUSTERUPGRADENODEVERSION = "InternalError.ClusterUpgradeNodeVersion"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- func (c *Client) UpdateClusterVersion(request *UpdateClusterVersionRequest) (response *UpdateClusterVersionResponse, err error) {
- return c.UpdateClusterVersionWithContext(context.Background(), request)
- }
-
- // UpdateClusterVersion
- // 升级集群 Master 组件到指定版本
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CLUSTERUPGRADENODEVERSION = "InternalError.ClusterUpgradeNodeVersion"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal"
- // INVALIDPARAMETER = "InvalidParameter"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- func (c *Client) UpdateClusterVersionWithContext(ctx context.Context, request *UpdateClusterVersionRequest) (response *UpdateClusterVersionResponse, err error) {
- if request == nil {
- request = NewUpdateClusterVersionRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("UpdateClusterVersion require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewUpdateClusterVersionResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewUpdateEKSClusterRequest() (request *UpdateEKSClusterRequest) {
- request = &UpdateEKSClusterRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "UpdateEKSCluster")
-
- return
- }
-
- func NewUpdateEKSClusterResponse() (response *UpdateEKSClusterResponse) {
- response = &UpdateEKSClusterResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // UpdateEKSCluster
- // 修改弹性集群名称等属性
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) UpdateEKSCluster(request *UpdateEKSClusterRequest) (response *UpdateEKSClusterResponse, err error) {
- return c.UpdateEKSClusterWithContext(context.Background(), request)
- }
-
- // UpdateEKSCluster
- // 修改弹性集群名称等属性
- //
- // 可能返回的错误码:
- //
- // FAILEDOPERATION = "FailedOperation"
- // INTERNALERROR = "InternalError"
- // INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth"
- // INVALIDPARAMETER = "InvalidParameter"
- // LIMITEXCEEDED = "LimitExceeded"
- // MISSINGPARAMETER = "MissingParameter"
- // RESOURCEINUSE = "ResourceInUse"
- // RESOURCENOTFOUND = "ResourceNotFound"
- // RESOURCEUNAVAILABLE = "ResourceUnavailable"
- // UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
- // UNKNOWNPARAMETER = "UnknownParameter"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) UpdateEKSClusterWithContext(ctx context.Context, request *UpdateEKSClusterRequest) (response *UpdateEKSClusterResponse, err error) {
- if request == nil {
- request = NewUpdateEKSClusterRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("UpdateEKSCluster require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewUpdateEKSClusterResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewUpdateEKSContainerInstanceRequest() (request *UpdateEKSContainerInstanceRequest) {
- request = &UpdateEKSContainerInstanceRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "UpdateEKSContainerInstance")
-
- return
- }
-
- func NewUpdateEKSContainerInstanceResponse() (response *UpdateEKSContainerInstanceResponse) {
- response = &UpdateEKSContainerInstanceResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // UpdateEKSContainerInstance
- // 更新容器实例
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func UpdateEKSContainerInstance(request *UpdateEKSContainerInstanceRequest) (response *UpdateEKSContainerInstanceResponse, err error) {
- provider := pbtenant.CloudProvider(request.ProviderId)
- var configFile string
- flag.StringVar(&configFile, "conf-tencent", "configs/config.yaml", "config.yaml")
- flag.Parse()
- defer glog.Flush()
-
- if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil {
- if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) {
- glog.Fatalf("tenanter.LoadCloudConfigsFromFile error %+v", err)
- }
- glog.Warningf("tenanter.LoadCloudConfigsFromFile empty file path %s", configFile)
- }
-
- glog.Infof("load tenant from file finished")
- var regionId int32
- switch request.ProviderId {
- case 0:
- regionId, _ = tenanter.GetAliRegionId(request.RegionId)
- case 1:
- regionId, _ = tenanter.GetTencentRegionId(request.RegionId)
- case 2:
- regionId, _ = tenanter.GetHuaweiRegionId(request.RegionId)
- case 3:
- regionId, _ = tenanter.GetK8SRegionId(request.RegionId)
- }
- containers := request.Containers
- requestPCM := &pbpod.UpdatePodReq{
- RequestSource: "tencent",
- Provider: provider,
- AccountName: request.AccountName,
- PcmId: *request.EksCiId,
- PodId: *request.EksCiId,
- PodName: *request.Name,
- Namespace: request.Namespace,
- RegionId: regionId,
- ContainerImage: *containers[0].Image,
- ContainerName: *containers[0].Name,
- CpuPod: strconv.FormatFloat(*containers[0].Cpu, 'E', -1, 64),
- MemoryPod: strconv.FormatFloat(*containers[0].Memory, 'E', -1, 64),
- RestartPolicy: *request.RestartPolicy,
- Labels: "",
- }
-
- resp, err := server.UpdatePod(nil, requestPCM)
- if err != nil {
- glog.Errorf("CreatePod error %+v", err)
- return
- }
- glog.Infof("CreatePod response %+v", resp)
- response = &UpdateEKSContainerInstanceResponse{
- Response: (*struct {
- EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"`
- RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
- })(&struct {
- EksCiId *string
- RequestId *string
- }{
- EksCiId: &resp.PodId,
- RequestId: &resp.RequestId,
- }),
- BaseResponse: &tchttp.BaseResponse{},
- }
- return response, nil
- }
-
- // UpdateEKSContainerInstance
- // 更新容器实例
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR = "InternalError"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) UpdateEKSContainerInstanceWithContext(ctx context.Context, request *UpdateEKSContainerInstanceRequest) (response *UpdateEKSContainerInstanceResponse, err error) {
- if request == nil {
- request = NewUpdateEKSContainerInstanceRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("UpdateEKSContainerInstance require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewUpdateEKSContainerInstanceResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewUpdateImageCacheRequest() (request *UpdateImageCacheRequest) {
- request = &UpdateImageCacheRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "UpdateImageCache")
-
- return
- }
-
- func NewUpdateImageCacheResponse() (response *UpdateImageCacheResponse) {
- response = &UpdateImageCacheResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // UpdateImageCache
- // 更新镜像缓存接口
- //
- // 可能返回的错误码:
- //
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) UpdateImageCache(request *UpdateImageCacheRequest) (response *UpdateImageCacheResponse, err error) {
- return c.UpdateImageCacheWithContext(context.Background(), request)
- }
-
- // UpdateImageCache
- // 更新镜像缓存接口
- //
- // 可能返回的错误码:
- //
- // UNSUPPORTEDOPERATION = "UnsupportedOperation"
- func (c *Client) UpdateImageCacheWithContext(ctx context.Context, request *UpdateImageCacheRequest) (response *UpdateImageCacheResponse, err error) {
- if request == nil {
- request = NewUpdateImageCacheRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("UpdateImageCache require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewUpdateImageCacheResponse()
- err = c.Send(request, response)
- return
- }
-
- func NewUpgradeClusterInstancesRequest() (request *UpgradeClusterInstancesRequest) {
- request = &UpgradeClusterInstancesRequest{
- BaseRequest: &tchttp.BaseRequest{},
- }
- request.Init().WithApiInfo("tke", APIVersion, "UpgradeClusterInstances")
-
- return
- }
-
- func NewUpgradeClusterInstancesResponse() (response *UpgradeClusterInstancesResponse) {
- response = &UpgradeClusterInstancesResponse{
- BaseResponse: &tchttp.BaseResponse{},
- }
- return
- }
-
- // UpgradeClusterInstances
- // 给集群的一批work节点进行升级
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_TASKALREADYRUNNING = "InternalError.TaskAlreadyRunning"
- // INTERNALERROR_TASKLIFESTATEERROR = "InternalError.TaskLifeStateError"
- // INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- func (c *Client) UpgradeClusterInstances(request *UpgradeClusterInstancesRequest) (response *UpgradeClusterInstancesResponse, err error) {
- return c.UpgradeClusterInstancesWithContext(context.Background(), request)
- }
-
- // UpgradeClusterInstances
- // 给集群的一批work节点进行升级
- //
- // 可能返回的错误码:
- //
- // INTERNALERROR_CLUSTERNOTFOUND = "InternalError.ClusterNotFound"
- // INTERNALERROR_PARAM = "InternalError.Param"
- // INTERNALERROR_TASKALREADYRUNNING = "InternalError.TaskAlreadyRunning"
- // INTERNALERROR_TASKLIFESTATEERROR = "InternalError.TaskLifeStateError"
- // INTERNALERROR_TASKNOTFOUND = "InternalError.TaskNotFound"
- // INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
- // INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
- // RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState"
- func (c *Client) UpgradeClusterInstancesWithContext(ctx context.Context, request *UpgradeClusterInstancesRequest) (response *UpgradeClusterInstancesResponse, err error) {
- if request == nil {
- request = NewUpgradeClusterInstancesRequest()
- }
-
- if c.GetCredential() == nil {
- return nil, errors.New("UpgradeClusterInstances require credential")
- }
-
- request.SetContext(ctx)
-
- response = NewUpgradeClusterInstancesResponse()
- err = c.Send(request, response)
- return
- }
|