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