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

client.go 267 kB

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

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