api.go 518 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package ecs
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  11. )
  12. const opCreateCluster = "CreateCluster"
  13. // CreateClusterRequest generates a "aws/request.Request" representing the
  14. // client's request for the CreateCluster operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See CreateCluster for more information on using the CreateCluster
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. //
  28. // // Example sending a request using the CreateClusterRequest method.
  29. // req, resp := client.CreateClusterRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/CreateCluster
  37. func (c *ECS) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) {
  38. op := &request.Operation{
  39. Name: opCreateCluster,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &CreateClusterInput{}
  45. }
  46. output = &CreateClusterOutput{}
  47. req = c.newRequest(op, input, output)
  48. return
  49. }
  50. // CreateCluster API operation for Amazon EC2 Container Service.
  51. //
  52. // Creates a new Amazon ECS cluster. By default, your account receives a default
  53. // cluster when you launch your first container instance. However, you can create
  54. // your own cluster with a unique name with the CreateCluster action.
  55. //
  56. // When you call the CreateCluster API operation, Amazon ECS attempts to create
  57. // the service-linked role for your account so that required resources in other
  58. // AWS services can be managed on your behalf. However, if the IAM user that
  59. // makes the call does not have permissions to create the service-linked role,
  60. // it is not created. For more information, see Using Service-Linked Roles for
  61. // Amazon ECS (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html)
  62. // in the Amazon Elastic Container Service Developer Guide.
  63. //
  64. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  65. // with awserr.Error's Code and Message methods to get detailed information about
  66. // the error.
  67. //
  68. // See the AWS API reference guide for Amazon EC2 Container Service's
  69. // API operation CreateCluster for usage and error information.
  70. //
  71. // Returned Error Codes:
  72. // * ErrCodeServerException "ServerException"
  73. // These errors are usually caused by a server issue.
  74. //
  75. // * ErrCodeClientException "ClientException"
  76. // These errors are usually caused by a client action, such as using an action
  77. // or resource on behalf of a user that doesn't have permissions to use the
  78. // action or resource, or specifying an identifier that is not valid.
  79. //
  80. // * ErrCodeInvalidParameterException "InvalidParameterException"
  81. // The specified parameter is invalid. Review the available parameters for the
  82. // API request.
  83. //
  84. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/CreateCluster
  85. func (c *ECS) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) {
  86. req, out := c.CreateClusterRequest(input)
  87. return out, req.Send()
  88. }
  89. // CreateClusterWithContext is the same as CreateCluster with the addition of
  90. // the ability to pass a context and additional request options.
  91. //
  92. // See CreateCluster for details on how to use this API operation.
  93. //
  94. // The context must be non-nil and will be used for request cancellation. If
  95. // the context is nil a panic will occur. In the future the SDK may create
  96. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  97. // for more information on using Contexts.
  98. func (c *ECS) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) {
  99. req, out := c.CreateClusterRequest(input)
  100. req.SetContext(ctx)
  101. req.ApplyOptions(opts...)
  102. return out, req.Send()
  103. }
  104. const opCreateService = "CreateService"
  105. // CreateServiceRequest generates a "aws/request.Request" representing the
  106. // client's request for the CreateService operation. The "output" return
  107. // value will be populated with the request's response once the request completes
  108. // successfully.
  109. //
  110. // Use "Send" method on the returned Request to send the API call to the service.
  111. // the "output" return value is not valid until after Send returns without error.
  112. //
  113. // See CreateService for more information on using the CreateService
  114. // API call, and error handling.
  115. //
  116. // This method is useful when you want to inject custom logic or configuration
  117. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  118. //
  119. //
  120. // // Example sending a request using the CreateServiceRequest method.
  121. // req, resp := client.CreateServiceRequest(params)
  122. //
  123. // err := req.Send()
  124. // if err == nil { // resp is now filled
  125. // fmt.Println(resp)
  126. // }
  127. //
  128. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/CreateService
  129. func (c *ECS) CreateServiceRequest(input *CreateServiceInput) (req *request.Request, output *CreateServiceOutput) {
  130. op := &request.Operation{
  131. Name: opCreateService,
  132. HTTPMethod: "POST",
  133. HTTPPath: "/",
  134. }
  135. if input == nil {
  136. input = &CreateServiceInput{}
  137. }
  138. output = &CreateServiceOutput{}
  139. req = c.newRequest(op, input, output)
  140. return
  141. }
  142. // CreateService API operation for Amazon EC2 Container Service.
  143. //
  144. // Runs and maintains a desired number of tasks from a specified task definition.
  145. // If the number of tasks running in a service drops below desiredCount, Amazon
  146. // ECS spawns another copy of the task in the specified cluster. To update an
  147. // existing service, see UpdateService.
  148. //
  149. // In addition to maintaining the desired count of tasks in your service, you
  150. // can optionally run your service behind a load balancer. The load balancer
  151. // distributes traffic across the tasks that are associated with the service.
  152. // For more information, see Service Load Balancing (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html)
  153. // in the Amazon Elastic Container Service Developer Guide.
  154. //
  155. // You can optionally specify a deployment configuration for your service. The
  156. // deployment is triggered by changing properties, such as the task definition
  157. // or the desired count of a service, with an UpdateService operation.
  158. //
  159. // If a service is using the ECS deployment controller, the minimum healthy
  160. // percent represents a lower limit on the number of tasks in a service that
  161. // must remain in the RUNNING state during a deployment, as a percentage of
  162. // the desired number of tasks (rounded up to the nearest integer), and while
  163. // any container instances are in the DRAINING state if the service contains
  164. // tasks using the EC2 launch type. This parameter enables you to deploy without
  165. // using additional cluster capacity. For example, if your service has a desired
  166. // number of four tasks and a minimum healthy percent of 50%, the scheduler
  167. // may stop two existing tasks to free up cluster capacity before starting two
  168. // new tasks. Tasks for services that do not use a load balancer are considered
  169. // healthy if they are in the RUNNING state; tasks for services that do use
  170. // a load balancer are considered healthy if they are in the RUNNING state and
  171. // they are reported as healthy by the load balancer. The default value for
  172. // minimum healthy percent is 100%.
  173. //
  174. // If a service is using the ECS deployment controller, the maximum percent
  175. // parameter represents an upper limit on the number of tasks in a service that
  176. // are allowed in the RUNNING or PENDING state during a deployment, as a percentage
  177. // of the desired number of tasks (rounded down to the nearest integer), and
  178. // while any container instances are in the DRAINING state if the service contains
  179. // tasks using the EC2 launch type. This parameter enables you to define the
  180. // deployment batch size. For example, if your service has a desired number
  181. // of four tasks and a maximum percent value of 200%, the scheduler may start
  182. // four new tasks before stopping the four older tasks (provided that the cluster
  183. // resources required to do this are available). The default value for maximum
  184. // percent is 200%.
  185. //
  186. // If a service is using the CODE_DEPLOY deployment controller and tasks that
  187. // use the EC2 launch type, the minimum healthy percent and maximum percent
  188. // values are only used to define the lower and upper limit on the number of
  189. // the tasks in the service that remain in the RUNNING state while the container
  190. // instances are in the DRAINING state. If the tasks in the service use the
  191. // Fargate launch type, the minimum healthy percent and maximum percent values
  192. // are not used, although they are currently visible when describing your service.
  193. //
  194. // Tasks for services that do not use a load balancer are considered healthy
  195. // if they are in the RUNNING state. Tasks for services that do use a load balancer
  196. // are considered healthy if they are in the RUNNING state and the container
  197. // instance they are hosted on is reported as healthy by the load balancer.
  198. // The default value for a replica service for minimumHealthyPercent is 100%.
  199. // The default value for a daemon service for minimumHealthyPercent is 0%.
  200. //
  201. // When the service scheduler launches new tasks, it determines task placement
  202. // in your cluster using the following logic:
  203. //
  204. // * Determine which of the container instances in your cluster can support
  205. // your service's task definition (for example, they have the required CPU,
  206. // memory, ports, and container instance attributes).
  207. //
  208. // * By default, the service scheduler attempts to balance tasks across Availability
  209. // Zones in this manner (although you can choose a different placement strategy)
  210. // with the placementStrategy parameter):
  211. //
  212. // Sort the valid container instances, giving priority to instances that have
  213. // the fewest number of running tasks for this service in their respective
  214. // Availability Zone. For example, if zone A has one running service task
  215. // and zones B and C each have zero, valid container instances in either
  216. // zone B or C are considered optimal for placement.
  217. //
  218. // Place the new service task on a valid container instance in an optimal Availability
  219. // Zone (based on the previous steps), favoring container instances with
  220. // the fewest number of running tasks for this service.
  221. //
  222. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  223. // with awserr.Error's Code and Message methods to get detailed information about
  224. // the error.
  225. //
  226. // See the AWS API reference guide for Amazon EC2 Container Service's
  227. // API operation CreateService for usage and error information.
  228. //
  229. // Returned Error Codes:
  230. // * ErrCodeServerException "ServerException"
  231. // These errors are usually caused by a server issue.
  232. //
  233. // * ErrCodeClientException "ClientException"
  234. // These errors are usually caused by a client action, such as using an action
  235. // or resource on behalf of a user that doesn't have permissions to use the
  236. // action or resource, or specifying an identifier that is not valid.
  237. //
  238. // * ErrCodeInvalidParameterException "InvalidParameterException"
  239. // The specified parameter is invalid. Review the available parameters for the
  240. // API request.
  241. //
  242. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  243. // The specified cluster could not be found. You can view your available clusters
  244. // with ListClusters. Amazon ECS clusters are Region-specific.
  245. //
  246. // * ErrCodeUnsupportedFeatureException "UnsupportedFeatureException"
  247. // The specified task is not supported in this Region.
  248. //
  249. // * ErrCodePlatformUnknownException "PlatformUnknownException"
  250. // The specified platform version does not exist.
  251. //
  252. // * ErrCodePlatformTaskDefinitionIncompatibilityException "PlatformTaskDefinitionIncompatibilityException"
  253. // The specified platform version does not satisfy the task definition's required
  254. // capabilities.
  255. //
  256. // * ErrCodeAccessDeniedException "AccessDeniedException"
  257. // You do not have authorization to perform the requested action.
  258. //
  259. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/CreateService
  260. func (c *ECS) CreateService(input *CreateServiceInput) (*CreateServiceOutput, error) {
  261. req, out := c.CreateServiceRequest(input)
  262. return out, req.Send()
  263. }
  264. // CreateServiceWithContext is the same as CreateService with the addition of
  265. // the ability to pass a context and additional request options.
  266. //
  267. // See CreateService for details on how to use this API operation.
  268. //
  269. // The context must be non-nil and will be used for request cancellation. If
  270. // the context is nil a panic will occur. In the future the SDK may create
  271. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  272. // for more information on using Contexts.
  273. func (c *ECS) CreateServiceWithContext(ctx aws.Context, input *CreateServiceInput, opts ...request.Option) (*CreateServiceOutput, error) {
  274. req, out := c.CreateServiceRequest(input)
  275. req.SetContext(ctx)
  276. req.ApplyOptions(opts...)
  277. return out, req.Send()
  278. }
  279. const opDeleteAccountSetting = "DeleteAccountSetting"
  280. // DeleteAccountSettingRequest generates a "aws/request.Request" representing the
  281. // client's request for the DeleteAccountSetting operation. The "output" return
  282. // value will be populated with the request's response once the request completes
  283. // successfully.
  284. //
  285. // Use "Send" method on the returned Request to send the API call to the service.
  286. // the "output" return value is not valid until after Send returns without error.
  287. //
  288. // See DeleteAccountSetting for more information on using the DeleteAccountSetting
  289. // API call, and error handling.
  290. //
  291. // This method is useful when you want to inject custom logic or configuration
  292. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  293. //
  294. //
  295. // // Example sending a request using the DeleteAccountSettingRequest method.
  296. // req, resp := client.DeleteAccountSettingRequest(params)
  297. //
  298. // err := req.Send()
  299. // if err == nil { // resp is now filled
  300. // fmt.Println(resp)
  301. // }
  302. //
  303. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteAccountSetting
  304. func (c *ECS) DeleteAccountSettingRequest(input *DeleteAccountSettingInput) (req *request.Request, output *DeleteAccountSettingOutput) {
  305. op := &request.Operation{
  306. Name: opDeleteAccountSetting,
  307. HTTPMethod: "POST",
  308. HTTPPath: "/",
  309. }
  310. if input == nil {
  311. input = &DeleteAccountSettingInput{}
  312. }
  313. output = &DeleteAccountSettingOutput{}
  314. req = c.newRequest(op, input, output)
  315. return
  316. }
  317. // DeleteAccountSetting API operation for Amazon EC2 Container Service.
  318. //
  319. // Modifies the ARN and resource ID format of a resource for a specified IAM
  320. // user, IAM role, or the root user for an account. You can specify whether
  321. // the new ARN and resource ID format are disabled for new resources that are
  322. // created.
  323. //
  324. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  325. // with awserr.Error's Code and Message methods to get detailed information about
  326. // the error.
  327. //
  328. // See the AWS API reference guide for Amazon EC2 Container Service's
  329. // API operation DeleteAccountSetting for usage and error information.
  330. //
  331. // Returned Error Codes:
  332. // * ErrCodeServerException "ServerException"
  333. // These errors are usually caused by a server issue.
  334. //
  335. // * ErrCodeClientException "ClientException"
  336. // These errors are usually caused by a client action, such as using an action
  337. // or resource on behalf of a user that doesn't have permissions to use the
  338. // action or resource, or specifying an identifier that is not valid.
  339. //
  340. // * ErrCodeInvalidParameterException "InvalidParameterException"
  341. // The specified parameter is invalid. Review the available parameters for the
  342. // API request.
  343. //
  344. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteAccountSetting
  345. func (c *ECS) DeleteAccountSetting(input *DeleteAccountSettingInput) (*DeleteAccountSettingOutput, error) {
  346. req, out := c.DeleteAccountSettingRequest(input)
  347. return out, req.Send()
  348. }
  349. // DeleteAccountSettingWithContext is the same as DeleteAccountSetting with the addition of
  350. // the ability to pass a context and additional request options.
  351. //
  352. // See DeleteAccountSetting for details on how to use this API operation.
  353. //
  354. // The context must be non-nil and will be used for request cancellation. If
  355. // the context is nil a panic will occur. In the future the SDK may create
  356. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  357. // for more information on using Contexts.
  358. func (c *ECS) DeleteAccountSettingWithContext(ctx aws.Context, input *DeleteAccountSettingInput, opts ...request.Option) (*DeleteAccountSettingOutput, error) {
  359. req, out := c.DeleteAccountSettingRequest(input)
  360. req.SetContext(ctx)
  361. req.ApplyOptions(opts...)
  362. return out, req.Send()
  363. }
  364. const opDeleteAttributes = "DeleteAttributes"
  365. // DeleteAttributesRequest generates a "aws/request.Request" representing the
  366. // client's request for the DeleteAttributes operation. The "output" return
  367. // value will be populated with the request's response once the request completes
  368. // successfully.
  369. //
  370. // Use "Send" method on the returned Request to send the API call to the service.
  371. // the "output" return value is not valid until after Send returns without error.
  372. //
  373. // See DeleteAttributes for more information on using the DeleteAttributes
  374. // API call, and error handling.
  375. //
  376. // This method is useful when you want to inject custom logic or configuration
  377. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  378. //
  379. //
  380. // // Example sending a request using the DeleteAttributesRequest method.
  381. // req, resp := client.DeleteAttributesRequest(params)
  382. //
  383. // err := req.Send()
  384. // if err == nil { // resp is now filled
  385. // fmt.Println(resp)
  386. // }
  387. //
  388. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteAttributes
  389. func (c *ECS) DeleteAttributesRequest(input *DeleteAttributesInput) (req *request.Request, output *DeleteAttributesOutput) {
  390. op := &request.Operation{
  391. Name: opDeleteAttributes,
  392. HTTPMethod: "POST",
  393. HTTPPath: "/",
  394. }
  395. if input == nil {
  396. input = &DeleteAttributesInput{}
  397. }
  398. output = &DeleteAttributesOutput{}
  399. req = c.newRequest(op, input, output)
  400. return
  401. }
  402. // DeleteAttributes API operation for Amazon EC2 Container Service.
  403. //
  404. // Deletes one or more custom attributes from an Amazon ECS resource.
  405. //
  406. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  407. // with awserr.Error's Code and Message methods to get detailed information about
  408. // the error.
  409. //
  410. // See the AWS API reference guide for Amazon EC2 Container Service's
  411. // API operation DeleteAttributes for usage and error information.
  412. //
  413. // Returned Error Codes:
  414. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  415. // The specified cluster could not be found. You can view your available clusters
  416. // with ListClusters. Amazon ECS clusters are Region-specific.
  417. //
  418. // * ErrCodeTargetNotFoundException "TargetNotFoundException"
  419. // The specified target could not be found. You can view your available container
  420. // instances with ListContainerInstances. Amazon ECS container instances are
  421. // cluster-specific and Region-specific.
  422. //
  423. // * ErrCodeInvalidParameterException "InvalidParameterException"
  424. // The specified parameter is invalid. Review the available parameters for the
  425. // API request.
  426. //
  427. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteAttributes
  428. func (c *ECS) DeleteAttributes(input *DeleteAttributesInput) (*DeleteAttributesOutput, error) {
  429. req, out := c.DeleteAttributesRequest(input)
  430. return out, req.Send()
  431. }
  432. // DeleteAttributesWithContext is the same as DeleteAttributes with the addition of
  433. // the ability to pass a context and additional request options.
  434. //
  435. // See DeleteAttributes for details on how to use this API operation.
  436. //
  437. // The context must be non-nil and will be used for request cancellation. If
  438. // the context is nil a panic will occur. In the future the SDK may create
  439. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  440. // for more information on using Contexts.
  441. func (c *ECS) DeleteAttributesWithContext(ctx aws.Context, input *DeleteAttributesInput, opts ...request.Option) (*DeleteAttributesOutput, error) {
  442. req, out := c.DeleteAttributesRequest(input)
  443. req.SetContext(ctx)
  444. req.ApplyOptions(opts...)
  445. return out, req.Send()
  446. }
  447. const opDeleteCluster = "DeleteCluster"
  448. // DeleteClusterRequest generates a "aws/request.Request" representing the
  449. // client's request for the DeleteCluster operation. The "output" return
  450. // value will be populated with the request's response once the request completes
  451. // successfully.
  452. //
  453. // Use "Send" method on the returned Request to send the API call to the service.
  454. // the "output" return value is not valid until after Send returns without error.
  455. //
  456. // See DeleteCluster for more information on using the DeleteCluster
  457. // API call, and error handling.
  458. //
  459. // This method is useful when you want to inject custom logic or configuration
  460. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  461. //
  462. //
  463. // // Example sending a request using the DeleteClusterRequest method.
  464. // req, resp := client.DeleteClusterRequest(params)
  465. //
  466. // err := req.Send()
  467. // if err == nil { // resp is now filled
  468. // fmt.Println(resp)
  469. // }
  470. //
  471. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteCluster
  472. func (c *ECS) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) {
  473. op := &request.Operation{
  474. Name: opDeleteCluster,
  475. HTTPMethod: "POST",
  476. HTTPPath: "/",
  477. }
  478. if input == nil {
  479. input = &DeleteClusterInput{}
  480. }
  481. output = &DeleteClusterOutput{}
  482. req = c.newRequest(op, input, output)
  483. return
  484. }
  485. // DeleteCluster API operation for Amazon EC2 Container Service.
  486. //
  487. // Deletes the specified cluster. You must deregister all container instances
  488. // from this cluster before you may delete it. You can list the container instances
  489. // in a cluster with ListContainerInstances and deregister them with DeregisterContainerInstance.
  490. //
  491. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  492. // with awserr.Error's Code and Message methods to get detailed information about
  493. // the error.
  494. //
  495. // See the AWS API reference guide for Amazon EC2 Container Service's
  496. // API operation DeleteCluster for usage and error information.
  497. //
  498. // Returned Error Codes:
  499. // * ErrCodeServerException "ServerException"
  500. // These errors are usually caused by a server issue.
  501. //
  502. // * ErrCodeClientException "ClientException"
  503. // These errors are usually caused by a client action, such as using an action
  504. // or resource on behalf of a user that doesn't have permissions to use the
  505. // action or resource, or specifying an identifier that is not valid.
  506. //
  507. // * ErrCodeInvalidParameterException "InvalidParameterException"
  508. // The specified parameter is invalid. Review the available parameters for the
  509. // API request.
  510. //
  511. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  512. // The specified cluster could not be found. You can view your available clusters
  513. // with ListClusters. Amazon ECS clusters are Region-specific.
  514. //
  515. // * ErrCodeClusterContainsContainerInstancesException "ClusterContainsContainerInstancesException"
  516. // You cannot delete a cluster that has registered container instances. First,
  517. // deregister the container instances before you can delete the cluster. For
  518. // more information, see DeregisterContainerInstance.
  519. //
  520. // * ErrCodeClusterContainsServicesException "ClusterContainsServicesException"
  521. // You cannot delete a cluster that contains services. First, update the service
  522. // to reduce its desired task count to 0 and then delete the service. For more
  523. // information, see UpdateService and DeleteService.
  524. //
  525. // * ErrCodeClusterContainsTasksException "ClusterContainsTasksException"
  526. // You cannot delete a cluster that has active tasks.
  527. //
  528. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteCluster
  529. func (c *ECS) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) {
  530. req, out := c.DeleteClusterRequest(input)
  531. return out, req.Send()
  532. }
  533. // DeleteClusterWithContext is the same as DeleteCluster with the addition of
  534. // the ability to pass a context and additional request options.
  535. //
  536. // See DeleteCluster for details on how to use this API operation.
  537. //
  538. // The context must be non-nil and will be used for request cancellation. If
  539. // the context is nil a panic will occur. In the future the SDK may create
  540. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  541. // for more information on using Contexts.
  542. func (c *ECS) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) {
  543. req, out := c.DeleteClusterRequest(input)
  544. req.SetContext(ctx)
  545. req.ApplyOptions(opts...)
  546. return out, req.Send()
  547. }
  548. const opDeleteService = "DeleteService"
  549. // DeleteServiceRequest generates a "aws/request.Request" representing the
  550. // client's request for the DeleteService operation. The "output" return
  551. // value will be populated with the request's response once the request completes
  552. // successfully.
  553. //
  554. // Use "Send" method on the returned Request to send the API call to the service.
  555. // the "output" return value is not valid until after Send returns without error.
  556. //
  557. // See DeleteService for more information on using the DeleteService
  558. // API call, and error handling.
  559. //
  560. // This method is useful when you want to inject custom logic or configuration
  561. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  562. //
  563. //
  564. // // Example sending a request using the DeleteServiceRequest method.
  565. // req, resp := client.DeleteServiceRequest(params)
  566. //
  567. // err := req.Send()
  568. // if err == nil { // resp is now filled
  569. // fmt.Println(resp)
  570. // }
  571. //
  572. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteService
  573. func (c *ECS) DeleteServiceRequest(input *DeleteServiceInput) (req *request.Request, output *DeleteServiceOutput) {
  574. op := &request.Operation{
  575. Name: opDeleteService,
  576. HTTPMethod: "POST",
  577. HTTPPath: "/",
  578. }
  579. if input == nil {
  580. input = &DeleteServiceInput{}
  581. }
  582. output = &DeleteServiceOutput{}
  583. req = c.newRequest(op, input, output)
  584. return
  585. }
  586. // DeleteService API operation for Amazon EC2 Container Service.
  587. //
  588. // Deletes a specified service within a cluster. You can delete a service if
  589. // you have no running tasks in it and the desired task count is zero. If the
  590. // service is actively maintaining tasks, you cannot delete it, and you must
  591. // update the service to a desired task count of zero. For more information,
  592. // see UpdateService.
  593. //
  594. // When you delete a service, if there are still running tasks that require
  595. // cleanup, the service status moves from ACTIVE to DRAINING, and the service
  596. // is no longer visible in the console or in the ListServices API operation.
  597. // After the tasks have stopped, then the service status moves from DRAINING
  598. // to INACTIVE. Services in the DRAINING or INACTIVE status can still be viewed
  599. // with the DescribeServices API operation. However, in the future, INACTIVE
  600. // services may be cleaned up and purged from Amazon ECS record keeping, and
  601. // DescribeServices calls on those services return a ServiceNotFoundException
  602. // error.
  603. //
  604. // If you attempt to create a new service with the same name as an existing
  605. // service in either ACTIVE or DRAINING status, you receive an error.
  606. //
  607. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  608. // with awserr.Error's Code and Message methods to get detailed information about
  609. // the error.
  610. //
  611. // See the AWS API reference guide for Amazon EC2 Container Service's
  612. // API operation DeleteService for usage and error information.
  613. //
  614. // Returned Error Codes:
  615. // * ErrCodeServerException "ServerException"
  616. // These errors are usually caused by a server issue.
  617. //
  618. // * ErrCodeClientException "ClientException"
  619. // These errors are usually caused by a client action, such as using an action
  620. // or resource on behalf of a user that doesn't have permissions to use the
  621. // action or resource, or specifying an identifier that is not valid.
  622. //
  623. // * ErrCodeInvalidParameterException "InvalidParameterException"
  624. // The specified parameter is invalid. Review the available parameters for the
  625. // API request.
  626. //
  627. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  628. // The specified cluster could not be found. You can view your available clusters
  629. // with ListClusters. Amazon ECS clusters are Region-specific.
  630. //
  631. // * ErrCodeServiceNotFoundException "ServiceNotFoundException"
  632. // The specified service could not be found. You can view your available services
  633. // with ListServices. Amazon ECS services are cluster-specific and Region-specific.
  634. //
  635. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteService
  636. func (c *ECS) DeleteService(input *DeleteServiceInput) (*DeleteServiceOutput, error) {
  637. req, out := c.DeleteServiceRequest(input)
  638. return out, req.Send()
  639. }
  640. // DeleteServiceWithContext is the same as DeleteService with the addition of
  641. // the ability to pass a context and additional request options.
  642. //
  643. // See DeleteService for details on how to use this API operation.
  644. //
  645. // The context must be non-nil and will be used for request cancellation. If
  646. // the context is nil a panic will occur. In the future the SDK may create
  647. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  648. // for more information on using Contexts.
  649. func (c *ECS) DeleteServiceWithContext(ctx aws.Context, input *DeleteServiceInput, opts ...request.Option) (*DeleteServiceOutput, error) {
  650. req, out := c.DeleteServiceRequest(input)
  651. req.SetContext(ctx)
  652. req.ApplyOptions(opts...)
  653. return out, req.Send()
  654. }
  655. const opDeregisterContainerInstance = "DeregisterContainerInstance"
  656. // DeregisterContainerInstanceRequest generates a "aws/request.Request" representing the
  657. // client's request for the DeregisterContainerInstance operation. The "output" return
  658. // value will be populated with the request's response once the request completes
  659. // successfully.
  660. //
  661. // Use "Send" method on the returned Request to send the API call to the service.
  662. // the "output" return value is not valid until after Send returns without error.
  663. //
  664. // See DeregisterContainerInstance for more information on using the DeregisterContainerInstance
  665. // API call, and error handling.
  666. //
  667. // This method is useful when you want to inject custom logic or configuration
  668. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  669. //
  670. //
  671. // // Example sending a request using the DeregisterContainerInstanceRequest method.
  672. // req, resp := client.DeregisterContainerInstanceRequest(params)
  673. //
  674. // err := req.Send()
  675. // if err == nil { // resp is now filled
  676. // fmt.Println(resp)
  677. // }
  678. //
  679. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeregisterContainerInstance
  680. func (c *ECS) DeregisterContainerInstanceRequest(input *DeregisterContainerInstanceInput) (req *request.Request, output *DeregisterContainerInstanceOutput) {
  681. op := &request.Operation{
  682. Name: opDeregisterContainerInstance,
  683. HTTPMethod: "POST",
  684. HTTPPath: "/",
  685. }
  686. if input == nil {
  687. input = &DeregisterContainerInstanceInput{}
  688. }
  689. output = &DeregisterContainerInstanceOutput{}
  690. req = c.newRequest(op, input, output)
  691. return
  692. }
  693. // DeregisterContainerInstance API operation for Amazon EC2 Container Service.
  694. //
  695. // Deregisters an Amazon ECS container instance from the specified cluster.
  696. // This instance is no longer available to run tasks.
  697. //
  698. // If you intend to use the container instance for some other purpose after
  699. // deregistration, you should stop all of the tasks running on the container
  700. // instance before deregistration. That prevents any orphaned tasks from consuming
  701. // resources.
  702. //
  703. // Deregistering a container instance removes the instance from a cluster, but
  704. // it does not terminate the EC2 instance. If you are finished using the instance,
  705. // be sure to terminate it in the Amazon EC2 console to stop billing.
  706. //
  707. // If you terminate a running container instance, Amazon ECS automatically deregisters
  708. // the instance from your cluster (stopped container instances or instances
  709. // with disconnected agents are not automatically deregistered when terminated).
  710. //
  711. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  712. // with awserr.Error's Code and Message methods to get detailed information about
  713. // the error.
  714. //
  715. // See the AWS API reference guide for Amazon EC2 Container Service's
  716. // API operation DeregisterContainerInstance for usage and error information.
  717. //
  718. // Returned Error Codes:
  719. // * ErrCodeServerException "ServerException"
  720. // These errors are usually caused by a server issue.
  721. //
  722. // * ErrCodeClientException "ClientException"
  723. // These errors are usually caused by a client action, such as using an action
  724. // or resource on behalf of a user that doesn't have permissions to use the
  725. // action or resource, or specifying an identifier that is not valid.
  726. //
  727. // * ErrCodeInvalidParameterException "InvalidParameterException"
  728. // The specified parameter is invalid. Review the available parameters for the
  729. // API request.
  730. //
  731. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  732. // The specified cluster could not be found. You can view your available clusters
  733. // with ListClusters. Amazon ECS clusters are Region-specific.
  734. //
  735. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeregisterContainerInstance
  736. func (c *ECS) DeregisterContainerInstance(input *DeregisterContainerInstanceInput) (*DeregisterContainerInstanceOutput, error) {
  737. req, out := c.DeregisterContainerInstanceRequest(input)
  738. return out, req.Send()
  739. }
  740. // DeregisterContainerInstanceWithContext is the same as DeregisterContainerInstance with the addition of
  741. // the ability to pass a context and additional request options.
  742. //
  743. // See DeregisterContainerInstance for details on how to use this API operation.
  744. //
  745. // The context must be non-nil and will be used for request cancellation. If
  746. // the context is nil a panic will occur. In the future the SDK may create
  747. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  748. // for more information on using Contexts.
  749. func (c *ECS) DeregisterContainerInstanceWithContext(ctx aws.Context, input *DeregisterContainerInstanceInput, opts ...request.Option) (*DeregisterContainerInstanceOutput, error) {
  750. req, out := c.DeregisterContainerInstanceRequest(input)
  751. req.SetContext(ctx)
  752. req.ApplyOptions(opts...)
  753. return out, req.Send()
  754. }
  755. const opDeregisterTaskDefinition = "DeregisterTaskDefinition"
  756. // DeregisterTaskDefinitionRequest generates a "aws/request.Request" representing the
  757. // client's request for the DeregisterTaskDefinition operation. The "output" return
  758. // value will be populated with the request's response once the request completes
  759. // successfully.
  760. //
  761. // Use "Send" method on the returned Request to send the API call to the service.
  762. // the "output" return value is not valid until after Send returns without error.
  763. //
  764. // See DeregisterTaskDefinition for more information on using the DeregisterTaskDefinition
  765. // API call, and error handling.
  766. //
  767. // This method is useful when you want to inject custom logic or configuration
  768. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  769. //
  770. //
  771. // // Example sending a request using the DeregisterTaskDefinitionRequest method.
  772. // req, resp := client.DeregisterTaskDefinitionRequest(params)
  773. //
  774. // err := req.Send()
  775. // if err == nil { // resp is now filled
  776. // fmt.Println(resp)
  777. // }
  778. //
  779. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeregisterTaskDefinition
  780. func (c *ECS) DeregisterTaskDefinitionRequest(input *DeregisterTaskDefinitionInput) (req *request.Request, output *DeregisterTaskDefinitionOutput) {
  781. op := &request.Operation{
  782. Name: opDeregisterTaskDefinition,
  783. HTTPMethod: "POST",
  784. HTTPPath: "/",
  785. }
  786. if input == nil {
  787. input = &DeregisterTaskDefinitionInput{}
  788. }
  789. output = &DeregisterTaskDefinitionOutput{}
  790. req = c.newRequest(op, input, output)
  791. return
  792. }
  793. // DeregisterTaskDefinition API operation for Amazon EC2 Container Service.
  794. //
  795. // Deregisters the specified task definition by family and revision. Upon deregistration,
  796. // the task definition is marked as INACTIVE. Existing tasks and services that
  797. // reference an INACTIVE task definition continue to run without disruption.
  798. // Existing services that reference an INACTIVE task definition can still scale
  799. // up or down by modifying the service's desired count.
  800. //
  801. // You cannot use an INACTIVE task definition to run new tasks or create new
  802. // services, and you cannot update an existing service to reference an INACTIVE
  803. // task definition. However, there may be up to a 10-minute window following
  804. // deregistration where these restrictions have not yet taken effect.
  805. //
  806. // At this time, INACTIVE task definitions remain discoverable in your account
  807. // indefinitely. However, this behavior is subject to change in the future,
  808. // so you should not rely on INACTIVE task definitions persisting beyond the
  809. // lifecycle of any associated tasks and services.
  810. //
  811. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  812. // with awserr.Error's Code and Message methods to get detailed information about
  813. // the error.
  814. //
  815. // See the AWS API reference guide for Amazon EC2 Container Service's
  816. // API operation DeregisterTaskDefinition for usage and error information.
  817. //
  818. // Returned Error Codes:
  819. // * ErrCodeServerException "ServerException"
  820. // These errors are usually caused by a server issue.
  821. //
  822. // * ErrCodeClientException "ClientException"
  823. // These errors are usually caused by a client action, such as using an action
  824. // or resource on behalf of a user that doesn't have permissions to use the
  825. // action or resource, or specifying an identifier that is not valid.
  826. //
  827. // * ErrCodeInvalidParameterException "InvalidParameterException"
  828. // The specified parameter is invalid. Review the available parameters for the
  829. // API request.
  830. //
  831. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeregisterTaskDefinition
  832. func (c *ECS) DeregisterTaskDefinition(input *DeregisterTaskDefinitionInput) (*DeregisterTaskDefinitionOutput, error) {
  833. req, out := c.DeregisterTaskDefinitionRequest(input)
  834. return out, req.Send()
  835. }
  836. // DeregisterTaskDefinitionWithContext is the same as DeregisterTaskDefinition with the addition of
  837. // the ability to pass a context and additional request options.
  838. //
  839. // See DeregisterTaskDefinition for details on how to use this API operation.
  840. //
  841. // The context must be non-nil and will be used for request cancellation. If
  842. // the context is nil a panic will occur. In the future the SDK may create
  843. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  844. // for more information on using Contexts.
  845. func (c *ECS) DeregisterTaskDefinitionWithContext(ctx aws.Context, input *DeregisterTaskDefinitionInput, opts ...request.Option) (*DeregisterTaskDefinitionOutput, error) {
  846. req, out := c.DeregisterTaskDefinitionRequest(input)
  847. req.SetContext(ctx)
  848. req.ApplyOptions(opts...)
  849. return out, req.Send()
  850. }
  851. const opDescribeClusters = "DescribeClusters"
  852. // DescribeClustersRequest generates a "aws/request.Request" representing the
  853. // client's request for the DescribeClusters operation. The "output" return
  854. // value will be populated with the request's response once the request completes
  855. // successfully.
  856. //
  857. // Use "Send" method on the returned Request to send the API call to the service.
  858. // the "output" return value is not valid until after Send returns without error.
  859. //
  860. // See DescribeClusters for more information on using the DescribeClusters
  861. // API call, and error handling.
  862. //
  863. // This method is useful when you want to inject custom logic or configuration
  864. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  865. //
  866. //
  867. // // Example sending a request using the DescribeClustersRequest method.
  868. // req, resp := client.DescribeClustersRequest(params)
  869. //
  870. // err := req.Send()
  871. // if err == nil { // resp is now filled
  872. // fmt.Println(resp)
  873. // }
  874. //
  875. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeClusters
  876. func (c *ECS) DescribeClustersRequest(input *DescribeClustersInput) (req *request.Request, output *DescribeClustersOutput) {
  877. op := &request.Operation{
  878. Name: opDescribeClusters,
  879. HTTPMethod: "POST",
  880. HTTPPath: "/",
  881. }
  882. if input == nil {
  883. input = &DescribeClustersInput{}
  884. }
  885. output = &DescribeClustersOutput{}
  886. req = c.newRequest(op, input, output)
  887. return
  888. }
  889. // DescribeClusters API operation for Amazon EC2 Container Service.
  890. //
  891. // Describes one or more of your clusters.
  892. //
  893. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  894. // with awserr.Error's Code and Message methods to get detailed information about
  895. // the error.
  896. //
  897. // See the AWS API reference guide for Amazon EC2 Container Service's
  898. // API operation DescribeClusters for usage and error information.
  899. //
  900. // Returned Error Codes:
  901. // * ErrCodeServerException "ServerException"
  902. // These errors are usually caused by a server issue.
  903. //
  904. // * ErrCodeClientException "ClientException"
  905. // These errors are usually caused by a client action, such as using an action
  906. // or resource on behalf of a user that doesn't have permissions to use the
  907. // action or resource, or specifying an identifier that is not valid.
  908. //
  909. // * ErrCodeInvalidParameterException "InvalidParameterException"
  910. // The specified parameter is invalid. Review the available parameters for the
  911. // API request.
  912. //
  913. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeClusters
  914. func (c *ECS) DescribeClusters(input *DescribeClustersInput) (*DescribeClustersOutput, error) {
  915. req, out := c.DescribeClustersRequest(input)
  916. return out, req.Send()
  917. }
  918. // DescribeClustersWithContext is the same as DescribeClusters with the addition of
  919. // the ability to pass a context and additional request options.
  920. //
  921. // See DescribeClusters for details on how to use this API operation.
  922. //
  923. // The context must be non-nil and will be used for request cancellation. If
  924. // the context is nil a panic will occur. In the future the SDK may create
  925. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  926. // for more information on using Contexts.
  927. func (c *ECS) DescribeClustersWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.Option) (*DescribeClustersOutput, error) {
  928. req, out := c.DescribeClustersRequest(input)
  929. req.SetContext(ctx)
  930. req.ApplyOptions(opts...)
  931. return out, req.Send()
  932. }
  933. const opDescribeContainerInstances = "DescribeContainerInstances"
  934. // DescribeContainerInstancesRequest generates a "aws/request.Request" representing the
  935. // client's request for the DescribeContainerInstances operation. The "output" return
  936. // value will be populated with the request's response once the request completes
  937. // successfully.
  938. //
  939. // Use "Send" method on the returned Request to send the API call to the service.
  940. // the "output" return value is not valid until after Send returns without error.
  941. //
  942. // See DescribeContainerInstances for more information on using the DescribeContainerInstances
  943. // API call, and error handling.
  944. //
  945. // This method is useful when you want to inject custom logic or configuration
  946. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  947. //
  948. //
  949. // // Example sending a request using the DescribeContainerInstancesRequest method.
  950. // req, resp := client.DescribeContainerInstancesRequest(params)
  951. //
  952. // err := req.Send()
  953. // if err == nil { // resp is now filled
  954. // fmt.Println(resp)
  955. // }
  956. //
  957. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeContainerInstances
  958. func (c *ECS) DescribeContainerInstancesRequest(input *DescribeContainerInstancesInput) (req *request.Request, output *DescribeContainerInstancesOutput) {
  959. op := &request.Operation{
  960. Name: opDescribeContainerInstances,
  961. HTTPMethod: "POST",
  962. HTTPPath: "/",
  963. }
  964. if input == nil {
  965. input = &DescribeContainerInstancesInput{}
  966. }
  967. output = &DescribeContainerInstancesOutput{}
  968. req = c.newRequest(op, input, output)
  969. return
  970. }
  971. // DescribeContainerInstances API operation for Amazon EC2 Container Service.
  972. //
  973. // Describes Amazon Elastic Container Service container instances. Returns metadata
  974. // about registered and remaining resources on each container instance requested.
  975. //
  976. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  977. // with awserr.Error's Code and Message methods to get detailed information about
  978. // the error.
  979. //
  980. // See the AWS API reference guide for Amazon EC2 Container Service's
  981. // API operation DescribeContainerInstances for usage and error information.
  982. //
  983. // Returned Error Codes:
  984. // * ErrCodeServerException "ServerException"
  985. // These errors are usually caused by a server issue.
  986. //
  987. // * ErrCodeClientException "ClientException"
  988. // These errors are usually caused by a client action, such as using an action
  989. // or resource on behalf of a user that doesn't have permissions to use the
  990. // action or resource, or specifying an identifier that is not valid.
  991. //
  992. // * ErrCodeInvalidParameterException "InvalidParameterException"
  993. // The specified parameter is invalid. Review the available parameters for the
  994. // API request.
  995. //
  996. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  997. // The specified cluster could not be found. You can view your available clusters
  998. // with ListClusters. Amazon ECS clusters are Region-specific.
  999. //
  1000. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeContainerInstances
  1001. func (c *ECS) DescribeContainerInstances(input *DescribeContainerInstancesInput) (*DescribeContainerInstancesOutput, error) {
  1002. req, out := c.DescribeContainerInstancesRequest(input)
  1003. return out, req.Send()
  1004. }
  1005. // DescribeContainerInstancesWithContext is the same as DescribeContainerInstances with the addition of
  1006. // the ability to pass a context and additional request options.
  1007. //
  1008. // See DescribeContainerInstances for details on how to use this API operation.
  1009. //
  1010. // The context must be non-nil and will be used for request cancellation. If
  1011. // the context is nil a panic will occur. In the future the SDK may create
  1012. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1013. // for more information on using Contexts.
  1014. func (c *ECS) DescribeContainerInstancesWithContext(ctx aws.Context, input *DescribeContainerInstancesInput, opts ...request.Option) (*DescribeContainerInstancesOutput, error) {
  1015. req, out := c.DescribeContainerInstancesRequest(input)
  1016. req.SetContext(ctx)
  1017. req.ApplyOptions(opts...)
  1018. return out, req.Send()
  1019. }
  1020. const opDescribeServices = "DescribeServices"
  1021. // DescribeServicesRequest generates a "aws/request.Request" representing the
  1022. // client's request for the DescribeServices operation. The "output" return
  1023. // value will be populated with the request's response once the request completes
  1024. // successfully.
  1025. //
  1026. // Use "Send" method on the returned Request to send the API call to the service.
  1027. // the "output" return value is not valid until after Send returns without error.
  1028. //
  1029. // See DescribeServices for more information on using the DescribeServices
  1030. // API call, and error handling.
  1031. //
  1032. // This method is useful when you want to inject custom logic or configuration
  1033. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1034. //
  1035. //
  1036. // // Example sending a request using the DescribeServicesRequest method.
  1037. // req, resp := client.DescribeServicesRequest(params)
  1038. //
  1039. // err := req.Send()
  1040. // if err == nil { // resp is now filled
  1041. // fmt.Println(resp)
  1042. // }
  1043. //
  1044. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeServices
  1045. func (c *ECS) DescribeServicesRequest(input *DescribeServicesInput) (req *request.Request, output *DescribeServicesOutput) {
  1046. op := &request.Operation{
  1047. Name: opDescribeServices,
  1048. HTTPMethod: "POST",
  1049. HTTPPath: "/",
  1050. }
  1051. if input == nil {
  1052. input = &DescribeServicesInput{}
  1053. }
  1054. output = &DescribeServicesOutput{}
  1055. req = c.newRequest(op, input, output)
  1056. return
  1057. }
  1058. // DescribeServices API operation for Amazon EC2 Container Service.
  1059. //
  1060. // Describes the specified services running in your cluster.
  1061. //
  1062. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1063. // with awserr.Error's Code and Message methods to get detailed information about
  1064. // the error.
  1065. //
  1066. // See the AWS API reference guide for Amazon EC2 Container Service's
  1067. // API operation DescribeServices for usage and error information.
  1068. //
  1069. // Returned Error Codes:
  1070. // * ErrCodeServerException "ServerException"
  1071. // These errors are usually caused by a server issue.
  1072. //
  1073. // * ErrCodeClientException "ClientException"
  1074. // These errors are usually caused by a client action, such as using an action
  1075. // or resource on behalf of a user that doesn't have permissions to use the
  1076. // action or resource, or specifying an identifier that is not valid.
  1077. //
  1078. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1079. // The specified parameter is invalid. Review the available parameters for the
  1080. // API request.
  1081. //
  1082. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  1083. // The specified cluster could not be found. You can view your available clusters
  1084. // with ListClusters. Amazon ECS clusters are Region-specific.
  1085. //
  1086. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeServices
  1087. func (c *ECS) DescribeServices(input *DescribeServicesInput) (*DescribeServicesOutput, error) {
  1088. req, out := c.DescribeServicesRequest(input)
  1089. return out, req.Send()
  1090. }
  1091. // DescribeServicesWithContext is the same as DescribeServices with the addition of
  1092. // the ability to pass a context and additional request options.
  1093. //
  1094. // See DescribeServices for details on how to use this API operation.
  1095. //
  1096. // The context must be non-nil and will be used for request cancellation. If
  1097. // the context is nil a panic will occur. In the future the SDK may create
  1098. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1099. // for more information on using Contexts.
  1100. func (c *ECS) DescribeServicesWithContext(ctx aws.Context, input *DescribeServicesInput, opts ...request.Option) (*DescribeServicesOutput, error) {
  1101. req, out := c.DescribeServicesRequest(input)
  1102. req.SetContext(ctx)
  1103. req.ApplyOptions(opts...)
  1104. return out, req.Send()
  1105. }
  1106. const opDescribeTaskDefinition = "DescribeTaskDefinition"
  1107. // DescribeTaskDefinitionRequest generates a "aws/request.Request" representing the
  1108. // client's request for the DescribeTaskDefinition operation. The "output" return
  1109. // value will be populated with the request's response once the request completes
  1110. // successfully.
  1111. //
  1112. // Use "Send" method on the returned Request to send the API call to the service.
  1113. // the "output" return value is not valid until after Send returns without error.
  1114. //
  1115. // See DescribeTaskDefinition for more information on using the DescribeTaskDefinition
  1116. // API call, and error handling.
  1117. //
  1118. // This method is useful when you want to inject custom logic or configuration
  1119. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1120. //
  1121. //
  1122. // // Example sending a request using the DescribeTaskDefinitionRequest method.
  1123. // req, resp := client.DescribeTaskDefinitionRequest(params)
  1124. //
  1125. // err := req.Send()
  1126. // if err == nil { // resp is now filled
  1127. // fmt.Println(resp)
  1128. // }
  1129. //
  1130. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeTaskDefinition
  1131. func (c *ECS) DescribeTaskDefinitionRequest(input *DescribeTaskDefinitionInput) (req *request.Request, output *DescribeTaskDefinitionOutput) {
  1132. op := &request.Operation{
  1133. Name: opDescribeTaskDefinition,
  1134. HTTPMethod: "POST",
  1135. HTTPPath: "/",
  1136. }
  1137. if input == nil {
  1138. input = &DescribeTaskDefinitionInput{}
  1139. }
  1140. output = &DescribeTaskDefinitionOutput{}
  1141. req = c.newRequest(op, input, output)
  1142. return
  1143. }
  1144. // DescribeTaskDefinition API operation for Amazon EC2 Container Service.
  1145. //
  1146. // Describes a task definition. You can specify a family and revision to find
  1147. // information about a specific task definition, or you can simply specify the
  1148. // family to find the latest ACTIVE revision in that family.
  1149. //
  1150. // You can only describe INACTIVE task definitions while an active task or service
  1151. // references them.
  1152. //
  1153. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1154. // with awserr.Error's Code and Message methods to get detailed information about
  1155. // the error.
  1156. //
  1157. // See the AWS API reference guide for Amazon EC2 Container Service's
  1158. // API operation DescribeTaskDefinition for usage and error information.
  1159. //
  1160. // Returned Error Codes:
  1161. // * ErrCodeServerException "ServerException"
  1162. // These errors are usually caused by a server issue.
  1163. //
  1164. // * ErrCodeClientException "ClientException"
  1165. // These errors are usually caused by a client action, such as using an action
  1166. // or resource on behalf of a user that doesn't have permissions to use the
  1167. // action or resource, or specifying an identifier that is not valid.
  1168. //
  1169. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1170. // The specified parameter is invalid. Review the available parameters for the
  1171. // API request.
  1172. //
  1173. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeTaskDefinition
  1174. func (c *ECS) DescribeTaskDefinition(input *DescribeTaskDefinitionInput) (*DescribeTaskDefinitionOutput, error) {
  1175. req, out := c.DescribeTaskDefinitionRequest(input)
  1176. return out, req.Send()
  1177. }
  1178. // DescribeTaskDefinitionWithContext is the same as DescribeTaskDefinition with the addition of
  1179. // the ability to pass a context and additional request options.
  1180. //
  1181. // See DescribeTaskDefinition for details on how to use this API operation.
  1182. //
  1183. // The context must be non-nil and will be used for request cancellation. If
  1184. // the context is nil a panic will occur. In the future the SDK may create
  1185. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1186. // for more information on using Contexts.
  1187. func (c *ECS) DescribeTaskDefinitionWithContext(ctx aws.Context, input *DescribeTaskDefinitionInput, opts ...request.Option) (*DescribeTaskDefinitionOutput, error) {
  1188. req, out := c.DescribeTaskDefinitionRequest(input)
  1189. req.SetContext(ctx)
  1190. req.ApplyOptions(opts...)
  1191. return out, req.Send()
  1192. }
  1193. const opDescribeTasks = "DescribeTasks"
  1194. // DescribeTasksRequest generates a "aws/request.Request" representing the
  1195. // client's request for the DescribeTasks operation. The "output" return
  1196. // value will be populated with the request's response once the request completes
  1197. // successfully.
  1198. //
  1199. // Use "Send" method on the returned Request to send the API call to the service.
  1200. // the "output" return value is not valid until after Send returns without error.
  1201. //
  1202. // See DescribeTasks for more information on using the DescribeTasks
  1203. // API call, and error handling.
  1204. //
  1205. // This method is useful when you want to inject custom logic or configuration
  1206. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1207. //
  1208. //
  1209. // // Example sending a request using the DescribeTasksRequest method.
  1210. // req, resp := client.DescribeTasksRequest(params)
  1211. //
  1212. // err := req.Send()
  1213. // if err == nil { // resp is now filled
  1214. // fmt.Println(resp)
  1215. // }
  1216. //
  1217. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeTasks
  1218. func (c *ECS) DescribeTasksRequest(input *DescribeTasksInput) (req *request.Request, output *DescribeTasksOutput) {
  1219. op := &request.Operation{
  1220. Name: opDescribeTasks,
  1221. HTTPMethod: "POST",
  1222. HTTPPath: "/",
  1223. }
  1224. if input == nil {
  1225. input = &DescribeTasksInput{}
  1226. }
  1227. output = &DescribeTasksOutput{}
  1228. req = c.newRequest(op, input, output)
  1229. return
  1230. }
  1231. // DescribeTasks API operation for Amazon EC2 Container Service.
  1232. //
  1233. // Describes a specified task or tasks.
  1234. //
  1235. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1236. // with awserr.Error's Code and Message methods to get detailed information about
  1237. // the error.
  1238. //
  1239. // See the AWS API reference guide for Amazon EC2 Container Service's
  1240. // API operation DescribeTasks for usage and error information.
  1241. //
  1242. // Returned Error Codes:
  1243. // * ErrCodeServerException "ServerException"
  1244. // These errors are usually caused by a server issue.
  1245. //
  1246. // * ErrCodeClientException "ClientException"
  1247. // These errors are usually caused by a client action, such as using an action
  1248. // or resource on behalf of a user that doesn't have permissions to use the
  1249. // action or resource, or specifying an identifier that is not valid.
  1250. //
  1251. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1252. // The specified parameter is invalid. Review the available parameters for the
  1253. // API request.
  1254. //
  1255. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  1256. // The specified cluster could not be found. You can view your available clusters
  1257. // with ListClusters. Amazon ECS clusters are Region-specific.
  1258. //
  1259. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeTasks
  1260. func (c *ECS) DescribeTasks(input *DescribeTasksInput) (*DescribeTasksOutput, error) {
  1261. req, out := c.DescribeTasksRequest(input)
  1262. return out, req.Send()
  1263. }
  1264. // DescribeTasksWithContext is the same as DescribeTasks with the addition of
  1265. // the ability to pass a context and additional request options.
  1266. //
  1267. // See DescribeTasks for details on how to use this API operation.
  1268. //
  1269. // The context must be non-nil and will be used for request cancellation. If
  1270. // the context is nil a panic will occur. In the future the SDK may create
  1271. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1272. // for more information on using Contexts.
  1273. func (c *ECS) DescribeTasksWithContext(ctx aws.Context, input *DescribeTasksInput, opts ...request.Option) (*DescribeTasksOutput, error) {
  1274. req, out := c.DescribeTasksRequest(input)
  1275. req.SetContext(ctx)
  1276. req.ApplyOptions(opts...)
  1277. return out, req.Send()
  1278. }
  1279. const opDiscoverPollEndpoint = "DiscoverPollEndpoint"
  1280. // DiscoverPollEndpointRequest generates a "aws/request.Request" representing the
  1281. // client's request for the DiscoverPollEndpoint operation. The "output" return
  1282. // value will be populated with the request's response once the request completes
  1283. // successfully.
  1284. //
  1285. // Use "Send" method on the returned Request to send the API call to the service.
  1286. // the "output" return value is not valid until after Send returns without error.
  1287. //
  1288. // See DiscoverPollEndpoint for more information on using the DiscoverPollEndpoint
  1289. // API call, and error handling.
  1290. //
  1291. // This method is useful when you want to inject custom logic or configuration
  1292. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1293. //
  1294. //
  1295. // // Example sending a request using the DiscoverPollEndpointRequest method.
  1296. // req, resp := client.DiscoverPollEndpointRequest(params)
  1297. //
  1298. // err := req.Send()
  1299. // if err == nil { // resp is now filled
  1300. // fmt.Println(resp)
  1301. // }
  1302. //
  1303. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DiscoverPollEndpoint
  1304. func (c *ECS) DiscoverPollEndpointRequest(input *DiscoverPollEndpointInput) (req *request.Request, output *DiscoverPollEndpointOutput) {
  1305. op := &request.Operation{
  1306. Name: opDiscoverPollEndpoint,
  1307. HTTPMethod: "POST",
  1308. HTTPPath: "/",
  1309. }
  1310. if input == nil {
  1311. input = &DiscoverPollEndpointInput{}
  1312. }
  1313. output = &DiscoverPollEndpointOutput{}
  1314. req = c.newRequest(op, input, output)
  1315. return
  1316. }
  1317. // DiscoverPollEndpoint API operation for Amazon EC2 Container Service.
  1318. //
  1319. // This action is only used by the Amazon ECS agent, and it is not intended
  1320. // for use outside of the agent.
  1321. //
  1322. // Returns an endpoint for the Amazon ECS agent to poll for updates.
  1323. //
  1324. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1325. // with awserr.Error's Code and Message methods to get detailed information about
  1326. // the error.
  1327. //
  1328. // See the AWS API reference guide for Amazon EC2 Container Service's
  1329. // API operation DiscoverPollEndpoint for usage and error information.
  1330. //
  1331. // Returned Error Codes:
  1332. // * ErrCodeServerException "ServerException"
  1333. // These errors are usually caused by a server issue.
  1334. //
  1335. // * ErrCodeClientException "ClientException"
  1336. // These errors are usually caused by a client action, such as using an action
  1337. // or resource on behalf of a user that doesn't have permissions to use the
  1338. // action or resource, or specifying an identifier that is not valid.
  1339. //
  1340. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DiscoverPollEndpoint
  1341. func (c *ECS) DiscoverPollEndpoint(input *DiscoverPollEndpointInput) (*DiscoverPollEndpointOutput, error) {
  1342. req, out := c.DiscoverPollEndpointRequest(input)
  1343. return out, req.Send()
  1344. }
  1345. // DiscoverPollEndpointWithContext is the same as DiscoverPollEndpoint with the addition of
  1346. // the ability to pass a context and additional request options.
  1347. //
  1348. // See DiscoverPollEndpoint for details on how to use this API operation.
  1349. //
  1350. // The context must be non-nil and will be used for request cancellation. If
  1351. // the context is nil a panic will occur. In the future the SDK may create
  1352. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1353. // for more information on using Contexts.
  1354. func (c *ECS) DiscoverPollEndpointWithContext(ctx aws.Context, input *DiscoverPollEndpointInput, opts ...request.Option) (*DiscoverPollEndpointOutput, error) {
  1355. req, out := c.DiscoverPollEndpointRequest(input)
  1356. req.SetContext(ctx)
  1357. req.ApplyOptions(opts...)
  1358. return out, req.Send()
  1359. }
  1360. const opListAccountSettings = "ListAccountSettings"
  1361. // ListAccountSettingsRequest generates a "aws/request.Request" representing the
  1362. // client's request for the ListAccountSettings operation. The "output" return
  1363. // value will be populated with the request's response once the request completes
  1364. // successfully.
  1365. //
  1366. // Use "Send" method on the returned Request to send the API call to the service.
  1367. // the "output" return value is not valid until after Send returns without error.
  1368. //
  1369. // See ListAccountSettings for more information on using the ListAccountSettings
  1370. // API call, and error handling.
  1371. //
  1372. // This method is useful when you want to inject custom logic or configuration
  1373. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1374. //
  1375. //
  1376. // // Example sending a request using the ListAccountSettingsRequest method.
  1377. // req, resp := client.ListAccountSettingsRequest(params)
  1378. //
  1379. // err := req.Send()
  1380. // if err == nil { // resp is now filled
  1381. // fmt.Println(resp)
  1382. // }
  1383. //
  1384. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListAccountSettings
  1385. func (c *ECS) ListAccountSettingsRequest(input *ListAccountSettingsInput) (req *request.Request, output *ListAccountSettingsOutput) {
  1386. op := &request.Operation{
  1387. Name: opListAccountSettings,
  1388. HTTPMethod: "POST",
  1389. HTTPPath: "/",
  1390. }
  1391. if input == nil {
  1392. input = &ListAccountSettingsInput{}
  1393. }
  1394. output = &ListAccountSettingsOutput{}
  1395. req = c.newRequest(op, input, output)
  1396. return
  1397. }
  1398. // ListAccountSettings API operation for Amazon EC2 Container Service.
  1399. //
  1400. // Lists the account settings for an Amazon ECS resource for a specified principal.
  1401. //
  1402. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1403. // with awserr.Error's Code and Message methods to get detailed information about
  1404. // the error.
  1405. //
  1406. // See the AWS API reference guide for Amazon EC2 Container Service's
  1407. // API operation ListAccountSettings for usage and error information.
  1408. //
  1409. // Returned Error Codes:
  1410. // * ErrCodeServerException "ServerException"
  1411. // These errors are usually caused by a server issue.
  1412. //
  1413. // * ErrCodeClientException "ClientException"
  1414. // These errors are usually caused by a client action, such as using an action
  1415. // or resource on behalf of a user that doesn't have permissions to use the
  1416. // action or resource, or specifying an identifier that is not valid.
  1417. //
  1418. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1419. // The specified parameter is invalid. Review the available parameters for the
  1420. // API request.
  1421. //
  1422. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListAccountSettings
  1423. func (c *ECS) ListAccountSettings(input *ListAccountSettingsInput) (*ListAccountSettingsOutput, error) {
  1424. req, out := c.ListAccountSettingsRequest(input)
  1425. return out, req.Send()
  1426. }
  1427. // ListAccountSettingsWithContext is the same as ListAccountSettings with the addition of
  1428. // the ability to pass a context and additional request options.
  1429. //
  1430. // See ListAccountSettings for details on how to use this API operation.
  1431. //
  1432. // The context must be non-nil and will be used for request cancellation. If
  1433. // the context is nil a panic will occur. In the future the SDK may create
  1434. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1435. // for more information on using Contexts.
  1436. func (c *ECS) ListAccountSettingsWithContext(ctx aws.Context, input *ListAccountSettingsInput, opts ...request.Option) (*ListAccountSettingsOutput, error) {
  1437. req, out := c.ListAccountSettingsRequest(input)
  1438. req.SetContext(ctx)
  1439. req.ApplyOptions(opts...)
  1440. return out, req.Send()
  1441. }
  1442. const opListAttributes = "ListAttributes"
  1443. // ListAttributesRequest generates a "aws/request.Request" representing the
  1444. // client's request for the ListAttributes operation. The "output" return
  1445. // value will be populated with the request's response once the request completes
  1446. // successfully.
  1447. //
  1448. // Use "Send" method on the returned Request to send the API call to the service.
  1449. // the "output" return value is not valid until after Send returns without error.
  1450. //
  1451. // See ListAttributes for more information on using the ListAttributes
  1452. // API call, and error handling.
  1453. //
  1454. // This method is useful when you want to inject custom logic or configuration
  1455. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1456. //
  1457. //
  1458. // // Example sending a request using the ListAttributesRequest method.
  1459. // req, resp := client.ListAttributesRequest(params)
  1460. //
  1461. // err := req.Send()
  1462. // if err == nil { // resp is now filled
  1463. // fmt.Println(resp)
  1464. // }
  1465. //
  1466. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListAttributes
  1467. func (c *ECS) ListAttributesRequest(input *ListAttributesInput) (req *request.Request, output *ListAttributesOutput) {
  1468. op := &request.Operation{
  1469. Name: opListAttributes,
  1470. HTTPMethod: "POST",
  1471. HTTPPath: "/",
  1472. }
  1473. if input == nil {
  1474. input = &ListAttributesInput{}
  1475. }
  1476. output = &ListAttributesOutput{}
  1477. req = c.newRequest(op, input, output)
  1478. return
  1479. }
  1480. // ListAttributes API operation for Amazon EC2 Container Service.
  1481. //
  1482. // Lists the attributes for Amazon ECS resources within a specified target type
  1483. // and cluster. When you specify a target type and cluster, ListAttributes returns
  1484. // a list of attribute objects, one for each attribute on each resource. You
  1485. // can filter the list of results to a single attribute name to only return
  1486. // results that have that name. You can also filter the results by attribute
  1487. // name and value, for example, to see which container instances in a cluster
  1488. // are running a Linux AMI (ecs.os-type=linux).
  1489. //
  1490. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1491. // with awserr.Error's Code and Message methods to get detailed information about
  1492. // the error.
  1493. //
  1494. // See the AWS API reference guide for Amazon EC2 Container Service's
  1495. // API operation ListAttributes for usage and error information.
  1496. //
  1497. // Returned Error Codes:
  1498. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  1499. // The specified cluster could not be found. You can view your available clusters
  1500. // with ListClusters. Amazon ECS clusters are Region-specific.
  1501. //
  1502. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1503. // The specified parameter is invalid. Review the available parameters for the
  1504. // API request.
  1505. //
  1506. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListAttributes
  1507. func (c *ECS) ListAttributes(input *ListAttributesInput) (*ListAttributesOutput, error) {
  1508. req, out := c.ListAttributesRequest(input)
  1509. return out, req.Send()
  1510. }
  1511. // ListAttributesWithContext is the same as ListAttributes with the addition of
  1512. // the ability to pass a context and additional request options.
  1513. //
  1514. // See ListAttributes for details on how to use this API operation.
  1515. //
  1516. // The context must be non-nil and will be used for request cancellation. If
  1517. // the context is nil a panic will occur. In the future the SDK may create
  1518. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1519. // for more information on using Contexts.
  1520. func (c *ECS) ListAttributesWithContext(ctx aws.Context, input *ListAttributesInput, opts ...request.Option) (*ListAttributesOutput, error) {
  1521. req, out := c.ListAttributesRequest(input)
  1522. req.SetContext(ctx)
  1523. req.ApplyOptions(opts...)
  1524. return out, req.Send()
  1525. }
  1526. const opListClusters = "ListClusters"
  1527. // ListClustersRequest generates a "aws/request.Request" representing the
  1528. // client's request for the ListClusters operation. The "output" return
  1529. // value will be populated with the request's response once the request completes
  1530. // successfully.
  1531. //
  1532. // Use "Send" method on the returned Request to send the API call to the service.
  1533. // the "output" return value is not valid until after Send returns without error.
  1534. //
  1535. // See ListClusters for more information on using the ListClusters
  1536. // API call, and error handling.
  1537. //
  1538. // This method is useful when you want to inject custom logic or configuration
  1539. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1540. //
  1541. //
  1542. // // Example sending a request using the ListClustersRequest method.
  1543. // req, resp := client.ListClustersRequest(params)
  1544. //
  1545. // err := req.Send()
  1546. // if err == nil { // resp is now filled
  1547. // fmt.Println(resp)
  1548. // }
  1549. //
  1550. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListClusters
  1551. func (c *ECS) ListClustersRequest(input *ListClustersInput) (req *request.Request, output *ListClustersOutput) {
  1552. op := &request.Operation{
  1553. Name: opListClusters,
  1554. HTTPMethod: "POST",
  1555. HTTPPath: "/",
  1556. Paginator: &request.Paginator{
  1557. InputTokens: []string{"nextToken"},
  1558. OutputTokens: []string{"nextToken"},
  1559. LimitToken: "maxResults",
  1560. TruncationToken: "",
  1561. },
  1562. }
  1563. if input == nil {
  1564. input = &ListClustersInput{}
  1565. }
  1566. output = &ListClustersOutput{}
  1567. req = c.newRequest(op, input, output)
  1568. return
  1569. }
  1570. // ListClusters API operation for Amazon EC2 Container Service.
  1571. //
  1572. // Returns a list of existing clusters.
  1573. //
  1574. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1575. // with awserr.Error's Code and Message methods to get detailed information about
  1576. // the error.
  1577. //
  1578. // See the AWS API reference guide for Amazon EC2 Container Service's
  1579. // API operation ListClusters for usage and error information.
  1580. //
  1581. // Returned Error Codes:
  1582. // * ErrCodeServerException "ServerException"
  1583. // These errors are usually caused by a server issue.
  1584. //
  1585. // * ErrCodeClientException "ClientException"
  1586. // These errors are usually caused by a client action, such as using an action
  1587. // or resource on behalf of a user that doesn't have permissions to use the
  1588. // action or resource, or specifying an identifier that is not valid.
  1589. //
  1590. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1591. // The specified parameter is invalid. Review the available parameters for the
  1592. // API request.
  1593. //
  1594. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListClusters
  1595. func (c *ECS) ListClusters(input *ListClustersInput) (*ListClustersOutput, error) {
  1596. req, out := c.ListClustersRequest(input)
  1597. return out, req.Send()
  1598. }
  1599. // ListClustersWithContext is the same as ListClusters with the addition of
  1600. // the ability to pass a context and additional request options.
  1601. //
  1602. // See ListClusters for details on how to use this API operation.
  1603. //
  1604. // The context must be non-nil and will be used for request cancellation. If
  1605. // the context is nil a panic will occur. In the future the SDK may create
  1606. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1607. // for more information on using Contexts.
  1608. func (c *ECS) ListClustersWithContext(ctx aws.Context, input *ListClustersInput, opts ...request.Option) (*ListClustersOutput, error) {
  1609. req, out := c.ListClustersRequest(input)
  1610. req.SetContext(ctx)
  1611. req.ApplyOptions(opts...)
  1612. return out, req.Send()
  1613. }
  1614. // ListClustersPages iterates over the pages of a ListClusters operation,
  1615. // calling the "fn" function with the response data for each page. To stop
  1616. // iterating, return false from the fn function.
  1617. //
  1618. // See ListClusters method for more information on how to use this operation.
  1619. //
  1620. // Note: This operation can generate multiple requests to a service.
  1621. //
  1622. // // Example iterating over at most 3 pages of a ListClusters operation.
  1623. // pageNum := 0
  1624. // err := client.ListClustersPages(params,
  1625. // func(page *ListClustersOutput, lastPage bool) bool {
  1626. // pageNum++
  1627. // fmt.Println(page)
  1628. // return pageNum <= 3
  1629. // })
  1630. //
  1631. func (c *ECS) ListClustersPages(input *ListClustersInput, fn func(*ListClustersOutput, bool) bool) error {
  1632. return c.ListClustersPagesWithContext(aws.BackgroundContext(), input, fn)
  1633. }
  1634. // ListClustersPagesWithContext same as ListClustersPages except
  1635. // it takes a Context and allows setting request options on the pages.
  1636. //
  1637. // The context must be non-nil and will be used for request cancellation. If
  1638. // the context is nil a panic will occur. In the future the SDK may create
  1639. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1640. // for more information on using Contexts.
  1641. func (c *ECS) ListClustersPagesWithContext(ctx aws.Context, input *ListClustersInput, fn func(*ListClustersOutput, bool) bool, opts ...request.Option) error {
  1642. p := request.Pagination{
  1643. NewRequest: func() (*request.Request, error) {
  1644. var inCpy *ListClustersInput
  1645. if input != nil {
  1646. tmp := *input
  1647. inCpy = &tmp
  1648. }
  1649. req, _ := c.ListClustersRequest(inCpy)
  1650. req.SetContext(ctx)
  1651. req.ApplyOptions(opts...)
  1652. return req, nil
  1653. },
  1654. }
  1655. cont := true
  1656. for p.Next() && cont {
  1657. cont = fn(p.Page().(*ListClustersOutput), !p.HasNextPage())
  1658. }
  1659. return p.Err()
  1660. }
  1661. const opListContainerInstances = "ListContainerInstances"
  1662. // ListContainerInstancesRequest generates a "aws/request.Request" representing the
  1663. // client's request for the ListContainerInstances operation. The "output" return
  1664. // value will be populated with the request's response once the request completes
  1665. // successfully.
  1666. //
  1667. // Use "Send" method on the returned Request to send the API call to the service.
  1668. // the "output" return value is not valid until after Send returns without error.
  1669. //
  1670. // See ListContainerInstances for more information on using the ListContainerInstances
  1671. // API call, and error handling.
  1672. //
  1673. // This method is useful when you want to inject custom logic or configuration
  1674. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1675. //
  1676. //
  1677. // // Example sending a request using the ListContainerInstancesRequest method.
  1678. // req, resp := client.ListContainerInstancesRequest(params)
  1679. //
  1680. // err := req.Send()
  1681. // if err == nil { // resp is now filled
  1682. // fmt.Println(resp)
  1683. // }
  1684. //
  1685. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListContainerInstances
  1686. func (c *ECS) ListContainerInstancesRequest(input *ListContainerInstancesInput) (req *request.Request, output *ListContainerInstancesOutput) {
  1687. op := &request.Operation{
  1688. Name: opListContainerInstances,
  1689. HTTPMethod: "POST",
  1690. HTTPPath: "/",
  1691. Paginator: &request.Paginator{
  1692. InputTokens: []string{"nextToken"},
  1693. OutputTokens: []string{"nextToken"},
  1694. LimitToken: "maxResults",
  1695. TruncationToken: "",
  1696. },
  1697. }
  1698. if input == nil {
  1699. input = &ListContainerInstancesInput{}
  1700. }
  1701. output = &ListContainerInstancesOutput{}
  1702. req = c.newRequest(op, input, output)
  1703. return
  1704. }
  1705. // ListContainerInstances API operation for Amazon EC2 Container Service.
  1706. //
  1707. // Returns a list of container instances in a specified cluster. You can filter
  1708. // the results of a ListContainerInstances operation with cluster query language
  1709. // statements inside the filter parameter. For more information, see Cluster
  1710. // Query Language (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html)
  1711. // in the Amazon Elastic Container Service Developer Guide.
  1712. //
  1713. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1714. // with awserr.Error's Code and Message methods to get detailed information about
  1715. // the error.
  1716. //
  1717. // See the AWS API reference guide for Amazon EC2 Container Service's
  1718. // API operation ListContainerInstances for usage and error information.
  1719. //
  1720. // Returned Error Codes:
  1721. // * ErrCodeServerException "ServerException"
  1722. // These errors are usually caused by a server issue.
  1723. //
  1724. // * ErrCodeClientException "ClientException"
  1725. // These errors are usually caused by a client action, such as using an action
  1726. // or resource on behalf of a user that doesn't have permissions to use the
  1727. // action or resource, or specifying an identifier that is not valid.
  1728. //
  1729. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1730. // The specified parameter is invalid. Review the available parameters for the
  1731. // API request.
  1732. //
  1733. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  1734. // The specified cluster could not be found. You can view your available clusters
  1735. // with ListClusters. Amazon ECS clusters are Region-specific.
  1736. //
  1737. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListContainerInstances
  1738. func (c *ECS) ListContainerInstances(input *ListContainerInstancesInput) (*ListContainerInstancesOutput, error) {
  1739. req, out := c.ListContainerInstancesRequest(input)
  1740. return out, req.Send()
  1741. }
  1742. // ListContainerInstancesWithContext is the same as ListContainerInstances with the addition of
  1743. // the ability to pass a context and additional request options.
  1744. //
  1745. // See ListContainerInstances for details on how to use this API operation.
  1746. //
  1747. // The context must be non-nil and will be used for request cancellation. If
  1748. // the context is nil a panic will occur. In the future the SDK may create
  1749. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1750. // for more information on using Contexts.
  1751. func (c *ECS) ListContainerInstancesWithContext(ctx aws.Context, input *ListContainerInstancesInput, opts ...request.Option) (*ListContainerInstancesOutput, error) {
  1752. req, out := c.ListContainerInstancesRequest(input)
  1753. req.SetContext(ctx)
  1754. req.ApplyOptions(opts...)
  1755. return out, req.Send()
  1756. }
  1757. // ListContainerInstancesPages iterates over the pages of a ListContainerInstances operation,
  1758. // calling the "fn" function with the response data for each page. To stop
  1759. // iterating, return false from the fn function.
  1760. //
  1761. // See ListContainerInstances method for more information on how to use this operation.
  1762. //
  1763. // Note: This operation can generate multiple requests to a service.
  1764. //
  1765. // // Example iterating over at most 3 pages of a ListContainerInstances operation.
  1766. // pageNum := 0
  1767. // err := client.ListContainerInstancesPages(params,
  1768. // func(page *ListContainerInstancesOutput, lastPage bool) bool {
  1769. // pageNum++
  1770. // fmt.Println(page)
  1771. // return pageNum <= 3
  1772. // })
  1773. //
  1774. func (c *ECS) ListContainerInstancesPages(input *ListContainerInstancesInput, fn func(*ListContainerInstancesOutput, bool) bool) error {
  1775. return c.ListContainerInstancesPagesWithContext(aws.BackgroundContext(), input, fn)
  1776. }
  1777. // ListContainerInstancesPagesWithContext same as ListContainerInstancesPages except
  1778. // it takes a Context and allows setting request options on the pages.
  1779. //
  1780. // The context must be non-nil and will be used for request cancellation. If
  1781. // the context is nil a panic will occur. In the future the SDK may create
  1782. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1783. // for more information on using Contexts.
  1784. func (c *ECS) ListContainerInstancesPagesWithContext(ctx aws.Context, input *ListContainerInstancesInput, fn func(*ListContainerInstancesOutput, bool) bool, opts ...request.Option) error {
  1785. p := request.Pagination{
  1786. NewRequest: func() (*request.Request, error) {
  1787. var inCpy *ListContainerInstancesInput
  1788. if input != nil {
  1789. tmp := *input
  1790. inCpy = &tmp
  1791. }
  1792. req, _ := c.ListContainerInstancesRequest(inCpy)
  1793. req.SetContext(ctx)
  1794. req.ApplyOptions(opts...)
  1795. return req, nil
  1796. },
  1797. }
  1798. cont := true
  1799. for p.Next() && cont {
  1800. cont = fn(p.Page().(*ListContainerInstancesOutput), !p.HasNextPage())
  1801. }
  1802. return p.Err()
  1803. }
  1804. const opListServices = "ListServices"
  1805. // ListServicesRequest generates a "aws/request.Request" representing the
  1806. // client's request for the ListServices operation. The "output" return
  1807. // value will be populated with the request's response once the request completes
  1808. // successfully.
  1809. //
  1810. // Use "Send" method on the returned Request to send the API call to the service.
  1811. // the "output" return value is not valid until after Send returns without error.
  1812. //
  1813. // See ListServices for more information on using the ListServices
  1814. // API call, and error handling.
  1815. //
  1816. // This method is useful when you want to inject custom logic or configuration
  1817. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1818. //
  1819. //
  1820. // // Example sending a request using the ListServicesRequest method.
  1821. // req, resp := client.ListServicesRequest(params)
  1822. //
  1823. // err := req.Send()
  1824. // if err == nil { // resp is now filled
  1825. // fmt.Println(resp)
  1826. // }
  1827. //
  1828. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListServices
  1829. func (c *ECS) ListServicesRequest(input *ListServicesInput) (req *request.Request, output *ListServicesOutput) {
  1830. op := &request.Operation{
  1831. Name: opListServices,
  1832. HTTPMethod: "POST",
  1833. HTTPPath: "/",
  1834. Paginator: &request.Paginator{
  1835. InputTokens: []string{"nextToken"},
  1836. OutputTokens: []string{"nextToken"},
  1837. LimitToken: "maxResults",
  1838. TruncationToken: "",
  1839. },
  1840. }
  1841. if input == nil {
  1842. input = &ListServicesInput{}
  1843. }
  1844. output = &ListServicesOutput{}
  1845. req = c.newRequest(op, input, output)
  1846. return
  1847. }
  1848. // ListServices API operation for Amazon EC2 Container Service.
  1849. //
  1850. // Lists the services that are running in a specified cluster.
  1851. //
  1852. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1853. // with awserr.Error's Code and Message methods to get detailed information about
  1854. // the error.
  1855. //
  1856. // See the AWS API reference guide for Amazon EC2 Container Service's
  1857. // API operation ListServices for usage and error information.
  1858. //
  1859. // Returned Error Codes:
  1860. // * ErrCodeServerException "ServerException"
  1861. // These errors are usually caused by a server issue.
  1862. //
  1863. // * ErrCodeClientException "ClientException"
  1864. // These errors are usually caused by a client action, such as using an action
  1865. // or resource on behalf of a user that doesn't have permissions to use the
  1866. // action or resource, or specifying an identifier that is not valid.
  1867. //
  1868. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1869. // The specified parameter is invalid. Review the available parameters for the
  1870. // API request.
  1871. //
  1872. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  1873. // The specified cluster could not be found. You can view your available clusters
  1874. // with ListClusters. Amazon ECS clusters are Region-specific.
  1875. //
  1876. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListServices
  1877. func (c *ECS) ListServices(input *ListServicesInput) (*ListServicesOutput, error) {
  1878. req, out := c.ListServicesRequest(input)
  1879. return out, req.Send()
  1880. }
  1881. // ListServicesWithContext is the same as ListServices with the addition of
  1882. // the ability to pass a context and additional request options.
  1883. //
  1884. // See ListServices for details on how to use this API operation.
  1885. //
  1886. // The context must be non-nil and will be used for request cancellation. If
  1887. // the context is nil a panic will occur. In the future the SDK may create
  1888. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1889. // for more information on using Contexts.
  1890. func (c *ECS) ListServicesWithContext(ctx aws.Context, input *ListServicesInput, opts ...request.Option) (*ListServicesOutput, error) {
  1891. req, out := c.ListServicesRequest(input)
  1892. req.SetContext(ctx)
  1893. req.ApplyOptions(opts...)
  1894. return out, req.Send()
  1895. }
  1896. // ListServicesPages iterates over the pages of a ListServices operation,
  1897. // calling the "fn" function with the response data for each page. To stop
  1898. // iterating, return false from the fn function.
  1899. //
  1900. // See ListServices method for more information on how to use this operation.
  1901. //
  1902. // Note: This operation can generate multiple requests to a service.
  1903. //
  1904. // // Example iterating over at most 3 pages of a ListServices operation.
  1905. // pageNum := 0
  1906. // err := client.ListServicesPages(params,
  1907. // func(page *ListServicesOutput, lastPage bool) bool {
  1908. // pageNum++
  1909. // fmt.Println(page)
  1910. // return pageNum <= 3
  1911. // })
  1912. //
  1913. func (c *ECS) ListServicesPages(input *ListServicesInput, fn func(*ListServicesOutput, bool) bool) error {
  1914. return c.ListServicesPagesWithContext(aws.BackgroundContext(), input, fn)
  1915. }
  1916. // ListServicesPagesWithContext same as ListServicesPages except
  1917. // it takes a Context and allows setting request options on the pages.
  1918. //
  1919. // The context must be non-nil and will be used for request cancellation. If
  1920. // the context is nil a panic will occur. In the future the SDK may create
  1921. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1922. // for more information on using Contexts.
  1923. func (c *ECS) ListServicesPagesWithContext(ctx aws.Context, input *ListServicesInput, fn func(*ListServicesOutput, bool) bool, opts ...request.Option) error {
  1924. p := request.Pagination{
  1925. NewRequest: func() (*request.Request, error) {
  1926. var inCpy *ListServicesInput
  1927. if input != nil {
  1928. tmp := *input
  1929. inCpy = &tmp
  1930. }
  1931. req, _ := c.ListServicesRequest(inCpy)
  1932. req.SetContext(ctx)
  1933. req.ApplyOptions(opts...)
  1934. return req, nil
  1935. },
  1936. }
  1937. cont := true
  1938. for p.Next() && cont {
  1939. cont = fn(p.Page().(*ListServicesOutput), !p.HasNextPage())
  1940. }
  1941. return p.Err()
  1942. }
  1943. const opListTagsForResource = "ListTagsForResource"
  1944. // ListTagsForResourceRequest generates a "aws/request.Request" representing the
  1945. // client's request for the ListTagsForResource operation. The "output" return
  1946. // value will be populated with the request's response once the request completes
  1947. // successfully.
  1948. //
  1949. // Use "Send" method on the returned Request to send the API call to the service.
  1950. // the "output" return value is not valid until after Send returns without error.
  1951. //
  1952. // See ListTagsForResource for more information on using the ListTagsForResource
  1953. // API call, and error handling.
  1954. //
  1955. // This method is useful when you want to inject custom logic or configuration
  1956. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1957. //
  1958. //
  1959. // // Example sending a request using the ListTagsForResourceRequest method.
  1960. // req, resp := client.ListTagsForResourceRequest(params)
  1961. //
  1962. // err := req.Send()
  1963. // if err == nil { // resp is now filled
  1964. // fmt.Println(resp)
  1965. // }
  1966. //
  1967. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTagsForResource
  1968. func (c *ECS) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
  1969. op := &request.Operation{
  1970. Name: opListTagsForResource,
  1971. HTTPMethod: "POST",
  1972. HTTPPath: "/",
  1973. }
  1974. if input == nil {
  1975. input = &ListTagsForResourceInput{}
  1976. }
  1977. output = &ListTagsForResourceOutput{}
  1978. req = c.newRequest(op, input, output)
  1979. return
  1980. }
  1981. // ListTagsForResource API operation for Amazon EC2 Container Service.
  1982. //
  1983. // List the tags for an Amazon ECS resource.
  1984. //
  1985. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1986. // with awserr.Error's Code and Message methods to get detailed information about
  1987. // the error.
  1988. //
  1989. // See the AWS API reference guide for Amazon EC2 Container Service's
  1990. // API operation ListTagsForResource for usage and error information.
  1991. //
  1992. // Returned Error Codes:
  1993. // * ErrCodeServerException "ServerException"
  1994. // These errors are usually caused by a server issue.
  1995. //
  1996. // * ErrCodeClientException "ClientException"
  1997. // These errors are usually caused by a client action, such as using an action
  1998. // or resource on behalf of a user that doesn't have permissions to use the
  1999. // action or resource, or specifying an identifier that is not valid.
  2000. //
  2001. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  2002. // The specified cluster could not be found. You can view your available clusters
  2003. // with ListClusters. Amazon ECS clusters are Region-specific.
  2004. //
  2005. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2006. // The specified parameter is invalid. Review the available parameters for the
  2007. // API request.
  2008. //
  2009. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTagsForResource
  2010. func (c *ECS) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
  2011. req, out := c.ListTagsForResourceRequest(input)
  2012. return out, req.Send()
  2013. }
  2014. // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
  2015. // the ability to pass a context and additional request options.
  2016. //
  2017. // See ListTagsForResource for details on how to use this API operation.
  2018. //
  2019. // The context must be non-nil and will be used for request cancellation. If
  2020. // the context is nil a panic will occur. In the future the SDK may create
  2021. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2022. // for more information on using Contexts.
  2023. func (c *ECS) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
  2024. req, out := c.ListTagsForResourceRequest(input)
  2025. req.SetContext(ctx)
  2026. req.ApplyOptions(opts...)
  2027. return out, req.Send()
  2028. }
  2029. const opListTaskDefinitionFamilies = "ListTaskDefinitionFamilies"
  2030. // ListTaskDefinitionFamiliesRequest generates a "aws/request.Request" representing the
  2031. // client's request for the ListTaskDefinitionFamilies operation. The "output" return
  2032. // value will be populated with the request's response once the request completes
  2033. // successfully.
  2034. //
  2035. // Use "Send" method on the returned Request to send the API call to the service.
  2036. // the "output" return value is not valid until after Send returns without error.
  2037. //
  2038. // See ListTaskDefinitionFamilies for more information on using the ListTaskDefinitionFamilies
  2039. // API call, and error handling.
  2040. //
  2041. // This method is useful when you want to inject custom logic or configuration
  2042. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2043. //
  2044. //
  2045. // // Example sending a request using the ListTaskDefinitionFamiliesRequest method.
  2046. // req, resp := client.ListTaskDefinitionFamiliesRequest(params)
  2047. //
  2048. // err := req.Send()
  2049. // if err == nil { // resp is now filled
  2050. // fmt.Println(resp)
  2051. // }
  2052. //
  2053. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTaskDefinitionFamilies
  2054. func (c *ECS) ListTaskDefinitionFamiliesRequest(input *ListTaskDefinitionFamiliesInput) (req *request.Request, output *ListTaskDefinitionFamiliesOutput) {
  2055. op := &request.Operation{
  2056. Name: opListTaskDefinitionFamilies,
  2057. HTTPMethod: "POST",
  2058. HTTPPath: "/",
  2059. Paginator: &request.Paginator{
  2060. InputTokens: []string{"nextToken"},
  2061. OutputTokens: []string{"nextToken"},
  2062. LimitToken: "maxResults",
  2063. TruncationToken: "",
  2064. },
  2065. }
  2066. if input == nil {
  2067. input = &ListTaskDefinitionFamiliesInput{}
  2068. }
  2069. output = &ListTaskDefinitionFamiliesOutput{}
  2070. req = c.newRequest(op, input, output)
  2071. return
  2072. }
  2073. // ListTaskDefinitionFamilies API operation for Amazon EC2 Container Service.
  2074. //
  2075. // Returns a list of task definition families that are registered to your account
  2076. // (which may include task definition families that no longer have any ACTIVE
  2077. // task definition revisions).
  2078. //
  2079. // You can filter out task definition families that do not contain any ACTIVE
  2080. // task definition revisions by setting the status parameter to ACTIVE. You
  2081. // can also filter the results with the familyPrefix parameter.
  2082. //
  2083. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2084. // with awserr.Error's Code and Message methods to get detailed information about
  2085. // the error.
  2086. //
  2087. // See the AWS API reference guide for Amazon EC2 Container Service's
  2088. // API operation ListTaskDefinitionFamilies for usage and error information.
  2089. //
  2090. // Returned Error Codes:
  2091. // * ErrCodeServerException "ServerException"
  2092. // These errors are usually caused by a server issue.
  2093. //
  2094. // * ErrCodeClientException "ClientException"
  2095. // These errors are usually caused by a client action, such as using an action
  2096. // or resource on behalf of a user that doesn't have permissions to use the
  2097. // action or resource, or specifying an identifier that is not valid.
  2098. //
  2099. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2100. // The specified parameter is invalid. Review the available parameters for the
  2101. // API request.
  2102. //
  2103. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTaskDefinitionFamilies
  2104. func (c *ECS) ListTaskDefinitionFamilies(input *ListTaskDefinitionFamiliesInput) (*ListTaskDefinitionFamiliesOutput, error) {
  2105. req, out := c.ListTaskDefinitionFamiliesRequest(input)
  2106. return out, req.Send()
  2107. }
  2108. // ListTaskDefinitionFamiliesWithContext is the same as ListTaskDefinitionFamilies with the addition of
  2109. // the ability to pass a context and additional request options.
  2110. //
  2111. // See ListTaskDefinitionFamilies for details on how to use this API operation.
  2112. //
  2113. // The context must be non-nil and will be used for request cancellation. If
  2114. // the context is nil a panic will occur. In the future the SDK may create
  2115. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2116. // for more information on using Contexts.
  2117. func (c *ECS) ListTaskDefinitionFamiliesWithContext(ctx aws.Context, input *ListTaskDefinitionFamiliesInput, opts ...request.Option) (*ListTaskDefinitionFamiliesOutput, error) {
  2118. req, out := c.ListTaskDefinitionFamiliesRequest(input)
  2119. req.SetContext(ctx)
  2120. req.ApplyOptions(opts...)
  2121. return out, req.Send()
  2122. }
  2123. // ListTaskDefinitionFamiliesPages iterates over the pages of a ListTaskDefinitionFamilies operation,
  2124. // calling the "fn" function with the response data for each page. To stop
  2125. // iterating, return false from the fn function.
  2126. //
  2127. // See ListTaskDefinitionFamilies method for more information on how to use this operation.
  2128. //
  2129. // Note: This operation can generate multiple requests to a service.
  2130. //
  2131. // // Example iterating over at most 3 pages of a ListTaskDefinitionFamilies operation.
  2132. // pageNum := 0
  2133. // err := client.ListTaskDefinitionFamiliesPages(params,
  2134. // func(page *ListTaskDefinitionFamiliesOutput, lastPage bool) bool {
  2135. // pageNum++
  2136. // fmt.Println(page)
  2137. // return pageNum <= 3
  2138. // })
  2139. //
  2140. func (c *ECS) ListTaskDefinitionFamiliesPages(input *ListTaskDefinitionFamiliesInput, fn func(*ListTaskDefinitionFamiliesOutput, bool) bool) error {
  2141. return c.ListTaskDefinitionFamiliesPagesWithContext(aws.BackgroundContext(), input, fn)
  2142. }
  2143. // ListTaskDefinitionFamiliesPagesWithContext same as ListTaskDefinitionFamiliesPages except
  2144. // it takes a Context and allows setting request options on the pages.
  2145. //
  2146. // The context must be non-nil and will be used for request cancellation. If
  2147. // the context is nil a panic will occur. In the future the SDK may create
  2148. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2149. // for more information on using Contexts.
  2150. func (c *ECS) ListTaskDefinitionFamiliesPagesWithContext(ctx aws.Context, input *ListTaskDefinitionFamiliesInput, fn func(*ListTaskDefinitionFamiliesOutput, bool) bool, opts ...request.Option) error {
  2151. p := request.Pagination{
  2152. NewRequest: func() (*request.Request, error) {
  2153. var inCpy *ListTaskDefinitionFamiliesInput
  2154. if input != nil {
  2155. tmp := *input
  2156. inCpy = &tmp
  2157. }
  2158. req, _ := c.ListTaskDefinitionFamiliesRequest(inCpy)
  2159. req.SetContext(ctx)
  2160. req.ApplyOptions(opts...)
  2161. return req, nil
  2162. },
  2163. }
  2164. cont := true
  2165. for p.Next() && cont {
  2166. cont = fn(p.Page().(*ListTaskDefinitionFamiliesOutput), !p.HasNextPage())
  2167. }
  2168. return p.Err()
  2169. }
  2170. const opListTaskDefinitions = "ListTaskDefinitions"
  2171. // ListTaskDefinitionsRequest generates a "aws/request.Request" representing the
  2172. // client's request for the ListTaskDefinitions operation. The "output" return
  2173. // value will be populated with the request's response once the request completes
  2174. // successfully.
  2175. //
  2176. // Use "Send" method on the returned Request to send the API call to the service.
  2177. // the "output" return value is not valid until after Send returns without error.
  2178. //
  2179. // See ListTaskDefinitions for more information on using the ListTaskDefinitions
  2180. // API call, and error handling.
  2181. //
  2182. // This method is useful when you want to inject custom logic or configuration
  2183. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2184. //
  2185. //
  2186. // // Example sending a request using the ListTaskDefinitionsRequest method.
  2187. // req, resp := client.ListTaskDefinitionsRequest(params)
  2188. //
  2189. // err := req.Send()
  2190. // if err == nil { // resp is now filled
  2191. // fmt.Println(resp)
  2192. // }
  2193. //
  2194. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTaskDefinitions
  2195. func (c *ECS) ListTaskDefinitionsRequest(input *ListTaskDefinitionsInput) (req *request.Request, output *ListTaskDefinitionsOutput) {
  2196. op := &request.Operation{
  2197. Name: opListTaskDefinitions,
  2198. HTTPMethod: "POST",
  2199. HTTPPath: "/",
  2200. Paginator: &request.Paginator{
  2201. InputTokens: []string{"nextToken"},
  2202. OutputTokens: []string{"nextToken"},
  2203. LimitToken: "maxResults",
  2204. TruncationToken: "",
  2205. },
  2206. }
  2207. if input == nil {
  2208. input = &ListTaskDefinitionsInput{}
  2209. }
  2210. output = &ListTaskDefinitionsOutput{}
  2211. req = c.newRequest(op, input, output)
  2212. return
  2213. }
  2214. // ListTaskDefinitions API operation for Amazon EC2 Container Service.
  2215. //
  2216. // Returns a list of task definitions that are registered to your account. You
  2217. // can filter the results by family name with the familyPrefix parameter or
  2218. // by status with the status parameter.
  2219. //
  2220. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2221. // with awserr.Error's Code and Message methods to get detailed information about
  2222. // the error.
  2223. //
  2224. // See the AWS API reference guide for Amazon EC2 Container Service's
  2225. // API operation ListTaskDefinitions for usage and error information.
  2226. //
  2227. // Returned Error Codes:
  2228. // * ErrCodeServerException "ServerException"
  2229. // These errors are usually caused by a server issue.
  2230. //
  2231. // * ErrCodeClientException "ClientException"
  2232. // These errors are usually caused by a client action, such as using an action
  2233. // or resource on behalf of a user that doesn't have permissions to use the
  2234. // action or resource, or specifying an identifier that is not valid.
  2235. //
  2236. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2237. // The specified parameter is invalid. Review the available parameters for the
  2238. // API request.
  2239. //
  2240. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTaskDefinitions
  2241. func (c *ECS) ListTaskDefinitions(input *ListTaskDefinitionsInput) (*ListTaskDefinitionsOutput, error) {
  2242. req, out := c.ListTaskDefinitionsRequest(input)
  2243. return out, req.Send()
  2244. }
  2245. // ListTaskDefinitionsWithContext is the same as ListTaskDefinitions with the addition of
  2246. // the ability to pass a context and additional request options.
  2247. //
  2248. // See ListTaskDefinitions for details on how to use this API operation.
  2249. //
  2250. // The context must be non-nil and will be used for request cancellation. If
  2251. // the context is nil a panic will occur. In the future the SDK may create
  2252. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2253. // for more information on using Contexts.
  2254. func (c *ECS) ListTaskDefinitionsWithContext(ctx aws.Context, input *ListTaskDefinitionsInput, opts ...request.Option) (*ListTaskDefinitionsOutput, error) {
  2255. req, out := c.ListTaskDefinitionsRequest(input)
  2256. req.SetContext(ctx)
  2257. req.ApplyOptions(opts...)
  2258. return out, req.Send()
  2259. }
  2260. // ListTaskDefinitionsPages iterates over the pages of a ListTaskDefinitions operation,
  2261. // calling the "fn" function with the response data for each page. To stop
  2262. // iterating, return false from the fn function.
  2263. //
  2264. // See ListTaskDefinitions method for more information on how to use this operation.
  2265. //
  2266. // Note: This operation can generate multiple requests to a service.
  2267. //
  2268. // // Example iterating over at most 3 pages of a ListTaskDefinitions operation.
  2269. // pageNum := 0
  2270. // err := client.ListTaskDefinitionsPages(params,
  2271. // func(page *ListTaskDefinitionsOutput, lastPage bool) bool {
  2272. // pageNum++
  2273. // fmt.Println(page)
  2274. // return pageNum <= 3
  2275. // })
  2276. //
  2277. func (c *ECS) ListTaskDefinitionsPages(input *ListTaskDefinitionsInput, fn func(*ListTaskDefinitionsOutput, bool) bool) error {
  2278. return c.ListTaskDefinitionsPagesWithContext(aws.BackgroundContext(), input, fn)
  2279. }
  2280. // ListTaskDefinitionsPagesWithContext same as ListTaskDefinitionsPages except
  2281. // it takes a Context and allows setting request options on the pages.
  2282. //
  2283. // The context must be non-nil and will be used for request cancellation. If
  2284. // the context is nil a panic will occur. In the future the SDK may create
  2285. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2286. // for more information on using Contexts.
  2287. func (c *ECS) ListTaskDefinitionsPagesWithContext(ctx aws.Context, input *ListTaskDefinitionsInput, fn func(*ListTaskDefinitionsOutput, bool) bool, opts ...request.Option) error {
  2288. p := request.Pagination{
  2289. NewRequest: func() (*request.Request, error) {
  2290. var inCpy *ListTaskDefinitionsInput
  2291. if input != nil {
  2292. tmp := *input
  2293. inCpy = &tmp
  2294. }
  2295. req, _ := c.ListTaskDefinitionsRequest(inCpy)
  2296. req.SetContext(ctx)
  2297. req.ApplyOptions(opts...)
  2298. return req, nil
  2299. },
  2300. }
  2301. cont := true
  2302. for p.Next() && cont {
  2303. cont = fn(p.Page().(*ListTaskDefinitionsOutput), !p.HasNextPage())
  2304. }
  2305. return p.Err()
  2306. }
  2307. const opListTasks = "ListTasks"
  2308. // ListTasksRequest generates a "aws/request.Request" representing the
  2309. // client's request for the ListTasks operation. The "output" return
  2310. // value will be populated with the request's response once the request completes
  2311. // successfully.
  2312. //
  2313. // Use "Send" method on the returned Request to send the API call to the service.
  2314. // the "output" return value is not valid until after Send returns without error.
  2315. //
  2316. // See ListTasks for more information on using the ListTasks
  2317. // API call, and error handling.
  2318. //
  2319. // This method is useful when you want to inject custom logic or configuration
  2320. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2321. //
  2322. //
  2323. // // Example sending a request using the ListTasksRequest method.
  2324. // req, resp := client.ListTasksRequest(params)
  2325. //
  2326. // err := req.Send()
  2327. // if err == nil { // resp is now filled
  2328. // fmt.Println(resp)
  2329. // }
  2330. //
  2331. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTasks
  2332. func (c *ECS) ListTasksRequest(input *ListTasksInput) (req *request.Request, output *ListTasksOutput) {
  2333. op := &request.Operation{
  2334. Name: opListTasks,
  2335. HTTPMethod: "POST",
  2336. HTTPPath: "/",
  2337. Paginator: &request.Paginator{
  2338. InputTokens: []string{"nextToken"},
  2339. OutputTokens: []string{"nextToken"},
  2340. LimitToken: "maxResults",
  2341. TruncationToken: "",
  2342. },
  2343. }
  2344. if input == nil {
  2345. input = &ListTasksInput{}
  2346. }
  2347. output = &ListTasksOutput{}
  2348. req = c.newRequest(op, input, output)
  2349. return
  2350. }
  2351. // ListTasks API operation for Amazon EC2 Container Service.
  2352. //
  2353. // Returns a list of tasks for a specified cluster. You can filter the results
  2354. // by family name, by a particular container instance, or by the desired status
  2355. // of the task with the family, containerInstance, and desiredStatus parameters.
  2356. //
  2357. // Recently stopped tasks might appear in the returned results. Currently, stopped
  2358. // tasks appear in the returned results for at least one hour.
  2359. //
  2360. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2361. // with awserr.Error's Code and Message methods to get detailed information about
  2362. // the error.
  2363. //
  2364. // See the AWS API reference guide for Amazon EC2 Container Service's
  2365. // API operation ListTasks for usage and error information.
  2366. //
  2367. // Returned Error Codes:
  2368. // * ErrCodeServerException "ServerException"
  2369. // These errors are usually caused by a server issue.
  2370. //
  2371. // * ErrCodeClientException "ClientException"
  2372. // These errors are usually caused by a client action, such as using an action
  2373. // or resource on behalf of a user that doesn't have permissions to use the
  2374. // action or resource, or specifying an identifier that is not valid.
  2375. //
  2376. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2377. // The specified parameter is invalid. Review the available parameters for the
  2378. // API request.
  2379. //
  2380. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  2381. // The specified cluster could not be found. You can view your available clusters
  2382. // with ListClusters. Amazon ECS clusters are Region-specific.
  2383. //
  2384. // * ErrCodeServiceNotFoundException "ServiceNotFoundException"
  2385. // The specified service could not be found. You can view your available services
  2386. // with ListServices. Amazon ECS services are cluster-specific and Region-specific.
  2387. //
  2388. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTasks
  2389. func (c *ECS) ListTasks(input *ListTasksInput) (*ListTasksOutput, error) {
  2390. req, out := c.ListTasksRequest(input)
  2391. return out, req.Send()
  2392. }
  2393. // ListTasksWithContext is the same as ListTasks with the addition of
  2394. // the ability to pass a context and additional request options.
  2395. //
  2396. // See ListTasks for details on how to use this API operation.
  2397. //
  2398. // The context must be non-nil and will be used for request cancellation. If
  2399. // the context is nil a panic will occur. In the future the SDK may create
  2400. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2401. // for more information on using Contexts.
  2402. func (c *ECS) ListTasksWithContext(ctx aws.Context, input *ListTasksInput, opts ...request.Option) (*ListTasksOutput, error) {
  2403. req, out := c.ListTasksRequest(input)
  2404. req.SetContext(ctx)
  2405. req.ApplyOptions(opts...)
  2406. return out, req.Send()
  2407. }
  2408. // ListTasksPages iterates over the pages of a ListTasks operation,
  2409. // calling the "fn" function with the response data for each page. To stop
  2410. // iterating, return false from the fn function.
  2411. //
  2412. // See ListTasks method for more information on how to use this operation.
  2413. //
  2414. // Note: This operation can generate multiple requests to a service.
  2415. //
  2416. // // Example iterating over at most 3 pages of a ListTasks operation.
  2417. // pageNum := 0
  2418. // err := client.ListTasksPages(params,
  2419. // func(page *ListTasksOutput, lastPage bool) bool {
  2420. // pageNum++
  2421. // fmt.Println(page)
  2422. // return pageNum <= 3
  2423. // })
  2424. //
  2425. func (c *ECS) ListTasksPages(input *ListTasksInput, fn func(*ListTasksOutput, bool) bool) error {
  2426. return c.ListTasksPagesWithContext(aws.BackgroundContext(), input, fn)
  2427. }
  2428. // ListTasksPagesWithContext same as ListTasksPages except
  2429. // it takes a Context and allows setting request options on the pages.
  2430. //
  2431. // The context must be non-nil and will be used for request cancellation. If
  2432. // the context is nil a panic will occur. In the future the SDK may create
  2433. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2434. // for more information on using Contexts.
  2435. func (c *ECS) ListTasksPagesWithContext(ctx aws.Context, input *ListTasksInput, fn func(*ListTasksOutput, bool) bool, opts ...request.Option) error {
  2436. p := request.Pagination{
  2437. NewRequest: func() (*request.Request, error) {
  2438. var inCpy *ListTasksInput
  2439. if input != nil {
  2440. tmp := *input
  2441. inCpy = &tmp
  2442. }
  2443. req, _ := c.ListTasksRequest(inCpy)
  2444. req.SetContext(ctx)
  2445. req.ApplyOptions(opts...)
  2446. return req, nil
  2447. },
  2448. }
  2449. cont := true
  2450. for p.Next() && cont {
  2451. cont = fn(p.Page().(*ListTasksOutput), !p.HasNextPage())
  2452. }
  2453. return p.Err()
  2454. }
  2455. const opPutAccountSetting = "PutAccountSetting"
  2456. // PutAccountSettingRequest generates a "aws/request.Request" representing the
  2457. // client's request for the PutAccountSetting operation. The "output" return
  2458. // value will be populated with the request's response once the request completes
  2459. // successfully.
  2460. //
  2461. // Use "Send" method on the returned Request to send the API call to the service.
  2462. // the "output" return value is not valid until after Send returns without error.
  2463. //
  2464. // See PutAccountSetting for more information on using the PutAccountSetting
  2465. // API call, and error handling.
  2466. //
  2467. // This method is useful when you want to inject custom logic or configuration
  2468. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2469. //
  2470. //
  2471. // // Example sending a request using the PutAccountSettingRequest method.
  2472. // req, resp := client.PutAccountSettingRequest(params)
  2473. //
  2474. // err := req.Send()
  2475. // if err == nil { // resp is now filled
  2476. // fmt.Println(resp)
  2477. // }
  2478. //
  2479. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutAccountSetting
  2480. func (c *ECS) PutAccountSettingRequest(input *PutAccountSettingInput) (req *request.Request, output *PutAccountSettingOutput) {
  2481. op := &request.Operation{
  2482. Name: opPutAccountSetting,
  2483. HTTPMethod: "POST",
  2484. HTTPPath: "/",
  2485. }
  2486. if input == nil {
  2487. input = &PutAccountSettingInput{}
  2488. }
  2489. output = &PutAccountSettingOutput{}
  2490. req = c.newRequest(op, input, output)
  2491. return
  2492. }
  2493. // PutAccountSetting API operation for Amazon EC2 Container Service.
  2494. //
  2495. // Modifies the ARN and resource ID format of a resource for a specified IAM
  2496. // user, IAM role, or the root user for an account. You can specify whether
  2497. // the new ARN and resource ID format are enabled for new resources that are
  2498. // created. Enabling this setting is required to use new Amazon ECS features
  2499. // such as resource tagging.
  2500. //
  2501. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2502. // with awserr.Error's Code and Message methods to get detailed information about
  2503. // the error.
  2504. //
  2505. // See the AWS API reference guide for Amazon EC2 Container Service's
  2506. // API operation PutAccountSetting for usage and error information.
  2507. //
  2508. // Returned Error Codes:
  2509. // * ErrCodeServerException "ServerException"
  2510. // These errors are usually caused by a server issue.
  2511. //
  2512. // * ErrCodeClientException "ClientException"
  2513. // These errors are usually caused by a client action, such as using an action
  2514. // or resource on behalf of a user that doesn't have permissions to use the
  2515. // action or resource, or specifying an identifier that is not valid.
  2516. //
  2517. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2518. // The specified parameter is invalid. Review the available parameters for the
  2519. // API request.
  2520. //
  2521. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutAccountSetting
  2522. func (c *ECS) PutAccountSetting(input *PutAccountSettingInput) (*PutAccountSettingOutput, error) {
  2523. req, out := c.PutAccountSettingRequest(input)
  2524. return out, req.Send()
  2525. }
  2526. // PutAccountSettingWithContext is the same as PutAccountSetting with the addition of
  2527. // the ability to pass a context and additional request options.
  2528. //
  2529. // See PutAccountSetting for details on how to use this API operation.
  2530. //
  2531. // The context must be non-nil and will be used for request cancellation. If
  2532. // the context is nil a panic will occur. In the future the SDK may create
  2533. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2534. // for more information on using Contexts.
  2535. func (c *ECS) PutAccountSettingWithContext(ctx aws.Context, input *PutAccountSettingInput, opts ...request.Option) (*PutAccountSettingOutput, error) {
  2536. req, out := c.PutAccountSettingRequest(input)
  2537. req.SetContext(ctx)
  2538. req.ApplyOptions(opts...)
  2539. return out, req.Send()
  2540. }
  2541. const opPutAttributes = "PutAttributes"
  2542. // PutAttributesRequest generates a "aws/request.Request" representing the
  2543. // client's request for the PutAttributes operation. The "output" return
  2544. // value will be populated with the request's response once the request completes
  2545. // successfully.
  2546. //
  2547. // Use "Send" method on the returned Request to send the API call to the service.
  2548. // the "output" return value is not valid until after Send returns without error.
  2549. //
  2550. // See PutAttributes for more information on using the PutAttributes
  2551. // API call, and error handling.
  2552. //
  2553. // This method is useful when you want to inject custom logic or configuration
  2554. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2555. //
  2556. //
  2557. // // Example sending a request using the PutAttributesRequest method.
  2558. // req, resp := client.PutAttributesRequest(params)
  2559. //
  2560. // err := req.Send()
  2561. // if err == nil { // resp is now filled
  2562. // fmt.Println(resp)
  2563. // }
  2564. //
  2565. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutAttributes
  2566. func (c *ECS) PutAttributesRequest(input *PutAttributesInput) (req *request.Request, output *PutAttributesOutput) {
  2567. op := &request.Operation{
  2568. Name: opPutAttributes,
  2569. HTTPMethod: "POST",
  2570. HTTPPath: "/",
  2571. }
  2572. if input == nil {
  2573. input = &PutAttributesInput{}
  2574. }
  2575. output = &PutAttributesOutput{}
  2576. req = c.newRequest(op, input, output)
  2577. return
  2578. }
  2579. // PutAttributes API operation for Amazon EC2 Container Service.
  2580. //
  2581. // Create or update an attribute on an Amazon ECS resource. If the attribute
  2582. // does not exist, it is created. If the attribute exists, its value is replaced
  2583. // with the specified value. To delete an attribute, use DeleteAttributes. For
  2584. // more information, see Attributes (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes)
  2585. // in the Amazon Elastic Container Service Developer Guide.
  2586. //
  2587. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2588. // with awserr.Error's Code and Message methods to get detailed information about
  2589. // the error.
  2590. //
  2591. // See the AWS API reference guide for Amazon EC2 Container Service's
  2592. // API operation PutAttributes for usage and error information.
  2593. //
  2594. // Returned Error Codes:
  2595. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  2596. // The specified cluster could not be found. You can view your available clusters
  2597. // with ListClusters. Amazon ECS clusters are Region-specific.
  2598. //
  2599. // * ErrCodeTargetNotFoundException "TargetNotFoundException"
  2600. // The specified target could not be found. You can view your available container
  2601. // instances with ListContainerInstances. Amazon ECS container instances are
  2602. // cluster-specific and Region-specific.
  2603. //
  2604. // * ErrCodeAttributeLimitExceededException "AttributeLimitExceededException"
  2605. // You can apply up to 10 custom attributes per resource. You can view the attributes
  2606. // of a resource with ListAttributes. You can remove existing attributes on
  2607. // a resource with DeleteAttributes.
  2608. //
  2609. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2610. // The specified parameter is invalid. Review the available parameters for the
  2611. // API request.
  2612. //
  2613. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutAttributes
  2614. func (c *ECS) PutAttributes(input *PutAttributesInput) (*PutAttributesOutput, error) {
  2615. req, out := c.PutAttributesRequest(input)
  2616. return out, req.Send()
  2617. }
  2618. // PutAttributesWithContext is the same as PutAttributes with the addition of
  2619. // the ability to pass a context and additional request options.
  2620. //
  2621. // See PutAttributes for details on how to use this API operation.
  2622. //
  2623. // The context must be non-nil and will be used for request cancellation. If
  2624. // the context is nil a panic will occur. In the future the SDK may create
  2625. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2626. // for more information on using Contexts.
  2627. func (c *ECS) PutAttributesWithContext(ctx aws.Context, input *PutAttributesInput, opts ...request.Option) (*PutAttributesOutput, error) {
  2628. req, out := c.PutAttributesRequest(input)
  2629. req.SetContext(ctx)
  2630. req.ApplyOptions(opts...)
  2631. return out, req.Send()
  2632. }
  2633. const opRegisterContainerInstance = "RegisterContainerInstance"
  2634. // RegisterContainerInstanceRequest generates a "aws/request.Request" representing the
  2635. // client's request for the RegisterContainerInstance operation. The "output" return
  2636. // value will be populated with the request's response once the request completes
  2637. // successfully.
  2638. //
  2639. // Use "Send" method on the returned Request to send the API call to the service.
  2640. // the "output" return value is not valid until after Send returns without error.
  2641. //
  2642. // See RegisterContainerInstance for more information on using the RegisterContainerInstance
  2643. // API call, and error handling.
  2644. //
  2645. // This method is useful when you want to inject custom logic or configuration
  2646. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2647. //
  2648. //
  2649. // // Example sending a request using the RegisterContainerInstanceRequest method.
  2650. // req, resp := client.RegisterContainerInstanceRequest(params)
  2651. //
  2652. // err := req.Send()
  2653. // if err == nil { // resp is now filled
  2654. // fmt.Println(resp)
  2655. // }
  2656. //
  2657. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RegisterContainerInstance
  2658. func (c *ECS) RegisterContainerInstanceRequest(input *RegisterContainerInstanceInput) (req *request.Request, output *RegisterContainerInstanceOutput) {
  2659. op := &request.Operation{
  2660. Name: opRegisterContainerInstance,
  2661. HTTPMethod: "POST",
  2662. HTTPPath: "/",
  2663. }
  2664. if input == nil {
  2665. input = &RegisterContainerInstanceInput{}
  2666. }
  2667. output = &RegisterContainerInstanceOutput{}
  2668. req = c.newRequest(op, input, output)
  2669. return
  2670. }
  2671. // RegisterContainerInstance API operation for Amazon EC2 Container Service.
  2672. //
  2673. // This action is only used by the Amazon ECS agent, and it is not intended
  2674. // for use outside of the agent.
  2675. //
  2676. // Registers an EC2 instance into the specified cluster. This instance becomes
  2677. // available to place containers on.
  2678. //
  2679. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2680. // with awserr.Error's Code and Message methods to get detailed information about
  2681. // the error.
  2682. //
  2683. // See the AWS API reference guide for Amazon EC2 Container Service's
  2684. // API operation RegisterContainerInstance for usage and error information.
  2685. //
  2686. // Returned Error Codes:
  2687. // * ErrCodeServerException "ServerException"
  2688. // These errors are usually caused by a server issue.
  2689. //
  2690. // * ErrCodeClientException "ClientException"
  2691. // These errors are usually caused by a client action, such as using an action
  2692. // or resource on behalf of a user that doesn't have permissions to use the
  2693. // action or resource, or specifying an identifier that is not valid.
  2694. //
  2695. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2696. // The specified parameter is invalid. Review the available parameters for the
  2697. // API request.
  2698. //
  2699. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RegisterContainerInstance
  2700. func (c *ECS) RegisterContainerInstance(input *RegisterContainerInstanceInput) (*RegisterContainerInstanceOutput, error) {
  2701. req, out := c.RegisterContainerInstanceRequest(input)
  2702. return out, req.Send()
  2703. }
  2704. // RegisterContainerInstanceWithContext is the same as RegisterContainerInstance with the addition of
  2705. // the ability to pass a context and additional request options.
  2706. //
  2707. // See RegisterContainerInstance for details on how to use this API operation.
  2708. //
  2709. // The context must be non-nil and will be used for request cancellation. If
  2710. // the context is nil a panic will occur. In the future the SDK may create
  2711. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2712. // for more information on using Contexts.
  2713. func (c *ECS) RegisterContainerInstanceWithContext(ctx aws.Context, input *RegisterContainerInstanceInput, opts ...request.Option) (*RegisterContainerInstanceOutput, error) {
  2714. req, out := c.RegisterContainerInstanceRequest(input)
  2715. req.SetContext(ctx)
  2716. req.ApplyOptions(opts...)
  2717. return out, req.Send()
  2718. }
  2719. const opRegisterTaskDefinition = "RegisterTaskDefinition"
  2720. // RegisterTaskDefinitionRequest generates a "aws/request.Request" representing the
  2721. // client's request for the RegisterTaskDefinition operation. The "output" return
  2722. // value will be populated with the request's response once the request completes
  2723. // successfully.
  2724. //
  2725. // Use "Send" method on the returned Request to send the API call to the service.
  2726. // the "output" return value is not valid until after Send returns without error.
  2727. //
  2728. // See RegisterTaskDefinition for more information on using the RegisterTaskDefinition
  2729. // API call, and error handling.
  2730. //
  2731. // This method is useful when you want to inject custom logic or configuration
  2732. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2733. //
  2734. //
  2735. // // Example sending a request using the RegisterTaskDefinitionRequest method.
  2736. // req, resp := client.RegisterTaskDefinitionRequest(params)
  2737. //
  2738. // err := req.Send()
  2739. // if err == nil { // resp is now filled
  2740. // fmt.Println(resp)
  2741. // }
  2742. //
  2743. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RegisterTaskDefinition
  2744. func (c *ECS) RegisterTaskDefinitionRequest(input *RegisterTaskDefinitionInput) (req *request.Request, output *RegisterTaskDefinitionOutput) {
  2745. op := &request.Operation{
  2746. Name: opRegisterTaskDefinition,
  2747. HTTPMethod: "POST",
  2748. HTTPPath: "/",
  2749. }
  2750. if input == nil {
  2751. input = &RegisterTaskDefinitionInput{}
  2752. }
  2753. output = &RegisterTaskDefinitionOutput{}
  2754. req = c.newRequest(op, input, output)
  2755. return
  2756. }
  2757. // RegisterTaskDefinition API operation for Amazon EC2 Container Service.
  2758. //
  2759. // Registers a new task definition from the supplied family and containerDefinitions.
  2760. // Optionally, you can add data volumes to your containers with the volumes
  2761. // parameter. For more information about task definition parameters and defaults,
  2762. // see Amazon ECS Task Definitions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html)
  2763. // in the Amazon Elastic Container Service Developer Guide.
  2764. //
  2765. // You can specify an IAM role for your task with the taskRoleArn parameter.
  2766. // When you specify an IAM role for a task, its containers can then use the
  2767. // latest versions of the AWS CLI or SDKs to make API requests to the AWS services
  2768. // that are specified in the IAM policy associated with the role. For more information,
  2769. // see IAM Roles for Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html)
  2770. // in the Amazon Elastic Container Service Developer Guide.
  2771. //
  2772. // You can specify a Docker networking mode for the containers in your task
  2773. // definition with the networkMode parameter. The available network modes correspond
  2774. // to those described in Network settings (https://docs.docker.com/engine/reference/run/#/network-settings)
  2775. // in the Docker run reference. If you specify the awsvpc network mode, the
  2776. // task is allocated an elastic network interface, and you must specify a NetworkConfiguration
  2777. // when you create a service or run a task with the task definition. For more
  2778. // information, see Task Networking (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html)
  2779. // in the Amazon Elastic Container Service Developer Guide.
  2780. //
  2781. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2782. // with awserr.Error's Code and Message methods to get detailed information about
  2783. // the error.
  2784. //
  2785. // See the AWS API reference guide for Amazon EC2 Container Service's
  2786. // API operation RegisterTaskDefinition for usage and error information.
  2787. //
  2788. // Returned Error Codes:
  2789. // * ErrCodeServerException "ServerException"
  2790. // These errors are usually caused by a server issue.
  2791. //
  2792. // * ErrCodeClientException "ClientException"
  2793. // These errors are usually caused by a client action, such as using an action
  2794. // or resource on behalf of a user that doesn't have permissions to use the
  2795. // action or resource, or specifying an identifier that is not valid.
  2796. //
  2797. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2798. // The specified parameter is invalid. Review the available parameters for the
  2799. // API request.
  2800. //
  2801. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RegisterTaskDefinition
  2802. func (c *ECS) RegisterTaskDefinition(input *RegisterTaskDefinitionInput) (*RegisterTaskDefinitionOutput, error) {
  2803. req, out := c.RegisterTaskDefinitionRequest(input)
  2804. return out, req.Send()
  2805. }
  2806. // RegisterTaskDefinitionWithContext is the same as RegisterTaskDefinition with the addition of
  2807. // the ability to pass a context and additional request options.
  2808. //
  2809. // See RegisterTaskDefinition for details on how to use this API operation.
  2810. //
  2811. // The context must be non-nil and will be used for request cancellation. If
  2812. // the context is nil a panic will occur. In the future the SDK may create
  2813. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2814. // for more information on using Contexts.
  2815. func (c *ECS) RegisterTaskDefinitionWithContext(ctx aws.Context, input *RegisterTaskDefinitionInput, opts ...request.Option) (*RegisterTaskDefinitionOutput, error) {
  2816. req, out := c.RegisterTaskDefinitionRequest(input)
  2817. req.SetContext(ctx)
  2818. req.ApplyOptions(opts...)
  2819. return out, req.Send()
  2820. }
  2821. const opRunTask = "RunTask"
  2822. // RunTaskRequest generates a "aws/request.Request" representing the
  2823. // client's request for the RunTask operation. The "output" return
  2824. // value will be populated with the request's response once the request completes
  2825. // successfully.
  2826. //
  2827. // Use "Send" method on the returned Request to send the API call to the service.
  2828. // the "output" return value is not valid until after Send returns without error.
  2829. //
  2830. // See RunTask for more information on using the RunTask
  2831. // API call, and error handling.
  2832. //
  2833. // This method is useful when you want to inject custom logic or configuration
  2834. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2835. //
  2836. //
  2837. // // Example sending a request using the RunTaskRequest method.
  2838. // req, resp := client.RunTaskRequest(params)
  2839. //
  2840. // err := req.Send()
  2841. // if err == nil { // resp is now filled
  2842. // fmt.Println(resp)
  2843. // }
  2844. //
  2845. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RunTask
  2846. func (c *ECS) RunTaskRequest(input *RunTaskInput) (req *request.Request, output *RunTaskOutput) {
  2847. op := &request.Operation{
  2848. Name: opRunTask,
  2849. HTTPMethod: "POST",
  2850. HTTPPath: "/",
  2851. }
  2852. if input == nil {
  2853. input = &RunTaskInput{}
  2854. }
  2855. output = &RunTaskOutput{}
  2856. req = c.newRequest(op, input, output)
  2857. return
  2858. }
  2859. // RunTask API operation for Amazon EC2 Container Service.
  2860. //
  2861. // Starts a new task using the specified task definition.
  2862. //
  2863. // You can allow Amazon ECS to place tasks for you, or you can customize how
  2864. // Amazon ECS places tasks using placement constraints and placement strategies.
  2865. // For more information, see Scheduling Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html)
  2866. // in the Amazon Elastic Container Service Developer Guide.
  2867. //
  2868. // Alternatively, you can use StartTask to use your own scheduler or place tasks
  2869. // manually on specific container instances.
  2870. //
  2871. // The Amazon ECS API follows an eventual consistency model, due to the distributed
  2872. // nature of the system supporting the API. This means that the result of an
  2873. // API command you run that affects your Amazon ECS resources might not be immediately
  2874. // visible to all subsequent commands you run. Keep this in mind when you carry
  2875. // out an API command that immediately follows a previous API command.
  2876. //
  2877. // To manage eventual consistency, you can do the following:
  2878. //
  2879. // * Confirm the state of the resource before you run a command to modify
  2880. // it. Run the DescribeTasks command using an exponential backoff algorithm
  2881. // to ensure that you allow enough time for the previous command to propagate
  2882. // through the system. To do this, run the DescribeTasks command repeatedly,
  2883. // starting with a couple of seconds of wait time and increasing gradually
  2884. // up to five minutes of wait time.
  2885. //
  2886. // * Add wait time between subsequent commands, even if the DescribeTasks
  2887. // command returns an accurate response. Apply an exponential backoff algorithm
  2888. // starting with a couple of seconds of wait time, and increase gradually
  2889. // up to about five minutes of wait time.
  2890. //
  2891. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2892. // with awserr.Error's Code and Message methods to get detailed information about
  2893. // the error.
  2894. //
  2895. // See the AWS API reference guide for Amazon EC2 Container Service's
  2896. // API operation RunTask for usage and error information.
  2897. //
  2898. // Returned Error Codes:
  2899. // * ErrCodeServerException "ServerException"
  2900. // These errors are usually caused by a server issue.
  2901. //
  2902. // * ErrCodeClientException "ClientException"
  2903. // These errors are usually caused by a client action, such as using an action
  2904. // or resource on behalf of a user that doesn't have permissions to use the
  2905. // action or resource, or specifying an identifier that is not valid.
  2906. //
  2907. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2908. // The specified parameter is invalid. Review the available parameters for the
  2909. // API request.
  2910. //
  2911. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  2912. // The specified cluster could not be found. You can view your available clusters
  2913. // with ListClusters. Amazon ECS clusters are Region-specific.
  2914. //
  2915. // * ErrCodeUnsupportedFeatureException "UnsupportedFeatureException"
  2916. // The specified task is not supported in this Region.
  2917. //
  2918. // * ErrCodePlatformUnknownException "PlatformUnknownException"
  2919. // The specified platform version does not exist.
  2920. //
  2921. // * ErrCodePlatformTaskDefinitionIncompatibilityException "PlatformTaskDefinitionIncompatibilityException"
  2922. // The specified platform version does not satisfy the task definition's required
  2923. // capabilities.
  2924. //
  2925. // * ErrCodeAccessDeniedException "AccessDeniedException"
  2926. // You do not have authorization to perform the requested action.
  2927. //
  2928. // * ErrCodeBlockedException "BlockedException"
  2929. // Your AWS account has been blocked. For more information, contact AWS Support
  2930. // (http://aws.amazon.com/contact-us/).
  2931. //
  2932. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RunTask
  2933. func (c *ECS) RunTask(input *RunTaskInput) (*RunTaskOutput, error) {
  2934. req, out := c.RunTaskRequest(input)
  2935. return out, req.Send()
  2936. }
  2937. // RunTaskWithContext is the same as RunTask with the addition of
  2938. // the ability to pass a context and additional request options.
  2939. //
  2940. // See RunTask for details on how to use this API operation.
  2941. //
  2942. // The context must be non-nil and will be used for request cancellation. If
  2943. // the context is nil a panic will occur. In the future the SDK may create
  2944. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2945. // for more information on using Contexts.
  2946. func (c *ECS) RunTaskWithContext(ctx aws.Context, input *RunTaskInput, opts ...request.Option) (*RunTaskOutput, error) {
  2947. req, out := c.RunTaskRequest(input)
  2948. req.SetContext(ctx)
  2949. req.ApplyOptions(opts...)
  2950. return out, req.Send()
  2951. }
  2952. const opStartTask = "StartTask"
  2953. // StartTaskRequest generates a "aws/request.Request" representing the
  2954. // client's request for the StartTask operation. The "output" return
  2955. // value will be populated with the request's response once the request completes
  2956. // successfully.
  2957. //
  2958. // Use "Send" method on the returned Request to send the API call to the service.
  2959. // the "output" return value is not valid until after Send returns without error.
  2960. //
  2961. // See StartTask for more information on using the StartTask
  2962. // API call, and error handling.
  2963. //
  2964. // This method is useful when you want to inject custom logic or configuration
  2965. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2966. //
  2967. //
  2968. // // Example sending a request using the StartTaskRequest method.
  2969. // req, resp := client.StartTaskRequest(params)
  2970. //
  2971. // err := req.Send()
  2972. // if err == nil { // resp is now filled
  2973. // fmt.Println(resp)
  2974. // }
  2975. //
  2976. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/StartTask
  2977. func (c *ECS) StartTaskRequest(input *StartTaskInput) (req *request.Request, output *StartTaskOutput) {
  2978. op := &request.Operation{
  2979. Name: opStartTask,
  2980. HTTPMethod: "POST",
  2981. HTTPPath: "/",
  2982. }
  2983. if input == nil {
  2984. input = &StartTaskInput{}
  2985. }
  2986. output = &StartTaskOutput{}
  2987. req = c.newRequest(op, input, output)
  2988. return
  2989. }
  2990. // StartTask API operation for Amazon EC2 Container Service.
  2991. //
  2992. // Starts a new task from the specified task definition on the specified container
  2993. // instance or instances.
  2994. //
  2995. // Alternatively, you can use RunTask to place tasks for you. For more information,
  2996. // see Scheduling Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html)
  2997. // in the Amazon Elastic Container Service Developer Guide.
  2998. //
  2999. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3000. // with awserr.Error's Code and Message methods to get detailed information about
  3001. // the error.
  3002. //
  3003. // See the AWS API reference guide for Amazon EC2 Container Service's
  3004. // API operation StartTask for usage and error information.
  3005. //
  3006. // Returned Error Codes:
  3007. // * ErrCodeServerException "ServerException"
  3008. // These errors are usually caused by a server issue.
  3009. //
  3010. // * ErrCodeClientException "ClientException"
  3011. // These errors are usually caused by a client action, such as using an action
  3012. // or resource on behalf of a user that doesn't have permissions to use the
  3013. // action or resource, or specifying an identifier that is not valid.
  3014. //
  3015. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3016. // The specified parameter is invalid. Review the available parameters for the
  3017. // API request.
  3018. //
  3019. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  3020. // The specified cluster could not be found. You can view your available clusters
  3021. // with ListClusters. Amazon ECS clusters are Region-specific.
  3022. //
  3023. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/StartTask
  3024. func (c *ECS) StartTask(input *StartTaskInput) (*StartTaskOutput, error) {
  3025. req, out := c.StartTaskRequest(input)
  3026. return out, req.Send()
  3027. }
  3028. // StartTaskWithContext is the same as StartTask with the addition of
  3029. // the ability to pass a context and additional request options.
  3030. //
  3031. // See StartTask for details on how to use this API operation.
  3032. //
  3033. // The context must be non-nil and will be used for request cancellation. If
  3034. // the context is nil a panic will occur. In the future the SDK may create
  3035. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3036. // for more information on using Contexts.
  3037. func (c *ECS) StartTaskWithContext(ctx aws.Context, input *StartTaskInput, opts ...request.Option) (*StartTaskOutput, error) {
  3038. req, out := c.StartTaskRequest(input)
  3039. req.SetContext(ctx)
  3040. req.ApplyOptions(opts...)
  3041. return out, req.Send()
  3042. }
  3043. const opStopTask = "StopTask"
  3044. // StopTaskRequest generates a "aws/request.Request" representing the
  3045. // client's request for the StopTask operation. The "output" return
  3046. // value will be populated with the request's response once the request completes
  3047. // successfully.
  3048. //
  3049. // Use "Send" method on the returned Request to send the API call to the service.
  3050. // the "output" return value is not valid until after Send returns without error.
  3051. //
  3052. // See StopTask for more information on using the StopTask
  3053. // API call, and error handling.
  3054. //
  3055. // This method is useful when you want to inject custom logic or configuration
  3056. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3057. //
  3058. //
  3059. // // Example sending a request using the StopTaskRequest method.
  3060. // req, resp := client.StopTaskRequest(params)
  3061. //
  3062. // err := req.Send()
  3063. // if err == nil { // resp is now filled
  3064. // fmt.Println(resp)
  3065. // }
  3066. //
  3067. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/StopTask
  3068. func (c *ECS) StopTaskRequest(input *StopTaskInput) (req *request.Request, output *StopTaskOutput) {
  3069. op := &request.Operation{
  3070. Name: opStopTask,
  3071. HTTPMethod: "POST",
  3072. HTTPPath: "/",
  3073. }
  3074. if input == nil {
  3075. input = &StopTaskInput{}
  3076. }
  3077. output = &StopTaskOutput{}
  3078. req = c.newRequest(op, input, output)
  3079. return
  3080. }
  3081. // StopTask API operation for Amazon EC2 Container Service.
  3082. //
  3083. // Stops a running task. Any tags associated with the task will be deleted.
  3084. //
  3085. // When StopTask is called on a task, the equivalent of docker stop is issued
  3086. // to the containers running in the task. This results in a SIGTERM value and
  3087. // a default 30-second timeout, after which the SIGKILL value is sent and the
  3088. // containers are forcibly stopped. If the container handles the SIGTERM value
  3089. // gracefully and exits within 30 seconds from receiving it, no SIGKILL value
  3090. // is sent.
  3091. //
  3092. // The default 30-second timeout can be configured on the Amazon ECS container
  3093. // agent with the ECS_CONTAINER_STOP_TIMEOUT variable. For more information,
  3094. // see Amazon ECS Container Agent Configuration (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html)
  3095. // in the Amazon Elastic Container Service Developer Guide.
  3096. //
  3097. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3098. // with awserr.Error's Code and Message methods to get detailed information about
  3099. // the error.
  3100. //
  3101. // See the AWS API reference guide for Amazon EC2 Container Service's
  3102. // API operation StopTask for usage and error information.
  3103. //
  3104. // Returned Error Codes:
  3105. // * ErrCodeServerException "ServerException"
  3106. // These errors are usually caused by a server issue.
  3107. //
  3108. // * ErrCodeClientException "ClientException"
  3109. // These errors are usually caused by a client action, such as using an action
  3110. // or resource on behalf of a user that doesn't have permissions to use the
  3111. // action or resource, or specifying an identifier that is not valid.
  3112. //
  3113. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3114. // The specified parameter is invalid. Review the available parameters for the
  3115. // API request.
  3116. //
  3117. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  3118. // The specified cluster could not be found. You can view your available clusters
  3119. // with ListClusters. Amazon ECS clusters are Region-specific.
  3120. //
  3121. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/StopTask
  3122. func (c *ECS) StopTask(input *StopTaskInput) (*StopTaskOutput, error) {
  3123. req, out := c.StopTaskRequest(input)
  3124. return out, req.Send()
  3125. }
  3126. // StopTaskWithContext is the same as StopTask with the addition of
  3127. // the ability to pass a context and additional request options.
  3128. //
  3129. // See StopTask for details on how to use this API operation.
  3130. //
  3131. // The context must be non-nil and will be used for request cancellation. If
  3132. // the context is nil a panic will occur. In the future the SDK may create
  3133. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3134. // for more information on using Contexts.
  3135. func (c *ECS) StopTaskWithContext(ctx aws.Context, input *StopTaskInput, opts ...request.Option) (*StopTaskOutput, error) {
  3136. req, out := c.StopTaskRequest(input)
  3137. req.SetContext(ctx)
  3138. req.ApplyOptions(opts...)
  3139. return out, req.Send()
  3140. }
  3141. const opSubmitContainerStateChange = "SubmitContainerStateChange"
  3142. // SubmitContainerStateChangeRequest generates a "aws/request.Request" representing the
  3143. // client's request for the SubmitContainerStateChange operation. The "output" return
  3144. // value will be populated with the request's response once the request completes
  3145. // successfully.
  3146. //
  3147. // Use "Send" method on the returned Request to send the API call to the service.
  3148. // the "output" return value is not valid until after Send returns without error.
  3149. //
  3150. // See SubmitContainerStateChange for more information on using the SubmitContainerStateChange
  3151. // API call, and error handling.
  3152. //
  3153. // This method is useful when you want to inject custom logic or configuration
  3154. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3155. //
  3156. //
  3157. // // Example sending a request using the SubmitContainerStateChangeRequest method.
  3158. // req, resp := client.SubmitContainerStateChangeRequest(params)
  3159. //
  3160. // err := req.Send()
  3161. // if err == nil { // resp is now filled
  3162. // fmt.Println(resp)
  3163. // }
  3164. //
  3165. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/SubmitContainerStateChange
  3166. func (c *ECS) SubmitContainerStateChangeRequest(input *SubmitContainerStateChangeInput) (req *request.Request, output *SubmitContainerStateChangeOutput) {
  3167. op := &request.Operation{
  3168. Name: opSubmitContainerStateChange,
  3169. HTTPMethod: "POST",
  3170. HTTPPath: "/",
  3171. }
  3172. if input == nil {
  3173. input = &SubmitContainerStateChangeInput{}
  3174. }
  3175. output = &SubmitContainerStateChangeOutput{}
  3176. req = c.newRequest(op, input, output)
  3177. return
  3178. }
  3179. // SubmitContainerStateChange API operation for Amazon EC2 Container Service.
  3180. //
  3181. // This action is only used by the Amazon ECS agent, and it is not intended
  3182. // for use outside of the agent.
  3183. //
  3184. // Sent to acknowledge that a container changed states.
  3185. //
  3186. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3187. // with awserr.Error's Code and Message methods to get detailed information about
  3188. // the error.
  3189. //
  3190. // See the AWS API reference guide for Amazon EC2 Container Service's
  3191. // API operation SubmitContainerStateChange for usage and error information.
  3192. //
  3193. // Returned Error Codes:
  3194. // * ErrCodeServerException "ServerException"
  3195. // These errors are usually caused by a server issue.
  3196. //
  3197. // * ErrCodeClientException "ClientException"
  3198. // These errors are usually caused by a client action, such as using an action
  3199. // or resource on behalf of a user that doesn't have permissions to use the
  3200. // action or resource, or specifying an identifier that is not valid.
  3201. //
  3202. // * ErrCodeAccessDeniedException "AccessDeniedException"
  3203. // You do not have authorization to perform the requested action.
  3204. //
  3205. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/SubmitContainerStateChange
  3206. func (c *ECS) SubmitContainerStateChange(input *SubmitContainerStateChangeInput) (*SubmitContainerStateChangeOutput, error) {
  3207. req, out := c.SubmitContainerStateChangeRequest(input)
  3208. return out, req.Send()
  3209. }
  3210. // SubmitContainerStateChangeWithContext is the same as SubmitContainerStateChange with the addition of
  3211. // the ability to pass a context and additional request options.
  3212. //
  3213. // See SubmitContainerStateChange for details on how to use this API operation.
  3214. //
  3215. // The context must be non-nil and will be used for request cancellation. If
  3216. // the context is nil a panic will occur. In the future the SDK may create
  3217. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3218. // for more information on using Contexts.
  3219. func (c *ECS) SubmitContainerStateChangeWithContext(ctx aws.Context, input *SubmitContainerStateChangeInput, opts ...request.Option) (*SubmitContainerStateChangeOutput, error) {
  3220. req, out := c.SubmitContainerStateChangeRequest(input)
  3221. req.SetContext(ctx)
  3222. req.ApplyOptions(opts...)
  3223. return out, req.Send()
  3224. }
  3225. const opSubmitTaskStateChange = "SubmitTaskStateChange"
  3226. // SubmitTaskStateChangeRequest generates a "aws/request.Request" representing the
  3227. // client's request for the SubmitTaskStateChange operation. The "output" return
  3228. // value will be populated with the request's response once the request completes
  3229. // successfully.
  3230. //
  3231. // Use "Send" method on the returned Request to send the API call to the service.
  3232. // the "output" return value is not valid until after Send returns without error.
  3233. //
  3234. // See SubmitTaskStateChange for more information on using the SubmitTaskStateChange
  3235. // API call, and error handling.
  3236. //
  3237. // This method is useful when you want to inject custom logic or configuration
  3238. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3239. //
  3240. //
  3241. // // Example sending a request using the SubmitTaskStateChangeRequest method.
  3242. // req, resp := client.SubmitTaskStateChangeRequest(params)
  3243. //
  3244. // err := req.Send()
  3245. // if err == nil { // resp is now filled
  3246. // fmt.Println(resp)
  3247. // }
  3248. //
  3249. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/SubmitTaskStateChange
  3250. func (c *ECS) SubmitTaskStateChangeRequest(input *SubmitTaskStateChangeInput) (req *request.Request, output *SubmitTaskStateChangeOutput) {
  3251. op := &request.Operation{
  3252. Name: opSubmitTaskStateChange,
  3253. HTTPMethod: "POST",
  3254. HTTPPath: "/",
  3255. }
  3256. if input == nil {
  3257. input = &SubmitTaskStateChangeInput{}
  3258. }
  3259. output = &SubmitTaskStateChangeOutput{}
  3260. req = c.newRequest(op, input, output)
  3261. return
  3262. }
  3263. // SubmitTaskStateChange API operation for Amazon EC2 Container Service.
  3264. //
  3265. // This action is only used by the Amazon ECS agent, and it is not intended
  3266. // for use outside of the agent.
  3267. //
  3268. // Sent to acknowledge that a task changed states.
  3269. //
  3270. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3271. // with awserr.Error's Code and Message methods to get detailed information about
  3272. // the error.
  3273. //
  3274. // See the AWS API reference guide for Amazon EC2 Container Service's
  3275. // API operation SubmitTaskStateChange for usage and error information.
  3276. //
  3277. // Returned Error Codes:
  3278. // * ErrCodeServerException "ServerException"
  3279. // These errors are usually caused by a server issue.
  3280. //
  3281. // * ErrCodeClientException "ClientException"
  3282. // These errors are usually caused by a client action, such as using an action
  3283. // or resource on behalf of a user that doesn't have permissions to use the
  3284. // action or resource, or specifying an identifier that is not valid.
  3285. //
  3286. // * ErrCodeAccessDeniedException "AccessDeniedException"
  3287. // You do not have authorization to perform the requested action.
  3288. //
  3289. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/SubmitTaskStateChange
  3290. func (c *ECS) SubmitTaskStateChange(input *SubmitTaskStateChangeInput) (*SubmitTaskStateChangeOutput, error) {
  3291. req, out := c.SubmitTaskStateChangeRequest(input)
  3292. return out, req.Send()
  3293. }
  3294. // SubmitTaskStateChangeWithContext is the same as SubmitTaskStateChange with the addition of
  3295. // the ability to pass a context and additional request options.
  3296. //
  3297. // See SubmitTaskStateChange for details on how to use this API operation.
  3298. //
  3299. // The context must be non-nil and will be used for request cancellation. If
  3300. // the context is nil a panic will occur. In the future the SDK may create
  3301. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3302. // for more information on using Contexts.
  3303. func (c *ECS) SubmitTaskStateChangeWithContext(ctx aws.Context, input *SubmitTaskStateChangeInput, opts ...request.Option) (*SubmitTaskStateChangeOutput, error) {
  3304. req, out := c.SubmitTaskStateChangeRequest(input)
  3305. req.SetContext(ctx)
  3306. req.ApplyOptions(opts...)
  3307. return out, req.Send()
  3308. }
  3309. const opTagResource = "TagResource"
  3310. // TagResourceRequest generates a "aws/request.Request" representing the
  3311. // client's request for the TagResource operation. The "output" return
  3312. // value will be populated with the request's response once the request completes
  3313. // successfully.
  3314. //
  3315. // Use "Send" method on the returned Request to send the API call to the service.
  3316. // the "output" return value is not valid until after Send returns without error.
  3317. //
  3318. // See TagResource for more information on using the TagResource
  3319. // API call, and error handling.
  3320. //
  3321. // This method is useful when you want to inject custom logic or configuration
  3322. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3323. //
  3324. //
  3325. // // Example sending a request using the TagResourceRequest method.
  3326. // req, resp := client.TagResourceRequest(params)
  3327. //
  3328. // err := req.Send()
  3329. // if err == nil { // resp is now filled
  3330. // fmt.Println(resp)
  3331. // }
  3332. //
  3333. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/TagResource
  3334. func (c *ECS) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
  3335. op := &request.Operation{
  3336. Name: opTagResource,
  3337. HTTPMethod: "POST",
  3338. HTTPPath: "/",
  3339. }
  3340. if input == nil {
  3341. input = &TagResourceInput{}
  3342. }
  3343. output = &TagResourceOutput{}
  3344. req = c.newRequest(op, input, output)
  3345. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3346. return
  3347. }
  3348. // TagResource API operation for Amazon EC2 Container Service.
  3349. //
  3350. // Associates the specified tags to a resource with the specified resourceArn.
  3351. // If existing tags on a resource are not specified in the request parameters,
  3352. // they are not changed. When a resource is deleted, the tags associated with
  3353. // that resource are deleted as well.
  3354. //
  3355. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3356. // with awserr.Error's Code and Message methods to get detailed information about
  3357. // the error.
  3358. //
  3359. // See the AWS API reference guide for Amazon EC2 Container Service's
  3360. // API operation TagResource for usage and error information.
  3361. //
  3362. // Returned Error Codes:
  3363. // * ErrCodeServerException "ServerException"
  3364. // These errors are usually caused by a server issue.
  3365. //
  3366. // * ErrCodeClientException "ClientException"
  3367. // These errors are usually caused by a client action, such as using an action
  3368. // or resource on behalf of a user that doesn't have permissions to use the
  3369. // action or resource, or specifying an identifier that is not valid.
  3370. //
  3371. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  3372. // The specified cluster could not be found. You can view your available clusters
  3373. // with ListClusters. Amazon ECS clusters are Region-specific.
  3374. //
  3375. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3376. // The specified resource could not be found.
  3377. //
  3378. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3379. // The specified parameter is invalid. Review the available parameters for the
  3380. // API request.
  3381. //
  3382. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/TagResource
  3383. func (c *ECS) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
  3384. req, out := c.TagResourceRequest(input)
  3385. return out, req.Send()
  3386. }
  3387. // TagResourceWithContext is the same as TagResource with the addition of
  3388. // the ability to pass a context and additional request options.
  3389. //
  3390. // See TagResource for details on how to use this API operation.
  3391. //
  3392. // The context must be non-nil and will be used for request cancellation. If
  3393. // the context is nil a panic will occur. In the future the SDK may create
  3394. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3395. // for more information on using Contexts.
  3396. func (c *ECS) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
  3397. req, out := c.TagResourceRequest(input)
  3398. req.SetContext(ctx)
  3399. req.ApplyOptions(opts...)
  3400. return out, req.Send()
  3401. }
  3402. const opUntagResource = "UntagResource"
  3403. // UntagResourceRequest generates a "aws/request.Request" representing the
  3404. // client's request for the UntagResource operation. The "output" return
  3405. // value will be populated with the request's response once the request completes
  3406. // successfully.
  3407. //
  3408. // Use "Send" method on the returned Request to send the API call to the service.
  3409. // the "output" return value is not valid until after Send returns without error.
  3410. //
  3411. // See UntagResource for more information on using the UntagResource
  3412. // API call, and error handling.
  3413. //
  3414. // This method is useful when you want to inject custom logic or configuration
  3415. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3416. //
  3417. //
  3418. // // Example sending a request using the UntagResourceRequest method.
  3419. // req, resp := client.UntagResourceRequest(params)
  3420. //
  3421. // err := req.Send()
  3422. // if err == nil { // resp is now filled
  3423. // fmt.Println(resp)
  3424. // }
  3425. //
  3426. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UntagResource
  3427. func (c *ECS) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
  3428. op := &request.Operation{
  3429. Name: opUntagResource,
  3430. HTTPMethod: "POST",
  3431. HTTPPath: "/",
  3432. }
  3433. if input == nil {
  3434. input = &UntagResourceInput{}
  3435. }
  3436. output = &UntagResourceOutput{}
  3437. req = c.newRequest(op, input, output)
  3438. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3439. return
  3440. }
  3441. // UntagResource API operation for Amazon EC2 Container Service.
  3442. //
  3443. // Deletes specified tags from a resource.
  3444. //
  3445. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3446. // with awserr.Error's Code and Message methods to get detailed information about
  3447. // the error.
  3448. //
  3449. // See the AWS API reference guide for Amazon EC2 Container Service's
  3450. // API operation UntagResource for usage and error information.
  3451. //
  3452. // Returned Error Codes:
  3453. // * ErrCodeServerException "ServerException"
  3454. // These errors are usually caused by a server issue.
  3455. //
  3456. // * ErrCodeClientException "ClientException"
  3457. // These errors are usually caused by a client action, such as using an action
  3458. // or resource on behalf of a user that doesn't have permissions to use the
  3459. // action or resource, or specifying an identifier that is not valid.
  3460. //
  3461. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  3462. // The specified cluster could not be found. You can view your available clusters
  3463. // with ListClusters. Amazon ECS clusters are Region-specific.
  3464. //
  3465. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3466. // The specified resource could not be found.
  3467. //
  3468. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3469. // The specified parameter is invalid. Review the available parameters for the
  3470. // API request.
  3471. //
  3472. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UntagResource
  3473. func (c *ECS) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  3474. req, out := c.UntagResourceRequest(input)
  3475. return out, req.Send()
  3476. }
  3477. // UntagResourceWithContext is the same as UntagResource with the addition of
  3478. // the ability to pass a context and additional request options.
  3479. //
  3480. // See UntagResource for details on how to use this API operation.
  3481. //
  3482. // The context must be non-nil and will be used for request cancellation. If
  3483. // the context is nil a panic will occur. In the future the SDK may create
  3484. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3485. // for more information on using Contexts.
  3486. func (c *ECS) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
  3487. req, out := c.UntagResourceRequest(input)
  3488. req.SetContext(ctx)
  3489. req.ApplyOptions(opts...)
  3490. return out, req.Send()
  3491. }
  3492. const opUpdateContainerAgent = "UpdateContainerAgent"
  3493. // UpdateContainerAgentRequest generates a "aws/request.Request" representing the
  3494. // client's request for the UpdateContainerAgent operation. The "output" return
  3495. // value will be populated with the request's response once the request completes
  3496. // successfully.
  3497. //
  3498. // Use "Send" method on the returned Request to send the API call to the service.
  3499. // the "output" return value is not valid until after Send returns without error.
  3500. //
  3501. // See UpdateContainerAgent for more information on using the UpdateContainerAgent
  3502. // API call, and error handling.
  3503. //
  3504. // This method is useful when you want to inject custom logic or configuration
  3505. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3506. //
  3507. //
  3508. // // Example sending a request using the UpdateContainerAgentRequest method.
  3509. // req, resp := client.UpdateContainerAgentRequest(params)
  3510. //
  3511. // err := req.Send()
  3512. // if err == nil { // resp is now filled
  3513. // fmt.Println(resp)
  3514. // }
  3515. //
  3516. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateContainerAgent
  3517. func (c *ECS) UpdateContainerAgentRequest(input *UpdateContainerAgentInput) (req *request.Request, output *UpdateContainerAgentOutput) {
  3518. op := &request.Operation{
  3519. Name: opUpdateContainerAgent,
  3520. HTTPMethod: "POST",
  3521. HTTPPath: "/",
  3522. }
  3523. if input == nil {
  3524. input = &UpdateContainerAgentInput{}
  3525. }
  3526. output = &UpdateContainerAgentOutput{}
  3527. req = c.newRequest(op, input, output)
  3528. return
  3529. }
  3530. // UpdateContainerAgent API operation for Amazon EC2 Container Service.
  3531. //
  3532. // Updates the Amazon ECS container agent on a specified container instance.
  3533. // Updating the Amazon ECS container agent does not interrupt running tasks
  3534. // or services on the container instance. The process for updating the agent
  3535. // differs depending on whether your container instance was launched with the
  3536. // Amazon ECS-optimized AMI or another operating system.
  3537. //
  3538. // UpdateContainerAgent requires the Amazon ECS-optimized AMI or Amazon Linux
  3539. // with the ecs-init service installed and running. For help updating the Amazon
  3540. // ECS container agent on other operating systems, see Manually Updating the
  3541. // Amazon ECS Container Agent (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html#manually_update_agent)
  3542. // in the Amazon Elastic Container Service Developer Guide.
  3543. //
  3544. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3545. // with awserr.Error's Code and Message methods to get detailed information about
  3546. // the error.
  3547. //
  3548. // See the AWS API reference guide for Amazon EC2 Container Service's
  3549. // API operation UpdateContainerAgent for usage and error information.
  3550. //
  3551. // Returned Error Codes:
  3552. // * ErrCodeServerException "ServerException"
  3553. // These errors are usually caused by a server issue.
  3554. //
  3555. // * ErrCodeClientException "ClientException"
  3556. // These errors are usually caused by a client action, such as using an action
  3557. // or resource on behalf of a user that doesn't have permissions to use the
  3558. // action or resource, or specifying an identifier that is not valid.
  3559. //
  3560. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3561. // The specified parameter is invalid. Review the available parameters for the
  3562. // API request.
  3563. //
  3564. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  3565. // The specified cluster could not be found. You can view your available clusters
  3566. // with ListClusters. Amazon ECS clusters are Region-specific.
  3567. //
  3568. // * ErrCodeUpdateInProgressException "UpdateInProgressException"
  3569. // There is already a current Amazon ECS container agent update in progress
  3570. // on the specified container instance. If the container agent becomes disconnected
  3571. // while it is in a transitional stage, such as PENDING or STAGING, the update
  3572. // process can get stuck in that state. However, when the agent reconnects,
  3573. // it resumes where it stopped previously.
  3574. //
  3575. // * ErrCodeNoUpdateAvailableException "NoUpdateAvailableException"
  3576. // There is no update available for this Amazon ECS container agent. This could
  3577. // be because the agent is already running the latest version, or it is so old
  3578. // that there is no update path to the current version.
  3579. //
  3580. // * ErrCodeMissingVersionException "MissingVersionException"
  3581. // Amazon ECS is unable to determine the current version of the Amazon ECS container
  3582. // agent on the container instance and does not have enough information to proceed
  3583. // with an update. This could be because the agent running on the container
  3584. // instance is an older or custom version that does not use our version information.
  3585. //
  3586. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateContainerAgent
  3587. func (c *ECS) UpdateContainerAgent(input *UpdateContainerAgentInput) (*UpdateContainerAgentOutput, error) {
  3588. req, out := c.UpdateContainerAgentRequest(input)
  3589. return out, req.Send()
  3590. }
  3591. // UpdateContainerAgentWithContext is the same as UpdateContainerAgent with the addition of
  3592. // the ability to pass a context and additional request options.
  3593. //
  3594. // See UpdateContainerAgent for details on how to use this API operation.
  3595. //
  3596. // The context must be non-nil and will be used for request cancellation. If
  3597. // the context is nil a panic will occur. In the future the SDK may create
  3598. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3599. // for more information on using Contexts.
  3600. func (c *ECS) UpdateContainerAgentWithContext(ctx aws.Context, input *UpdateContainerAgentInput, opts ...request.Option) (*UpdateContainerAgentOutput, error) {
  3601. req, out := c.UpdateContainerAgentRequest(input)
  3602. req.SetContext(ctx)
  3603. req.ApplyOptions(opts...)
  3604. return out, req.Send()
  3605. }
  3606. const opUpdateContainerInstancesState = "UpdateContainerInstancesState"
  3607. // UpdateContainerInstancesStateRequest generates a "aws/request.Request" representing the
  3608. // client's request for the UpdateContainerInstancesState operation. The "output" return
  3609. // value will be populated with the request's response once the request completes
  3610. // successfully.
  3611. //
  3612. // Use "Send" method on the returned Request to send the API call to the service.
  3613. // the "output" return value is not valid until after Send returns without error.
  3614. //
  3615. // See UpdateContainerInstancesState for more information on using the UpdateContainerInstancesState
  3616. // API call, and error handling.
  3617. //
  3618. // This method is useful when you want to inject custom logic or configuration
  3619. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3620. //
  3621. //
  3622. // // Example sending a request using the UpdateContainerInstancesStateRequest method.
  3623. // req, resp := client.UpdateContainerInstancesStateRequest(params)
  3624. //
  3625. // err := req.Send()
  3626. // if err == nil { // resp is now filled
  3627. // fmt.Println(resp)
  3628. // }
  3629. //
  3630. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateContainerInstancesState
  3631. func (c *ECS) UpdateContainerInstancesStateRequest(input *UpdateContainerInstancesStateInput) (req *request.Request, output *UpdateContainerInstancesStateOutput) {
  3632. op := &request.Operation{
  3633. Name: opUpdateContainerInstancesState,
  3634. HTTPMethod: "POST",
  3635. HTTPPath: "/",
  3636. }
  3637. if input == nil {
  3638. input = &UpdateContainerInstancesStateInput{}
  3639. }
  3640. output = &UpdateContainerInstancesStateOutput{}
  3641. req = c.newRequest(op, input, output)
  3642. return
  3643. }
  3644. // UpdateContainerInstancesState API operation for Amazon EC2 Container Service.
  3645. //
  3646. // Modifies the status of an Amazon ECS container instance.
  3647. //
  3648. // You can change the status of a container instance to DRAINING to manually
  3649. // remove an instance from a cluster, for example to perform system updates,
  3650. // update the Docker daemon, or scale down the cluster size.
  3651. //
  3652. // When you set a container instance to DRAINING, Amazon ECS prevents new tasks
  3653. // from being scheduled for placement on the container instance and replacement
  3654. // service tasks are started on other container instances in the cluster if
  3655. // the resources are available. Service tasks on the container instance that
  3656. // are in the PENDING state are stopped immediately.
  3657. //
  3658. // Service tasks on the container instance that are in the RUNNING state are
  3659. // stopped and replaced according to the service's deployment configuration
  3660. // parameters, minimumHealthyPercent and maximumPercent. You can change the
  3661. // deployment configuration of your service using UpdateService.
  3662. //
  3663. // * If minimumHealthyPercent is below 100%, the scheduler can ignore desiredCount
  3664. // temporarily during task replacement. For example, desiredCount is four
  3665. // tasks, a minimum of 50% allows the scheduler to stop two existing tasks
  3666. // before starting two new tasks. If the minimum is 100%, the service scheduler
  3667. // can't remove existing tasks until the replacement tasks are considered
  3668. // healthy. Tasks for services that do not use a load balancer are considered
  3669. // healthy if they are in the RUNNING state. Tasks for services that use
  3670. // a load balancer are considered healthy if they are in the RUNNING state
  3671. // and the container instance they are hosted on is reported as healthy by
  3672. // the load balancer.
  3673. //
  3674. // * The maximumPercent parameter represents an upper limit on the number
  3675. // of running tasks during task replacement, which enables you to define
  3676. // the replacement batch size. For example, if desiredCount is four tasks,
  3677. // a maximum of 200% starts four new tasks before stopping the four tasks
  3678. // to be drained, provided that the cluster resources required to do this
  3679. // are available. If the maximum is 100%, then replacement tasks can't start
  3680. // until the draining tasks have stopped.
  3681. //
  3682. // Any PENDING or RUNNING tasks that do not belong to a service are not affected.
  3683. // You must wait for them to finish or stop them manually.
  3684. //
  3685. // A container instance has completed draining when it has no more RUNNING tasks.
  3686. // You can verify this using ListTasks.
  3687. //
  3688. // When you set a container instance to ACTIVE, the Amazon ECS scheduler can
  3689. // begin scheduling tasks on the instance again.
  3690. //
  3691. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3692. // with awserr.Error's Code and Message methods to get detailed information about
  3693. // the error.
  3694. //
  3695. // See the AWS API reference guide for Amazon EC2 Container Service's
  3696. // API operation UpdateContainerInstancesState for usage and error information.
  3697. //
  3698. // Returned Error Codes:
  3699. // * ErrCodeServerException "ServerException"
  3700. // These errors are usually caused by a server issue.
  3701. //
  3702. // * ErrCodeClientException "ClientException"
  3703. // These errors are usually caused by a client action, such as using an action
  3704. // or resource on behalf of a user that doesn't have permissions to use the
  3705. // action or resource, or specifying an identifier that is not valid.
  3706. //
  3707. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3708. // The specified parameter is invalid. Review the available parameters for the
  3709. // API request.
  3710. //
  3711. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  3712. // The specified cluster could not be found. You can view your available clusters
  3713. // with ListClusters. Amazon ECS clusters are Region-specific.
  3714. //
  3715. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateContainerInstancesState
  3716. func (c *ECS) UpdateContainerInstancesState(input *UpdateContainerInstancesStateInput) (*UpdateContainerInstancesStateOutput, error) {
  3717. req, out := c.UpdateContainerInstancesStateRequest(input)
  3718. return out, req.Send()
  3719. }
  3720. // UpdateContainerInstancesStateWithContext is the same as UpdateContainerInstancesState with the addition of
  3721. // the ability to pass a context and additional request options.
  3722. //
  3723. // See UpdateContainerInstancesState for details on how to use this API operation.
  3724. //
  3725. // The context must be non-nil and will be used for request cancellation. If
  3726. // the context is nil a panic will occur. In the future the SDK may create
  3727. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3728. // for more information on using Contexts.
  3729. func (c *ECS) UpdateContainerInstancesStateWithContext(ctx aws.Context, input *UpdateContainerInstancesStateInput, opts ...request.Option) (*UpdateContainerInstancesStateOutput, error) {
  3730. req, out := c.UpdateContainerInstancesStateRequest(input)
  3731. req.SetContext(ctx)
  3732. req.ApplyOptions(opts...)
  3733. return out, req.Send()
  3734. }
  3735. const opUpdateService = "UpdateService"
  3736. // UpdateServiceRequest generates a "aws/request.Request" representing the
  3737. // client's request for the UpdateService operation. The "output" return
  3738. // value will be populated with the request's response once the request completes
  3739. // successfully.
  3740. //
  3741. // Use "Send" method on the returned Request to send the API call to the service.
  3742. // the "output" return value is not valid until after Send returns without error.
  3743. //
  3744. // See UpdateService for more information on using the UpdateService
  3745. // API call, and error handling.
  3746. //
  3747. // This method is useful when you want to inject custom logic or configuration
  3748. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3749. //
  3750. //
  3751. // // Example sending a request using the UpdateServiceRequest method.
  3752. // req, resp := client.UpdateServiceRequest(params)
  3753. //
  3754. // err := req.Send()
  3755. // if err == nil { // resp is now filled
  3756. // fmt.Println(resp)
  3757. // }
  3758. //
  3759. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateService
  3760. func (c *ECS) UpdateServiceRequest(input *UpdateServiceInput) (req *request.Request, output *UpdateServiceOutput) {
  3761. op := &request.Operation{
  3762. Name: opUpdateService,
  3763. HTTPMethod: "POST",
  3764. HTTPPath: "/",
  3765. }
  3766. if input == nil {
  3767. input = &UpdateServiceInput{}
  3768. }
  3769. output = &UpdateServiceOutput{}
  3770. req = c.newRequest(op, input, output)
  3771. return
  3772. }
  3773. // UpdateService API operation for Amazon EC2 Container Service.
  3774. //
  3775. // Modifies the parameters of a service.
  3776. //
  3777. // For services using the rolling update (ECS) deployment controller, the desired
  3778. // count, deployment configuration, network configuration, or task definition
  3779. // used can be updated.
  3780. //
  3781. // For services using the blue/green (CODE_DEPLOY) deployment controller, only
  3782. // the desired count, deployment configuration, and health check grace period
  3783. // can be updated using this API. If the network configuration, platform version,
  3784. // or task definition need to be updated, a new AWS CodeDeploy deployment should
  3785. // be created. For more information, see CreateDeployment (https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html)
  3786. // in the AWS CodeDeploy API Reference.
  3787. //
  3788. // You can add to or subtract from the number of instantiations of a task definition
  3789. // in a service by specifying the cluster that the service is running in and
  3790. // a new desiredCount parameter.
  3791. //
  3792. // If you have updated the Docker image of your application, you can create
  3793. // a new task definition with that image and deploy it to your service. The
  3794. // service scheduler uses the minimum healthy percent and maximum percent parameters
  3795. // (in the service's deployment configuration) to determine the deployment strategy.
  3796. //
  3797. // If your updated Docker image uses the same tag as what is in the existing
  3798. // task definition for your service (for example, my_image:latest), you do not
  3799. // need to create a new revision of your task definition. You can update the
  3800. // service using the forceNewDeployment option. The new tasks launched by the
  3801. // deployment pull the current image/tag combination from your repository when
  3802. // they start.
  3803. //
  3804. // You can also update the deployment configuration of a service. When a deployment
  3805. // is triggered by updating the task definition of a service, the service scheduler
  3806. // uses the deployment configuration parameters, minimumHealthyPercent and maximumPercent,
  3807. // to determine the deployment strategy.
  3808. //
  3809. // * If minimumHealthyPercent is below 100%, the scheduler can ignore desiredCount
  3810. // temporarily during a deployment. For example, if desiredCount is four
  3811. // tasks, a minimum of 50% allows the scheduler to stop two existing tasks
  3812. // before starting two new tasks. Tasks for services that do not use a load
  3813. // balancer are considered healthy if they are in the RUNNING state. Tasks
  3814. // for services that use a load balancer are considered healthy if they are
  3815. // in the RUNNING state and the container instance they are hosted on is
  3816. // reported as healthy by the load balancer.
  3817. //
  3818. // * The maximumPercent parameter represents an upper limit on the number
  3819. // of running tasks during a deployment, which enables you to define the
  3820. // deployment batch size. For example, if desiredCount is four tasks, a maximum
  3821. // of 200% starts four new tasks before stopping the four older tasks (provided
  3822. // that the cluster resources required to do this are available).
  3823. //
  3824. // When UpdateService stops a task during a deployment, the equivalent of docker
  3825. // stop is issued to the containers running in the task. This results in a SIGTERM
  3826. // and a 30-second timeout, after which SIGKILL is sent and the containers are
  3827. // forcibly stopped. If the container handles the SIGTERM gracefully and exits
  3828. // within 30 seconds from receiving it, no SIGKILL is sent.
  3829. //
  3830. // When the service scheduler launches new tasks, it determines task placement
  3831. // in your cluster with the following logic:
  3832. //
  3833. // * Determine which of the container instances in your cluster can support
  3834. // your service's task definition (for example, they have the required CPU,
  3835. // memory, ports, and container instance attributes).
  3836. //
  3837. // * By default, the service scheduler attempts to balance tasks across Availability
  3838. // Zones in this manner (although you can choose a different placement strategy):
  3839. //
  3840. // Sort the valid container instances by the fewest number of running tasks
  3841. // for this service in the same Availability Zone as the instance. For example,
  3842. // if zone A has one running service task and zones B and C each have zero,
  3843. // valid container instances in either zone B or C are considered optimal
  3844. // for placement.
  3845. //
  3846. // Place the new service task on a valid container instance in an optimal Availability
  3847. // Zone (based on the previous steps), favoring container instances with
  3848. // the fewest number of running tasks for this service.
  3849. //
  3850. // When the service scheduler stops running tasks, it attempts to maintain balance
  3851. // across the Availability Zones in your cluster using the following logic:
  3852. //
  3853. // * Sort the container instances by the largest number of running tasks
  3854. // for this service in the same Availability Zone as the instance. For example,
  3855. // if zone A has one running service task and zones B and C each have two,
  3856. // container instances in either zone B or C are considered optimal for termination.
  3857. //
  3858. // * Stop the task on a container instance in an optimal Availability Zone
  3859. // (based on the previous steps), favoring container instances with the largest
  3860. // number of running tasks for this service.
  3861. //
  3862. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3863. // with awserr.Error's Code and Message methods to get detailed information about
  3864. // the error.
  3865. //
  3866. // See the AWS API reference guide for Amazon EC2 Container Service's
  3867. // API operation UpdateService for usage and error information.
  3868. //
  3869. // Returned Error Codes:
  3870. // * ErrCodeServerException "ServerException"
  3871. // These errors are usually caused by a server issue.
  3872. //
  3873. // * ErrCodeClientException "ClientException"
  3874. // These errors are usually caused by a client action, such as using an action
  3875. // or resource on behalf of a user that doesn't have permissions to use the
  3876. // action or resource, or specifying an identifier that is not valid.
  3877. //
  3878. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3879. // The specified parameter is invalid. Review the available parameters for the
  3880. // API request.
  3881. //
  3882. // * ErrCodeClusterNotFoundException "ClusterNotFoundException"
  3883. // The specified cluster could not be found. You can view your available clusters
  3884. // with ListClusters. Amazon ECS clusters are Region-specific.
  3885. //
  3886. // * ErrCodeServiceNotFoundException "ServiceNotFoundException"
  3887. // The specified service could not be found. You can view your available services
  3888. // with ListServices. Amazon ECS services are cluster-specific and Region-specific.
  3889. //
  3890. // * ErrCodeServiceNotActiveException "ServiceNotActiveException"
  3891. // The specified service is not active. You can't update a service that is inactive.
  3892. // If you have previously deleted a service, you can re-create it with CreateService.
  3893. //
  3894. // * ErrCodePlatformUnknownException "PlatformUnknownException"
  3895. // The specified platform version does not exist.
  3896. //
  3897. // * ErrCodePlatformTaskDefinitionIncompatibilityException "PlatformTaskDefinitionIncompatibilityException"
  3898. // The specified platform version does not satisfy the task definition's required
  3899. // capabilities.
  3900. //
  3901. // * ErrCodeAccessDeniedException "AccessDeniedException"
  3902. // You do not have authorization to perform the requested action.
  3903. //
  3904. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateService
  3905. func (c *ECS) UpdateService(input *UpdateServiceInput) (*UpdateServiceOutput, error) {
  3906. req, out := c.UpdateServiceRequest(input)
  3907. return out, req.Send()
  3908. }
  3909. // UpdateServiceWithContext is the same as UpdateService with the addition of
  3910. // the ability to pass a context and additional request options.
  3911. //
  3912. // See UpdateService for details on how to use this API operation.
  3913. //
  3914. // The context must be non-nil and will be used for request cancellation. If
  3915. // the context is nil a panic will occur. In the future the SDK may create
  3916. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3917. // for more information on using Contexts.
  3918. func (c *ECS) UpdateServiceWithContext(ctx aws.Context, input *UpdateServiceInput, opts ...request.Option) (*UpdateServiceOutput, error) {
  3919. req, out := c.UpdateServiceRequest(input)
  3920. req.SetContext(ctx)
  3921. req.ApplyOptions(opts...)
  3922. return out, req.Send()
  3923. }
  3924. // An object representing a container instance or task attachment.
  3925. type Attachment struct {
  3926. _ struct{} `type:"structure"`
  3927. // Details of the attachment. For elastic network interfaces, this includes
  3928. // the network interface ID, the MAC address, the subnet ID, and the private
  3929. // IPv4 address.
  3930. Details []*KeyValuePair `locationName:"details" type:"list"`
  3931. // The unique identifier for the attachment.
  3932. Id *string `locationName:"id" type:"string"`
  3933. // The status of the attachment. Valid values are PRECREATED, CREATED, ATTACHING,
  3934. // ATTACHED, DETACHING, DETACHED, and DELETED.
  3935. Status *string `locationName:"status" type:"string"`
  3936. // The type of the attachment, such as ElasticNetworkInterface.
  3937. Type *string `locationName:"type" type:"string"`
  3938. }
  3939. // String returns the string representation
  3940. func (s Attachment) String() string {
  3941. return awsutil.Prettify(s)
  3942. }
  3943. // GoString returns the string representation
  3944. func (s Attachment) GoString() string {
  3945. return s.String()
  3946. }
  3947. // SetDetails sets the Details field's value.
  3948. func (s *Attachment) SetDetails(v []*KeyValuePair) *Attachment {
  3949. s.Details = v
  3950. return s
  3951. }
  3952. // SetId sets the Id field's value.
  3953. func (s *Attachment) SetId(v string) *Attachment {
  3954. s.Id = &v
  3955. return s
  3956. }
  3957. // SetStatus sets the Status field's value.
  3958. func (s *Attachment) SetStatus(v string) *Attachment {
  3959. s.Status = &v
  3960. return s
  3961. }
  3962. // SetType sets the Type field's value.
  3963. func (s *Attachment) SetType(v string) *Attachment {
  3964. s.Type = &v
  3965. return s
  3966. }
  3967. // An object representing a change in state for a task attachment.
  3968. type AttachmentStateChange struct {
  3969. _ struct{} `type:"structure"`
  3970. // The Amazon Resource Name (ARN) of the attachment.
  3971. //
  3972. // AttachmentArn is a required field
  3973. AttachmentArn *string `locationName:"attachmentArn" type:"string" required:"true"`
  3974. // The status of the attachment.
  3975. //
  3976. // Status is a required field
  3977. Status *string `locationName:"status" type:"string" required:"true"`
  3978. }
  3979. // String returns the string representation
  3980. func (s AttachmentStateChange) String() string {
  3981. return awsutil.Prettify(s)
  3982. }
  3983. // GoString returns the string representation
  3984. func (s AttachmentStateChange) GoString() string {
  3985. return s.String()
  3986. }
  3987. // Validate inspects the fields of the type to determine if they are valid.
  3988. func (s *AttachmentStateChange) Validate() error {
  3989. invalidParams := request.ErrInvalidParams{Context: "AttachmentStateChange"}
  3990. if s.AttachmentArn == nil {
  3991. invalidParams.Add(request.NewErrParamRequired("AttachmentArn"))
  3992. }
  3993. if s.Status == nil {
  3994. invalidParams.Add(request.NewErrParamRequired("Status"))
  3995. }
  3996. if invalidParams.Len() > 0 {
  3997. return invalidParams
  3998. }
  3999. return nil
  4000. }
  4001. // SetAttachmentArn sets the AttachmentArn field's value.
  4002. func (s *AttachmentStateChange) SetAttachmentArn(v string) *AttachmentStateChange {
  4003. s.AttachmentArn = &v
  4004. return s
  4005. }
  4006. // SetStatus sets the Status field's value.
  4007. func (s *AttachmentStateChange) SetStatus(v string) *AttachmentStateChange {
  4008. s.Status = &v
  4009. return s
  4010. }
  4011. // An attribute is a name-value pair associated with an Amazon ECS object. Attributes
  4012. // enable you to extend the Amazon ECS data model by adding custom metadata
  4013. // to your resources. For more information, see Attributes (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes)
  4014. // in the Amazon Elastic Container Service Developer Guide.
  4015. type Attribute struct {
  4016. _ struct{} `type:"structure"`
  4017. // The name of the attribute. Up to 128 letters (uppercase and lowercase), numbers,
  4018. // hyphens, underscores, and periods are allowed.
  4019. //
  4020. // Name is a required field
  4021. Name *string `locationName:"name" type:"string" required:"true"`
  4022. // The ID of the target. You can specify the short form ID for a resource or
  4023. // the full Amazon Resource Name (ARN).
  4024. TargetId *string `locationName:"targetId" type:"string"`
  4025. // The type of the target with which to attach the attribute. This parameter
  4026. // is required if you use the short form ID for a resource instead of the full
  4027. // ARN.
  4028. TargetType *string `locationName:"targetType" type:"string" enum:"TargetType"`
  4029. // The value of the attribute. Up to 128 letters (uppercase and lowercase),
  4030. // numbers, hyphens, underscores, periods, at signs (@), forward slashes, colons,
  4031. // and spaces are allowed.
  4032. Value *string `locationName:"value" type:"string"`
  4033. }
  4034. // String returns the string representation
  4035. func (s Attribute) String() string {
  4036. return awsutil.Prettify(s)
  4037. }
  4038. // GoString returns the string representation
  4039. func (s Attribute) GoString() string {
  4040. return s.String()
  4041. }
  4042. // Validate inspects the fields of the type to determine if they are valid.
  4043. func (s *Attribute) Validate() error {
  4044. invalidParams := request.ErrInvalidParams{Context: "Attribute"}
  4045. if s.Name == nil {
  4046. invalidParams.Add(request.NewErrParamRequired("Name"))
  4047. }
  4048. if invalidParams.Len() > 0 {
  4049. return invalidParams
  4050. }
  4051. return nil
  4052. }
  4053. // SetName sets the Name field's value.
  4054. func (s *Attribute) SetName(v string) *Attribute {
  4055. s.Name = &v
  4056. return s
  4057. }
  4058. // SetTargetId sets the TargetId field's value.
  4059. func (s *Attribute) SetTargetId(v string) *Attribute {
  4060. s.TargetId = &v
  4061. return s
  4062. }
  4063. // SetTargetType sets the TargetType field's value.
  4064. func (s *Attribute) SetTargetType(v string) *Attribute {
  4065. s.TargetType = &v
  4066. return s
  4067. }
  4068. // SetValue sets the Value field's value.
  4069. func (s *Attribute) SetValue(v string) *Attribute {
  4070. s.Value = &v
  4071. return s
  4072. }
  4073. // An object representing the networking details for a task or service.
  4074. type AwsVpcConfiguration struct {
  4075. _ struct{} `type:"structure"`
  4076. // Whether the task's elastic network interface receives a public IP address.
  4077. // The default value is DISABLED.
  4078. AssignPublicIp *string `locationName:"assignPublicIp" type:"string" enum:"AssignPublicIp"`
  4079. // The security groups associated with the task or service. If you do not specify
  4080. // a security group, the default security group for the VPC is used. There is
  4081. // a limit of five security groups able to be specified per AwsVpcConfiguration.
  4082. //
  4083. // All specified security groups must be from the same VPC.
  4084. SecurityGroups []*string `locationName:"securityGroups" type:"list"`
  4085. // The subnets associated with the task or service. There is a limit of 16 subnets
  4086. // able to be specified per AwsVpcConfiguration.
  4087. //
  4088. // All specified subnets must be from the same VPC.
  4089. //
  4090. // Subnets is a required field
  4091. Subnets []*string `locationName:"subnets" type:"list" required:"true"`
  4092. }
  4093. // String returns the string representation
  4094. func (s AwsVpcConfiguration) String() string {
  4095. return awsutil.Prettify(s)
  4096. }
  4097. // GoString returns the string representation
  4098. func (s AwsVpcConfiguration) GoString() string {
  4099. return s.String()
  4100. }
  4101. // Validate inspects the fields of the type to determine if they are valid.
  4102. func (s *AwsVpcConfiguration) Validate() error {
  4103. invalidParams := request.ErrInvalidParams{Context: "AwsVpcConfiguration"}
  4104. if s.Subnets == nil {
  4105. invalidParams.Add(request.NewErrParamRequired("Subnets"))
  4106. }
  4107. if invalidParams.Len() > 0 {
  4108. return invalidParams
  4109. }
  4110. return nil
  4111. }
  4112. // SetAssignPublicIp sets the AssignPublicIp field's value.
  4113. func (s *AwsVpcConfiguration) SetAssignPublicIp(v string) *AwsVpcConfiguration {
  4114. s.AssignPublicIp = &v
  4115. return s
  4116. }
  4117. // SetSecurityGroups sets the SecurityGroups field's value.
  4118. func (s *AwsVpcConfiguration) SetSecurityGroups(v []*string) *AwsVpcConfiguration {
  4119. s.SecurityGroups = v
  4120. return s
  4121. }
  4122. // SetSubnets sets the Subnets field's value.
  4123. func (s *AwsVpcConfiguration) SetSubnets(v []*string) *AwsVpcConfiguration {
  4124. s.Subnets = v
  4125. return s
  4126. }
  4127. // A regional grouping of one or more container instances on which you can run
  4128. // task requests. Each account receives a default cluster the first time you
  4129. // use the Amazon ECS service, but you may also create other clusters. Clusters
  4130. // may contain more than one instance type simultaneously.
  4131. type Cluster struct {
  4132. _ struct{} `type:"structure"`
  4133. // The number of services that are running on the cluster in an ACTIVE state.
  4134. // You can view these services with ListServices.
  4135. ActiveServicesCount *int64 `locationName:"activeServicesCount" type:"integer"`
  4136. // The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains
  4137. // the arn:aws:ecs namespace, followed by the Region of the cluster, the AWS
  4138. // account ID of the cluster owner, the cluster namespace, and then the cluster
  4139. // name. For example, arn:aws:ecs:region:012345678910:cluster/test..
  4140. ClusterArn *string `locationName:"clusterArn" type:"string"`
  4141. // A user-generated string that you use to identify your cluster.
  4142. ClusterName *string `locationName:"clusterName" type:"string"`
  4143. // The number of tasks in the cluster that are in the PENDING state.
  4144. PendingTasksCount *int64 `locationName:"pendingTasksCount" type:"integer"`
  4145. // The number of container instances registered into the cluster. This includes
  4146. // container instances in both ACTIVE and DRAINING status.
  4147. RegisteredContainerInstancesCount *int64 `locationName:"registeredContainerInstancesCount" type:"integer"`
  4148. // The number of tasks in the cluster that are in the RUNNING state.
  4149. RunningTasksCount *int64 `locationName:"runningTasksCount" type:"integer"`
  4150. // Additional information about your clusters that are separated by launch type,
  4151. // including:
  4152. //
  4153. // * runningEC2TasksCount
  4154. //
  4155. // * RunningFargateTasksCount
  4156. //
  4157. // * pendingEC2TasksCount
  4158. //
  4159. // * pendingFargateTasksCount
  4160. //
  4161. // * activeEC2ServiceCount
  4162. //
  4163. // * activeFargateServiceCount
  4164. //
  4165. // * drainingEC2ServiceCount
  4166. //
  4167. // * drainingFargateServiceCount
  4168. Statistics []*KeyValuePair `locationName:"statistics" type:"list"`
  4169. // The status of the cluster. The valid values are ACTIVE or INACTIVE. ACTIVE
  4170. // indicates that you can register container instances with the cluster and
  4171. // the associated instances can accept tasks.
  4172. Status *string `locationName:"status" type:"string"`
  4173. // The metadata that you apply to the cluster to help you categorize and organize
  4174. // them. Each tag consists of a key and an optional value, both of which you
  4175. // define. Tag keys can have a maximum character length of 128 characters, and
  4176. // tag values can have a maximum length of 256 characters.
  4177. Tags []*Tag `locationName:"tags" type:"list"`
  4178. }
  4179. // String returns the string representation
  4180. func (s Cluster) String() string {
  4181. return awsutil.Prettify(s)
  4182. }
  4183. // GoString returns the string representation
  4184. func (s Cluster) GoString() string {
  4185. return s.String()
  4186. }
  4187. // SetActiveServicesCount sets the ActiveServicesCount field's value.
  4188. func (s *Cluster) SetActiveServicesCount(v int64) *Cluster {
  4189. s.ActiveServicesCount = &v
  4190. return s
  4191. }
  4192. // SetClusterArn sets the ClusterArn field's value.
  4193. func (s *Cluster) SetClusterArn(v string) *Cluster {
  4194. s.ClusterArn = &v
  4195. return s
  4196. }
  4197. // SetClusterName sets the ClusterName field's value.
  4198. func (s *Cluster) SetClusterName(v string) *Cluster {
  4199. s.ClusterName = &v
  4200. return s
  4201. }
  4202. // SetPendingTasksCount sets the PendingTasksCount field's value.
  4203. func (s *Cluster) SetPendingTasksCount(v int64) *Cluster {
  4204. s.PendingTasksCount = &v
  4205. return s
  4206. }
  4207. // SetRegisteredContainerInstancesCount sets the RegisteredContainerInstancesCount field's value.
  4208. func (s *Cluster) SetRegisteredContainerInstancesCount(v int64) *Cluster {
  4209. s.RegisteredContainerInstancesCount = &v
  4210. return s
  4211. }
  4212. // SetRunningTasksCount sets the RunningTasksCount field's value.
  4213. func (s *Cluster) SetRunningTasksCount(v int64) *Cluster {
  4214. s.RunningTasksCount = &v
  4215. return s
  4216. }
  4217. // SetStatistics sets the Statistics field's value.
  4218. func (s *Cluster) SetStatistics(v []*KeyValuePair) *Cluster {
  4219. s.Statistics = v
  4220. return s
  4221. }
  4222. // SetStatus sets the Status field's value.
  4223. func (s *Cluster) SetStatus(v string) *Cluster {
  4224. s.Status = &v
  4225. return s
  4226. }
  4227. // SetTags sets the Tags field's value.
  4228. func (s *Cluster) SetTags(v []*Tag) *Cluster {
  4229. s.Tags = v
  4230. return s
  4231. }
  4232. // A Docker container that is part of a task.
  4233. type Container struct {
  4234. _ struct{} `type:"structure"`
  4235. // The Amazon Resource Name (ARN) of the container.
  4236. ContainerArn *string `locationName:"containerArn" type:"string"`
  4237. // The exit code returned from the container.
  4238. ExitCode *int64 `locationName:"exitCode" type:"integer"`
  4239. // The health status of the container. If health checks are not configured for
  4240. // this container in its task definition, then it reports the health status
  4241. // as UNKNOWN.
  4242. HealthStatus *string `locationName:"healthStatus" type:"string" enum:"HealthStatus"`
  4243. // The last known status of the container.
  4244. LastStatus *string `locationName:"lastStatus" type:"string"`
  4245. // The name of the container.
  4246. Name *string `locationName:"name" type:"string"`
  4247. // The network bindings associated with the container.
  4248. NetworkBindings []*NetworkBinding `locationName:"networkBindings" type:"list"`
  4249. // The network interfaces associated with the container.
  4250. NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaces" type:"list"`
  4251. // A short (255 max characters) human-readable string to provide additional
  4252. // details about a running or stopped container.
  4253. Reason *string `locationName:"reason" type:"string"`
  4254. // The ARN of the task.
  4255. TaskArn *string `locationName:"taskArn" type:"string"`
  4256. }
  4257. // String returns the string representation
  4258. func (s Container) String() string {
  4259. return awsutil.Prettify(s)
  4260. }
  4261. // GoString returns the string representation
  4262. func (s Container) GoString() string {
  4263. return s.String()
  4264. }
  4265. // SetContainerArn sets the ContainerArn field's value.
  4266. func (s *Container) SetContainerArn(v string) *Container {
  4267. s.ContainerArn = &v
  4268. return s
  4269. }
  4270. // SetExitCode sets the ExitCode field's value.
  4271. func (s *Container) SetExitCode(v int64) *Container {
  4272. s.ExitCode = &v
  4273. return s
  4274. }
  4275. // SetHealthStatus sets the HealthStatus field's value.
  4276. func (s *Container) SetHealthStatus(v string) *Container {
  4277. s.HealthStatus = &v
  4278. return s
  4279. }
  4280. // SetLastStatus sets the LastStatus field's value.
  4281. func (s *Container) SetLastStatus(v string) *Container {
  4282. s.LastStatus = &v
  4283. return s
  4284. }
  4285. // SetName sets the Name field's value.
  4286. func (s *Container) SetName(v string) *Container {
  4287. s.Name = &v
  4288. return s
  4289. }
  4290. // SetNetworkBindings sets the NetworkBindings field's value.
  4291. func (s *Container) SetNetworkBindings(v []*NetworkBinding) *Container {
  4292. s.NetworkBindings = v
  4293. return s
  4294. }
  4295. // SetNetworkInterfaces sets the NetworkInterfaces field's value.
  4296. func (s *Container) SetNetworkInterfaces(v []*NetworkInterface) *Container {
  4297. s.NetworkInterfaces = v
  4298. return s
  4299. }
  4300. // SetReason sets the Reason field's value.
  4301. func (s *Container) SetReason(v string) *Container {
  4302. s.Reason = &v
  4303. return s
  4304. }
  4305. // SetTaskArn sets the TaskArn field's value.
  4306. func (s *Container) SetTaskArn(v string) *Container {
  4307. s.TaskArn = &v
  4308. return s
  4309. }
  4310. // Container definitions are used in task definitions to describe the different
  4311. // containers that are launched as part of a task.
  4312. type ContainerDefinition struct {
  4313. _ struct{} `type:"structure"`
  4314. // The command that is passed to the container. This parameter maps to Cmd in
  4315. // the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4316. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4317. // and the COMMAND parameter to docker run (https://docs.docker.com/engine/reference/run/).
  4318. // For more information, see https://docs.docker.com/engine/reference/builder/#cmd
  4319. // (https://docs.docker.com/engine/reference/builder/#cmd).
  4320. Command []*string `locationName:"command" type:"list"`
  4321. // The number of cpu units reserved for the container. This parameter maps to
  4322. // CpuShares in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4323. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4324. // and the --cpu-shares option to docker run (https://docs.docker.com/engine/reference/run/).
  4325. //
  4326. // This field is optional for tasks using the Fargate launch type, and the only
  4327. // requirement is that the total amount of CPU reserved for all containers within
  4328. // a task be lower than the task-level cpu value.
  4329. //
  4330. // You can determine the number of CPU units that are available per EC2 instance
  4331. // type by multiplying the vCPUs listed for that instance type on the Amazon
  4332. // EC2 Instances (http://aws.amazon.com/ec2/instance-types/) detail page by
  4333. // 1,024.
  4334. //
  4335. // For example, if you run a single-container task on a single-core instance
  4336. // type with 512 CPU units specified for that container, and that is the only
  4337. // task running on the container instance, that container could use the full
  4338. // 1,024 CPU unit share at any given time. However, if you launched another
  4339. // copy of the same task on that container instance, each task would be guaranteed
  4340. // a minimum of 512 CPU units when needed, and each container could float to
  4341. // higher CPU usage if the other container was not using it, but if both tasks
  4342. // were 100% active all of the time, they would be limited to 512 CPU units.
  4343. //
  4344. // Linux containers share unallocated CPU units with other containers on the
  4345. // container instance with the same ratio as their allocated amount. For example,
  4346. // if you run a single-container task on a single-core instance type with 512
  4347. // CPU units specified for that container, and that is the only task running
  4348. // on the container instance, that container could use the full 1,024 CPU unit
  4349. // share at any given time. However, if you launched another copy of the same
  4350. // task on that container instance, each task would be guaranteed a minimum
  4351. // of 512 CPU units when needed, and each container could float to higher CPU
  4352. // usage if the other container was not using it, but if both tasks were 100%
  4353. // active all of the time, they would be limited to 512 CPU units.
  4354. //
  4355. // On Linux container instances, the Docker daemon on the container instance
  4356. // uses the CPU value to calculate the relative CPU share ratios for running
  4357. // containers. For more information, see CPU share constraint (https://docs.docker.com/engine/reference/run/#cpu-share-constraint)
  4358. // in the Docker documentation. The minimum valid CPU share value that the Linux
  4359. // kernel allows is 2. However, the CPU parameter is not required, and you can
  4360. // use CPU values below 2 in your container definitions. For CPU values below
  4361. // 2 (including null), the behavior varies based on your Amazon ECS container
  4362. // agent version:
  4363. //
  4364. // * Agent versions less than or equal to 1.1.0: Null and zero CPU values
  4365. // are passed to Docker as 0, which Docker then converts to 1,024 CPU shares.
  4366. // CPU values of 1 are passed to Docker as 1, which the Linux kernel converts
  4367. // to two CPU shares.
  4368. //
  4369. // * Agent versions greater than or equal to 1.2.0: Null, zero, and CPU values
  4370. // of 1 are passed to Docker as 2.
  4371. //
  4372. // On Windows container instances, the CPU limit is enforced as an absolute
  4373. // limit, or a quota. Windows containers only have access to the specified amount
  4374. // of CPU that is described in the task definition.
  4375. Cpu *int64 `locationName:"cpu" type:"integer"`
  4376. // When this parameter is true, networking is disabled within the container.
  4377. // This parameter maps to NetworkDisabled in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4378. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/).
  4379. //
  4380. // This parameter is not supported for Windows containers.
  4381. DisableNetworking *bool `locationName:"disableNetworking" type:"boolean"`
  4382. // A list of DNS search domains that are presented to the container. This parameter
  4383. // maps to DnsSearch in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4384. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4385. // and the --dns-search option to docker run (https://docs.docker.com/engine/reference/run/).
  4386. //
  4387. // This parameter is not supported for Windows containers.
  4388. DnsSearchDomains []*string `locationName:"dnsSearchDomains" type:"list"`
  4389. // A list of DNS servers that are presented to the container. This parameter
  4390. // maps to Dns in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4391. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4392. // and the --dns option to docker run (https://docs.docker.com/engine/reference/run/).
  4393. //
  4394. // This parameter is not supported for Windows containers.
  4395. DnsServers []*string `locationName:"dnsServers" type:"list"`
  4396. // A key/value map of labels to add to the container. This parameter maps to
  4397. // Labels in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4398. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4399. // and the --label option to docker run (https://docs.docker.com/engine/reference/run/).
  4400. // This parameter requires version 1.18 of the Docker Remote API or greater
  4401. // on your container instance. To check the Docker Remote API version on your
  4402. // container instance, log in to your container instance and run the following
  4403. // command: sudo docker version --format '{{.Server.APIVersion}}'
  4404. DockerLabels map[string]*string `locationName:"dockerLabels" type:"map"`
  4405. // A list of strings to provide custom labels for SELinux and AppArmor multi-level
  4406. // security systems. This field is not valid for containers in tasks using the
  4407. // Fargate launch type.
  4408. //
  4409. // This parameter maps to SecurityOpt in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4410. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4411. // and the --security-opt option to docker run (https://docs.docker.com/engine/reference/run/).
  4412. //
  4413. // The Amazon ECS container agent running on a container instance must register
  4414. // with the ECS_SELINUX_CAPABLE=true or ECS_APPARMOR_CAPABLE=true environment
  4415. // variables before containers placed on that instance can use these security
  4416. // options. For more information, see Amazon ECS Container Agent Configuration
  4417. // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html)
  4418. // in the Amazon Elastic Container Service Developer Guide.
  4419. //
  4420. // This parameter is not supported for Windows containers.
  4421. DockerSecurityOptions []*string `locationName:"dockerSecurityOptions" type:"list"`
  4422. // Early versions of the Amazon ECS container agent do not properly handle entryPoint
  4423. // parameters. If you have problems using entryPoint, update your container
  4424. // agent or enter your commands and arguments as command array items instead.
  4425. //
  4426. // The entry point that is passed to the container. This parameter maps to Entrypoint
  4427. // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4428. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4429. // and the --entrypoint option to docker run (https://docs.docker.com/engine/reference/run/).
  4430. // For more information, see https://docs.docker.com/engine/reference/builder/#entrypoint
  4431. // (https://docs.docker.com/engine/reference/builder/#entrypoint).
  4432. EntryPoint []*string `locationName:"entryPoint" type:"list"`
  4433. // The environment variables to pass to a container. This parameter maps to
  4434. // Env in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4435. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4436. // and the --env option to docker run (https://docs.docker.com/engine/reference/run/).
  4437. //
  4438. // We do not recommend using plaintext environment variables for sensitive information,
  4439. // such as credential data.
  4440. Environment []*KeyValuePair `locationName:"environment" type:"list"`
  4441. // If the essential parameter of a container is marked as true, and that container
  4442. // fails or stops for any reason, all other containers that are part of the
  4443. // task are stopped. If the essential parameter of a container is marked as
  4444. // false, then its failure does not affect the rest of the containers in a task.
  4445. // If this parameter is omitted, a container is assumed to be essential.
  4446. //
  4447. // All tasks must have at least one essential container. If you have an application
  4448. // that is composed of multiple containers, you should group containers that
  4449. // are used for a common purpose into components, and separate the different
  4450. // components into multiple task definitions. For more information, see Application
  4451. // Architecture (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/application_architecture.html)
  4452. // in the Amazon Elastic Container Service Developer Guide.
  4453. Essential *bool `locationName:"essential" type:"boolean"`
  4454. // A list of hostnames and IP address mappings to append to the /etc/hosts file
  4455. // on the container. This parameter maps to ExtraHosts in the Create a container
  4456. // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section
  4457. // of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and
  4458. // the --add-host option to docker run (https://docs.docker.com/engine/reference/run/).
  4459. //
  4460. // This parameter is not supported for Windows containers or tasks that use
  4461. // the awsvpc network mode.
  4462. ExtraHosts []*HostEntry `locationName:"extraHosts" type:"list"`
  4463. // The health check command and associated configuration parameters for the
  4464. // container. This parameter maps to HealthCheck in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4465. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4466. // and the HEALTHCHECK parameter of docker run (https://docs.docker.com/engine/reference/run/).
  4467. HealthCheck *HealthCheck `locationName:"healthCheck" type:"structure"`
  4468. // The hostname to use for your container. This parameter maps to Hostname in
  4469. // the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4470. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4471. // and the --hostname option to docker run (https://docs.docker.com/engine/reference/run/).
  4472. //
  4473. // The hostname parameter is not supported if you are using the awsvpc network
  4474. // mode.
  4475. Hostname *string `locationName:"hostname" type:"string"`
  4476. // The image used to start a container. This string is passed directly to the
  4477. // Docker daemon. Images in the Docker Hub registry are available by default.
  4478. // Other repositories are specified with either repository-url/image:tag or
  4479. // repository-url/image@digest. Up to 255 letters (uppercase and lowercase),
  4480. // numbers, hyphens, underscores, colons, periods, forward slashes, and number
  4481. // signs are allowed. This parameter maps to Image in the Create a container
  4482. // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section
  4483. // of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and
  4484. // the IMAGE parameter of docker run (https://docs.docker.com/engine/reference/run/).
  4485. //
  4486. // * When a new task starts, the Amazon ECS container agent pulls the latest
  4487. // version of the specified image and tag for the container to use. However,
  4488. // subsequent updates to a repository image are not propagated to already
  4489. // running tasks.
  4490. //
  4491. // * Images in Amazon ECR repositories can be specified by either using the
  4492. // full registry/repository:tag or registry/repository@digest. For example,
  4493. // 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>:latest
  4494. // or 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE.
  4495. //
  4496. //
  4497. // * Images in official repositories on Docker Hub use a single name (for
  4498. // example, ubuntu or mongo).
  4499. //
  4500. // * Images in other repositories on Docker Hub are qualified with an organization
  4501. // name (for example, amazon/amazon-ecs-agent).
  4502. //
  4503. // * Images in other online repositories are qualified further by a domain
  4504. // name (for example, quay.io/assemblyline/ubuntu).
  4505. Image *string `locationName:"image" type:"string"`
  4506. // When this parameter is true, this allows you to deploy containerized applications
  4507. // that require stdin or a tty to be allocated. This parameter maps to OpenStdin
  4508. // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4509. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4510. // and the --interactive option to docker run (https://docs.docker.com/engine/reference/run/).
  4511. Interactive *bool `locationName:"interactive" type:"boolean"`
  4512. // The link parameter allows containers to communicate with each other without
  4513. // the need for port mappings. Only supported if the network mode of a task
  4514. // definition is set to bridge. The name:internalName construct is analogous
  4515. // to name:alias in Docker links. Up to 255 letters (uppercase and lowercase),
  4516. // numbers, hyphens, and underscores are allowed. For more information about
  4517. // linking Docker containers, go to https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/
  4518. // (https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/).
  4519. // This parameter maps to Links in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4520. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4521. // and the --link option to docker run (https://docs.docker.com/engine/reference/commandline/run/).
  4522. //
  4523. // This parameter is not supported for Windows containers.
  4524. //
  4525. // Containers that are collocated on a single container instance may be able
  4526. // to communicate with each other without requiring links or host port mappings.
  4527. // Network isolation is achieved on the container instance using security groups
  4528. // and VPC settings.
  4529. Links []*string `locationName:"links" type:"list"`
  4530. // Linux-specific modifications that are applied to the container, such as Linux
  4531. // KernelCapabilities.
  4532. //
  4533. // This parameter is not supported for Windows containers.
  4534. LinuxParameters *LinuxParameters `locationName:"linuxParameters" type:"structure"`
  4535. // The log configuration specification for the container.
  4536. //
  4537. // If you are using the Fargate launch type, the only supported value is awslogs.
  4538. //
  4539. // This parameter maps to LogConfig in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4540. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4541. // and the --log-driver option to docker run (https://docs.docker.com/engine/reference/run/).
  4542. // By default, containers use the same logging driver that the Docker daemon
  4543. // uses. However the container may use a different logging driver than the Docker
  4544. // daemon by specifying a log driver with this parameter in the container definition.
  4545. // To use a different logging driver for a container, the log system must be
  4546. // configured properly on the container instance (or on a different log server
  4547. // for remote logging options). For more information on the options for different
  4548. // supported log drivers, see Configure logging drivers (https://docs.docker.com/engine/admin/logging/overview/)
  4549. // in the Docker documentation.
  4550. //
  4551. // Amazon ECS currently supports a subset of the logging drivers available to
  4552. // the Docker daemon (shown in the LogConfiguration data type). Additional log
  4553. // drivers may be available in future releases of the Amazon ECS container agent.
  4554. //
  4555. // This parameter requires version 1.18 of the Docker Remote API or greater
  4556. // on your container instance. To check the Docker Remote API version on your
  4557. // container instance, log in to your container instance and run the following
  4558. // command: sudo docker version --format '{{.Server.APIVersion}}'
  4559. //
  4560. // The Amazon ECS container agent running on a container instance must register
  4561. // the logging drivers available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS
  4562. // environment variable before containers placed on that instance can use these
  4563. // log configuration options. For more information, see Amazon ECS Container
  4564. // Agent Configuration (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html)
  4565. // in the Amazon Elastic Container Service Developer Guide.
  4566. LogConfiguration *LogConfiguration `locationName:"logConfiguration" type:"structure"`
  4567. // The hard limit (in MiB) of memory to present to the container. If your container
  4568. // attempts to exceed the memory specified here, the container is killed. This
  4569. // parameter maps to Memory in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4570. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4571. // and the --memory option to docker run (https://docs.docker.com/engine/reference/run/).
  4572. //
  4573. // If your containers are part of a task using the Fargate launch type, this
  4574. // field is optional and the only requirement is that the total amount of memory
  4575. // reserved for all containers within a task be lower than the task memory value.
  4576. //
  4577. // For containers that are part of a task using the EC2 launch type, you must
  4578. // specify a non-zero integer for one or both of memory or memoryReservation
  4579. // in container definitions. If you specify both, memory must be greater than
  4580. // memoryReservation. If you specify memoryReservation, then that value is subtracted
  4581. // from the available memory resources for the container instance on which the
  4582. // container is placed. Otherwise, the value of memory is used.
  4583. //
  4584. // The Docker daemon reserves a minimum of 4 MiB of memory for a container,
  4585. // so you should not specify fewer than 4 MiB of memory for your containers.
  4586. Memory *int64 `locationName:"memory" type:"integer"`
  4587. // The soft limit (in MiB) of memory to reserve for the container. When system
  4588. // memory is under heavy contention, Docker attempts to keep the container memory
  4589. // to this soft limit. However, your container can consume more memory when
  4590. // it needs to, up to either the hard limit specified with the memory parameter
  4591. // (if applicable), or all of the available memory on the container instance,
  4592. // whichever comes first. This parameter maps to MemoryReservation in the Create
  4593. // a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4594. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4595. // and the --memory-reservation option to docker run (https://docs.docker.com/engine/reference/run/).
  4596. //
  4597. // You must specify a non-zero integer for one or both of memory or memoryReservation
  4598. // in container definitions. If you specify both, memory must be greater than
  4599. // memoryReservation. If you specify memoryReservation, then that value is subtracted
  4600. // from the available memory resources for the container instance on which the
  4601. // container is placed. Otherwise, the value of memory is used.
  4602. //
  4603. // For example, if your container normally uses 128 MiB of memory, but occasionally
  4604. // bursts to 256 MiB of memory for short periods of time, you can set a memoryReservation
  4605. // of 128 MiB, and a memory hard limit of 300 MiB. This configuration would
  4606. // allow the container to only reserve 128 MiB of memory from the remaining
  4607. // resources on the container instance, but also allow the container to consume
  4608. // more memory resources when needed.
  4609. //
  4610. // The Docker daemon reserves a minimum of 4 MiB of memory for a container,
  4611. // so you should not specify fewer than 4 MiB of memory for your containers.
  4612. MemoryReservation *int64 `locationName:"memoryReservation" type:"integer"`
  4613. // The mount points for data volumes in your container.
  4614. //
  4615. // This parameter maps to Volumes in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4616. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4617. // and the --volume option to docker run (https://docs.docker.com/engine/reference/run/).
  4618. //
  4619. // Windows containers can mount whole directories on the same drive as $env:ProgramData.
  4620. // Windows containers cannot mount directories on a different drive, and mount
  4621. // point cannot be across drives.
  4622. MountPoints []*MountPoint `locationName:"mountPoints" type:"list"`
  4623. // The name of a container. If you are linking multiple containers together
  4624. // in a task definition, the name of one container can be entered in the links
  4625. // of another container to connect the containers. Up to 255 letters (uppercase
  4626. // and lowercase), numbers, hyphens, and underscores are allowed. This parameter
  4627. // maps to name in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4628. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4629. // and the --name option to docker run (https://docs.docker.com/engine/reference/run/).
  4630. Name *string `locationName:"name" type:"string"`
  4631. // The list of port mappings for the container. Port mappings allow containers
  4632. // to access ports on the host container instance to send or receive traffic.
  4633. //
  4634. // For task definitions that use the awsvpc network mode, you should only specify
  4635. // the containerPort. The hostPort can be left blank or it must be the same
  4636. // value as the containerPort.
  4637. //
  4638. // Port mappings on Windows use the NetNAT gateway address rather than localhost.
  4639. // There is no loopback for port mappings on Windows, so you cannot access a
  4640. // container's mapped port from the host itself.
  4641. //
  4642. // This parameter maps to PortBindings in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4643. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4644. // and the --publish option to docker run (https://docs.docker.com/engine/reference/run/).
  4645. // If the network mode of a task definition is set to none, then you can't specify
  4646. // port mappings. If the network mode of a task definition is set to host, then
  4647. // host ports must either be undefined or they must match the container port
  4648. // in the port mapping.
  4649. //
  4650. // After a task reaches the RUNNING status, manual and automatic host and container
  4651. // port assignments are visible in the Network Bindings section of a container
  4652. // description for a selected task in the Amazon ECS console. The assignments
  4653. // are also visible in the networkBindings section DescribeTasks responses.
  4654. PortMappings []*PortMapping `locationName:"portMappings" type:"list"`
  4655. // When this parameter is true, the container is given elevated privileges on
  4656. // the host container instance (similar to the root user). This parameter maps
  4657. // to Privileged in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4658. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4659. // and the --privileged option to docker run (https://docs.docker.com/engine/reference/run/).
  4660. //
  4661. // This parameter is not supported for Windows containers or tasks using the
  4662. // Fargate launch type.
  4663. Privileged *bool `locationName:"privileged" type:"boolean"`
  4664. // When this parameter is true, a TTY is allocated. This parameter maps to Tty
  4665. // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4666. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4667. // and the --tty option to docker run (https://docs.docker.com/engine/reference/run/).
  4668. PseudoTerminal *bool `locationName:"pseudoTerminal" type:"boolean"`
  4669. // When this parameter is true, the container is given read-only access to its
  4670. // root file system. This parameter maps to ReadonlyRootfs in the Create a container
  4671. // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section
  4672. // of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and
  4673. // the --read-only option to docker run (https://docs.docker.com/engine/reference/run/).
  4674. //
  4675. // This parameter is not supported for Windows containers.
  4676. ReadonlyRootFilesystem *bool `locationName:"readonlyRootFilesystem" type:"boolean"`
  4677. // The private repository authentication credentials to use.
  4678. RepositoryCredentials *RepositoryCredentials `locationName:"repositoryCredentials" type:"structure"`
  4679. // The secrets to pass to the container.
  4680. Secrets []*Secret `locationName:"secrets" type:"list"`
  4681. // A list of namespaced kernel parameters to set in the container. This parameter
  4682. // maps to Sysctls in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4683. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4684. // and the --sysctl option to docker run (https://docs.docker.com/engine/reference/run/).
  4685. //
  4686. // It is not recommended that you specify network-related systemControls parameters
  4687. // for multiple containers in a single task that also uses either the awsvpc
  4688. // or host network modes. For tasks that use the awsvpc network mode, the container
  4689. // that is started last determines which systemControls parameters take effect.
  4690. // For tasks that use the host network mode, it changes the container instance's
  4691. // namespaced kernel parameters as well as the containers.
  4692. SystemControls []*SystemControl `locationName:"systemControls" type:"list"`
  4693. // A list of ulimits to set in the container. This parameter maps to Ulimits
  4694. // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4695. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4696. // and the --ulimit option to docker run (https://docs.docker.com/engine/reference/run/).
  4697. // Valid naming values are displayed in the Ulimit data type. This parameter
  4698. // requires version 1.18 of the Docker Remote API or greater on your container
  4699. // instance. To check the Docker Remote API version on your container instance,
  4700. // log in to your container instance and run the following command: sudo docker
  4701. // version --format '{{.Server.APIVersion}}'
  4702. //
  4703. // This parameter is not supported for Windows containers.
  4704. Ulimits []*Ulimit `locationName:"ulimits" type:"list"`
  4705. // The user name to use inside the container. This parameter maps to User in
  4706. // the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4707. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4708. // and the --user option to docker run (https://docs.docker.com/engine/reference/run/).
  4709. //
  4710. // This parameter is not supported for Windows containers.
  4711. User *string `locationName:"user" type:"string"`
  4712. // Data volumes to mount from another container. This parameter maps to VolumesFrom
  4713. // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4714. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4715. // and the --volumes-from option to docker run (https://docs.docker.com/engine/reference/run/).
  4716. VolumesFrom []*VolumeFrom `locationName:"volumesFrom" type:"list"`
  4717. // The working directory in which to run commands inside the container. This
  4718. // parameter maps to WorkingDir in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  4719. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  4720. // and the --workdir option to docker run (https://docs.docker.com/engine/reference/run/).
  4721. WorkingDirectory *string `locationName:"workingDirectory" type:"string"`
  4722. }
  4723. // String returns the string representation
  4724. func (s ContainerDefinition) String() string {
  4725. return awsutil.Prettify(s)
  4726. }
  4727. // GoString returns the string representation
  4728. func (s ContainerDefinition) GoString() string {
  4729. return s.String()
  4730. }
  4731. // Validate inspects the fields of the type to determine if they are valid.
  4732. func (s *ContainerDefinition) Validate() error {
  4733. invalidParams := request.ErrInvalidParams{Context: "ContainerDefinition"}
  4734. if s.ExtraHosts != nil {
  4735. for i, v := range s.ExtraHosts {
  4736. if v == nil {
  4737. continue
  4738. }
  4739. if err := v.Validate(); err != nil {
  4740. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ExtraHosts", i), err.(request.ErrInvalidParams))
  4741. }
  4742. }
  4743. }
  4744. if s.HealthCheck != nil {
  4745. if err := s.HealthCheck.Validate(); err != nil {
  4746. invalidParams.AddNested("HealthCheck", err.(request.ErrInvalidParams))
  4747. }
  4748. }
  4749. if s.LinuxParameters != nil {
  4750. if err := s.LinuxParameters.Validate(); err != nil {
  4751. invalidParams.AddNested("LinuxParameters", err.(request.ErrInvalidParams))
  4752. }
  4753. }
  4754. if s.LogConfiguration != nil {
  4755. if err := s.LogConfiguration.Validate(); err != nil {
  4756. invalidParams.AddNested("LogConfiguration", err.(request.ErrInvalidParams))
  4757. }
  4758. }
  4759. if s.RepositoryCredentials != nil {
  4760. if err := s.RepositoryCredentials.Validate(); err != nil {
  4761. invalidParams.AddNested("RepositoryCredentials", err.(request.ErrInvalidParams))
  4762. }
  4763. }
  4764. if s.Secrets != nil {
  4765. for i, v := range s.Secrets {
  4766. if v == nil {
  4767. continue
  4768. }
  4769. if err := v.Validate(); err != nil {
  4770. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Secrets", i), err.(request.ErrInvalidParams))
  4771. }
  4772. }
  4773. }
  4774. if s.Ulimits != nil {
  4775. for i, v := range s.Ulimits {
  4776. if v == nil {
  4777. continue
  4778. }
  4779. if err := v.Validate(); err != nil {
  4780. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Ulimits", i), err.(request.ErrInvalidParams))
  4781. }
  4782. }
  4783. }
  4784. if invalidParams.Len() > 0 {
  4785. return invalidParams
  4786. }
  4787. return nil
  4788. }
  4789. // SetCommand sets the Command field's value.
  4790. func (s *ContainerDefinition) SetCommand(v []*string) *ContainerDefinition {
  4791. s.Command = v
  4792. return s
  4793. }
  4794. // SetCpu sets the Cpu field's value.
  4795. func (s *ContainerDefinition) SetCpu(v int64) *ContainerDefinition {
  4796. s.Cpu = &v
  4797. return s
  4798. }
  4799. // SetDisableNetworking sets the DisableNetworking field's value.
  4800. func (s *ContainerDefinition) SetDisableNetworking(v bool) *ContainerDefinition {
  4801. s.DisableNetworking = &v
  4802. return s
  4803. }
  4804. // SetDnsSearchDomains sets the DnsSearchDomains field's value.
  4805. func (s *ContainerDefinition) SetDnsSearchDomains(v []*string) *ContainerDefinition {
  4806. s.DnsSearchDomains = v
  4807. return s
  4808. }
  4809. // SetDnsServers sets the DnsServers field's value.
  4810. func (s *ContainerDefinition) SetDnsServers(v []*string) *ContainerDefinition {
  4811. s.DnsServers = v
  4812. return s
  4813. }
  4814. // SetDockerLabels sets the DockerLabels field's value.
  4815. func (s *ContainerDefinition) SetDockerLabels(v map[string]*string) *ContainerDefinition {
  4816. s.DockerLabels = v
  4817. return s
  4818. }
  4819. // SetDockerSecurityOptions sets the DockerSecurityOptions field's value.
  4820. func (s *ContainerDefinition) SetDockerSecurityOptions(v []*string) *ContainerDefinition {
  4821. s.DockerSecurityOptions = v
  4822. return s
  4823. }
  4824. // SetEntryPoint sets the EntryPoint field's value.
  4825. func (s *ContainerDefinition) SetEntryPoint(v []*string) *ContainerDefinition {
  4826. s.EntryPoint = v
  4827. return s
  4828. }
  4829. // SetEnvironment sets the Environment field's value.
  4830. func (s *ContainerDefinition) SetEnvironment(v []*KeyValuePair) *ContainerDefinition {
  4831. s.Environment = v
  4832. return s
  4833. }
  4834. // SetEssential sets the Essential field's value.
  4835. func (s *ContainerDefinition) SetEssential(v bool) *ContainerDefinition {
  4836. s.Essential = &v
  4837. return s
  4838. }
  4839. // SetExtraHosts sets the ExtraHosts field's value.
  4840. func (s *ContainerDefinition) SetExtraHosts(v []*HostEntry) *ContainerDefinition {
  4841. s.ExtraHosts = v
  4842. return s
  4843. }
  4844. // SetHealthCheck sets the HealthCheck field's value.
  4845. func (s *ContainerDefinition) SetHealthCheck(v *HealthCheck) *ContainerDefinition {
  4846. s.HealthCheck = v
  4847. return s
  4848. }
  4849. // SetHostname sets the Hostname field's value.
  4850. func (s *ContainerDefinition) SetHostname(v string) *ContainerDefinition {
  4851. s.Hostname = &v
  4852. return s
  4853. }
  4854. // SetImage sets the Image field's value.
  4855. func (s *ContainerDefinition) SetImage(v string) *ContainerDefinition {
  4856. s.Image = &v
  4857. return s
  4858. }
  4859. // SetInteractive sets the Interactive field's value.
  4860. func (s *ContainerDefinition) SetInteractive(v bool) *ContainerDefinition {
  4861. s.Interactive = &v
  4862. return s
  4863. }
  4864. // SetLinks sets the Links field's value.
  4865. func (s *ContainerDefinition) SetLinks(v []*string) *ContainerDefinition {
  4866. s.Links = v
  4867. return s
  4868. }
  4869. // SetLinuxParameters sets the LinuxParameters field's value.
  4870. func (s *ContainerDefinition) SetLinuxParameters(v *LinuxParameters) *ContainerDefinition {
  4871. s.LinuxParameters = v
  4872. return s
  4873. }
  4874. // SetLogConfiguration sets the LogConfiguration field's value.
  4875. func (s *ContainerDefinition) SetLogConfiguration(v *LogConfiguration) *ContainerDefinition {
  4876. s.LogConfiguration = v
  4877. return s
  4878. }
  4879. // SetMemory sets the Memory field's value.
  4880. func (s *ContainerDefinition) SetMemory(v int64) *ContainerDefinition {
  4881. s.Memory = &v
  4882. return s
  4883. }
  4884. // SetMemoryReservation sets the MemoryReservation field's value.
  4885. func (s *ContainerDefinition) SetMemoryReservation(v int64) *ContainerDefinition {
  4886. s.MemoryReservation = &v
  4887. return s
  4888. }
  4889. // SetMountPoints sets the MountPoints field's value.
  4890. func (s *ContainerDefinition) SetMountPoints(v []*MountPoint) *ContainerDefinition {
  4891. s.MountPoints = v
  4892. return s
  4893. }
  4894. // SetName sets the Name field's value.
  4895. func (s *ContainerDefinition) SetName(v string) *ContainerDefinition {
  4896. s.Name = &v
  4897. return s
  4898. }
  4899. // SetPortMappings sets the PortMappings field's value.
  4900. func (s *ContainerDefinition) SetPortMappings(v []*PortMapping) *ContainerDefinition {
  4901. s.PortMappings = v
  4902. return s
  4903. }
  4904. // SetPrivileged sets the Privileged field's value.
  4905. func (s *ContainerDefinition) SetPrivileged(v bool) *ContainerDefinition {
  4906. s.Privileged = &v
  4907. return s
  4908. }
  4909. // SetPseudoTerminal sets the PseudoTerminal field's value.
  4910. func (s *ContainerDefinition) SetPseudoTerminal(v bool) *ContainerDefinition {
  4911. s.PseudoTerminal = &v
  4912. return s
  4913. }
  4914. // SetReadonlyRootFilesystem sets the ReadonlyRootFilesystem field's value.
  4915. func (s *ContainerDefinition) SetReadonlyRootFilesystem(v bool) *ContainerDefinition {
  4916. s.ReadonlyRootFilesystem = &v
  4917. return s
  4918. }
  4919. // SetRepositoryCredentials sets the RepositoryCredentials field's value.
  4920. func (s *ContainerDefinition) SetRepositoryCredentials(v *RepositoryCredentials) *ContainerDefinition {
  4921. s.RepositoryCredentials = v
  4922. return s
  4923. }
  4924. // SetSecrets sets the Secrets field's value.
  4925. func (s *ContainerDefinition) SetSecrets(v []*Secret) *ContainerDefinition {
  4926. s.Secrets = v
  4927. return s
  4928. }
  4929. // SetSystemControls sets the SystemControls field's value.
  4930. func (s *ContainerDefinition) SetSystemControls(v []*SystemControl) *ContainerDefinition {
  4931. s.SystemControls = v
  4932. return s
  4933. }
  4934. // SetUlimits sets the Ulimits field's value.
  4935. func (s *ContainerDefinition) SetUlimits(v []*Ulimit) *ContainerDefinition {
  4936. s.Ulimits = v
  4937. return s
  4938. }
  4939. // SetUser sets the User field's value.
  4940. func (s *ContainerDefinition) SetUser(v string) *ContainerDefinition {
  4941. s.User = &v
  4942. return s
  4943. }
  4944. // SetVolumesFrom sets the VolumesFrom field's value.
  4945. func (s *ContainerDefinition) SetVolumesFrom(v []*VolumeFrom) *ContainerDefinition {
  4946. s.VolumesFrom = v
  4947. return s
  4948. }
  4949. // SetWorkingDirectory sets the WorkingDirectory field's value.
  4950. func (s *ContainerDefinition) SetWorkingDirectory(v string) *ContainerDefinition {
  4951. s.WorkingDirectory = &v
  4952. return s
  4953. }
  4954. // An EC2 instance that is running the Amazon ECS agent and has been registered
  4955. // with a cluster.
  4956. type ContainerInstance struct {
  4957. _ struct{} `type:"structure"`
  4958. // This parameter returns true if the agent is connected to Amazon ECS. Registered
  4959. // instances with an agent that may be unhealthy or stopped return false. Only
  4960. // instances connected to an agent can accept placement requests.
  4961. AgentConnected *bool `locationName:"agentConnected" type:"boolean"`
  4962. // The status of the most recent agent update. If an update has never been requested,
  4963. // this value is NULL.
  4964. AgentUpdateStatus *string `locationName:"agentUpdateStatus" type:"string" enum:"AgentUpdateStatus"`
  4965. // The elastic network interfaces associated with the container instance.
  4966. Attachments []*Attachment `locationName:"attachments" type:"list"`
  4967. // The attributes set for the container instance, either by the Amazon ECS container
  4968. // agent at instance registration or manually with the PutAttributes operation.
  4969. Attributes []*Attribute `locationName:"attributes" type:"list"`
  4970. // The Amazon Resource Name (ARN) of the container instance. The ARN contains
  4971. // the arn:aws:ecs namespace, followed by the Region of the container instance,
  4972. // the AWS account ID of the container instance owner, the container-instance
  4973. // namespace, and then the container instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID.
  4974. ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"`
  4975. // The EC2 instance ID of the container instance.
  4976. Ec2InstanceId *string `locationName:"ec2InstanceId" type:"string"`
  4977. // The number of tasks on the container instance that are in the PENDING status.
  4978. PendingTasksCount *int64 `locationName:"pendingTasksCount" type:"integer"`
  4979. // The Unix timestamp for when the container instance was registered.
  4980. RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp"`
  4981. // For CPU and memory resource types, this parameter describes the amount of
  4982. // each resource that was available on the container instance when the container
  4983. // agent registered it with Amazon ECS. This value represents the total amount
  4984. // of CPU and memory that can be allocated on this container instance to tasks.
  4985. // For port resource types, this parameter describes the ports that were reserved
  4986. // by the Amazon ECS container agent when it registered the container instance
  4987. // with Amazon ECS.
  4988. RegisteredResources []*Resource `locationName:"registeredResources" type:"list"`
  4989. // For CPU and memory resource types, this parameter describes the remaining
  4990. // CPU and memory that has not already been allocated to tasks and is therefore
  4991. // available for new tasks. For port resource types, this parameter describes
  4992. // the ports that were reserved by the Amazon ECS container agent (at instance
  4993. // registration time) and any task containers that have reserved port mappings
  4994. // on the host (with the host or bridge network mode). Any port that is not
  4995. // specified here is available for new tasks.
  4996. RemainingResources []*Resource `locationName:"remainingResources" type:"list"`
  4997. // The number of tasks on the container instance that are in the RUNNING status.
  4998. RunningTasksCount *int64 `locationName:"runningTasksCount" type:"integer"`
  4999. // The status of the container instance. The valid values are ACTIVE, INACTIVE,
  5000. // or DRAINING. ACTIVE indicates that the container instance can accept tasks.
  5001. // DRAINING indicates that new tasks are not placed on the container instance
  5002. // and any service tasks running on the container instance are removed if possible.
  5003. // For more information, see Container Instance Draining (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-draining.html)
  5004. // in the Amazon Elastic Container Service Developer Guide.
  5005. Status *string `locationName:"status" type:"string"`
  5006. // The metadata that you apply to the container instance to help you categorize
  5007. // and organize them. Each tag consists of a key and an optional value, both
  5008. // of which you define. Tag keys can have a maximum character length of 128
  5009. // characters, and tag values can have a maximum length of 256 characters.
  5010. Tags []*Tag `locationName:"tags" type:"list"`
  5011. // The version counter for the container instance. Every time a container instance
  5012. // experiences a change that triggers a CloudWatch event, the version counter
  5013. // is incremented. If you are replicating your Amazon ECS container instance
  5014. // state with CloudWatch Events, you can compare the version of a container
  5015. // instance reported by the Amazon ECS APIs with the version reported in CloudWatch
  5016. // Events for the container instance (inside the detail object) to verify that
  5017. // the version in your event stream is current.
  5018. Version *int64 `locationName:"version" type:"long"`
  5019. // The version information for the Amazon ECS container agent and Docker daemon
  5020. // running on the container instance.
  5021. VersionInfo *VersionInfo `locationName:"versionInfo" type:"structure"`
  5022. }
  5023. // String returns the string representation
  5024. func (s ContainerInstance) String() string {
  5025. return awsutil.Prettify(s)
  5026. }
  5027. // GoString returns the string representation
  5028. func (s ContainerInstance) GoString() string {
  5029. return s.String()
  5030. }
  5031. // SetAgentConnected sets the AgentConnected field's value.
  5032. func (s *ContainerInstance) SetAgentConnected(v bool) *ContainerInstance {
  5033. s.AgentConnected = &v
  5034. return s
  5035. }
  5036. // SetAgentUpdateStatus sets the AgentUpdateStatus field's value.
  5037. func (s *ContainerInstance) SetAgentUpdateStatus(v string) *ContainerInstance {
  5038. s.AgentUpdateStatus = &v
  5039. return s
  5040. }
  5041. // SetAttachments sets the Attachments field's value.
  5042. func (s *ContainerInstance) SetAttachments(v []*Attachment) *ContainerInstance {
  5043. s.Attachments = v
  5044. return s
  5045. }
  5046. // SetAttributes sets the Attributes field's value.
  5047. func (s *ContainerInstance) SetAttributes(v []*Attribute) *ContainerInstance {
  5048. s.Attributes = v
  5049. return s
  5050. }
  5051. // SetContainerInstanceArn sets the ContainerInstanceArn field's value.
  5052. func (s *ContainerInstance) SetContainerInstanceArn(v string) *ContainerInstance {
  5053. s.ContainerInstanceArn = &v
  5054. return s
  5055. }
  5056. // SetEc2InstanceId sets the Ec2InstanceId field's value.
  5057. func (s *ContainerInstance) SetEc2InstanceId(v string) *ContainerInstance {
  5058. s.Ec2InstanceId = &v
  5059. return s
  5060. }
  5061. // SetPendingTasksCount sets the PendingTasksCount field's value.
  5062. func (s *ContainerInstance) SetPendingTasksCount(v int64) *ContainerInstance {
  5063. s.PendingTasksCount = &v
  5064. return s
  5065. }
  5066. // SetRegisteredAt sets the RegisteredAt field's value.
  5067. func (s *ContainerInstance) SetRegisteredAt(v time.Time) *ContainerInstance {
  5068. s.RegisteredAt = &v
  5069. return s
  5070. }
  5071. // SetRegisteredResources sets the RegisteredResources field's value.
  5072. func (s *ContainerInstance) SetRegisteredResources(v []*Resource) *ContainerInstance {
  5073. s.RegisteredResources = v
  5074. return s
  5075. }
  5076. // SetRemainingResources sets the RemainingResources field's value.
  5077. func (s *ContainerInstance) SetRemainingResources(v []*Resource) *ContainerInstance {
  5078. s.RemainingResources = v
  5079. return s
  5080. }
  5081. // SetRunningTasksCount sets the RunningTasksCount field's value.
  5082. func (s *ContainerInstance) SetRunningTasksCount(v int64) *ContainerInstance {
  5083. s.RunningTasksCount = &v
  5084. return s
  5085. }
  5086. // SetStatus sets the Status field's value.
  5087. func (s *ContainerInstance) SetStatus(v string) *ContainerInstance {
  5088. s.Status = &v
  5089. return s
  5090. }
  5091. // SetTags sets the Tags field's value.
  5092. func (s *ContainerInstance) SetTags(v []*Tag) *ContainerInstance {
  5093. s.Tags = v
  5094. return s
  5095. }
  5096. // SetVersion sets the Version field's value.
  5097. func (s *ContainerInstance) SetVersion(v int64) *ContainerInstance {
  5098. s.Version = &v
  5099. return s
  5100. }
  5101. // SetVersionInfo sets the VersionInfo field's value.
  5102. func (s *ContainerInstance) SetVersionInfo(v *VersionInfo) *ContainerInstance {
  5103. s.VersionInfo = v
  5104. return s
  5105. }
  5106. // The overrides that should be sent to a container.
  5107. type ContainerOverride struct {
  5108. _ struct{} `type:"structure"`
  5109. // The command to send to the container that overrides the default command from
  5110. // the Docker image or the task definition. You must also specify a container
  5111. // name.
  5112. Command []*string `locationName:"command" type:"list"`
  5113. // The number of cpu units reserved for the container, instead of the default
  5114. // value from the task definition. You must also specify a container name.
  5115. Cpu *int64 `locationName:"cpu" type:"integer"`
  5116. // The environment variables to send to the container. You can add new environment
  5117. // variables, which are added to the container at launch, or you can override
  5118. // the existing environment variables from the Docker image or the task definition.
  5119. // You must also specify a container name.
  5120. Environment []*KeyValuePair `locationName:"environment" type:"list"`
  5121. // The hard limit (in MiB) of memory to present to the container, instead of
  5122. // the default value from the task definition. If your container attempts to
  5123. // exceed the memory specified here, the container is killed. You must also
  5124. // specify a container name.
  5125. Memory *int64 `locationName:"memory" type:"integer"`
  5126. // The soft limit (in MiB) of memory to reserve for the container, instead of
  5127. // the default value from the task definition. You must also specify a container
  5128. // name.
  5129. MemoryReservation *int64 `locationName:"memoryReservation" type:"integer"`
  5130. // The name of the container that receives the override. This parameter is required
  5131. // if any override is specified.
  5132. Name *string `locationName:"name" type:"string"`
  5133. }
  5134. // String returns the string representation
  5135. func (s ContainerOverride) String() string {
  5136. return awsutil.Prettify(s)
  5137. }
  5138. // GoString returns the string representation
  5139. func (s ContainerOverride) GoString() string {
  5140. return s.String()
  5141. }
  5142. // SetCommand sets the Command field's value.
  5143. func (s *ContainerOverride) SetCommand(v []*string) *ContainerOverride {
  5144. s.Command = v
  5145. return s
  5146. }
  5147. // SetCpu sets the Cpu field's value.
  5148. func (s *ContainerOverride) SetCpu(v int64) *ContainerOverride {
  5149. s.Cpu = &v
  5150. return s
  5151. }
  5152. // SetEnvironment sets the Environment field's value.
  5153. func (s *ContainerOverride) SetEnvironment(v []*KeyValuePair) *ContainerOverride {
  5154. s.Environment = v
  5155. return s
  5156. }
  5157. // SetMemory sets the Memory field's value.
  5158. func (s *ContainerOverride) SetMemory(v int64) *ContainerOverride {
  5159. s.Memory = &v
  5160. return s
  5161. }
  5162. // SetMemoryReservation sets the MemoryReservation field's value.
  5163. func (s *ContainerOverride) SetMemoryReservation(v int64) *ContainerOverride {
  5164. s.MemoryReservation = &v
  5165. return s
  5166. }
  5167. // SetName sets the Name field's value.
  5168. func (s *ContainerOverride) SetName(v string) *ContainerOverride {
  5169. s.Name = &v
  5170. return s
  5171. }
  5172. // An object representing a change in state for a container.
  5173. type ContainerStateChange struct {
  5174. _ struct{} `type:"structure"`
  5175. // The name of the container.
  5176. ContainerName *string `locationName:"containerName" type:"string"`
  5177. // The exit code for the container, if the state change is a result of the container
  5178. // exiting.
  5179. ExitCode *int64 `locationName:"exitCode" type:"integer"`
  5180. // Any network bindings associated with the container.
  5181. NetworkBindings []*NetworkBinding `locationName:"networkBindings" type:"list"`
  5182. // The reason for the state change.
  5183. Reason *string `locationName:"reason" type:"string"`
  5184. // The status of the container.
  5185. Status *string `locationName:"status" type:"string"`
  5186. }
  5187. // String returns the string representation
  5188. func (s ContainerStateChange) String() string {
  5189. return awsutil.Prettify(s)
  5190. }
  5191. // GoString returns the string representation
  5192. func (s ContainerStateChange) GoString() string {
  5193. return s.String()
  5194. }
  5195. // SetContainerName sets the ContainerName field's value.
  5196. func (s *ContainerStateChange) SetContainerName(v string) *ContainerStateChange {
  5197. s.ContainerName = &v
  5198. return s
  5199. }
  5200. // SetExitCode sets the ExitCode field's value.
  5201. func (s *ContainerStateChange) SetExitCode(v int64) *ContainerStateChange {
  5202. s.ExitCode = &v
  5203. return s
  5204. }
  5205. // SetNetworkBindings sets the NetworkBindings field's value.
  5206. func (s *ContainerStateChange) SetNetworkBindings(v []*NetworkBinding) *ContainerStateChange {
  5207. s.NetworkBindings = v
  5208. return s
  5209. }
  5210. // SetReason sets the Reason field's value.
  5211. func (s *ContainerStateChange) SetReason(v string) *ContainerStateChange {
  5212. s.Reason = &v
  5213. return s
  5214. }
  5215. // SetStatus sets the Status field's value.
  5216. func (s *ContainerStateChange) SetStatus(v string) *ContainerStateChange {
  5217. s.Status = &v
  5218. return s
  5219. }
  5220. type CreateClusterInput struct {
  5221. _ struct{} `type:"structure"`
  5222. // The name of your cluster. If you do not specify a name for your cluster,
  5223. // you create a cluster named default. Up to 255 letters (uppercase and lowercase),
  5224. // numbers, hyphens, and underscores are allowed.
  5225. ClusterName *string `locationName:"clusterName" type:"string"`
  5226. // The metadata that you apply to the cluster to help you categorize and organize
  5227. // them. Each tag consists of a key and an optional value, both of which you
  5228. // define. Tag keys can have a maximum character length of 128 characters, and
  5229. // tag values can have a maximum length of 256 characters.
  5230. Tags []*Tag `locationName:"tags" type:"list"`
  5231. }
  5232. // String returns the string representation
  5233. func (s CreateClusterInput) String() string {
  5234. return awsutil.Prettify(s)
  5235. }
  5236. // GoString returns the string representation
  5237. func (s CreateClusterInput) GoString() string {
  5238. return s.String()
  5239. }
  5240. // Validate inspects the fields of the type to determine if they are valid.
  5241. func (s *CreateClusterInput) Validate() error {
  5242. invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"}
  5243. if s.Tags != nil {
  5244. for i, v := range s.Tags {
  5245. if v == nil {
  5246. continue
  5247. }
  5248. if err := v.Validate(); err != nil {
  5249. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  5250. }
  5251. }
  5252. }
  5253. if invalidParams.Len() > 0 {
  5254. return invalidParams
  5255. }
  5256. return nil
  5257. }
  5258. // SetClusterName sets the ClusterName field's value.
  5259. func (s *CreateClusterInput) SetClusterName(v string) *CreateClusterInput {
  5260. s.ClusterName = &v
  5261. return s
  5262. }
  5263. // SetTags sets the Tags field's value.
  5264. func (s *CreateClusterInput) SetTags(v []*Tag) *CreateClusterInput {
  5265. s.Tags = v
  5266. return s
  5267. }
  5268. type CreateClusterOutput struct {
  5269. _ struct{} `type:"structure"`
  5270. // The full description of your new cluster.
  5271. Cluster *Cluster `locationName:"cluster" type:"structure"`
  5272. }
  5273. // String returns the string representation
  5274. func (s CreateClusterOutput) String() string {
  5275. return awsutil.Prettify(s)
  5276. }
  5277. // GoString returns the string representation
  5278. func (s CreateClusterOutput) GoString() string {
  5279. return s.String()
  5280. }
  5281. // SetCluster sets the Cluster field's value.
  5282. func (s *CreateClusterOutput) SetCluster(v *Cluster) *CreateClusterOutput {
  5283. s.Cluster = v
  5284. return s
  5285. }
  5286. type CreateServiceInput struct {
  5287. _ struct{} `type:"structure"`
  5288. // Unique, case-sensitive identifier that you provide to ensure the idempotency
  5289. // of the request. Up to 32 ASCII characters are allowed.
  5290. ClientToken *string `locationName:"clientToken" type:"string"`
  5291. // The short name or full Amazon Resource Name (ARN) of the cluster on which
  5292. // to run your service. If you do not specify a cluster, the default cluster
  5293. // is assumed.
  5294. Cluster *string `locationName:"cluster" type:"string"`
  5295. // Optional deployment parameters that control how many tasks run during the
  5296. // deployment and the ordering of stopping and starting tasks.
  5297. DeploymentConfiguration *DeploymentConfiguration `locationName:"deploymentConfiguration" type:"structure"`
  5298. // The deployment controller to use for the service.
  5299. DeploymentController *DeploymentController `locationName:"deploymentController" type:"structure"`
  5300. // The number of instantiations of the specified task definition to place and
  5301. // keep running on your cluster.
  5302. DesiredCount *int64 `locationName:"desiredCount" type:"integer"`
  5303. // Specifies whether to enable Amazon ECS managed tags for the tasks within
  5304. // the service. For more information, see Tagging Your Amazon ECS Resources
  5305. // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
  5306. // in the Amazon Elastic Container Service Developer Guide.
  5307. EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"`
  5308. // The period of time, in seconds, that the Amazon ECS service scheduler should
  5309. // ignore unhealthy Elastic Load Balancing target health checks after a task
  5310. // has first started. This is only valid if your service is configured to use
  5311. // a load balancer. If your service's tasks take a while to start and respond
  5312. // to Elastic Load Balancing health checks, you can specify a health check grace
  5313. // period of up to 7,200 seconds. During that time, the ECS service scheduler
  5314. // ignores health check status. This grace period can prevent the ECS service
  5315. // scheduler from marking tasks as unhealthy and stopping them before they have
  5316. // time to come up.
  5317. HealthCheckGracePeriodSeconds *int64 `locationName:"healthCheckGracePeriodSeconds" type:"integer"`
  5318. // The launch type on which to run your service. For more information, see Amazon
  5319. // ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
  5320. // in the Amazon Elastic Container Service Developer Guide.
  5321. LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"`
  5322. // A load balancer object representing the load balancer to use with your service.
  5323. //
  5324. // If the service is using the ECS deployment controller, you are limited to
  5325. // one load balancer or target group.
  5326. //
  5327. // If the service is using the CODE_DEPLOY deployment controller, the service
  5328. // is required to use either an Application Load Balancer or Network Load Balancer.
  5329. // When creating an AWS CodeDeploy deployment group, you specify two target
  5330. // groups (referred to as a targetGroupPair). During a deployment, AWS CodeDeploy
  5331. // determines which task set in your service has the status PRIMARY and associates
  5332. // one target group with it, and then associates the other target group with
  5333. // the replacement task set. The load balancer can also have up to two listeners:
  5334. // a required listener for production traffic and an optional listener that
  5335. // allows you perform validation tests with Lambda functions before routing
  5336. // production traffic to it.
  5337. //
  5338. // After you create a service using the ECS deployment controller, the load
  5339. // balancer name or target group ARN, container name, and container port specified
  5340. // in the service definition are immutable. If you are using the CODE_DEPLOY
  5341. // deployment controller, these values can be changed when updating the service.
  5342. //
  5343. // For Classic Load Balancers, this object must contain the load balancer name,
  5344. // the container name (as it appears in a container definition), and the container
  5345. // port to access from the load balancer. When a task from this service is placed
  5346. // on a container instance, the container instance is registered with the load
  5347. // balancer specified here.
  5348. //
  5349. // For Application Load Balancers and Network Load Balancers, this object must
  5350. // contain the load balancer target group ARN, the container name (as it appears
  5351. // in a container definition), and the container port to access from the load
  5352. // balancer. When a task from this service is placed on a container instance,
  5353. // the container instance and port combination is registered as a target in
  5354. // the target group specified here.
  5355. //
  5356. // Services with tasks that use the awsvpc network mode (for example, those
  5357. // with the Fargate launch type) only support Application Load Balancers and
  5358. // Network Load Balancers. Classic Load Balancers are not supported. Also, when
  5359. // you create any target groups for these services, you must choose ip as the
  5360. // target type, not instance, because tasks that use the awsvpc network mode
  5361. // are associated with an elastic network interface, not an Amazon EC2 instance.
  5362. LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"`
  5363. // The network configuration for the service. This parameter is required for
  5364. // task definitions that use the awsvpc network mode to receive their own elastic
  5365. // network interface, and it is not supported for other network modes. For more
  5366. // information, see Task Networking (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html)
  5367. // in the Amazon Elastic Container Service Developer Guide.
  5368. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"`
  5369. // An array of placement constraint objects to use for tasks in your service.
  5370. // You can specify a maximum of 10 constraints per task (this limit includes
  5371. // constraints in the task definition and those specified at runtime).
  5372. PlacementConstraints []*PlacementConstraint `locationName:"placementConstraints" type:"list"`
  5373. // The placement strategy objects to use for tasks in your service. You can
  5374. // specify a maximum of five strategy rules per service.
  5375. PlacementStrategy []*PlacementStrategy `locationName:"placementStrategy" type:"list"`
  5376. // The platform version on which your tasks in the service are running. A platform
  5377. // version is only specified for tasks using the Fargate launch type. If one
  5378. // is not specified, the LATEST platform version is used by default. For more
  5379. // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html)
  5380. // in the Amazon Elastic Container Service Developer Guide.
  5381. PlatformVersion *string `locationName:"platformVersion" type:"string"`
  5382. // Specifies whether to propagate the tags from the task definition or the service
  5383. // to the tasks. If no value is specified, the tags are not propagated. Tags
  5384. // can only be propagated to the tasks within the service during service creation.
  5385. // To add tags to a task after service creation, use the TagResource API action.
  5386. PropagateTags *string `locationName:"propagateTags" type:"string" enum:"PropagateTags"`
  5387. // The name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon
  5388. // ECS to make calls to your load balancer on your behalf. This parameter is
  5389. // only permitted if you are using a load balancer with your service and your
  5390. // task definition does not use the awsvpc network mode. If you specify the
  5391. // role parameter, you must also specify a load balancer object with the loadBalancers
  5392. // parameter.
  5393. //
  5394. // If your account has already created the Amazon ECS service-linked role, that
  5395. // role is used by default for your service unless you specify a role here.
  5396. // The service-linked role is required if your task definition uses the awsvpc
  5397. // network mode, in which case you should not specify a role here. For more
  5398. // information, see Using Service-Linked Roles for Amazon ECS (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html)
  5399. // in the Amazon Elastic Container Service Developer Guide.
  5400. //
  5401. // If your specified role has a path other than /, then you must either specify
  5402. // the full role ARN (this is recommended) or prefix the role name with the
  5403. // path. For example, if a role with the name bar has a path of /foo/ then you
  5404. // would specify /foo/bar as the role name. For more information, see Friendly
  5405. // Names and Paths (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-friendly-names)
  5406. // in the IAM User Guide.
  5407. Role *string `locationName:"role" type:"string"`
  5408. // The scheduling strategy to use for the service. For more information, see
  5409. // Services (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html).
  5410. //
  5411. // There are two service scheduler strategies available:
  5412. //
  5413. // * REPLICA-The replica scheduling strategy places and maintains the desired
  5414. // number of tasks across your cluster. By default, the service scheduler
  5415. // spreads tasks across Availability Zones. You can use task placement strategies
  5416. // and constraints to customize task placement decisions. This scheduler
  5417. // strategy is required if using the CODE_DEPLOY deployment controller.
  5418. //
  5419. // * DAEMON-The daemon scheduling strategy deploys exactly one task on each
  5420. // active container instance that meets all of the task placement constraints
  5421. // that you specify in your cluster. When you are using this strategy, there
  5422. // is no need to specify a desired number of tasks, a task placement strategy,
  5423. // or use Service Auto Scaling policies.
  5424. //
  5425. // Tasks using the Fargate launch type or the CODE_DEPLOY deploymenet controller
  5426. // do not support the DAEMON scheduling strategy.
  5427. SchedulingStrategy *string `locationName:"schedulingStrategy" type:"string" enum:"SchedulingStrategy"`
  5428. // The name of your service. Up to 255 letters (uppercase and lowercase), numbers,
  5429. // hyphens, and underscores are allowed. Service names must be unique within
  5430. // a cluster, but you can have similarly named services in multiple clusters
  5431. // within a Region or across multiple Regions.
  5432. //
  5433. // ServiceName is a required field
  5434. ServiceName *string `locationName:"serviceName" type:"string" required:"true"`
  5435. // The details of the service discovery registries to assign to this service.
  5436. // For more information, see Service Discovery (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html).
  5437. //
  5438. // Service discovery is supported for Fargate tasks if you are using platform
  5439. // version v1.1.0 or later. For more information, see AWS Fargate Platform Versions
  5440. // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html).
  5441. ServiceRegistries []*ServiceRegistry `locationName:"serviceRegistries" type:"list"`
  5442. // The metadata that you apply to the service to help you categorize and organize
  5443. // them. Each tag consists of a key and an optional value, both of which you
  5444. // define. When a service is deleted, the tags are deleted as well. Tag keys
  5445. // can have a maximum character length of 128 characters, and tag values can
  5446. // have a maximum length of 256 characters.
  5447. Tags []*Tag `locationName:"tags" type:"list"`
  5448. // The family and revision (family:revision) or full ARN of the task definition
  5449. // to run in your service. If a revision is not specified, the latest ACTIVE
  5450. // revision is used.
  5451. //
  5452. // TaskDefinition is a required field
  5453. TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"`
  5454. }
  5455. // String returns the string representation
  5456. func (s CreateServiceInput) String() string {
  5457. return awsutil.Prettify(s)
  5458. }
  5459. // GoString returns the string representation
  5460. func (s CreateServiceInput) GoString() string {
  5461. return s.String()
  5462. }
  5463. // Validate inspects the fields of the type to determine if they are valid.
  5464. func (s *CreateServiceInput) Validate() error {
  5465. invalidParams := request.ErrInvalidParams{Context: "CreateServiceInput"}
  5466. if s.ServiceName == nil {
  5467. invalidParams.Add(request.NewErrParamRequired("ServiceName"))
  5468. }
  5469. if s.TaskDefinition == nil {
  5470. invalidParams.Add(request.NewErrParamRequired("TaskDefinition"))
  5471. }
  5472. if s.DeploymentController != nil {
  5473. if err := s.DeploymentController.Validate(); err != nil {
  5474. invalidParams.AddNested("DeploymentController", err.(request.ErrInvalidParams))
  5475. }
  5476. }
  5477. if s.NetworkConfiguration != nil {
  5478. if err := s.NetworkConfiguration.Validate(); err != nil {
  5479. invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams))
  5480. }
  5481. }
  5482. if s.Tags != nil {
  5483. for i, v := range s.Tags {
  5484. if v == nil {
  5485. continue
  5486. }
  5487. if err := v.Validate(); err != nil {
  5488. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  5489. }
  5490. }
  5491. }
  5492. if invalidParams.Len() > 0 {
  5493. return invalidParams
  5494. }
  5495. return nil
  5496. }
  5497. // SetClientToken sets the ClientToken field's value.
  5498. func (s *CreateServiceInput) SetClientToken(v string) *CreateServiceInput {
  5499. s.ClientToken = &v
  5500. return s
  5501. }
  5502. // SetCluster sets the Cluster field's value.
  5503. func (s *CreateServiceInput) SetCluster(v string) *CreateServiceInput {
  5504. s.Cluster = &v
  5505. return s
  5506. }
  5507. // SetDeploymentConfiguration sets the DeploymentConfiguration field's value.
  5508. func (s *CreateServiceInput) SetDeploymentConfiguration(v *DeploymentConfiguration) *CreateServiceInput {
  5509. s.DeploymentConfiguration = v
  5510. return s
  5511. }
  5512. // SetDeploymentController sets the DeploymentController field's value.
  5513. func (s *CreateServiceInput) SetDeploymentController(v *DeploymentController) *CreateServiceInput {
  5514. s.DeploymentController = v
  5515. return s
  5516. }
  5517. // SetDesiredCount sets the DesiredCount field's value.
  5518. func (s *CreateServiceInput) SetDesiredCount(v int64) *CreateServiceInput {
  5519. s.DesiredCount = &v
  5520. return s
  5521. }
  5522. // SetEnableECSManagedTags sets the EnableECSManagedTags field's value.
  5523. func (s *CreateServiceInput) SetEnableECSManagedTags(v bool) *CreateServiceInput {
  5524. s.EnableECSManagedTags = &v
  5525. return s
  5526. }
  5527. // SetHealthCheckGracePeriodSeconds sets the HealthCheckGracePeriodSeconds field's value.
  5528. func (s *CreateServiceInput) SetHealthCheckGracePeriodSeconds(v int64) *CreateServiceInput {
  5529. s.HealthCheckGracePeriodSeconds = &v
  5530. return s
  5531. }
  5532. // SetLaunchType sets the LaunchType field's value.
  5533. func (s *CreateServiceInput) SetLaunchType(v string) *CreateServiceInput {
  5534. s.LaunchType = &v
  5535. return s
  5536. }
  5537. // SetLoadBalancers sets the LoadBalancers field's value.
  5538. func (s *CreateServiceInput) SetLoadBalancers(v []*LoadBalancer) *CreateServiceInput {
  5539. s.LoadBalancers = v
  5540. return s
  5541. }
  5542. // SetNetworkConfiguration sets the NetworkConfiguration field's value.
  5543. func (s *CreateServiceInput) SetNetworkConfiguration(v *NetworkConfiguration) *CreateServiceInput {
  5544. s.NetworkConfiguration = v
  5545. return s
  5546. }
  5547. // SetPlacementConstraints sets the PlacementConstraints field's value.
  5548. func (s *CreateServiceInput) SetPlacementConstraints(v []*PlacementConstraint) *CreateServiceInput {
  5549. s.PlacementConstraints = v
  5550. return s
  5551. }
  5552. // SetPlacementStrategy sets the PlacementStrategy field's value.
  5553. func (s *CreateServiceInput) SetPlacementStrategy(v []*PlacementStrategy) *CreateServiceInput {
  5554. s.PlacementStrategy = v
  5555. return s
  5556. }
  5557. // SetPlatformVersion sets the PlatformVersion field's value.
  5558. func (s *CreateServiceInput) SetPlatformVersion(v string) *CreateServiceInput {
  5559. s.PlatformVersion = &v
  5560. return s
  5561. }
  5562. // SetPropagateTags sets the PropagateTags field's value.
  5563. func (s *CreateServiceInput) SetPropagateTags(v string) *CreateServiceInput {
  5564. s.PropagateTags = &v
  5565. return s
  5566. }
  5567. // SetRole sets the Role field's value.
  5568. func (s *CreateServiceInput) SetRole(v string) *CreateServiceInput {
  5569. s.Role = &v
  5570. return s
  5571. }
  5572. // SetSchedulingStrategy sets the SchedulingStrategy field's value.
  5573. func (s *CreateServiceInput) SetSchedulingStrategy(v string) *CreateServiceInput {
  5574. s.SchedulingStrategy = &v
  5575. return s
  5576. }
  5577. // SetServiceName sets the ServiceName field's value.
  5578. func (s *CreateServiceInput) SetServiceName(v string) *CreateServiceInput {
  5579. s.ServiceName = &v
  5580. return s
  5581. }
  5582. // SetServiceRegistries sets the ServiceRegistries field's value.
  5583. func (s *CreateServiceInput) SetServiceRegistries(v []*ServiceRegistry) *CreateServiceInput {
  5584. s.ServiceRegistries = v
  5585. return s
  5586. }
  5587. // SetTags sets the Tags field's value.
  5588. func (s *CreateServiceInput) SetTags(v []*Tag) *CreateServiceInput {
  5589. s.Tags = v
  5590. return s
  5591. }
  5592. // SetTaskDefinition sets the TaskDefinition field's value.
  5593. func (s *CreateServiceInput) SetTaskDefinition(v string) *CreateServiceInput {
  5594. s.TaskDefinition = &v
  5595. return s
  5596. }
  5597. type CreateServiceOutput struct {
  5598. _ struct{} `type:"structure"`
  5599. // The full description of your service following the create call.
  5600. //
  5601. // If a service is using the ECS deployment controller, the deploymentController
  5602. // and taskSets parameters will not be returned.
  5603. //
  5604. // If the service is using the CODE_DEPLOY deployment controller, the deploymentController,
  5605. // taskSets and deployments parameters will be returned, however the deployments
  5606. // parameter will be an empty list.
  5607. Service *Service `locationName:"service" type:"structure"`
  5608. }
  5609. // String returns the string representation
  5610. func (s CreateServiceOutput) String() string {
  5611. return awsutil.Prettify(s)
  5612. }
  5613. // GoString returns the string representation
  5614. func (s CreateServiceOutput) GoString() string {
  5615. return s.String()
  5616. }
  5617. // SetService sets the Service field's value.
  5618. func (s *CreateServiceOutput) SetService(v *Service) *CreateServiceOutput {
  5619. s.Service = v
  5620. return s
  5621. }
  5622. type DeleteAccountSettingInput struct {
  5623. _ struct{} `type:"structure"`
  5624. // The resource name for which to disable the new format. If serviceLongArnFormat
  5625. // is specified, the ARN for your Amazon ECS services is affected. If taskLongArnFormat
  5626. // is specified, the ARN and resource ID for your Amazon ECS tasks is affected.
  5627. // If containerInstanceLongArnFormat is specified, the ARN and resource ID for
  5628. // your Amazon ECS container instances is affected.
  5629. //
  5630. // Name is a required field
  5631. Name *string `locationName:"name" type:"string" required:"true" enum:"SettingName"`
  5632. // The ARN of the principal, which can be an IAM user, IAM role, or the root
  5633. // user. If you specify the root user, it modifies the ARN and resource ID format
  5634. // for all IAM users, IAM roles, and the root user of the account unless an
  5635. // IAM user or role explicitly overrides these settings for themselves. If this
  5636. // field is omitted, the setting are changed only for the authenticated user.
  5637. PrincipalArn *string `locationName:"principalArn" type:"string"`
  5638. }
  5639. // String returns the string representation
  5640. func (s DeleteAccountSettingInput) String() string {
  5641. return awsutil.Prettify(s)
  5642. }
  5643. // GoString returns the string representation
  5644. func (s DeleteAccountSettingInput) GoString() string {
  5645. return s.String()
  5646. }
  5647. // Validate inspects the fields of the type to determine if they are valid.
  5648. func (s *DeleteAccountSettingInput) Validate() error {
  5649. invalidParams := request.ErrInvalidParams{Context: "DeleteAccountSettingInput"}
  5650. if s.Name == nil {
  5651. invalidParams.Add(request.NewErrParamRequired("Name"))
  5652. }
  5653. if invalidParams.Len() > 0 {
  5654. return invalidParams
  5655. }
  5656. return nil
  5657. }
  5658. // SetName sets the Name field's value.
  5659. func (s *DeleteAccountSettingInput) SetName(v string) *DeleteAccountSettingInput {
  5660. s.Name = &v
  5661. return s
  5662. }
  5663. // SetPrincipalArn sets the PrincipalArn field's value.
  5664. func (s *DeleteAccountSettingInput) SetPrincipalArn(v string) *DeleteAccountSettingInput {
  5665. s.PrincipalArn = &v
  5666. return s
  5667. }
  5668. type DeleteAccountSettingOutput struct {
  5669. _ struct{} `type:"structure"`
  5670. // The account setting for the specified principal ARN.
  5671. Setting *Setting `locationName:"setting" type:"structure"`
  5672. }
  5673. // String returns the string representation
  5674. func (s DeleteAccountSettingOutput) String() string {
  5675. return awsutil.Prettify(s)
  5676. }
  5677. // GoString returns the string representation
  5678. func (s DeleteAccountSettingOutput) GoString() string {
  5679. return s.String()
  5680. }
  5681. // SetSetting sets the Setting field's value.
  5682. func (s *DeleteAccountSettingOutput) SetSetting(v *Setting) *DeleteAccountSettingOutput {
  5683. s.Setting = v
  5684. return s
  5685. }
  5686. type DeleteAttributesInput struct {
  5687. _ struct{} `type:"structure"`
  5688. // The attributes to delete from your resource. You can specify up to 10 attributes
  5689. // per request. For custom attributes, specify the attribute name and target
  5690. // ID, but do not specify the value. If you specify the target ID using the
  5691. // short form, you must also specify the target type.
  5692. //
  5693. // Attributes is a required field
  5694. Attributes []*Attribute `locationName:"attributes" type:"list" required:"true"`
  5695. // The short name or full Amazon Resource Name (ARN) of the cluster that contains
  5696. // the resource to delete attributes. If you do not specify a cluster, the default
  5697. // cluster is assumed.
  5698. Cluster *string `locationName:"cluster" type:"string"`
  5699. }
  5700. // String returns the string representation
  5701. func (s DeleteAttributesInput) String() string {
  5702. return awsutil.Prettify(s)
  5703. }
  5704. // GoString returns the string representation
  5705. func (s DeleteAttributesInput) GoString() string {
  5706. return s.String()
  5707. }
  5708. // Validate inspects the fields of the type to determine if they are valid.
  5709. func (s *DeleteAttributesInput) Validate() error {
  5710. invalidParams := request.ErrInvalidParams{Context: "DeleteAttributesInput"}
  5711. if s.Attributes == nil {
  5712. invalidParams.Add(request.NewErrParamRequired("Attributes"))
  5713. }
  5714. if s.Attributes != nil {
  5715. for i, v := range s.Attributes {
  5716. if v == nil {
  5717. continue
  5718. }
  5719. if err := v.Validate(); err != nil {
  5720. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
  5721. }
  5722. }
  5723. }
  5724. if invalidParams.Len() > 0 {
  5725. return invalidParams
  5726. }
  5727. return nil
  5728. }
  5729. // SetAttributes sets the Attributes field's value.
  5730. func (s *DeleteAttributesInput) SetAttributes(v []*Attribute) *DeleteAttributesInput {
  5731. s.Attributes = v
  5732. return s
  5733. }
  5734. // SetCluster sets the Cluster field's value.
  5735. func (s *DeleteAttributesInput) SetCluster(v string) *DeleteAttributesInput {
  5736. s.Cluster = &v
  5737. return s
  5738. }
  5739. type DeleteAttributesOutput struct {
  5740. _ struct{} `type:"structure"`
  5741. // A list of attribute objects that were successfully deleted from your resource.
  5742. Attributes []*Attribute `locationName:"attributes" type:"list"`
  5743. }
  5744. // String returns the string representation
  5745. func (s DeleteAttributesOutput) String() string {
  5746. return awsutil.Prettify(s)
  5747. }
  5748. // GoString returns the string representation
  5749. func (s DeleteAttributesOutput) GoString() string {
  5750. return s.String()
  5751. }
  5752. // SetAttributes sets the Attributes field's value.
  5753. func (s *DeleteAttributesOutput) SetAttributes(v []*Attribute) *DeleteAttributesOutput {
  5754. s.Attributes = v
  5755. return s
  5756. }
  5757. type DeleteClusterInput struct {
  5758. _ struct{} `type:"structure"`
  5759. // The short name or full Amazon Resource Name (ARN) of the cluster to delete.
  5760. //
  5761. // Cluster is a required field
  5762. Cluster *string `locationName:"cluster" type:"string" required:"true"`
  5763. }
  5764. // String returns the string representation
  5765. func (s DeleteClusterInput) String() string {
  5766. return awsutil.Prettify(s)
  5767. }
  5768. // GoString returns the string representation
  5769. func (s DeleteClusterInput) GoString() string {
  5770. return s.String()
  5771. }
  5772. // Validate inspects the fields of the type to determine if they are valid.
  5773. func (s *DeleteClusterInput) Validate() error {
  5774. invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"}
  5775. if s.Cluster == nil {
  5776. invalidParams.Add(request.NewErrParamRequired("Cluster"))
  5777. }
  5778. if invalidParams.Len() > 0 {
  5779. return invalidParams
  5780. }
  5781. return nil
  5782. }
  5783. // SetCluster sets the Cluster field's value.
  5784. func (s *DeleteClusterInput) SetCluster(v string) *DeleteClusterInput {
  5785. s.Cluster = &v
  5786. return s
  5787. }
  5788. type DeleteClusterOutput struct {
  5789. _ struct{} `type:"structure"`
  5790. // The full description of the deleted cluster.
  5791. Cluster *Cluster `locationName:"cluster" type:"structure"`
  5792. }
  5793. // String returns the string representation
  5794. func (s DeleteClusterOutput) String() string {
  5795. return awsutil.Prettify(s)
  5796. }
  5797. // GoString returns the string representation
  5798. func (s DeleteClusterOutput) GoString() string {
  5799. return s.String()
  5800. }
  5801. // SetCluster sets the Cluster field's value.
  5802. func (s *DeleteClusterOutput) SetCluster(v *Cluster) *DeleteClusterOutput {
  5803. s.Cluster = v
  5804. return s
  5805. }
  5806. type DeleteServiceInput struct {
  5807. _ struct{} `type:"structure"`
  5808. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  5809. // the service to delete. If you do not specify a cluster, the default cluster
  5810. // is assumed.
  5811. Cluster *string `locationName:"cluster" type:"string"`
  5812. // If true, allows you to delete a service even if it has not been scaled down
  5813. // to zero tasks. It is only necessary to use this if the service is using the
  5814. // REPLICA scheduling strategy.
  5815. Force *bool `locationName:"force" type:"boolean"`
  5816. // The name of the service to delete.
  5817. //
  5818. // Service is a required field
  5819. Service *string `locationName:"service" type:"string" required:"true"`
  5820. }
  5821. // String returns the string representation
  5822. func (s DeleteServiceInput) String() string {
  5823. return awsutil.Prettify(s)
  5824. }
  5825. // GoString returns the string representation
  5826. func (s DeleteServiceInput) GoString() string {
  5827. return s.String()
  5828. }
  5829. // Validate inspects the fields of the type to determine if they are valid.
  5830. func (s *DeleteServiceInput) Validate() error {
  5831. invalidParams := request.ErrInvalidParams{Context: "DeleteServiceInput"}
  5832. if s.Service == nil {
  5833. invalidParams.Add(request.NewErrParamRequired("Service"))
  5834. }
  5835. if invalidParams.Len() > 0 {
  5836. return invalidParams
  5837. }
  5838. return nil
  5839. }
  5840. // SetCluster sets the Cluster field's value.
  5841. func (s *DeleteServiceInput) SetCluster(v string) *DeleteServiceInput {
  5842. s.Cluster = &v
  5843. return s
  5844. }
  5845. // SetForce sets the Force field's value.
  5846. func (s *DeleteServiceInput) SetForce(v bool) *DeleteServiceInput {
  5847. s.Force = &v
  5848. return s
  5849. }
  5850. // SetService sets the Service field's value.
  5851. func (s *DeleteServiceInput) SetService(v string) *DeleteServiceInput {
  5852. s.Service = &v
  5853. return s
  5854. }
  5855. type DeleteServiceOutput struct {
  5856. _ struct{} `type:"structure"`
  5857. // The full description of the deleted service.
  5858. Service *Service `locationName:"service" type:"structure"`
  5859. }
  5860. // String returns the string representation
  5861. func (s DeleteServiceOutput) String() string {
  5862. return awsutil.Prettify(s)
  5863. }
  5864. // GoString returns the string representation
  5865. func (s DeleteServiceOutput) GoString() string {
  5866. return s.String()
  5867. }
  5868. // SetService sets the Service field's value.
  5869. func (s *DeleteServiceOutput) SetService(v *Service) *DeleteServiceOutput {
  5870. s.Service = v
  5871. return s
  5872. }
  5873. // The details of an Amazon ECS service deployment. This is used when a service
  5874. // uses the CODE_DEPLOY deployment controller type.
  5875. type Deployment struct {
  5876. _ struct{} `type:"structure"`
  5877. // The Unix timestamp for when the service deployment was created.
  5878. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"`
  5879. // The most recent desired count of tasks that was specified for the service
  5880. // to deploy or maintain.
  5881. DesiredCount *int64 `locationName:"desiredCount" type:"integer"`
  5882. // The ID of the deployment.
  5883. Id *string `locationName:"id" type:"string"`
  5884. // The launch type the tasks in the service are using. For more information,
  5885. // see Amazon ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
  5886. // in the Amazon Elastic Container Service Developer Guide.
  5887. LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"`
  5888. // The VPC subnet and security group configuration for tasks that receive their
  5889. // own elastic network interface by using the awsvpc networking mode.
  5890. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"`
  5891. // The number of tasks in the deployment that are in the PENDING status.
  5892. PendingCount *int64 `locationName:"pendingCount" type:"integer"`
  5893. // The platform version on which your tasks in the service are running. A platform
  5894. // version is only specified for tasks using the Fargate launch type. If one
  5895. // is not specified, the LATEST platform version is used by default. For more
  5896. // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html)
  5897. // in the Amazon Elastic Container Service Developer Guide.
  5898. PlatformVersion *string `locationName:"platformVersion" type:"string"`
  5899. // The number of tasks in the deployment that are in the RUNNING status.
  5900. RunningCount *int64 `locationName:"runningCount" type:"integer"`
  5901. // The status of the deployment. The following describes each state:
  5902. //
  5903. // PRIMARYThe most recent deployment of a service.
  5904. //
  5905. // ACTIVEA service deployment that still has running tasks, but are in the process
  5906. // of being replaced with a new PRIMARY deployment.
  5907. //
  5908. // INACTIVEA deployment that has been completely replaced.
  5909. Status *string `locationName:"status" type:"string"`
  5910. // The most recent task definition that was specified for the tasks in the service
  5911. // to use.
  5912. TaskDefinition *string `locationName:"taskDefinition" type:"string"`
  5913. // The Unix timestamp for when the service deployment was last updated.
  5914. UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp"`
  5915. }
  5916. // String returns the string representation
  5917. func (s Deployment) String() string {
  5918. return awsutil.Prettify(s)
  5919. }
  5920. // GoString returns the string representation
  5921. func (s Deployment) GoString() string {
  5922. return s.String()
  5923. }
  5924. // SetCreatedAt sets the CreatedAt field's value.
  5925. func (s *Deployment) SetCreatedAt(v time.Time) *Deployment {
  5926. s.CreatedAt = &v
  5927. return s
  5928. }
  5929. // SetDesiredCount sets the DesiredCount field's value.
  5930. func (s *Deployment) SetDesiredCount(v int64) *Deployment {
  5931. s.DesiredCount = &v
  5932. return s
  5933. }
  5934. // SetId sets the Id field's value.
  5935. func (s *Deployment) SetId(v string) *Deployment {
  5936. s.Id = &v
  5937. return s
  5938. }
  5939. // SetLaunchType sets the LaunchType field's value.
  5940. func (s *Deployment) SetLaunchType(v string) *Deployment {
  5941. s.LaunchType = &v
  5942. return s
  5943. }
  5944. // SetNetworkConfiguration sets the NetworkConfiguration field's value.
  5945. func (s *Deployment) SetNetworkConfiguration(v *NetworkConfiguration) *Deployment {
  5946. s.NetworkConfiguration = v
  5947. return s
  5948. }
  5949. // SetPendingCount sets the PendingCount field's value.
  5950. func (s *Deployment) SetPendingCount(v int64) *Deployment {
  5951. s.PendingCount = &v
  5952. return s
  5953. }
  5954. // SetPlatformVersion sets the PlatformVersion field's value.
  5955. func (s *Deployment) SetPlatformVersion(v string) *Deployment {
  5956. s.PlatformVersion = &v
  5957. return s
  5958. }
  5959. // SetRunningCount sets the RunningCount field's value.
  5960. func (s *Deployment) SetRunningCount(v int64) *Deployment {
  5961. s.RunningCount = &v
  5962. return s
  5963. }
  5964. // SetStatus sets the Status field's value.
  5965. func (s *Deployment) SetStatus(v string) *Deployment {
  5966. s.Status = &v
  5967. return s
  5968. }
  5969. // SetTaskDefinition sets the TaskDefinition field's value.
  5970. func (s *Deployment) SetTaskDefinition(v string) *Deployment {
  5971. s.TaskDefinition = &v
  5972. return s
  5973. }
  5974. // SetUpdatedAt sets the UpdatedAt field's value.
  5975. func (s *Deployment) SetUpdatedAt(v time.Time) *Deployment {
  5976. s.UpdatedAt = &v
  5977. return s
  5978. }
  5979. // Optional deployment parameters that control how many tasks run during the
  5980. // deployment and the ordering of stopping and starting tasks.
  5981. type DeploymentConfiguration struct {
  5982. _ struct{} `type:"structure"`
  5983. // If a service is using the rolling update (ECS) deployment type, the maximum
  5984. // percent parameter represents an upper limit on the number of tasks in a service
  5985. // that are allowed in the RUNNING or PENDING state during a deployment, as
  5986. // a percentage of the desired number of tasks (rounded down to the nearest
  5987. // integer), and while any container instances are in the DRAINING state if
  5988. // the service contains tasks using the EC2 launch type. This parameter enables
  5989. // you to define the deployment batch size. For example, if your service has
  5990. // a desired number of four tasks and a maximum percent value of 200%, the scheduler
  5991. // may start four new tasks before stopping the four older tasks (provided that
  5992. // the cluster resources required to do this are available). The default value
  5993. // for maximum percent is 200%.
  5994. //
  5995. // If a service is using the blue/green (CODE_DEPLOY) deployment type and tasks
  5996. // that use the EC2 launch type, the maximum percent value is set to the default
  5997. // value and is used to define the upper limit on the number of the tasks in
  5998. // the service that remain in the RUNNING state while the container instances
  5999. // are in the DRAINING state. If the tasks in the service use the Fargate launch
  6000. // type, the maximum percent value is not used, although it is returned when
  6001. // describing your service.
  6002. MaximumPercent *int64 `locationName:"maximumPercent" type:"integer"`
  6003. // If a service is using the rolling update (ECS) deployment type, the minimum
  6004. // healthy percent represents a lower limit on the number of tasks in a service
  6005. // that must remain in the RUNNING state during a deployment, as a percentage
  6006. // of the desired number of tasks (rounded up to the nearest integer), and while
  6007. // any container instances are in the DRAINING state if the service contains
  6008. // tasks using the EC2 launch type. This parameter enables you to deploy without
  6009. // using additional cluster capacity. For example, if your service has a desired
  6010. // number of four tasks and a minimum healthy percent of 50%, the scheduler
  6011. // may stop two existing tasks to free up cluster capacity before starting two
  6012. // new tasks. Tasks for services that do not use a load balancer are considered
  6013. // healthy if they are in the RUNNING state; tasks for services that do use
  6014. // a load balancer are considered healthy if they are in the RUNNING state and
  6015. // they are reported as healthy by the load balancer. The default value for
  6016. // minimum healthy percent is 100%.
  6017. //
  6018. // If a service is using the blue/green (CODE_DEPLOY) deployment type and tasks
  6019. // that use the EC2 launch type, the minimum healthy percent value is set to
  6020. // the default value and is used to define the lower limit on the number of
  6021. // the tasks in the service that remain in the RUNNING state while the container
  6022. // instances are in the DRAINING state. If the tasks in the service use the
  6023. // Fargate launch type, the minimum healthy percent value is not used, although
  6024. // it is returned when describing your service.
  6025. MinimumHealthyPercent *int64 `locationName:"minimumHealthyPercent" type:"integer"`
  6026. }
  6027. // String returns the string representation
  6028. func (s DeploymentConfiguration) String() string {
  6029. return awsutil.Prettify(s)
  6030. }
  6031. // GoString returns the string representation
  6032. func (s DeploymentConfiguration) GoString() string {
  6033. return s.String()
  6034. }
  6035. // SetMaximumPercent sets the MaximumPercent field's value.
  6036. func (s *DeploymentConfiguration) SetMaximumPercent(v int64) *DeploymentConfiguration {
  6037. s.MaximumPercent = &v
  6038. return s
  6039. }
  6040. // SetMinimumHealthyPercent sets the MinimumHealthyPercent field's value.
  6041. func (s *DeploymentConfiguration) SetMinimumHealthyPercent(v int64) *DeploymentConfiguration {
  6042. s.MinimumHealthyPercent = &v
  6043. return s
  6044. }
  6045. // The deployment controller to use for the service. For more information, see
  6046. // Amazon ECS Deployment Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
  6047. // in the Amazon Elastic Container Service Developer Guide.
  6048. type DeploymentController struct {
  6049. _ struct{} `type:"structure"`
  6050. // The deployment controller type to use.
  6051. //
  6052. // There are two deployment controller types available:
  6053. //
  6054. // ECSThe rolling update (ECS) deployment type involves replacing the current
  6055. // running version of the container with the latest version. The number of containers
  6056. // Amazon ECS adds or removes from the service during a rolling update is controlled
  6057. // by adjusting the minimum and maximum number of healthy tasks allowed during
  6058. // a service deployment, as specified in the DeploymentConfiguration.
  6059. //
  6060. // CODE_DEPLOYThe blue/green (CODE_DEPLOY) deployment type uses the blue/green
  6061. // deployment model powered by AWS CodeDeploy, which allows you to verify a
  6062. // new deployment of a service before sending production traffic to it. For
  6063. // more information, see Amazon ECS Deployment Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
  6064. // in the Amazon Elastic Container Service Developer Guide.
  6065. //
  6066. // Type is a required field
  6067. Type *string `locationName:"type" type:"string" required:"true" enum:"DeploymentControllerType"`
  6068. }
  6069. // String returns the string representation
  6070. func (s DeploymentController) String() string {
  6071. return awsutil.Prettify(s)
  6072. }
  6073. // GoString returns the string representation
  6074. func (s DeploymentController) GoString() string {
  6075. return s.String()
  6076. }
  6077. // Validate inspects the fields of the type to determine if they are valid.
  6078. func (s *DeploymentController) Validate() error {
  6079. invalidParams := request.ErrInvalidParams{Context: "DeploymentController"}
  6080. if s.Type == nil {
  6081. invalidParams.Add(request.NewErrParamRequired("Type"))
  6082. }
  6083. if invalidParams.Len() > 0 {
  6084. return invalidParams
  6085. }
  6086. return nil
  6087. }
  6088. // SetType sets the Type field's value.
  6089. func (s *DeploymentController) SetType(v string) *DeploymentController {
  6090. s.Type = &v
  6091. return s
  6092. }
  6093. type DeregisterContainerInstanceInput struct {
  6094. _ struct{} `type:"structure"`
  6095. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  6096. // the container instance to deregister. If you do not specify a cluster, the
  6097. // default cluster is assumed.
  6098. Cluster *string `locationName:"cluster" type:"string"`
  6099. // The container instance ID or full ARN of the container instance to deregister.
  6100. // The ARN contains the arn:aws:ecs namespace, followed by the Region of the
  6101. // container instance, the AWS account ID of the container instance owner, the
  6102. // container-instance namespace, and then the container instance ID. For example,
  6103. // arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID.
  6104. //
  6105. // ContainerInstance is a required field
  6106. ContainerInstance *string `locationName:"containerInstance" type:"string" required:"true"`
  6107. // Forces the deregistration of the container instance. If you have tasks running
  6108. // on the container instance when you deregister it with the force option, these
  6109. // tasks remain running until you terminate the instance or the tasks stop through
  6110. // some other means, but they are orphaned (no longer monitored or accounted
  6111. // for by Amazon ECS). If an orphaned task on your container instance is part
  6112. // of an Amazon ECS service, then the service scheduler starts another copy
  6113. // of that task, on a different container instance if possible.
  6114. //
  6115. // Any containers in orphaned service tasks that are registered with a Classic
  6116. // Load Balancer or an Application Load Balancer target group are deregistered.
  6117. // They begin connection draining according to the settings on the load balancer
  6118. // or target group.
  6119. Force *bool `locationName:"force" type:"boolean"`
  6120. }
  6121. // String returns the string representation
  6122. func (s DeregisterContainerInstanceInput) String() string {
  6123. return awsutil.Prettify(s)
  6124. }
  6125. // GoString returns the string representation
  6126. func (s DeregisterContainerInstanceInput) GoString() string {
  6127. return s.String()
  6128. }
  6129. // Validate inspects the fields of the type to determine if they are valid.
  6130. func (s *DeregisterContainerInstanceInput) Validate() error {
  6131. invalidParams := request.ErrInvalidParams{Context: "DeregisterContainerInstanceInput"}
  6132. if s.ContainerInstance == nil {
  6133. invalidParams.Add(request.NewErrParamRequired("ContainerInstance"))
  6134. }
  6135. if invalidParams.Len() > 0 {
  6136. return invalidParams
  6137. }
  6138. return nil
  6139. }
  6140. // SetCluster sets the Cluster field's value.
  6141. func (s *DeregisterContainerInstanceInput) SetCluster(v string) *DeregisterContainerInstanceInput {
  6142. s.Cluster = &v
  6143. return s
  6144. }
  6145. // SetContainerInstance sets the ContainerInstance field's value.
  6146. func (s *DeregisterContainerInstanceInput) SetContainerInstance(v string) *DeregisterContainerInstanceInput {
  6147. s.ContainerInstance = &v
  6148. return s
  6149. }
  6150. // SetForce sets the Force field's value.
  6151. func (s *DeregisterContainerInstanceInput) SetForce(v bool) *DeregisterContainerInstanceInput {
  6152. s.Force = &v
  6153. return s
  6154. }
  6155. type DeregisterContainerInstanceOutput struct {
  6156. _ struct{} `type:"structure"`
  6157. // The container instance that was deregistered.
  6158. ContainerInstance *ContainerInstance `locationName:"containerInstance" type:"structure"`
  6159. }
  6160. // String returns the string representation
  6161. func (s DeregisterContainerInstanceOutput) String() string {
  6162. return awsutil.Prettify(s)
  6163. }
  6164. // GoString returns the string representation
  6165. func (s DeregisterContainerInstanceOutput) GoString() string {
  6166. return s.String()
  6167. }
  6168. // SetContainerInstance sets the ContainerInstance field's value.
  6169. func (s *DeregisterContainerInstanceOutput) SetContainerInstance(v *ContainerInstance) *DeregisterContainerInstanceOutput {
  6170. s.ContainerInstance = v
  6171. return s
  6172. }
  6173. type DeregisterTaskDefinitionInput struct {
  6174. _ struct{} `type:"structure"`
  6175. // The family and revision (family:revision) or full Amazon Resource Name (ARN)
  6176. // of the task definition to deregister. You must specify a revision.
  6177. //
  6178. // TaskDefinition is a required field
  6179. TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"`
  6180. }
  6181. // String returns the string representation
  6182. func (s DeregisterTaskDefinitionInput) String() string {
  6183. return awsutil.Prettify(s)
  6184. }
  6185. // GoString returns the string representation
  6186. func (s DeregisterTaskDefinitionInput) GoString() string {
  6187. return s.String()
  6188. }
  6189. // Validate inspects the fields of the type to determine if they are valid.
  6190. func (s *DeregisterTaskDefinitionInput) Validate() error {
  6191. invalidParams := request.ErrInvalidParams{Context: "DeregisterTaskDefinitionInput"}
  6192. if s.TaskDefinition == nil {
  6193. invalidParams.Add(request.NewErrParamRequired("TaskDefinition"))
  6194. }
  6195. if invalidParams.Len() > 0 {
  6196. return invalidParams
  6197. }
  6198. return nil
  6199. }
  6200. // SetTaskDefinition sets the TaskDefinition field's value.
  6201. func (s *DeregisterTaskDefinitionInput) SetTaskDefinition(v string) *DeregisterTaskDefinitionInput {
  6202. s.TaskDefinition = &v
  6203. return s
  6204. }
  6205. type DeregisterTaskDefinitionOutput struct {
  6206. _ struct{} `type:"structure"`
  6207. // The full description of the deregistered task.
  6208. TaskDefinition *TaskDefinition `locationName:"taskDefinition" type:"structure"`
  6209. }
  6210. // String returns the string representation
  6211. func (s DeregisterTaskDefinitionOutput) String() string {
  6212. return awsutil.Prettify(s)
  6213. }
  6214. // GoString returns the string representation
  6215. func (s DeregisterTaskDefinitionOutput) GoString() string {
  6216. return s.String()
  6217. }
  6218. // SetTaskDefinition sets the TaskDefinition field's value.
  6219. func (s *DeregisterTaskDefinitionOutput) SetTaskDefinition(v *TaskDefinition) *DeregisterTaskDefinitionOutput {
  6220. s.TaskDefinition = v
  6221. return s
  6222. }
  6223. type DescribeClustersInput struct {
  6224. _ struct{} `type:"structure"`
  6225. // A list of up to 100 cluster names or full cluster Amazon Resource Name (ARN)
  6226. // entries. If you do not specify a cluster, the default cluster is assumed.
  6227. Clusters []*string `locationName:"clusters" type:"list"`
  6228. // Additional information about your clusters to be separated by launch type,
  6229. // including:
  6230. //
  6231. // * runningEC2TasksCount
  6232. //
  6233. // * runningFargateTasksCount
  6234. //
  6235. // * pendingEC2TasksCount
  6236. //
  6237. // * pendingFargateTasksCount
  6238. //
  6239. // * activeEC2ServiceCount
  6240. //
  6241. // * activeFargateServiceCount
  6242. //
  6243. // * drainingEC2ServiceCount
  6244. //
  6245. // * drainingFargateServiceCount
  6246. Include []*string `locationName:"include" type:"list"`
  6247. }
  6248. // String returns the string representation
  6249. func (s DescribeClustersInput) String() string {
  6250. return awsutil.Prettify(s)
  6251. }
  6252. // GoString returns the string representation
  6253. func (s DescribeClustersInput) GoString() string {
  6254. return s.String()
  6255. }
  6256. // SetClusters sets the Clusters field's value.
  6257. func (s *DescribeClustersInput) SetClusters(v []*string) *DescribeClustersInput {
  6258. s.Clusters = v
  6259. return s
  6260. }
  6261. // SetInclude sets the Include field's value.
  6262. func (s *DescribeClustersInput) SetInclude(v []*string) *DescribeClustersInput {
  6263. s.Include = v
  6264. return s
  6265. }
  6266. type DescribeClustersOutput struct {
  6267. _ struct{} `type:"structure"`
  6268. // The list of clusters.
  6269. Clusters []*Cluster `locationName:"clusters" type:"list"`
  6270. // Any failures associated with the call.
  6271. Failures []*Failure `locationName:"failures" type:"list"`
  6272. }
  6273. // String returns the string representation
  6274. func (s DescribeClustersOutput) String() string {
  6275. return awsutil.Prettify(s)
  6276. }
  6277. // GoString returns the string representation
  6278. func (s DescribeClustersOutput) GoString() string {
  6279. return s.String()
  6280. }
  6281. // SetClusters sets the Clusters field's value.
  6282. func (s *DescribeClustersOutput) SetClusters(v []*Cluster) *DescribeClustersOutput {
  6283. s.Clusters = v
  6284. return s
  6285. }
  6286. // SetFailures sets the Failures field's value.
  6287. func (s *DescribeClustersOutput) SetFailures(v []*Failure) *DescribeClustersOutput {
  6288. s.Failures = v
  6289. return s
  6290. }
  6291. type DescribeContainerInstancesInput struct {
  6292. _ struct{} `type:"structure"`
  6293. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  6294. // the container instances to describe. If you do not specify a cluster, the
  6295. // default cluster is assumed.
  6296. Cluster *string `locationName:"cluster" type:"string"`
  6297. // A list of up to 100 container instance IDs or full Amazon Resource Name (ARN)
  6298. // entries.
  6299. //
  6300. // ContainerInstances is a required field
  6301. ContainerInstances []*string `locationName:"containerInstances" type:"list" required:"true"`
  6302. // Specifies whether you want to see the resource tags for the container instance.
  6303. // If TAGS is specified, the tags are included in the response. If this field
  6304. // is omitted, tags are not included in the response.
  6305. Include []*string `locationName:"include" type:"list"`
  6306. }
  6307. // String returns the string representation
  6308. func (s DescribeContainerInstancesInput) String() string {
  6309. return awsutil.Prettify(s)
  6310. }
  6311. // GoString returns the string representation
  6312. func (s DescribeContainerInstancesInput) GoString() string {
  6313. return s.String()
  6314. }
  6315. // Validate inspects the fields of the type to determine if they are valid.
  6316. func (s *DescribeContainerInstancesInput) Validate() error {
  6317. invalidParams := request.ErrInvalidParams{Context: "DescribeContainerInstancesInput"}
  6318. if s.ContainerInstances == nil {
  6319. invalidParams.Add(request.NewErrParamRequired("ContainerInstances"))
  6320. }
  6321. if invalidParams.Len() > 0 {
  6322. return invalidParams
  6323. }
  6324. return nil
  6325. }
  6326. // SetCluster sets the Cluster field's value.
  6327. func (s *DescribeContainerInstancesInput) SetCluster(v string) *DescribeContainerInstancesInput {
  6328. s.Cluster = &v
  6329. return s
  6330. }
  6331. // SetContainerInstances sets the ContainerInstances field's value.
  6332. func (s *DescribeContainerInstancesInput) SetContainerInstances(v []*string) *DescribeContainerInstancesInput {
  6333. s.ContainerInstances = v
  6334. return s
  6335. }
  6336. // SetInclude sets the Include field's value.
  6337. func (s *DescribeContainerInstancesInput) SetInclude(v []*string) *DescribeContainerInstancesInput {
  6338. s.Include = v
  6339. return s
  6340. }
  6341. type DescribeContainerInstancesOutput struct {
  6342. _ struct{} `type:"structure"`
  6343. // The list of container instances.
  6344. ContainerInstances []*ContainerInstance `locationName:"containerInstances" type:"list"`
  6345. // Any failures associated with the call.
  6346. Failures []*Failure `locationName:"failures" type:"list"`
  6347. }
  6348. // String returns the string representation
  6349. func (s DescribeContainerInstancesOutput) String() string {
  6350. return awsutil.Prettify(s)
  6351. }
  6352. // GoString returns the string representation
  6353. func (s DescribeContainerInstancesOutput) GoString() string {
  6354. return s.String()
  6355. }
  6356. // SetContainerInstances sets the ContainerInstances field's value.
  6357. func (s *DescribeContainerInstancesOutput) SetContainerInstances(v []*ContainerInstance) *DescribeContainerInstancesOutput {
  6358. s.ContainerInstances = v
  6359. return s
  6360. }
  6361. // SetFailures sets the Failures field's value.
  6362. func (s *DescribeContainerInstancesOutput) SetFailures(v []*Failure) *DescribeContainerInstancesOutput {
  6363. s.Failures = v
  6364. return s
  6365. }
  6366. type DescribeServicesInput struct {
  6367. _ struct{} `type:"structure"`
  6368. // The short name or full Amazon Resource Name (ARN)the cluster that hosts the
  6369. // service to describe. If you do not specify a cluster, the default cluster
  6370. // is assumed.
  6371. Cluster *string `locationName:"cluster" type:"string"`
  6372. // Specifies whether you want to see the resource tags for the service. If TAGS
  6373. // is specified, the tags are included in the response. If this field is omitted,
  6374. // tags are not included in the response.
  6375. Include []*string `locationName:"include" type:"list"`
  6376. // A list of services to describe. You may specify up to 10 services to describe
  6377. // in a single operation.
  6378. //
  6379. // Services is a required field
  6380. Services []*string `locationName:"services" type:"list" required:"true"`
  6381. }
  6382. // String returns the string representation
  6383. func (s DescribeServicesInput) String() string {
  6384. return awsutil.Prettify(s)
  6385. }
  6386. // GoString returns the string representation
  6387. func (s DescribeServicesInput) GoString() string {
  6388. return s.String()
  6389. }
  6390. // Validate inspects the fields of the type to determine if they are valid.
  6391. func (s *DescribeServicesInput) Validate() error {
  6392. invalidParams := request.ErrInvalidParams{Context: "DescribeServicesInput"}
  6393. if s.Services == nil {
  6394. invalidParams.Add(request.NewErrParamRequired("Services"))
  6395. }
  6396. if invalidParams.Len() > 0 {
  6397. return invalidParams
  6398. }
  6399. return nil
  6400. }
  6401. // SetCluster sets the Cluster field's value.
  6402. func (s *DescribeServicesInput) SetCluster(v string) *DescribeServicesInput {
  6403. s.Cluster = &v
  6404. return s
  6405. }
  6406. // SetInclude sets the Include field's value.
  6407. func (s *DescribeServicesInput) SetInclude(v []*string) *DescribeServicesInput {
  6408. s.Include = v
  6409. return s
  6410. }
  6411. // SetServices sets the Services field's value.
  6412. func (s *DescribeServicesInput) SetServices(v []*string) *DescribeServicesInput {
  6413. s.Services = v
  6414. return s
  6415. }
  6416. type DescribeServicesOutput struct {
  6417. _ struct{} `type:"structure"`
  6418. // Any failures associated with the call.
  6419. Failures []*Failure `locationName:"failures" type:"list"`
  6420. // The list of services described.
  6421. Services []*Service `locationName:"services" type:"list"`
  6422. }
  6423. // String returns the string representation
  6424. func (s DescribeServicesOutput) String() string {
  6425. return awsutil.Prettify(s)
  6426. }
  6427. // GoString returns the string representation
  6428. func (s DescribeServicesOutput) GoString() string {
  6429. return s.String()
  6430. }
  6431. // SetFailures sets the Failures field's value.
  6432. func (s *DescribeServicesOutput) SetFailures(v []*Failure) *DescribeServicesOutput {
  6433. s.Failures = v
  6434. return s
  6435. }
  6436. // SetServices sets the Services field's value.
  6437. func (s *DescribeServicesOutput) SetServices(v []*Service) *DescribeServicesOutput {
  6438. s.Services = v
  6439. return s
  6440. }
  6441. type DescribeTaskDefinitionInput struct {
  6442. _ struct{} `type:"structure"`
  6443. // Specifies whether to see the resource tags for the task definition. If TAGS
  6444. // is specified, the tags are included in the response. If this field is omitted,
  6445. // tags are not included in the response.
  6446. Include []*string `locationName:"include" type:"list"`
  6447. // The family for the latest ACTIVE revision, family and revision (family:revision)
  6448. // for a specific revision in the family, or full Amazon Resource Name (ARN)
  6449. // of the task definition to describe.
  6450. //
  6451. // TaskDefinition is a required field
  6452. TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"`
  6453. }
  6454. // String returns the string representation
  6455. func (s DescribeTaskDefinitionInput) String() string {
  6456. return awsutil.Prettify(s)
  6457. }
  6458. // GoString returns the string representation
  6459. func (s DescribeTaskDefinitionInput) GoString() string {
  6460. return s.String()
  6461. }
  6462. // Validate inspects the fields of the type to determine if they are valid.
  6463. func (s *DescribeTaskDefinitionInput) Validate() error {
  6464. invalidParams := request.ErrInvalidParams{Context: "DescribeTaskDefinitionInput"}
  6465. if s.TaskDefinition == nil {
  6466. invalidParams.Add(request.NewErrParamRequired("TaskDefinition"))
  6467. }
  6468. if invalidParams.Len() > 0 {
  6469. return invalidParams
  6470. }
  6471. return nil
  6472. }
  6473. // SetInclude sets the Include field's value.
  6474. func (s *DescribeTaskDefinitionInput) SetInclude(v []*string) *DescribeTaskDefinitionInput {
  6475. s.Include = v
  6476. return s
  6477. }
  6478. // SetTaskDefinition sets the TaskDefinition field's value.
  6479. func (s *DescribeTaskDefinitionInput) SetTaskDefinition(v string) *DescribeTaskDefinitionInput {
  6480. s.TaskDefinition = &v
  6481. return s
  6482. }
  6483. type DescribeTaskDefinitionOutput struct {
  6484. _ struct{} `type:"structure"`
  6485. // The metadata that is applied to the task definition to help you categorize
  6486. // and organize them. Each tag consists of a key and an optional value, both
  6487. // of which you define. Tag keys can have a maximum character length of 128
  6488. // characters, and tag values can have a maximum length of 256 characters.
  6489. Tags []*Tag `locationName:"tags" type:"list"`
  6490. // The full task definition description.
  6491. TaskDefinition *TaskDefinition `locationName:"taskDefinition" type:"structure"`
  6492. }
  6493. // String returns the string representation
  6494. func (s DescribeTaskDefinitionOutput) String() string {
  6495. return awsutil.Prettify(s)
  6496. }
  6497. // GoString returns the string representation
  6498. func (s DescribeTaskDefinitionOutput) GoString() string {
  6499. return s.String()
  6500. }
  6501. // SetTags sets the Tags field's value.
  6502. func (s *DescribeTaskDefinitionOutput) SetTags(v []*Tag) *DescribeTaskDefinitionOutput {
  6503. s.Tags = v
  6504. return s
  6505. }
  6506. // SetTaskDefinition sets the TaskDefinition field's value.
  6507. func (s *DescribeTaskDefinitionOutput) SetTaskDefinition(v *TaskDefinition) *DescribeTaskDefinitionOutput {
  6508. s.TaskDefinition = v
  6509. return s
  6510. }
  6511. type DescribeTasksInput struct {
  6512. _ struct{} `type:"structure"`
  6513. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  6514. // the task to describe. If you do not specify a cluster, the default cluster
  6515. // is assumed.
  6516. Cluster *string `locationName:"cluster" type:"string"`
  6517. // Specifies whether you want to see the resource tags for the task. If TAGS
  6518. // is specified, the tags are included in the response. If this field is omitted,
  6519. // tags are not included in the response.
  6520. Include []*string `locationName:"include" type:"list"`
  6521. // A list of up to 100 task IDs or full ARN entries.
  6522. //
  6523. // Tasks is a required field
  6524. Tasks []*string `locationName:"tasks" type:"list" required:"true"`
  6525. }
  6526. // String returns the string representation
  6527. func (s DescribeTasksInput) String() string {
  6528. return awsutil.Prettify(s)
  6529. }
  6530. // GoString returns the string representation
  6531. func (s DescribeTasksInput) GoString() string {
  6532. return s.String()
  6533. }
  6534. // Validate inspects the fields of the type to determine if they are valid.
  6535. func (s *DescribeTasksInput) Validate() error {
  6536. invalidParams := request.ErrInvalidParams{Context: "DescribeTasksInput"}
  6537. if s.Tasks == nil {
  6538. invalidParams.Add(request.NewErrParamRequired("Tasks"))
  6539. }
  6540. if invalidParams.Len() > 0 {
  6541. return invalidParams
  6542. }
  6543. return nil
  6544. }
  6545. // SetCluster sets the Cluster field's value.
  6546. func (s *DescribeTasksInput) SetCluster(v string) *DescribeTasksInput {
  6547. s.Cluster = &v
  6548. return s
  6549. }
  6550. // SetInclude sets the Include field's value.
  6551. func (s *DescribeTasksInput) SetInclude(v []*string) *DescribeTasksInput {
  6552. s.Include = v
  6553. return s
  6554. }
  6555. // SetTasks sets the Tasks field's value.
  6556. func (s *DescribeTasksInput) SetTasks(v []*string) *DescribeTasksInput {
  6557. s.Tasks = v
  6558. return s
  6559. }
  6560. type DescribeTasksOutput struct {
  6561. _ struct{} `type:"structure"`
  6562. // Any failures associated with the call.
  6563. Failures []*Failure `locationName:"failures" type:"list"`
  6564. // The list of tasks.
  6565. Tasks []*Task `locationName:"tasks" type:"list"`
  6566. }
  6567. // String returns the string representation
  6568. func (s DescribeTasksOutput) String() string {
  6569. return awsutil.Prettify(s)
  6570. }
  6571. // GoString returns the string representation
  6572. func (s DescribeTasksOutput) GoString() string {
  6573. return s.String()
  6574. }
  6575. // SetFailures sets the Failures field's value.
  6576. func (s *DescribeTasksOutput) SetFailures(v []*Failure) *DescribeTasksOutput {
  6577. s.Failures = v
  6578. return s
  6579. }
  6580. // SetTasks sets the Tasks field's value.
  6581. func (s *DescribeTasksOutput) SetTasks(v []*Task) *DescribeTasksOutput {
  6582. s.Tasks = v
  6583. return s
  6584. }
  6585. // An object representing a container instance host device.
  6586. type Device struct {
  6587. _ struct{} `type:"structure"`
  6588. // The path inside the container at which to expose the host device.
  6589. ContainerPath *string `locationName:"containerPath" type:"string"`
  6590. // The path for the device on the host container instance.
  6591. //
  6592. // HostPath is a required field
  6593. HostPath *string `locationName:"hostPath" type:"string" required:"true"`
  6594. // The explicit permissions to provide to the container for the device. By default,
  6595. // the container has permissions for read, write, and mknod for the device.
  6596. Permissions []*string `locationName:"permissions" type:"list"`
  6597. }
  6598. // String returns the string representation
  6599. func (s Device) String() string {
  6600. return awsutil.Prettify(s)
  6601. }
  6602. // GoString returns the string representation
  6603. func (s Device) GoString() string {
  6604. return s.String()
  6605. }
  6606. // Validate inspects the fields of the type to determine if they are valid.
  6607. func (s *Device) Validate() error {
  6608. invalidParams := request.ErrInvalidParams{Context: "Device"}
  6609. if s.HostPath == nil {
  6610. invalidParams.Add(request.NewErrParamRequired("HostPath"))
  6611. }
  6612. if invalidParams.Len() > 0 {
  6613. return invalidParams
  6614. }
  6615. return nil
  6616. }
  6617. // SetContainerPath sets the ContainerPath field's value.
  6618. func (s *Device) SetContainerPath(v string) *Device {
  6619. s.ContainerPath = &v
  6620. return s
  6621. }
  6622. // SetHostPath sets the HostPath field's value.
  6623. func (s *Device) SetHostPath(v string) *Device {
  6624. s.HostPath = &v
  6625. return s
  6626. }
  6627. // SetPermissions sets the Permissions field's value.
  6628. func (s *Device) SetPermissions(v []*string) *Device {
  6629. s.Permissions = v
  6630. return s
  6631. }
  6632. type DiscoverPollEndpointInput struct {
  6633. _ struct{} `type:"structure"`
  6634. // The short name or full Amazon Resource Name (ARN) of the cluster to which
  6635. // the container instance belongs.
  6636. Cluster *string `locationName:"cluster" type:"string"`
  6637. // The container instance ID or full ARN of the container instance. The ARN
  6638. // contains the arn:aws:ecs namespace, followed by the Region of the container
  6639. // instance, the AWS account ID of the container instance owner, the container-instance
  6640. // namespace, and then the container instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID.
  6641. ContainerInstance *string `locationName:"containerInstance" type:"string"`
  6642. }
  6643. // String returns the string representation
  6644. func (s DiscoverPollEndpointInput) String() string {
  6645. return awsutil.Prettify(s)
  6646. }
  6647. // GoString returns the string representation
  6648. func (s DiscoverPollEndpointInput) GoString() string {
  6649. return s.String()
  6650. }
  6651. // SetCluster sets the Cluster field's value.
  6652. func (s *DiscoverPollEndpointInput) SetCluster(v string) *DiscoverPollEndpointInput {
  6653. s.Cluster = &v
  6654. return s
  6655. }
  6656. // SetContainerInstance sets the ContainerInstance field's value.
  6657. func (s *DiscoverPollEndpointInput) SetContainerInstance(v string) *DiscoverPollEndpointInput {
  6658. s.ContainerInstance = &v
  6659. return s
  6660. }
  6661. type DiscoverPollEndpointOutput struct {
  6662. _ struct{} `type:"structure"`
  6663. // The endpoint for the Amazon ECS agent to poll.
  6664. Endpoint *string `locationName:"endpoint" type:"string"`
  6665. // The telemetry endpoint for the Amazon ECS agent.
  6666. TelemetryEndpoint *string `locationName:"telemetryEndpoint" type:"string"`
  6667. }
  6668. // String returns the string representation
  6669. func (s DiscoverPollEndpointOutput) String() string {
  6670. return awsutil.Prettify(s)
  6671. }
  6672. // GoString returns the string representation
  6673. func (s DiscoverPollEndpointOutput) GoString() string {
  6674. return s.String()
  6675. }
  6676. // SetEndpoint sets the Endpoint field's value.
  6677. func (s *DiscoverPollEndpointOutput) SetEndpoint(v string) *DiscoverPollEndpointOutput {
  6678. s.Endpoint = &v
  6679. return s
  6680. }
  6681. // SetTelemetryEndpoint sets the TelemetryEndpoint field's value.
  6682. func (s *DiscoverPollEndpointOutput) SetTelemetryEndpoint(v string) *DiscoverPollEndpointOutput {
  6683. s.TelemetryEndpoint = &v
  6684. return s
  6685. }
  6686. // This parameter is specified when you are using Docker volumes. Docker volumes
  6687. // are only supported when you are using the EC2 launch type. Windows containers
  6688. // only support the use of the local driver. To use bind mounts, specify a host
  6689. // instead.
  6690. type DockerVolumeConfiguration struct {
  6691. _ struct{} `type:"structure"`
  6692. // If this value is true, the Docker volume is created if it does not already
  6693. // exist.
  6694. //
  6695. // This field is only used if the scope is shared.
  6696. Autoprovision *bool `locationName:"autoprovision" type:"boolean"`
  6697. // The Docker volume driver to use. The driver value must match the driver name
  6698. // provided by Docker because it is used for task placement. If the driver was
  6699. // installed using the Docker plugin CLI, use docker plugin ls to retrieve the
  6700. // driver name from your container instance. If the driver was installed using
  6701. // another method, use Docker plugin discovery to retrieve the driver name.
  6702. // For more information, see Docker plugin discovery (https://docs.docker.com/engine/extend/plugin_api/#plugin-discovery).
  6703. // This parameter maps to Driver in the Create a volume (https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate)
  6704. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  6705. // and the xxdriver option to docker volume create (https://docs.docker.com/engine/reference/commandline/volume_create/).
  6706. Driver *string `locationName:"driver" type:"string"`
  6707. // A map of Docker driver-specific options passed through. This parameter maps
  6708. // to DriverOpts in the Create a volume (https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate)
  6709. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  6710. // and the xxopt option to docker volume create (https://docs.docker.com/engine/reference/commandline/volume_create/).
  6711. DriverOpts map[string]*string `locationName:"driverOpts" type:"map"`
  6712. // Custom metadata to add to your Docker volume. This parameter maps to Labels
  6713. // in the Create a volume (https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate)
  6714. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  6715. // and the xxlabel option to docker volume create (https://docs.docker.com/engine/reference/commandline/volume_create/).
  6716. Labels map[string]*string `locationName:"labels" type:"map"`
  6717. // The scope for the Docker volume that determines its lifecycle. Docker volumes
  6718. // that are scoped to a task are automatically provisioned when the task starts
  6719. // and destroyed when the task stops. Docker volumes that are scoped as shared
  6720. // persist after the task stops.
  6721. Scope *string `locationName:"scope" type:"string" enum:"Scope"`
  6722. }
  6723. // String returns the string representation
  6724. func (s DockerVolumeConfiguration) String() string {
  6725. return awsutil.Prettify(s)
  6726. }
  6727. // GoString returns the string representation
  6728. func (s DockerVolumeConfiguration) GoString() string {
  6729. return s.String()
  6730. }
  6731. // SetAutoprovision sets the Autoprovision field's value.
  6732. func (s *DockerVolumeConfiguration) SetAutoprovision(v bool) *DockerVolumeConfiguration {
  6733. s.Autoprovision = &v
  6734. return s
  6735. }
  6736. // SetDriver sets the Driver field's value.
  6737. func (s *DockerVolumeConfiguration) SetDriver(v string) *DockerVolumeConfiguration {
  6738. s.Driver = &v
  6739. return s
  6740. }
  6741. // SetDriverOpts sets the DriverOpts field's value.
  6742. func (s *DockerVolumeConfiguration) SetDriverOpts(v map[string]*string) *DockerVolumeConfiguration {
  6743. s.DriverOpts = v
  6744. return s
  6745. }
  6746. // SetLabels sets the Labels field's value.
  6747. func (s *DockerVolumeConfiguration) SetLabels(v map[string]*string) *DockerVolumeConfiguration {
  6748. s.Labels = v
  6749. return s
  6750. }
  6751. // SetScope sets the Scope field's value.
  6752. func (s *DockerVolumeConfiguration) SetScope(v string) *DockerVolumeConfiguration {
  6753. s.Scope = &v
  6754. return s
  6755. }
  6756. // A failed resource.
  6757. type Failure struct {
  6758. _ struct{} `type:"structure"`
  6759. // The Amazon Resource Name (ARN) of the failed resource.
  6760. Arn *string `locationName:"arn" type:"string"`
  6761. // The reason for the failure.
  6762. Reason *string `locationName:"reason" type:"string"`
  6763. }
  6764. // String returns the string representation
  6765. func (s Failure) String() string {
  6766. return awsutil.Prettify(s)
  6767. }
  6768. // GoString returns the string representation
  6769. func (s Failure) GoString() string {
  6770. return s.String()
  6771. }
  6772. // SetArn sets the Arn field's value.
  6773. func (s *Failure) SetArn(v string) *Failure {
  6774. s.Arn = &v
  6775. return s
  6776. }
  6777. // SetReason sets the Reason field's value.
  6778. func (s *Failure) SetReason(v string) *Failure {
  6779. s.Reason = &v
  6780. return s
  6781. }
  6782. // An object representing a container health check. Health check parameters
  6783. // that are specified in a container definition override any Docker health checks
  6784. // that exist in the container image (such as those specified in a parent image
  6785. // or from the image's Dockerfile).
  6786. //
  6787. // The following are notes about container health check support:
  6788. //
  6789. // * Container health checks require version 1.17.0 or greater of the Amazon
  6790. // ECS container agent. For more information, see Updating the Amazon ECS
  6791. // Container Agent (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html).
  6792. //
  6793. // * Container health checks are supported for Fargate tasks if you are using
  6794. // platform version 1.1.0 or greater. For more information, see AWS Fargate
  6795. // Platform Versions (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html).
  6796. //
  6797. // * Container health checks are not supported for tasks that are part of
  6798. // a service that is configured to use a Classic Load Balancer.
  6799. type HealthCheck struct {
  6800. _ struct{} `type:"structure"`
  6801. // A string array representing the command that the container runs to determine
  6802. // if it is healthy. The string array must start with CMD to execute the command
  6803. // arguments directly, or CMD-SHELL to run the command with the container's
  6804. // default shell. For example:
  6805. //
  6806. // [ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]
  6807. //
  6808. // An exit code of 0 indicates success, and non-zero exit code indicates failure.
  6809. // For more information, see HealthCheck in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  6810. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/).
  6811. //
  6812. // Command is a required field
  6813. Command []*string `locationName:"command" type:"list" required:"true"`
  6814. // The time period in seconds between each health check execution. You may specify
  6815. // between 5 and 300 seconds. The default value is 30 seconds.
  6816. Interval *int64 `locationName:"interval" type:"integer"`
  6817. // The number of times to retry a failed health check before the container is
  6818. // considered unhealthy. You may specify between 1 and 10 retries. The default
  6819. // value is 3.
  6820. Retries *int64 `locationName:"retries" type:"integer"`
  6821. // The optional grace period within which to provide containers time to bootstrap
  6822. // before failed health checks count towards the maximum number of retries.
  6823. // You may specify between 0 and 300 seconds. The startPeriod is disabled by
  6824. // default.
  6825. //
  6826. // If a health check succeeds within the startPeriod, then the container is
  6827. // considered healthy and any subsequent failures count toward the maximum number
  6828. // of retries.
  6829. StartPeriod *int64 `locationName:"startPeriod" type:"integer"`
  6830. // The time period in seconds to wait for a health check to succeed before it
  6831. // is considered a failure. You may specify between 2 and 60 seconds. The default
  6832. // value is 5.
  6833. Timeout *int64 `locationName:"timeout" type:"integer"`
  6834. }
  6835. // String returns the string representation
  6836. func (s HealthCheck) String() string {
  6837. return awsutil.Prettify(s)
  6838. }
  6839. // GoString returns the string representation
  6840. func (s HealthCheck) GoString() string {
  6841. return s.String()
  6842. }
  6843. // Validate inspects the fields of the type to determine if they are valid.
  6844. func (s *HealthCheck) Validate() error {
  6845. invalidParams := request.ErrInvalidParams{Context: "HealthCheck"}
  6846. if s.Command == nil {
  6847. invalidParams.Add(request.NewErrParamRequired("Command"))
  6848. }
  6849. if invalidParams.Len() > 0 {
  6850. return invalidParams
  6851. }
  6852. return nil
  6853. }
  6854. // SetCommand sets the Command field's value.
  6855. func (s *HealthCheck) SetCommand(v []*string) *HealthCheck {
  6856. s.Command = v
  6857. return s
  6858. }
  6859. // SetInterval sets the Interval field's value.
  6860. func (s *HealthCheck) SetInterval(v int64) *HealthCheck {
  6861. s.Interval = &v
  6862. return s
  6863. }
  6864. // SetRetries sets the Retries field's value.
  6865. func (s *HealthCheck) SetRetries(v int64) *HealthCheck {
  6866. s.Retries = &v
  6867. return s
  6868. }
  6869. // SetStartPeriod sets the StartPeriod field's value.
  6870. func (s *HealthCheck) SetStartPeriod(v int64) *HealthCheck {
  6871. s.StartPeriod = &v
  6872. return s
  6873. }
  6874. // SetTimeout sets the Timeout field's value.
  6875. func (s *HealthCheck) SetTimeout(v int64) *HealthCheck {
  6876. s.Timeout = &v
  6877. return s
  6878. }
  6879. // Hostnames and IP address entries that are added to the /etc/hosts file of
  6880. // a container via the extraHosts parameter of its ContainerDefinition.
  6881. type HostEntry struct {
  6882. _ struct{} `type:"structure"`
  6883. // The hostname to use in the /etc/hosts entry.
  6884. //
  6885. // Hostname is a required field
  6886. Hostname *string `locationName:"hostname" type:"string" required:"true"`
  6887. // The IP address to use in the /etc/hosts entry.
  6888. //
  6889. // IpAddress is a required field
  6890. IpAddress *string `locationName:"ipAddress" type:"string" required:"true"`
  6891. }
  6892. // String returns the string representation
  6893. func (s HostEntry) String() string {
  6894. return awsutil.Prettify(s)
  6895. }
  6896. // GoString returns the string representation
  6897. func (s HostEntry) GoString() string {
  6898. return s.String()
  6899. }
  6900. // Validate inspects the fields of the type to determine if they are valid.
  6901. func (s *HostEntry) Validate() error {
  6902. invalidParams := request.ErrInvalidParams{Context: "HostEntry"}
  6903. if s.Hostname == nil {
  6904. invalidParams.Add(request.NewErrParamRequired("Hostname"))
  6905. }
  6906. if s.IpAddress == nil {
  6907. invalidParams.Add(request.NewErrParamRequired("IpAddress"))
  6908. }
  6909. if invalidParams.Len() > 0 {
  6910. return invalidParams
  6911. }
  6912. return nil
  6913. }
  6914. // SetHostname sets the Hostname field's value.
  6915. func (s *HostEntry) SetHostname(v string) *HostEntry {
  6916. s.Hostname = &v
  6917. return s
  6918. }
  6919. // SetIpAddress sets the IpAddress field's value.
  6920. func (s *HostEntry) SetIpAddress(v string) *HostEntry {
  6921. s.IpAddress = &v
  6922. return s
  6923. }
  6924. // Details on a container instance bind mount host volume.
  6925. type HostVolumeProperties struct {
  6926. _ struct{} `type:"structure"`
  6927. // When the host parameter is used, specify a sourcePath to declare the path
  6928. // on the host container instance that is presented to the container. If this
  6929. // parameter is empty, then the Docker daemon has assigned a host path for you.
  6930. // If the host parameter contains a sourcePath file location, then the data
  6931. // volume persists at the specified location on the host container instance
  6932. // until you delete it manually. If the sourcePath value does not exist on the
  6933. // host container instance, the Docker daemon creates it. If the location does
  6934. // exist, the contents of the source path folder are exported.
  6935. //
  6936. // If you are using the Fargate launch type, the sourcePath parameter is not
  6937. // supported.
  6938. SourcePath *string `locationName:"sourcePath" type:"string"`
  6939. }
  6940. // String returns the string representation
  6941. func (s HostVolumeProperties) String() string {
  6942. return awsutil.Prettify(s)
  6943. }
  6944. // GoString returns the string representation
  6945. func (s HostVolumeProperties) GoString() string {
  6946. return s.String()
  6947. }
  6948. // SetSourcePath sets the SourcePath field's value.
  6949. func (s *HostVolumeProperties) SetSourcePath(v string) *HostVolumeProperties {
  6950. s.SourcePath = &v
  6951. return s
  6952. }
  6953. // The Linux capabilities for the container that are added to or dropped from
  6954. // the default configuration provided by Docker. For more information on the
  6955. // default capabilities and the non-default available capabilities, see Runtime
  6956. // privilege and Linux capabilities (https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities)
  6957. // in the Docker run reference. For more detailed information on these Linux
  6958. // capabilities, see the capabilities(7) (http://man7.org/linux/man-pages/man7/capabilities.7.html)
  6959. // Linux manual page.
  6960. type KernelCapabilities struct {
  6961. _ struct{} `type:"structure"`
  6962. // The Linux capabilities for the container that have been added to the default
  6963. // configuration provided by Docker. This parameter maps to CapAdd in the Create
  6964. // a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  6965. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  6966. // and the --cap-add option to docker run (https://docs.docker.com/engine/reference/run/).
  6967. //
  6968. // If you are using tasks that use the Fargate launch type, the add parameter
  6969. // is not supported.
  6970. //
  6971. // Valid values: "ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" |
  6972. // "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK"
  6973. // | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE"
  6974. // | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW"
  6975. // | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT"
  6976. // | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" |
  6977. // "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" |
  6978. // "WAKE_ALARM"
  6979. Add []*string `locationName:"add" type:"list"`
  6980. // The Linux capabilities for the container that have been removed from the
  6981. // default configuration provided by Docker. This parameter maps to CapDrop
  6982. // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  6983. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  6984. // and the --cap-drop option to docker run (https://docs.docker.com/engine/reference/run/).
  6985. //
  6986. // Valid values: "ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" |
  6987. // "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK"
  6988. // | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE"
  6989. // | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW"
  6990. // | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT"
  6991. // | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" |
  6992. // "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" |
  6993. // "WAKE_ALARM"
  6994. Drop []*string `locationName:"drop" type:"list"`
  6995. }
  6996. // String returns the string representation
  6997. func (s KernelCapabilities) String() string {
  6998. return awsutil.Prettify(s)
  6999. }
  7000. // GoString returns the string representation
  7001. func (s KernelCapabilities) GoString() string {
  7002. return s.String()
  7003. }
  7004. // SetAdd sets the Add field's value.
  7005. func (s *KernelCapabilities) SetAdd(v []*string) *KernelCapabilities {
  7006. s.Add = v
  7007. return s
  7008. }
  7009. // SetDrop sets the Drop field's value.
  7010. func (s *KernelCapabilities) SetDrop(v []*string) *KernelCapabilities {
  7011. s.Drop = v
  7012. return s
  7013. }
  7014. // A key-value pair object.
  7015. type KeyValuePair struct {
  7016. _ struct{} `type:"structure"`
  7017. // The name of the key-value pair. For environment variables, this is the name
  7018. // of the environment variable.
  7019. Name *string `locationName:"name" type:"string"`
  7020. // The value of the key-value pair. For environment variables, this is the value
  7021. // of the environment variable.
  7022. Value *string `locationName:"value" type:"string"`
  7023. }
  7024. // String returns the string representation
  7025. func (s KeyValuePair) String() string {
  7026. return awsutil.Prettify(s)
  7027. }
  7028. // GoString returns the string representation
  7029. func (s KeyValuePair) GoString() string {
  7030. return s.String()
  7031. }
  7032. // SetName sets the Name field's value.
  7033. func (s *KeyValuePair) SetName(v string) *KeyValuePair {
  7034. s.Name = &v
  7035. return s
  7036. }
  7037. // SetValue sets the Value field's value.
  7038. func (s *KeyValuePair) SetValue(v string) *KeyValuePair {
  7039. s.Value = &v
  7040. return s
  7041. }
  7042. // Linux-specific options that are applied to the container, such as Linux KernelCapabilities.
  7043. type LinuxParameters struct {
  7044. _ struct{} `type:"structure"`
  7045. // The Linux capabilities for the container that are added to or dropped from
  7046. // the default configuration provided by Docker.
  7047. //
  7048. // If you are using tasks that use the Fargate launch type, capabilities is
  7049. // supported but the add parameter is not supported.
  7050. Capabilities *KernelCapabilities `locationName:"capabilities" type:"structure"`
  7051. // Any host devices to expose to the container. This parameter maps to Devices
  7052. // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  7053. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  7054. // and the --device option to docker run (https://docs.docker.com/engine/reference/run/).
  7055. //
  7056. // If you are using tasks that use the Fargate launch type, the devices parameter
  7057. // is not supported.
  7058. Devices []*Device `locationName:"devices" type:"list"`
  7059. // Run an init process inside the container that forwards signals and reaps
  7060. // processes. This parameter maps to the --init option to docker run (https://docs.docker.com/engine/reference/run/).
  7061. // This parameter requires version 1.25 of the Docker Remote API or greater
  7062. // on your container instance. To check the Docker Remote API version on your
  7063. // container instance, log in to your container instance and run the following
  7064. // command: sudo docker version --format '{{.Server.APIVersion}}'
  7065. InitProcessEnabled *bool `locationName:"initProcessEnabled" type:"boolean"`
  7066. // The value for the size (in MiB) of the /dev/shm volume. This parameter maps
  7067. // to the --shm-size option to docker run (https://docs.docker.com/engine/reference/run/).
  7068. //
  7069. // If you are using tasks that use the Fargate launch type, the sharedMemorySize
  7070. // parameter is not supported.
  7071. SharedMemorySize *int64 `locationName:"sharedMemorySize" type:"integer"`
  7072. // The container path, mount options, and size (in MiB) of the tmpfs mount.
  7073. // This parameter maps to the --tmpfs option to docker run (https://docs.docker.com/engine/reference/run/).
  7074. //
  7075. // If you are using tasks that use the Fargate launch type, the tmpfs parameter
  7076. // is not supported.
  7077. Tmpfs []*Tmpfs `locationName:"tmpfs" type:"list"`
  7078. }
  7079. // String returns the string representation
  7080. func (s LinuxParameters) String() string {
  7081. return awsutil.Prettify(s)
  7082. }
  7083. // GoString returns the string representation
  7084. func (s LinuxParameters) GoString() string {
  7085. return s.String()
  7086. }
  7087. // Validate inspects the fields of the type to determine if they are valid.
  7088. func (s *LinuxParameters) Validate() error {
  7089. invalidParams := request.ErrInvalidParams{Context: "LinuxParameters"}
  7090. if s.Devices != nil {
  7091. for i, v := range s.Devices {
  7092. if v == nil {
  7093. continue
  7094. }
  7095. if err := v.Validate(); err != nil {
  7096. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Devices", i), err.(request.ErrInvalidParams))
  7097. }
  7098. }
  7099. }
  7100. if s.Tmpfs != nil {
  7101. for i, v := range s.Tmpfs {
  7102. if v == nil {
  7103. continue
  7104. }
  7105. if err := v.Validate(); err != nil {
  7106. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tmpfs", i), err.(request.ErrInvalidParams))
  7107. }
  7108. }
  7109. }
  7110. if invalidParams.Len() > 0 {
  7111. return invalidParams
  7112. }
  7113. return nil
  7114. }
  7115. // SetCapabilities sets the Capabilities field's value.
  7116. func (s *LinuxParameters) SetCapabilities(v *KernelCapabilities) *LinuxParameters {
  7117. s.Capabilities = v
  7118. return s
  7119. }
  7120. // SetDevices sets the Devices field's value.
  7121. func (s *LinuxParameters) SetDevices(v []*Device) *LinuxParameters {
  7122. s.Devices = v
  7123. return s
  7124. }
  7125. // SetInitProcessEnabled sets the InitProcessEnabled field's value.
  7126. func (s *LinuxParameters) SetInitProcessEnabled(v bool) *LinuxParameters {
  7127. s.InitProcessEnabled = &v
  7128. return s
  7129. }
  7130. // SetSharedMemorySize sets the SharedMemorySize field's value.
  7131. func (s *LinuxParameters) SetSharedMemorySize(v int64) *LinuxParameters {
  7132. s.SharedMemorySize = &v
  7133. return s
  7134. }
  7135. // SetTmpfs sets the Tmpfs field's value.
  7136. func (s *LinuxParameters) SetTmpfs(v []*Tmpfs) *LinuxParameters {
  7137. s.Tmpfs = v
  7138. return s
  7139. }
  7140. type ListAccountSettingsInput struct {
  7141. _ struct{} `type:"structure"`
  7142. // Specifies whether to return the effective settings. If true, the account
  7143. // settings for the root user or the default setting for the principalArn. If
  7144. // false, the account settings for the principalArn are returned if they are
  7145. // set. Otherwise, no account settings are returned.
  7146. EffectiveSettings *bool `locationName:"effectiveSettings" type:"boolean"`
  7147. // The maximum number of account setting results returned by ListAccountSettings
  7148. // in paginated output. When this parameter is used, ListAccountSettings only
  7149. // returns maxResults results in a single page along with a nextToken response
  7150. // element. The remaining results of the initial request can be seen by sending
  7151. // another ListAccountSettings request with the returned nextToken value. This
  7152. // value can be between 1 and 10. If this parameter is not used, then ListAccountSettings
  7153. // returns up to 10 results and a nextToken value if applicable.
  7154. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  7155. // The resource name you want to list the account settings for.
  7156. Name *string `locationName:"name" type:"string" enum:"SettingName"`
  7157. // The nextToken value returned from a previous paginated ListAccountSettings
  7158. // request where maxResults was used and the results exceeded the value of that
  7159. // parameter. Pagination continues from the end of the previous results that
  7160. // returned the nextToken value.
  7161. //
  7162. // This token should be treated as an opaque identifier that is only used to
  7163. // retrieve the next items in a list and not for other programmatic purposes.
  7164. NextToken *string `locationName:"nextToken" type:"string"`
  7165. // The ARN of the principal, which can be an IAM user, IAM role, or the root
  7166. // user. If this field is omitted, the account settings are listed only for
  7167. // the authenticated user.
  7168. PrincipalArn *string `locationName:"principalArn" type:"string"`
  7169. // The value of the account settings with which to filter results. You must
  7170. // also specify an account setting name to use this parameter.
  7171. Value *string `locationName:"value" type:"string"`
  7172. }
  7173. // String returns the string representation
  7174. func (s ListAccountSettingsInput) String() string {
  7175. return awsutil.Prettify(s)
  7176. }
  7177. // GoString returns the string representation
  7178. func (s ListAccountSettingsInput) GoString() string {
  7179. return s.String()
  7180. }
  7181. // SetEffectiveSettings sets the EffectiveSettings field's value.
  7182. func (s *ListAccountSettingsInput) SetEffectiveSettings(v bool) *ListAccountSettingsInput {
  7183. s.EffectiveSettings = &v
  7184. return s
  7185. }
  7186. // SetMaxResults sets the MaxResults field's value.
  7187. func (s *ListAccountSettingsInput) SetMaxResults(v int64) *ListAccountSettingsInput {
  7188. s.MaxResults = &v
  7189. return s
  7190. }
  7191. // SetName sets the Name field's value.
  7192. func (s *ListAccountSettingsInput) SetName(v string) *ListAccountSettingsInput {
  7193. s.Name = &v
  7194. return s
  7195. }
  7196. // SetNextToken sets the NextToken field's value.
  7197. func (s *ListAccountSettingsInput) SetNextToken(v string) *ListAccountSettingsInput {
  7198. s.NextToken = &v
  7199. return s
  7200. }
  7201. // SetPrincipalArn sets the PrincipalArn field's value.
  7202. func (s *ListAccountSettingsInput) SetPrincipalArn(v string) *ListAccountSettingsInput {
  7203. s.PrincipalArn = &v
  7204. return s
  7205. }
  7206. // SetValue sets the Value field's value.
  7207. func (s *ListAccountSettingsInput) SetValue(v string) *ListAccountSettingsInput {
  7208. s.Value = &v
  7209. return s
  7210. }
  7211. type ListAccountSettingsOutput struct {
  7212. _ struct{} `type:"structure"`
  7213. // The nextToken value to include in a future ListAccountSettings request. When
  7214. // the results of a ListAccountSettings request exceed maxResults, this value
  7215. // can be used to retrieve the next page of results. This value is null when
  7216. // there are no more results to return.
  7217. NextToken *string `locationName:"nextToken" type:"string"`
  7218. // The account settings for the resource.
  7219. Settings []*Setting `locationName:"settings" type:"list"`
  7220. }
  7221. // String returns the string representation
  7222. func (s ListAccountSettingsOutput) String() string {
  7223. return awsutil.Prettify(s)
  7224. }
  7225. // GoString returns the string representation
  7226. func (s ListAccountSettingsOutput) GoString() string {
  7227. return s.String()
  7228. }
  7229. // SetNextToken sets the NextToken field's value.
  7230. func (s *ListAccountSettingsOutput) SetNextToken(v string) *ListAccountSettingsOutput {
  7231. s.NextToken = &v
  7232. return s
  7233. }
  7234. // SetSettings sets the Settings field's value.
  7235. func (s *ListAccountSettingsOutput) SetSettings(v []*Setting) *ListAccountSettingsOutput {
  7236. s.Settings = v
  7237. return s
  7238. }
  7239. type ListAttributesInput struct {
  7240. _ struct{} `type:"structure"`
  7241. // The name of the attribute with which to filter the results.
  7242. AttributeName *string `locationName:"attributeName" type:"string"`
  7243. // The value of the attribute with which to filter results. You must also specify
  7244. // an attribute name to use this parameter.
  7245. AttributeValue *string `locationName:"attributeValue" type:"string"`
  7246. // The short name or full Amazon Resource Name (ARN) of the cluster to list
  7247. // attributes. If you do not specify a cluster, the default cluster is assumed.
  7248. Cluster *string `locationName:"cluster" type:"string"`
  7249. // The maximum number of cluster results returned by ListAttributes in paginated
  7250. // output. When this parameter is used, ListAttributes only returns maxResults
  7251. // results in a single page along with a nextToken response element. The remaining
  7252. // results of the initial request can be seen by sending another ListAttributes
  7253. // request with the returned nextToken value. This value can be between 1 and
  7254. // 100. If this parameter is not used, then ListAttributes returns up to 100
  7255. // results and a nextToken value if applicable.
  7256. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  7257. // The nextToken value returned from a previous paginated ListAttributes request
  7258. // where maxResults was used and the results exceeded the value of that parameter.
  7259. // Pagination continues from the end of the previous results that returned the
  7260. // nextToken value.
  7261. //
  7262. // This token should be treated as an opaque identifier that is only used to
  7263. // retrieve the next items in a list and not for other programmatic purposes.
  7264. NextToken *string `locationName:"nextToken" type:"string"`
  7265. // The type of the target with which to list attributes.
  7266. //
  7267. // TargetType is a required field
  7268. TargetType *string `locationName:"targetType" type:"string" required:"true" enum:"TargetType"`
  7269. }
  7270. // String returns the string representation
  7271. func (s ListAttributesInput) String() string {
  7272. return awsutil.Prettify(s)
  7273. }
  7274. // GoString returns the string representation
  7275. func (s ListAttributesInput) GoString() string {
  7276. return s.String()
  7277. }
  7278. // Validate inspects the fields of the type to determine if they are valid.
  7279. func (s *ListAttributesInput) Validate() error {
  7280. invalidParams := request.ErrInvalidParams{Context: "ListAttributesInput"}
  7281. if s.TargetType == nil {
  7282. invalidParams.Add(request.NewErrParamRequired("TargetType"))
  7283. }
  7284. if invalidParams.Len() > 0 {
  7285. return invalidParams
  7286. }
  7287. return nil
  7288. }
  7289. // SetAttributeName sets the AttributeName field's value.
  7290. func (s *ListAttributesInput) SetAttributeName(v string) *ListAttributesInput {
  7291. s.AttributeName = &v
  7292. return s
  7293. }
  7294. // SetAttributeValue sets the AttributeValue field's value.
  7295. func (s *ListAttributesInput) SetAttributeValue(v string) *ListAttributesInput {
  7296. s.AttributeValue = &v
  7297. return s
  7298. }
  7299. // SetCluster sets the Cluster field's value.
  7300. func (s *ListAttributesInput) SetCluster(v string) *ListAttributesInput {
  7301. s.Cluster = &v
  7302. return s
  7303. }
  7304. // SetMaxResults sets the MaxResults field's value.
  7305. func (s *ListAttributesInput) SetMaxResults(v int64) *ListAttributesInput {
  7306. s.MaxResults = &v
  7307. return s
  7308. }
  7309. // SetNextToken sets the NextToken field's value.
  7310. func (s *ListAttributesInput) SetNextToken(v string) *ListAttributesInput {
  7311. s.NextToken = &v
  7312. return s
  7313. }
  7314. // SetTargetType sets the TargetType field's value.
  7315. func (s *ListAttributesInput) SetTargetType(v string) *ListAttributesInput {
  7316. s.TargetType = &v
  7317. return s
  7318. }
  7319. type ListAttributesOutput struct {
  7320. _ struct{} `type:"structure"`
  7321. // A list of attribute objects that meet the criteria of the request.
  7322. Attributes []*Attribute `locationName:"attributes" type:"list"`
  7323. // The nextToken value to include in a future ListAttributes request. When the
  7324. // results of a ListAttributes request exceed maxResults, this value can be
  7325. // used to retrieve the next page of results. This value is null when there
  7326. // are no more results to return.
  7327. NextToken *string `locationName:"nextToken" type:"string"`
  7328. }
  7329. // String returns the string representation
  7330. func (s ListAttributesOutput) String() string {
  7331. return awsutil.Prettify(s)
  7332. }
  7333. // GoString returns the string representation
  7334. func (s ListAttributesOutput) GoString() string {
  7335. return s.String()
  7336. }
  7337. // SetAttributes sets the Attributes field's value.
  7338. func (s *ListAttributesOutput) SetAttributes(v []*Attribute) *ListAttributesOutput {
  7339. s.Attributes = v
  7340. return s
  7341. }
  7342. // SetNextToken sets the NextToken field's value.
  7343. func (s *ListAttributesOutput) SetNextToken(v string) *ListAttributesOutput {
  7344. s.NextToken = &v
  7345. return s
  7346. }
  7347. type ListClustersInput struct {
  7348. _ struct{} `type:"structure"`
  7349. // The maximum number of cluster results returned by ListClusters in paginated
  7350. // output. When this parameter is used, ListClusters only returns maxResults
  7351. // results in a single page along with a nextToken response element. The remaining
  7352. // results of the initial request can be seen by sending another ListClusters
  7353. // request with the returned nextToken value. This value can be between 1 and
  7354. // 100. If this parameter is not used, then ListClusters returns up to 100 results
  7355. // and a nextToken value if applicable.
  7356. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  7357. // The nextToken value returned from a previous paginated ListClusters request
  7358. // where maxResults was used and the results exceeded the value of that parameter.
  7359. // Pagination continues from the end of the previous results that returned the
  7360. // nextToken value.
  7361. //
  7362. // This token should be treated as an opaque identifier that is only used to
  7363. // retrieve the next items in a list and not for other programmatic purposes.
  7364. NextToken *string `locationName:"nextToken" type:"string"`
  7365. }
  7366. // String returns the string representation
  7367. func (s ListClustersInput) String() string {
  7368. return awsutil.Prettify(s)
  7369. }
  7370. // GoString returns the string representation
  7371. func (s ListClustersInput) GoString() string {
  7372. return s.String()
  7373. }
  7374. // SetMaxResults sets the MaxResults field's value.
  7375. func (s *ListClustersInput) SetMaxResults(v int64) *ListClustersInput {
  7376. s.MaxResults = &v
  7377. return s
  7378. }
  7379. // SetNextToken sets the NextToken field's value.
  7380. func (s *ListClustersInput) SetNextToken(v string) *ListClustersInput {
  7381. s.NextToken = &v
  7382. return s
  7383. }
  7384. type ListClustersOutput struct {
  7385. _ struct{} `type:"structure"`
  7386. // The list of full Amazon Resource Name (ARN) entries for each cluster associated
  7387. // with your account.
  7388. ClusterArns []*string `locationName:"clusterArns" type:"list"`
  7389. // The nextToken value to include in a future ListClusters request. When the
  7390. // results of a ListClusters request exceed maxResults, this value can be used
  7391. // to retrieve the next page of results. This value is null when there are no
  7392. // more results to return.
  7393. NextToken *string `locationName:"nextToken" type:"string"`
  7394. }
  7395. // String returns the string representation
  7396. func (s ListClustersOutput) String() string {
  7397. return awsutil.Prettify(s)
  7398. }
  7399. // GoString returns the string representation
  7400. func (s ListClustersOutput) GoString() string {
  7401. return s.String()
  7402. }
  7403. // SetClusterArns sets the ClusterArns field's value.
  7404. func (s *ListClustersOutput) SetClusterArns(v []*string) *ListClustersOutput {
  7405. s.ClusterArns = v
  7406. return s
  7407. }
  7408. // SetNextToken sets the NextToken field's value.
  7409. func (s *ListClustersOutput) SetNextToken(v string) *ListClustersOutput {
  7410. s.NextToken = &v
  7411. return s
  7412. }
  7413. type ListContainerInstancesInput struct {
  7414. _ struct{} `type:"structure"`
  7415. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  7416. // the container instances to list. If you do not specify a cluster, the default
  7417. // cluster is assumed.
  7418. Cluster *string `locationName:"cluster" type:"string"`
  7419. // You can filter the results of a ListContainerInstances operation with cluster
  7420. // query language statements. For more information, see Cluster Query Language
  7421. // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html)
  7422. // in the Amazon Elastic Container Service Developer Guide.
  7423. Filter *string `locationName:"filter" type:"string"`
  7424. // The maximum number of container instance results returned by ListContainerInstances
  7425. // in paginated output. When this parameter is used, ListContainerInstances
  7426. // only returns maxResults results in a single page along with a nextToken response
  7427. // element. The remaining results of the initial request can be seen by sending
  7428. // another ListContainerInstances request with the returned nextToken value.
  7429. // This value can be between 1 and 100. If this parameter is not used, then
  7430. // ListContainerInstances returns up to 100 results and a nextToken value if
  7431. // applicable.
  7432. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  7433. // The nextToken value returned from a previous paginated ListContainerInstances
  7434. // request where maxResults was used and the results exceeded the value of that
  7435. // parameter. Pagination continues from the end of the previous results that
  7436. // returned the nextToken value.
  7437. //
  7438. // This token should be treated as an opaque identifier that is only used to
  7439. // retrieve the next items in a list and not for other programmatic purposes.
  7440. NextToken *string `locationName:"nextToken" type:"string"`
  7441. // Filters the container instances by status. For example, if you specify the
  7442. // DRAINING status, the results include only container instances that have been
  7443. // set to DRAINING using UpdateContainerInstancesState. If you do not specify
  7444. // this parameter, the default is to include container instances set to ACTIVE
  7445. // and DRAINING.
  7446. Status *string `locationName:"status" type:"string" enum:"ContainerInstanceStatus"`
  7447. }
  7448. // String returns the string representation
  7449. func (s ListContainerInstancesInput) String() string {
  7450. return awsutil.Prettify(s)
  7451. }
  7452. // GoString returns the string representation
  7453. func (s ListContainerInstancesInput) GoString() string {
  7454. return s.String()
  7455. }
  7456. // SetCluster sets the Cluster field's value.
  7457. func (s *ListContainerInstancesInput) SetCluster(v string) *ListContainerInstancesInput {
  7458. s.Cluster = &v
  7459. return s
  7460. }
  7461. // SetFilter sets the Filter field's value.
  7462. func (s *ListContainerInstancesInput) SetFilter(v string) *ListContainerInstancesInput {
  7463. s.Filter = &v
  7464. return s
  7465. }
  7466. // SetMaxResults sets the MaxResults field's value.
  7467. func (s *ListContainerInstancesInput) SetMaxResults(v int64) *ListContainerInstancesInput {
  7468. s.MaxResults = &v
  7469. return s
  7470. }
  7471. // SetNextToken sets the NextToken field's value.
  7472. func (s *ListContainerInstancesInput) SetNextToken(v string) *ListContainerInstancesInput {
  7473. s.NextToken = &v
  7474. return s
  7475. }
  7476. // SetStatus sets the Status field's value.
  7477. func (s *ListContainerInstancesInput) SetStatus(v string) *ListContainerInstancesInput {
  7478. s.Status = &v
  7479. return s
  7480. }
  7481. type ListContainerInstancesOutput struct {
  7482. _ struct{} `type:"structure"`
  7483. // The list of container instances with full ARN entries for each container
  7484. // instance associated with the specified cluster.
  7485. ContainerInstanceArns []*string `locationName:"containerInstanceArns" type:"list"`
  7486. // The nextToken value to include in a future ListContainerInstances request.
  7487. // When the results of a ListContainerInstances request exceed maxResults, this
  7488. // value can be used to retrieve the next page of results. This value is null
  7489. // when there are no more results to return.
  7490. NextToken *string `locationName:"nextToken" type:"string"`
  7491. }
  7492. // String returns the string representation
  7493. func (s ListContainerInstancesOutput) String() string {
  7494. return awsutil.Prettify(s)
  7495. }
  7496. // GoString returns the string representation
  7497. func (s ListContainerInstancesOutput) GoString() string {
  7498. return s.String()
  7499. }
  7500. // SetContainerInstanceArns sets the ContainerInstanceArns field's value.
  7501. func (s *ListContainerInstancesOutput) SetContainerInstanceArns(v []*string) *ListContainerInstancesOutput {
  7502. s.ContainerInstanceArns = v
  7503. return s
  7504. }
  7505. // SetNextToken sets the NextToken field's value.
  7506. func (s *ListContainerInstancesOutput) SetNextToken(v string) *ListContainerInstancesOutput {
  7507. s.NextToken = &v
  7508. return s
  7509. }
  7510. type ListServicesInput struct {
  7511. _ struct{} `type:"structure"`
  7512. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  7513. // the services to list. If you do not specify a cluster, the default cluster
  7514. // is assumed.
  7515. Cluster *string `locationName:"cluster" type:"string"`
  7516. // The launch type for the services to list.
  7517. LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"`
  7518. // The maximum number of service results returned by ListServices in paginated
  7519. // output. When this parameter is used, ListServices only returns maxResults
  7520. // results in a single page along with a nextToken response element. The remaining
  7521. // results of the initial request can be seen by sending another ListServices
  7522. // request with the returned nextToken value. This value can be between 1 and
  7523. // 100. If this parameter is not used, then ListServices returns up to 10 results
  7524. // and a nextToken value if applicable.
  7525. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  7526. // The nextToken value returned from a previous paginated ListServices request
  7527. // where maxResults was used and the results exceeded the value of that parameter.
  7528. // Pagination continues from the end of the previous results that returned the
  7529. // nextToken value.
  7530. //
  7531. // This token should be treated as an opaque identifier that is only used to
  7532. // retrieve the next items in a list and not for other programmatic purposes.
  7533. NextToken *string `locationName:"nextToken" type:"string"`
  7534. // The scheduling strategy for services to list.
  7535. SchedulingStrategy *string `locationName:"schedulingStrategy" type:"string" enum:"SchedulingStrategy"`
  7536. }
  7537. // String returns the string representation
  7538. func (s ListServicesInput) String() string {
  7539. return awsutil.Prettify(s)
  7540. }
  7541. // GoString returns the string representation
  7542. func (s ListServicesInput) GoString() string {
  7543. return s.String()
  7544. }
  7545. // SetCluster sets the Cluster field's value.
  7546. func (s *ListServicesInput) SetCluster(v string) *ListServicesInput {
  7547. s.Cluster = &v
  7548. return s
  7549. }
  7550. // SetLaunchType sets the LaunchType field's value.
  7551. func (s *ListServicesInput) SetLaunchType(v string) *ListServicesInput {
  7552. s.LaunchType = &v
  7553. return s
  7554. }
  7555. // SetMaxResults sets the MaxResults field's value.
  7556. func (s *ListServicesInput) SetMaxResults(v int64) *ListServicesInput {
  7557. s.MaxResults = &v
  7558. return s
  7559. }
  7560. // SetNextToken sets the NextToken field's value.
  7561. func (s *ListServicesInput) SetNextToken(v string) *ListServicesInput {
  7562. s.NextToken = &v
  7563. return s
  7564. }
  7565. // SetSchedulingStrategy sets the SchedulingStrategy field's value.
  7566. func (s *ListServicesInput) SetSchedulingStrategy(v string) *ListServicesInput {
  7567. s.SchedulingStrategy = &v
  7568. return s
  7569. }
  7570. type ListServicesOutput struct {
  7571. _ struct{} `type:"structure"`
  7572. // The nextToken value to include in a future ListServices request. When the
  7573. // results of a ListServices request exceed maxResults, this value can be used
  7574. // to retrieve the next page of results. This value is null when there are no
  7575. // more results to return.
  7576. NextToken *string `locationName:"nextToken" type:"string"`
  7577. // The list of full ARN entries for each service associated with the specified
  7578. // cluster.
  7579. ServiceArns []*string `locationName:"serviceArns" type:"list"`
  7580. }
  7581. // String returns the string representation
  7582. func (s ListServicesOutput) String() string {
  7583. return awsutil.Prettify(s)
  7584. }
  7585. // GoString returns the string representation
  7586. func (s ListServicesOutput) GoString() string {
  7587. return s.String()
  7588. }
  7589. // SetNextToken sets the NextToken field's value.
  7590. func (s *ListServicesOutput) SetNextToken(v string) *ListServicesOutput {
  7591. s.NextToken = &v
  7592. return s
  7593. }
  7594. // SetServiceArns sets the ServiceArns field's value.
  7595. func (s *ListServicesOutput) SetServiceArns(v []*string) *ListServicesOutput {
  7596. s.ServiceArns = v
  7597. return s
  7598. }
  7599. type ListTagsForResourceInput struct {
  7600. _ struct{} `type:"structure"`
  7601. // The Amazon Resource Name (ARN) that identifies the resource for which to
  7602. // list the tags. Currently, the supported resources are Amazon ECS tasks, services,
  7603. // task definitions, clusters, and container instances.
  7604. //
  7605. // ResourceArn is a required field
  7606. ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"`
  7607. }
  7608. // String returns the string representation
  7609. func (s ListTagsForResourceInput) String() string {
  7610. return awsutil.Prettify(s)
  7611. }
  7612. // GoString returns the string representation
  7613. func (s ListTagsForResourceInput) GoString() string {
  7614. return s.String()
  7615. }
  7616. // Validate inspects the fields of the type to determine if they are valid.
  7617. func (s *ListTagsForResourceInput) Validate() error {
  7618. invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
  7619. if s.ResourceArn == nil {
  7620. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  7621. }
  7622. if invalidParams.Len() > 0 {
  7623. return invalidParams
  7624. }
  7625. return nil
  7626. }
  7627. // SetResourceArn sets the ResourceArn field's value.
  7628. func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput {
  7629. s.ResourceArn = &v
  7630. return s
  7631. }
  7632. type ListTagsForResourceOutput struct {
  7633. _ struct{} `type:"structure"`
  7634. // The tags for the resource.
  7635. Tags []*Tag `locationName:"tags" type:"list"`
  7636. }
  7637. // String returns the string representation
  7638. func (s ListTagsForResourceOutput) String() string {
  7639. return awsutil.Prettify(s)
  7640. }
  7641. // GoString returns the string representation
  7642. func (s ListTagsForResourceOutput) GoString() string {
  7643. return s.String()
  7644. }
  7645. // SetTags sets the Tags field's value.
  7646. func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput {
  7647. s.Tags = v
  7648. return s
  7649. }
  7650. type ListTaskDefinitionFamiliesInput struct {
  7651. _ struct{} `type:"structure"`
  7652. // The familyPrefix is a string that is used to filter the results of ListTaskDefinitionFamilies.
  7653. // If you specify a familyPrefix, only task definition family names that begin
  7654. // with the familyPrefix string are returned.
  7655. FamilyPrefix *string `locationName:"familyPrefix" type:"string"`
  7656. // The maximum number of task definition family results returned by ListTaskDefinitionFamilies
  7657. // in paginated output. When this parameter is used, ListTaskDefinitions only
  7658. // returns maxResults results in a single page along with a nextToken response
  7659. // element. The remaining results of the initial request can be seen by sending
  7660. // another ListTaskDefinitionFamilies request with the returned nextToken value.
  7661. // This value can be between 1 and 100. If this parameter is not used, then
  7662. // ListTaskDefinitionFamilies returns up to 100 results and a nextToken value
  7663. // if applicable.
  7664. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  7665. // The nextToken value returned from a previous paginated ListTaskDefinitionFamilies
  7666. // request where maxResults was used and the results exceeded the value of that
  7667. // parameter. Pagination continues from the end of the previous results that
  7668. // returned the nextToken value.
  7669. //
  7670. // This token should be treated as an opaque identifier that is only used to
  7671. // retrieve the next items in a list and not for other programmatic purposes.
  7672. NextToken *string `locationName:"nextToken" type:"string"`
  7673. // The task definition family status with which to filter the ListTaskDefinitionFamilies
  7674. // results. By default, both ACTIVE and INACTIVE task definition families are
  7675. // listed. If this parameter is set to ACTIVE, only task definition families
  7676. // that have an ACTIVE task definition revision are returned. If this parameter
  7677. // is set to INACTIVE, only task definition families that do not have any ACTIVE
  7678. // task definition revisions are returned. If you paginate the resulting output,
  7679. // be sure to keep the status value constant in each subsequent request.
  7680. Status *string `locationName:"status" type:"string" enum:"TaskDefinitionFamilyStatus"`
  7681. }
  7682. // String returns the string representation
  7683. func (s ListTaskDefinitionFamiliesInput) String() string {
  7684. return awsutil.Prettify(s)
  7685. }
  7686. // GoString returns the string representation
  7687. func (s ListTaskDefinitionFamiliesInput) GoString() string {
  7688. return s.String()
  7689. }
  7690. // SetFamilyPrefix sets the FamilyPrefix field's value.
  7691. func (s *ListTaskDefinitionFamiliesInput) SetFamilyPrefix(v string) *ListTaskDefinitionFamiliesInput {
  7692. s.FamilyPrefix = &v
  7693. return s
  7694. }
  7695. // SetMaxResults sets the MaxResults field's value.
  7696. func (s *ListTaskDefinitionFamiliesInput) SetMaxResults(v int64) *ListTaskDefinitionFamiliesInput {
  7697. s.MaxResults = &v
  7698. return s
  7699. }
  7700. // SetNextToken sets the NextToken field's value.
  7701. func (s *ListTaskDefinitionFamiliesInput) SetNextToken(v string) *ListTaskDefinitionFamiliesInput {
  7702. s.NextToken = &v
  7703. return s
  7704. }
  7705. // SetStatus sets the Status field's value.
  7706. func (s *ListTaskDefinitionFamiliesInput) SetStatus(v string) *ListTaskDefinitionFamiliesInput {
  7707. s.Status = &v
  7708. return s
  7709. }
  7710. type ListTaskDefinitionFamiliesOutput struct {
  7711. _ struct{} `type:"structure"`
  7712. // The list of task definition family names that match the ListTaskDefinitionFamilies
  7713. // request.
  7714. Families []*string `locationName:"families" type:"list"`
  7715. // The nextToken value to include in a future ListTaskDefinitionFamilies request.
  7716. // When the results of a ListTaskDefinitionFamilies request exceed maxResults,
  7717. // this value can be used to retrieve the next page of results. This value is
  7718. // null when there are no more results to return.
  7719. NextToken *string `locationName:"nextToken" type:"string"`
  7720. }
  7721. // String returns the string representation
  7722. func (s ListTaskDefinitionFamiliesOutput) String() string {
  7723. return awsutil.Prettify(s)
  7724. }
  7725. // GoString returns the string representation
  7726. func (s ListTaskDefinitionFamiliesOutput) GoString() string {
  7727. return s.String()
  7728. }
  7729. // SetFamilies sets the Families field's value.
  7730. func (s *ListTaskDefinitionFamiliesOutput) SetFamilies(v []*string) *ListTaskDefinitionFamiliesOutput {
  7731. s.Families = v
  7732. return s
  7733. }
  7734. // SetNextToken sets the NextToken field's value.
  7735. func (s *ListTaskDefinitionFamiliesOutput) SetNextToken(v string) *ListTaskDefinitionFamiliesOutput {
  7736. s.NextToken = &v
  7737. return s
  7738. }
  7739. type ListTaskDefinitionsInput struct {
  7740. _ struct{} `type:"structure"`
  7741. // The full family name with which to filter the ListTaskDefinitions results.
  7742. // Specifying a familyPrefix limits the listed task definitions to task definition
  7743. // revisions that belong to that family.
  7744. FamilyPrefix *string `locationName:"familyPrefix" type:"string"`
  7745. // The maximum number of task definition results returned by ListTaskDefinitions
  7746. // in paginated output. When this parameter is used, ListTaskDefinitions only
  7747. // returns maxResults results in a single page along with a nextToken response
  7748. // element. The remaining results of the initial request can be seen by sending
  7749. // another ListTaskDefinitions request with the returned nextToken value. This
  7750. // value can be between 1 and 100. If this parameter is not used, then ListTaskDefinitions
  7751. // returns up to 100 results and a nextToken value if applicable.
  7752. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  7753. // The nextToken value returned from a previous paginated ListTaskDefinitions
  7754. // request where maxResults was used and the results exceeded the value of that
  7755. // parameter. Pagination continues from the end of the previous results that
  7756. // returned the nextToken value.
  7757. //
  7758. // This token should be treated as an opaque identifier that is only used to
  7759. // retrieve the next items in a list and not for other programmatic purposes.
  7760. NextToken *string `locationName:"nextToken" type:"string"`
  7761. // The order in which to sort the results. Valid values are ASC and DESC. By
  7762. // default (ASC), task definitions are listed lexicographically by family name
  7763. // and in ascending numerical order by revision so that the newest task definitions
  7764. // in a family are listed last. Setting this parameter to DESC reverses the
  7765. // sort order on family name and revision so that the newest task definitions
  7766. // in a family are listed first.
  7767. Sort *string `locationName:"sort" type:"string" enum:"SortOrder"`
  7768. // The task definition status with which to filter the ListTaskDefinitions results.
  7769. // By default, only ACTIVE task definitions are listed. By setting this parameter
  7770. // to INACTIVE, you can view task definitions that are INACTIVE as long as an
  7771. // active task or service still references them. If you paginate the resulting
  7772. // output, be sure to keep the status value constant in each subsequent request.
  7773. Status *string `locationName:"status" type:"string" enum:"TaskDefinitionStatus"`
  7774. }
  7775. // String returns the string representation
  7776. func (s ListTaskDefinitionsInput) String() string {
  7777. return awsutil.Prettify(s)
  7778. }
  7779. // GoString returns the string representation
  7780. func (s ListTaskDefinitionsInput) GoString() string {
  7781. return s.String()
  7782. }
  7783. // SetFamilyPrefix sets the FamilyPrefix field's value.
  7784. func (s *ListTaskDefinitionsInput) SetFamilyPrefix(v string) *ListTaskDefinitionsInput {
  7785. s.FamilyPrefix = &v
  7786. return s
  7787. }
  7788. // SetMaxResults sets the MaxResults field's value.
  7789. func (s *ListTaskDefinitionsInput) SetMaxResults(v int64) *ListTaskDefinitionsInput {
  7790. s.MaxResults = &v
  7791. return s
  7792. }
  7793. // SetNextToken sets the NextToken field's value.
  7794. func (s *ListTaskDefinitionsInput) SetNextToken(v string) *ListTaskDefinitionsInput {
  7795. s.NextToken = &v
  7796. return s
  7797. }
  7798. // SetSort sets the Sort field's value.
  7799. func (s *ListTaskDefinitionsInput) SetSort(v string) *ListTaskDefinitionsInput {
  7800. s.Sort = &v
  7801. return s
  7802. }
  7803. // SetStatus sets the Status field's value.
  7804. func (s *ListTaskDefinitionsInput) SetStatus(v string) *ListTaskDefinitionsInput {
  7805. s.Status = &v
  7806. return s
  7807. }
  7808. type ListTaskDefinitionsOutput struct {
  7809. _ struct{} `type:"structure"`
  7810. // The nextToken value to include in a future ListTaskDefinitions request. When
  7811. // the results of a ListTaskDefinitions request exceed maxResults, this value
  7812. // can be used to retrieve the next page of results. This value is null when
  7813. // there are no more results to return.
  7814. NextToken *string `locationName:"nextToken" type:"string"`
  7815. // The list of task definition Amazon Resource Name (ARN) entries for the ListTaskDefinitions
  7816. // request.
  7817. TaskDefinitionArns []*string `locationName:"taskDefinitionArns" type:"list"`
  7818. }
  7819. // String returns the string representation
  7820. func (s ListTaskDefinitionsOutput) String() string {
  7821. return awsutil.Prettify(s)
  7822. }
  7823. // GoString returns the string representation
  7824. func (s ListTaskDefinitionsOutput) GoString() string {
  7825. return s.String()
  7826. }
  7827. // SetNextToken sets the NextToken field's value.
  7828. func (s *ListTaskDefinitionsOutput) SetNextToken(v string) *ListTaskDefinitionsOutput {
  7829. s.NextToken = &v
  7830. return s
  7831. }
  7832. // SetTaskDefinitionArns sets the TaskDefinitionArns field's value.
  7833. func (s *ListTaskDefinitionsOutput) SetTaskDefinitionArns(v []*string) *ListTaskDefinitionsOutput {
  7834. s.TaskDefinitionArns = v
  7835. return s
  7836. }
  7837. type ListTasksInput struct {
  7838. _ struct{} `type:"structure"`
  7839. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  7840. // the tasks to list. If you do not specify a cluster, the default cluster is
  7841. // assumed.
  7842. Cluster *string `locationName:"cluster" type:"string"`
  7843. // The container instance ID or full ARN of the container instance with which
  7844. // to filter the ListTasks results. Specifying a containerInstance limits the
  7845. // results to tasks that belong to that container instance.
  7846. ContainerInstance *string `locationName:"containerInstance" type:"string"`
  7847. // The task desired status with which to filter the ListTasks results. Specifying
  7848. // a desiredStatus of STOPPED limits the results to tasks that Amazon ECS has
  7849. // set the desired status to STOPPED. This can be useful for debugging tasks
  7850. // that are not starting properly or have died or finished. The default status
  7851. // filter is RUNNING, which shows tasks that Amazon ECS has set the desired
  7852. // status to RUNNING.
  7853. //
  7854. // Although you can filter results based on a desired status of PENDING, this
  7855. // does not return any results. Amazon ECS never sets the desired status of
  7856. // a task to that value (only a task's lastStatus may have a value of PENDING).
  7857. DesiredStatus *string `locationName:"desiredStatus" type:"string" enum:"DesiredStatus"`
  7858. // The name of the family with which to filter the ListTasks results. Specifying
  7859. // a family limits the results to tasks that belong to that family.
  7860. Family *string `locationName:"family" type:"string"`
  7861. // The launch type for services to list.
  7862. LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"`
  7863. // The maximum number of task results returned by ListTasks in paginated output.
  7864. // When this parameter is used, ListTasks only returns maxResults results in
  7865. // a single page along with a nextToken response element. The remaining results
  7866. // of the initial request can be seen by sending another ListTasks request with
  7867. // the returned nextToken value. This value can be between 1 and 100. If this
  7868. // parameter is not used, then ListTasks returns up to 100 results and a nextToken
  7869. // value if applicable.
  7870. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  7871. // The nextToken value returned from a previous paginated ListTasks request
  7872. // where maxResults was used and the results exceeded the value of that parameter.
  7873. // Pagination continues from the end of the previous results that returned the
  7874. // nextToken value.
  7875. //
  7876. // This token should be treated as an opaque identifier that is only used to
  7877. // retrieve the next items in a list and not for other programmatic purposes.
  7878. NextToken *string `locationName:"nextToken" type:"string"`
  7879. // The name of the service with which to filter the ListTasks results. Specifying
  7880. // a serviceName limits the results to tasks that belong to that service.
  7881. ServiceName *string `locationName:"serviceName" type:"string"`
  7882. // The startedBy value with which to filter the task results. Specifying a startedBy
  7883. // value limits the results to tasks that were started with that value.
  7884. StartedBy *string `locationName:"startedBy" type:"string"`
  7885. }
  7886. // String returns the string representation
  7887. func (s ListTasksInput) String() string {
  7888. return awsutil.Prettify(s)
  7889. }
  7890. // GoString returns the string representation
  7891. func (s ListTasksInput) GoString() string {
  7892. return s.String()
  7893. }
  7894. // SetCluster sets the Cluster field's value.
  7895. func (s *ListTasksInput) SetCluster(v string) *ListTasksInput {
  7896. s.Cluster = &v
  7897. return s
  7898. }
  7899. // SetContainerInstance sets the ContainerInstance field's value.
  7900. func (s *ListTasksInput) SetContainerInstance(v string) *ListTasksInput {
  7901. s.ContainerInstance = &v
  7902. return s
  7903. }
  7904. // SetDesiredStatus sets the DesiredStatus field's value.
  7905. func (s *ListTasksInput) SetDesiredStatus(v string) *ListTasksInput {
  7906. s.DesiredStatus = &v
  7907. return s
  7908. }
  7909. // SetFamily sets the Family field's value.
  7910. func (s *ListTasksInput) SetFamily(v string) *ListTasksInput {
  7911. s.Family = &v
  7912. return s
  7913. }
  7914. // SetLaunchType sets the LaunchType field's value.
  7915. func (s *ListTasksInput) SetLaunchType(v string) *ListTasksInput {
  7916. s.LaunchType = &v
  7917. return s
  7918. }
  7919. // SetMaxResults sets the MaxResults field's value.
  7920. func (s *ListTasksInput) SetMaxResults(v int64) *ListTasksInput {
  7921. s.MaxResults = &v
  7922. return s
  7923. }
  7924. // SetNextToken sets the NextToken field's value.
  7925. func (s *ListTasksInput) SetNextToken(v string) *ListTasksInput {
  7926. s.NextToken = &v
  7927. return s
  7928. }
  7929. // SetServiceName sets the ServiceName field's value.
  7930. func (s *ListTasksInput) SetServiceName(v string) *ListTasksInput {
  7931. s.ServiceName = &v
  7932. return s
  7933. }
  7934. // SetStartedBy sets the StartedBy field's value.
  7935. func (s *ListTasksInput) SetStartedBy(v string) *ListTasksInput {
  7936. s.StartedBy = &v
  7937. return s
  7938. }
  7939. type ListTasksOutput struct {
  7940. _ struct{} `type:"structure"`
  7941. // The nextToken value to include in a future ListTasks request. When the results
  7942. // of a ListTasks request exceed maxResults, this value can be used to retrieve
  7943. // the next page of results. This value is null when there are no more results
  7944. // to return.
  7945. NextToken *string `locationName:"nextToken" type:"string"`
  7946. // The list of task ARN entries for the ListTasks request.
  7947. TaskArns []*string `locationName:"taskArns" type:"list"`
  7948. }
  7949. // String returns the string representation
  7950. func (s ListTasksOutput) String() string {
  7951. return awsutil.Prettify(s)
  7952. }
  7953. // GoString returns the string representation
  7954. func (s ListTasksOutput) GoString() string {
  7955. return s.String()
  7956. }
  7957. // SetNextToken sets the NextToken field's value.
  7958. func (s *ListTasksOutput) SetNextToken(v string) *ListTasksOutput {
  7959. s.NextToken = &v
  7960. return s
  7961. }
  7962. // SetTaskArns sets the TaskArns field's value.
  7963. func (s *ListTasksOutput) SetTaskArns(v []*string) *ListTasksOutput {
  7964. s.TaskArns = v
  7965. return s
  7966. }
  7967. // Details on a load balancer that is used with a service.
  7968. //
  7969. // If the service is using the ECS deployment controller, you are limited to
  7970. // one load balancer or target group.
  7971. //
  7972. // If the service is using the CODE_DEPLOY deployment controller, the service
  7973. // is required to use either an Application Load Balancer or Network Load Balancer.
  7974. // When you are creating an AWS CodeDeploy deployment group, you specify two
  7975. // target groups (referred to as a targetGroupPair). Each target group binds
  7976. // to a separate task set in the deployment. The load balancer can also have
  7977. // up to two listeners, a required listener for production traffic and an optional
  7978. // listener that allows you to test new revisions of the service before routing
  7979. // production traffic to it.
  7980. //
  7981. // Services with tasks that use the awsvpc network mode (for example, those
  7982. // with the Fargate launch type) only support Application Load Balancers and
  7983. // Network Load Balancers. Classic Load Balancers are not supported. Also, when
  7984. // you create any target groups for these services, you must choose ip as the
  7985. // target type, not instance. Tasks that use the awsvpc network mode are associated
  7986. // with an elastic network interface, not an Amazon EC2 instance.
  7987. type LoadBalancer struct {
  7988. _ struct{} `type:"structure"`
  7989. // The name of the container (as it appears in a container definition) to associate
  7990. // with the load balancer.
  7991. ContainerName *string `locationName:"containerName" type:"string"`
  7992. // The port on the container to associate with the load balancer. This port
  7993. // must correspond to a containerPort in the service's task definition. Your
  7994. // container instances must allow ingress traffic on the hostPort of the port
  7995. // mapping.
  7996. ContainerPort *int64 `locationName:"containerPort" type:"integer"`
  7997. // The name of a load balancer.
  7998. LoadBalancerName *string `locationName:"loadBalancerName" type:"string"`
  7999. // The full Amazon Resource Name (ARN) of the Elastic Load Balancing target
  8000. // group or groups associated with a service. For services using the ECS deployment
  8001. // controller, you are limited to one target group. For services using the CODE_DEPLOY
  8002. // deployment controller, you are required to define two target groups for the
  8003. // load balancer.
  8004. //
  8005. // If your service's task definition uses the awsvpc network mode (which is
  8006. // required for the Fargate launch type), you must choose ip as the target type,
  8007. // not instance, because tasks that use the awsvpc network mode are associated
  8008. // with an elastic network interface, not an Amazon EC2 instance.
  8009. TargetGroupArn *string `locationName:"targetGroupArn" type:"string"`
  8010. }
  8011. // String returns the string representation
  8012. func (s LoadBalancer) String() string {
  8013. return awsutil.Prettify(s)
  8014. }
  8015. // GoString returns the string representation
  8016. func (s LoadBalancer) GoString() string {
  8017. return s.String()
  8018. }
  8019. // SetContainerName sets the ContainerName field's value.
  8020. func (s *LoadBalancer) SetContainerName(v string) *LoadBalancer {
  8021. s.ContainerName = &v
  8022. return s
  8023. }
  8024. // SetContainerPort sets the ContainerPort field's value.
  8025. func (s *LoadBalancer) SetContainerPort(v int64) *LoadBalancer {
  8026. s.ContainerPort = &v
  8027. return s
  8028. }
  8029. // SetLoadBalancerName sets the LoadBalancerName field's value.
  8030. func (s *LoadBalancer) SetLoadBalancerName(v string) *LoadBalancer {
  8031. s.LoadBalancerName = &v
  8032. return s
  8033. }
  8034. // SetTargetGroupArn sets the TargetGroupArn field's value.
  8035. func (s *LoadBalancer) SetTargetGroupArn(v string) *LoadBalancer {
  8036. s.TargetGroupArn = &v
  8037. return s
  8038. }
  8039. // Log configuration options to send to a custom log driver for the container.
  8040. type LogConfiguration struct {
  8041. _ struct{} `type:"structure"`
  8042. // The log driver to use for the container. The valid values listed for this
  8043. // parameter are log drivers that the Amazon ECS container agent can communicate
  8044. // with by default. If you are using the Fargate launch type, the only supported
  8045. // value is awslogs. For more information about using the awslogs driver, see
  8046. // Using the awslogs Log Driver (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html)
  8047. // in the Amazon Elastic Container Service Developer Guide.
  8048. //
  8049. // If you have a custom driver that is not listed above that you would like
  8050. // to work with the Amazon ECS container agent, you can fork the Amazon ECS
  8051. // container agent project that is available on GitHub (https://github.com/aws/amazon-ecs-agent)
  8052. // and customize it to work with that driver. We encourage you to submit pull
  8053. // requests for changes that you would like to have included. However, Amazon
  8054. // Web Services does not currently support running modified copies of this software.
  8055. //
  8056. // This parameter requires version 1.18 of the Docker Remote API or greater
  8057. // on your container instance. To check the Docker Remote API version on your
  8058. // container instance, log in to your container instance and run the following
  8059. // command: sudo docker version --format '{{.Server.APIVersion}}'
  8060. //
  8061. // LogDriver is a required field
  8062. LogDriver *string `locationName:"logDriver" type:"string" required:"true" enum:"LogDriver"`
  8063. // The configuration options to send to the log driver. This parameter requires
  8064. // version 1.19 of the Docker Remote API or greater on your container instance.
  8065. // To check the Docker Remote API version on your container instance, log in
  8066. // to your container instance and run the following command: sudo docker version
  8067. // --format '{{.Server.APIVersion}}'
  8068. Options map[string]*string `locationName:"options" type:"map"`
  8069. }
  8070. // String returns the string representation
  8071. func (s LogConfiguration) String() string {
  8072. return awsutil.Prettify(s)
  8073. }
  8074. // GoString returns the string representation
  8075. func (s LogConfiguration) GoString() string {
  8076. return s.String()
  8077. }
  8078. // Validate inspects the fields of the type to determine if they are valid.
  8079. func (s *LogConfiguration) Validate() error {
  8080. invalidParams := request.ErrInvalidParams{Context: "LogConfiguration"}
  8081. if s.LogDriver == nil {
  8082. invalidParams.Add(request.NewErrParamRequired("LogDriver"))
  8083. }
  8084. if invalidParams.Len() > 0 {
  8085. return invalidParams
  8086. }
  8087. return nil
  8088. }
  8089. // SetLogDriver sets the LogDriver field's value.
  8090. func (s *LogConfiguration) SetLogDriver(v string) *LogConfiguration {
  8091. s.LogDriver = &v
  8092. return s
  8093. }
  8094. // SetOptions sets the Options field's value.
  8095. func (s *LogConfiguration) SetOptions(v map[string]*string) *LogConfiguration {
  8096. s.Options = v
  8097. return s
  8098. }
  8099. // Details on a volume mount point that is used in a container definition.
  8100. type MountPoint struct {
  8101. _ struct{} `type:"structure"`
  8102. // The path on the container to mount the host volume at.
  8103. ContainerPath *string `locationName:"containerPath" type:"string"`
  8104. // If this value is true, the container has read-only access to the volume.
  8105. // If this value is false, then the container can write to the volume. The default
  8106. // value is false.
  8107. ReadOnly *bool `locationName:"readOnly" type:"boolean"`
  8108. // The name of the volume to mount. Must be a volume name referenced in the
  8109. // name parameter of task definition volume.
  8110. SourceVolume *string `locationName:"sourceVolume" type:"string"`
  8111. }
  8112. // String returns the string representation
  8113. func (s MountPoint) String() string {
  8114. return awsutil.Prettify(s)
  8115. }
  8116. // GoString returns the string representation
  8117. func (s MountPoint) GoString() string {
  8118. return s.String()
  8119. }
  8120. // SetContainerPath sets the ContainerPath field's value.
  8121. func (s *MountPoint) SetContainerPath(v string) *MountPoint {
  8122. s.ContainerPath = &v
  8123. return s
  8124. }
  8125. // SetReadOnly sets the ReadOnly field's value.
  8126. func (s *MountPoint) SetReadOnly(v bool) *MountPoint {
  8127. s.ReadOnly = &v
  8128. return s
  8129. }
  8130. // SetSourceVolume sets the SourceVolume field's value.
  8131. func (s *MountPoint) SetSourceVolume(v string) *MountPoint {
  8132. s.SourceVolume = &v
  8133. return s
  8134. }
  8135. // Details on the network bindings between a container and its host container
  8136. // instance. After a task reaches the RUNNING status, manual and automatic host
  8137. // and container port assignments are visible in the networkBindings section
  8138. // of DescribeTasks API responses.
  8139. type NetworkBinding struct {
  8140. _ struct{} `type:"structure"`
  8141. // The IP address that the container is bound to on the container instance.
  8142. BindIP *string `locationName:"bindIP" type:"string"`
  8143. // The port number on the container that is used with the network binding.
  8144. ContainerPort *int64 `locationName:"containerPort" type:"integer"`
  8145. // The port number on the host that is used with the network binding.
  8146. HostPort *int64 `locationName:"hostPort" type:"integer"`
  8147. // The protocol used for the network binding.
  8148. Protocol *string `locationName:"protocol" type:"string" enum:"TransportProtocol"`
  8149. }
  8150. // String returns the string representation
  8151. func (s NetworkBinding) String() string {
  8152. return awsutil.Prettify(s)
  8153. }
  8154. // GoString returns the string representation
  8155. func (s NetworkBinding) GoString() string {
  8156. return s.String()
  8157. }
  8158. // SetBindIP sets the BindIP field's value.
  8159. func (s *NetworkBinding) SetBindIP(v string) *NetworkBinding {
  8160. s.BindIP = &v
  8161. return s
  8162. }
  8163. // SetContainerPort sets the ContainerPort field's value.
  8164. func (s *NetworkBinding) SetContainerPort(v int64) *NetworkBinding {
  8165. s.ContainerPort = &v
  8166. return s
  8167. }
  8168. // SetHostPort sets the HostPort field's value.
  8169. func (s *NetworkBinding) SetHostPort(v int64) *NetworkBinding {
  8170. s.HostPort = &v
  8171. return s
  8172. }
  8173. // SetProtocol sets the Protocol field's value.
  8174. func (s *NetworkBinding) SetProtocol(v string) *NetworkBinding {
  8175. s.Protocol = &v
  8176. return s
  8177. }
  8178. // An object representing the network configuration for a task or service.
  8179. type NetworkConfiguration struct {
  8180. _ struct{} `type:"structure"`
  8181. // The VPC subnets and security groups associated with a task.
  8182. //
  8183. // All specified subnets and security groups must be from the same VPC.
  8184. AwsvpcConfiguration *AwsVpcConfiguration `locationName:"awsvpcConfiguration" type:"structure"`
  8185. }
  8186. // String returns the string representation
  8187. func (s NetworkConfiguration) String() string {
  8188. return awsutil.Prettify(s)
  8189. }
  8190. // GoString returns the string representation
  8191. func (s NetworkConfiguration) GoString() string {
  8192. return s.String()
  8193. }
  8194. // Validate inspects the fields of the type to determine if they are valid.
  8195. func (s *NetworkConfiguration) Validate() error {
  8196. invalidParams := request.ErrInvalidParams{Context: "NetworkConfiguration"}
  8197. if s.AwsvpcConfiguration != nil {
  8198. if err := s.AwsvpcConfiguration.Validate(); err != nil {
  8199. invalidParams.AddNested("AwsvpcConfiguration", err.(request.ErrInvalidParams))
  8200. }
  8201. }
  8202. if invalidParams.Len() > 0 {
  8203. return invalidParams
  8204. }
  8205. return nil
  8206. }
  8207. // SetAwsvpcConfiguration sets the AwsvpcConfiguration field's value.
  8208. func (s *NetworkConfiguration) SetAwsvpcConfiguration(v *AwsVpcConfiguration) *NetworkConfiguration {
  8209. s.AwsvpcConfiguration = v
  8210. return s
  8211. }
  8212. // An object representing the elastic network interface for tasks that use the
  8213. // awsvpc network mode.
  8214. type NetworkInterface struct {
  8215. _ struct{} `type:"structure"`
  8216. // The attachment ID for the network interface.
  8217. AttachmentId *string `locationName:"attachmentId" type:"string"`
  8218. // The private IPv6 address for the network interface.
  8219. Ipv6Address *string `locationName:"ipv6Address" type:"string"`
  8220. // The private IPv4 address for the network interface.
  8221. PrivateIpv4Address *string `locationName:"privateIpv4Address" type:"string"`
  8222. }
  8223. // String returns the string representation
  8224. func (s NetworkInterface) String() string {
  8225. return awsutil.Prettify(s)
  8226. }
  8227. // GoString returns the string representation
  8228. func (s NetworkInterface) GoString() string {
  8229. return s.String()
  8230. }
  8231. // SetAttachmentId sets the AttachmentId field's value.
  8232. func (s *NetworkInterface) SetAttachmentId(v string) *NetworkInterface {
  8233. s.AttachmentId = &v
  8234. return s
  8235. }
  8236. // SetIpv6Address sets the Ipv6Address field's value.
  8237. func (s *NetworkInterface) SetIpv6Address(v string) *NetworkInterface {
  8238. s.Ipv6Address = &v
  8239. return s
  8240. }
  8241. // SetPrivateIpv4Address sets the PrivateIpv4Address field's value.
  8242. func (s *NetworkInterface) SetPrivateIpv4Address(v string) *NetworkInterface {
  8243. s.PrivateIpv4Address = &v
  8244. return s
  8245. }
  8246. // An object representing a constraint on task placement. For more information,
  8247. // see Task Placement Constraints (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html)
  8248. // in the Amazon Elastic Container Service Developer Guide.
  8249. type PlacementConstraint struct {
  8250. _ struct{} `type:"structure"`
  8251. // A cluster query language expression to apply to the constraint. You cannot
  8252. // specify an expression if the constraint type is distinctInstance. For more
  8253. // information, see Cluster Query Language (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html)
  8254. // in the Amazon Elastic Container Service Developer Guide.
  8255. Expression *string `locationName:"expression" type:"string"`
  8256. // The type of constraint. Use distinctInstance to ensure that each task in
  8257. // a particular group is running on a different container instance. Use memberOf
  8258. // to restrict the selection to a group of valid candidates. The value distinctInstance
  8259. // is not supported in task definitions.
  8260. Type *string `locationName:"type" type:"string" enum:"PlacementConstraintType"`
  8261. }
  8262. // String returns the string representation
  8263. func (s PlacementConstraint) String() string {
  8264. return awsutil.Prettify(s)
  8265. }
  8266. // GoString returns the string representation
  8267. func (s PlacementConstraint) GoString() string {
  8268. return s.String()
  8269. }
  8270. // SetExpression sets the Expression field's value.
  8271. func (s *PlacementConstraint) SetExpression(v string) *PlacementConstraint {
  8272. s.Expression = &v
  8273. return s
  8274. }
  8275. // SetType sets the Type field's value.
  8276. func (s *PlacementConstraint) SetType(v string) *PlacementConstraint {
  8277. s.Type = &v
  8278. return s
  8279. }
  8280. // The task placement strategy for a task or service. For more information,
  8281. // see Task Placement Strategies (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html)
  8282. // in the Amazon Elastic Container Service Developer Guide.
  8283. type PlacementStrategy struct {
  8284. _ struct{} `type:"structure"`
  8285. // The field to apply the placement strategy against. For the spread placement
  8286. // strategy, valid values are instanceId (or host, which has the same effect),
  8287. // or any platform or custom attribute that is applied to a container instance,
  8288. // such as attribute:ecs.availability-zone. For the binpack placement strategy,
  8289. // valid values are cpu and memory. For the random placement strategy, this
  8290. // field is not used.
  8291. Field *string `locationName:"field" type:"string"`
  8292. // The type of placement strategy. The random placement strategy randomly places
  8293. // tasks on available candidates. The spread placement strategy spreads placement
  8294. // across available candidates evenly based on the field parameter. The binpack
  8295. // strategy places tasks on available candidates that have the least available
  8296. // amount of the resource that is specified with the field parameter. For example,
  8297. // if you binpack on memory, a task is placed on the instance with the least
  8298. // amount of remaining memory (but still enough to run the task).
  8299. Type *string `locationName:"type" type:"string" enum:"PlacementStrategyType"`
  8300. }
  8301. // String returns the string representation
  8302. func (s PlacementStrategy) String() string {
  8303. return awsutil.Prettify(s)
  8304. }
  8305. // GoString returns the string representation
  8306. func (s PlacementStrategy) GoString() string {
  8307. return s.String()
  8308. }
  8309. // SetField sets the Field field's value.
  8310. func (s *PlacementStrategy) SetField(v string) *PlacementStrategy {
  8311. s.Field = &v
  8312. return s
  8313. }
  8314. // SetType sets the Type field's value.
  8315. func (s *PlacementStrategy) SetType(v string) *PlacementStrategy {
  8316. s.Type = &v
  8317. return s
  8318. }
  8319. // Port mappings allow containers to access ports on the host container instance
  8320. // to send or receive traffic. Port mappings are specified as part of the container
  8321. // definition.
  8322. //
  8323. // If you are using containers in a task with the awsvpc or host network mode,
  8324. // exposed ports should be specified using containerPort. The hostPort can be
  8325. // left blank or it must be the same value as the containerPort.
  8326. //
  8327. // After a task reaches the RUNNING status, manual and automatic host and container
  8328. // port assignments are visible in the networkBindings section of DescribeTasks
  8329. // API responses.
  8330. type PortMapping struct {
  8331. _ struct{} `type:"structure"`
  8332. // The port number on the container that is bound to the user-specified or automatically
  8333. // assigned host port.
  8334. //
  8335. // If you are using containers in a task with the awsvpc or host network mode,
  8336. // exposed ports should be specified using containerPort.
  8337. //
  8338. // If you are using containers in a task with the bridge network mode and you
  8339. // specify a container port and not a host port, your container automatically
  8340. // receives a host port in the ephemeral port range. For more information, see
  8341. // hostPort. Port mappings that are automatically assigned in this way do not
  8342. // count toward the 100 reserved ports limit of a container instance.
  8343. ContainerPort *int64 `locationName:"containerPort" type:"integer"`
  8344. // The port number on the container instance to reserve for your container.
  8345. //
  8346. // If you are using containers in a task with the awsvpc or host network mode,
  8347. // the hostPort can either be left blank or set to the same value as the containerPort.
  8348. //
  8349. // If you are using containers in a task with the bridge network mode, you can
  8350. // specify a non-reserved host port for your container port mapping, or you
  8351. // can omit the hostPort (or set it to 0) while specifying a containerPort and
  8352. // your container automatically receives a port in the ephemeral port range
  8353. // for your container instance operating system and Docker version.
  8354. //
  8355. // The default ephemeral port range for Docker version 1.6.0 and later is listed
  8356. // on the instance under /proc/sys/net/ipv4/ip_local_port_range. If this kernel
  8357. // parameter is unavailable, the default ephemeral port range from 49153 through
  8358. // 65535 is used. Do not attempt to specify a host port in the ephemeral port
  8359. // range as these are reserved for automatic assignment. In general, ports below
  8360. // 32768 are outside of the ephemeral port range.
  8361. //
  8362. // The default ephemeral port range from 49153 through 65535 is always used
  8363. // for Docker versions before 1.6.0.
  8364. //
  8365. // The default reserved ports are 22 for SSH, the Docker ports 2375 and 2376,
  8366. // and the Amazon ECS container agent ports 51678 and 51679. Any host port that
  8367. // was previously specified in a running task is also reserved while the task
  8368. // is running (after a task stops, the host port is released). The current reserved
  8369. // ports are displayed in the remainingResources of DescribeContainerInstances
  8370. // output. A container instance may have up to 100 reserved ports at a time,
  8371. // including the default reserved ports. Aautomatically assigned ports do not
  8372. // count toward the 100 reserved ports limit.
  8373. HostPort *int64 `locationName:"hostPort" type:"integer"`
  8374. // The protocol used for the port mapping. Valid values are tcp and udp. The
  8375. // default is tcp.
  8376. Protocol *string `locationName:"protocol" type:"string" enum:"TransportProtocol"`
  8377. }
  8378. // String returns the string representation
  8379. func (s PortMapping) String() string {
  8380. return awsutil.Prettify(s)
  8381. }
  8382. // GoString returns the string representation
  8383. func (s PortMapping) GoString() string {
  8384. return s.String()
  8385. }
  8386. // SetContainerPort sets the ContainerPort field's value.
  8387. func (s *PortMapping) SetContainerPort(v int64) *PortMapping {
  8388. s.ContainerPort = &v
  8389. return s
  8390. }
  8391. // SetHostPort sets the HostPort field's value.
  8392. func (s *PortMapping) SetHostPort(v int64) *PortMapping {
  8393. s.HostPort = &v
  8394. return s
  8395. }
  8396. // SetProtocol sets the Protocol field's value.
  8397. func (s *PortMapping) SetProtocol(v string) *PortMapping {
  8398. s.Protocol = &v
  8399. return s
  8400. }
  8401. type PutAccountSettingInput struct {
  8402. _ struct{} `type:"structure"`
  8403. // The resource name for which to enable the new format. If serviceLongArnFormat
  8404. // is specified, the ARN for your Amazon ECS services is affected. If taskLongArnFormat
  8405. // is specified, the ARN and resource ID for your Amazon ECS tasks is affected.
  8406. // If containerInstanceLongArnFormat is specified, the ARN and resource ID for
  8407. // your Amazon ECS container instances is affected.
  8408. //
  8409. // Name is a required field
  8410. Name *string `locationName:"name" type:"string" required:"true" enum:"SettingName"`
  8411. // The ARN of the principal, which can be an IAM user, IAM role, or the root
  8412. // user. If you specify the root user, it modifies the ARN and resource ID format
  8413. // for all IAM users, IAM roles, and the root user of the account unless an
  8414. // IAM user or role explicitly overrides these settings for themselves. If this
  8415. // field is omitted, the setting are changed only for the authenticated user.
  8416. PrincipalArn *string `locationName:"principalArn" type:"string"`
  8417. // The account setting value for the specified principal ARN. Accepted values
  8418. // are enabled and disabled.
  8419. //
  8420. // Value is a required field
  8421. Value *string `locationName:"value" type:"string" required:"true"`
  8422. }
  8423. // String returns the string representation
  8424. func (s PutAccountSettingInput) String() string {
  8425. return awsutil.Prettify(s)
  8426. }
  8427. // GoString returns the string representation
  8428. func (s PutAccountSettingInput) GoString() string {
  8429. return s.String()
  8430. }
  8431. // Validate inspects the fields of the type to determine if they are valid.
  8432. func (s *PutAccountSettingInput) Validate() error {
  8433. invalidParams := request.ErrInvalidParams{Context: "PutAccountSettingInput"}
  8434. if s.Name == nil {
  8435. invalidParams.Add(request.NewErrParamRequired("Name"))
  8436. }
  8437. if s.Value == nil {
  8438. invalidParams.Add(request.NewErrParamRequired("Value"))
  8439. }
  8440. if invalidParams.Len() > 0 {
  8441. return invalidParams
  8442. }
  8443. return nil
  8444. }
  8445. // SetName sets the Name field's value.
  8446. func (s *PutAccountSettingInput) SetName(v string) *PutAccountSettingInput {
  8447. s.Name = &v
  8448. return s
  8449. }
  8450. // SetPrincipalArn sets the PrincipalArn field's value.
  8451. func (s *PutAccountSettingInput) SetPrincipalArn(v string) *PutAccountSettingInput {
  8452. s.PrincipalArn = &v
  8453. return s
  8454. }
  8455. // SetValue sets the Value field's value.
  8456. func (s *PutAccountSettingInput) SetValue(v string) *PutAccountSettingInput {
  8457. s.Value = &v
  8458. return s
  8459. }
  8460. type PutAccountSettingOutput struct {
  8461. _ struct{} `type:"structure"`
  8462. // The current account setting for a resource.
  8463. Setting *Setting `locationName:"setting" type:"structure"`
  8464. }
  8465. // String returns the string representation
  8466. func (s PutAccountSettingOutput) String() string {
  8467. return awsutil.Prettify(s)
  8468. }
  8469. // GoString returns the string representation
  8470. func (s PutAccountSettingOutput) GoString() string {
  8471. return s.String()
  8472. }
  8473. // SetSetting sets the Setting field's value.
  8474. func (s *PutAccountSettingOutput) SetSetting(v *Setting) *PutAccountSettingOutput {
  8475. s.Setting = v
  8476. return s
  8477. }
  8478. type PutAttributesInput struct {
  8479. _ struct{} `type:"structure"`
  8480. // The attributes to apply to your resource. You can specify up to 10 custom
  8481. // attributes per resource. You can specify up to 10 attributes in a single
  8482. // call.
  8483. //
  8484. // Attributes is a required field
  8485. Attributes []*Attribute `locationName:"attributes" type:"list" required:"true"`
  8486. // The short name or full Amazon Resource Name (ARN) of the cluster that contains
  8487. // the resource to apply attributes. If you do not specify a cluster, the default
  8488. // cluster is assumed.
  8489. Cluster *string `locationName:"cluster" type:"string"`
  8490. }
  8491. // String returns the string representation
  8492. func (s PutAttributesInput) String() string {
  8493. return awsutil.Prettify(s)
  8494. }
  8495. // GoString returns the string representation
  8496. func (s PutAttributesInput) GoString() string {
  8497. return s.String()
  8498. }
  8499. // Validate inspects the fields of the type to determine if they are valid.
  8500. func (s *PutAttributesInput) Validate() error {
  8501. invalidParams := request.ErrInvalidParams{Context: "PutAttributesInput"}
  8502. if s.Attributes == nil {
  8503. invalidParams.Add(request.NewErrParamRequired("Attributes"))
  8504. }
  8505. if s.Attributes != nil {
  8506. for i, v := range s.Attributes {
  8507. if v == nil {
  8508. continue
  8509. }
  8510. if err := v.Validate(); err != nil {
  8511. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
  8512. }
  8513. }
  8514. }
  8515. if invalidParams.Len() > 0 {
  8516. return invalidParams
  8517. }
  8518. return nil
  8519. }
  8520. // SetAttributes sets the Attributes field's value.
  8521. func (s *PutAttributesInput) SetAttributes(v []*Attribute) *PutAttributesInput {
  8522. s.Attributes = v
  8523. return s
  8524. }
  8525. // SetCluster sets the Cluster field's value.
  8526. func (s *PutAttributesInput) SetCluster(v string) *PutAttributesInput {
  8527. s.Cluster = &v
  8528. return s
  8529. }
  8530. type PutAttributesOutput struct {
  8531. _ struct{} `type:"structure"`
  8532. // The attributes applied to your resource.
  8533. Attributes []*Attribute `locationName:"attributes" type:"list"`
  8534. }
  8535. // String returns the string representation
  8536. func (s PutAttributesOutput) String() string {
  8537. return awsutil.Prettify(s)
  8538. }
  8539. // GoString returns the string representation
  8540. func (s PutAttributesOutput) GoString() string {
  8541. return s.String()
  8542. }
  8543. // SetAttributes sets the Attributes field's value.
  8544. func (s *PutAttributesOutput) SetAttributes(v []*Attribute) *PutAttributesOutput {
  8545. s.Attributes = v
  8546. return s
  8547. }
  8548. type RegisterContainerInstanceInput struct {
  8549. _ struct{} `type:"structure"`
  8550. // The container instance attributes that this container instance supports.
  8551. Attributes []*Attribute `locationName:"attributes" type:"list"`
  8552. // The short name or full Amazon Resource Name (ARN) of the cluster with which
  8553. // to register your container instance. If you do not specify a cluster, the
  8554. // default cluster is assumed.
  8555. Cluster *string `locationName:"cluster" type:"string"`
  8556. // The ARN of the container instance (if it was previously registered).
  8557. ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"`
  8558. // The instance identity document for the EC2 instance to register. This document
  8559. // can be found by running the following command from the instance: curl http://169.254.169.254/latest/dynamic/instance-identity/document/
  8560. InstanceIdentityDocument *string `locationName:"instanceIdentityDocument" type:"string"`
  8561. // The instance identity document signature for the EC2 instance to register.
  8562. // This signature can be found by running the following command from the instance:
  8563. // curl http://169.254.169.254/latest/dynamic/instance-identity/signature/
  8564. InstanceIdentityDocumentSignature *string `locationName:"instanceIdentityDocumentSignature" type:"string"`
  8565. // The metadata that you apply to the container instance to help you categorize
  8566. // and organize them. Each tag consists of a key and an optional value, both
  8567. // of which you define. Tag keys can have a maximum character length of 128
  8568. // characters, and tag values can have a maximum length of 256 characters.
  8569. Tags []*Tag `locationName:"tags" type:"list"`
  8570. // The resources available on the instance.
  8571. TotalResources []*Resource `locationName:"totalResources" type:"list"`
  8572. // The version information for the Amazon ECS container agent and Docker daemon
  8573. // running on the container instance.
  8574. VersionInfo *VersionInfo `locationName:"versionInfo" type:"structure"`
  8575. }
  8576. // String returns the string representation
  8577. func (s RegisterContainerInstanceInput) String() string {
  8578. return awsutil.Prettify(s)
  8579. }
  8580. // GoString returns the string representation
  8581. func (s RegisterContainerInstanceInput) GoString() string {
  8582. return s.String()
  8583. }
  8584. // Validate inspects the fields of the type to determine if they are valid.
  8585. func (s *RegisterContainerInstanceInput) Validate() error {
  8586. invalidParams := request.ErrInvalidParams{Context: "RegisterContainerInstanceInput"}
  8587. if s.Attributes != nil {
  8588. for i, v := range s.Attributes {
  8589. if v == nil {
  8590. continue
  8591. }
  8592. if err := v.Validate(); err != nil {
  8593. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
  8594. }
  8595. }
  8596. }
  8597. if s.Tags != nil {
  8598. for i, v := range s.Tags {
  8599. if v == nil {
  8600. continue
  8601. }
  8602. if err := v.Validate(); err != nil {
  8603. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  8604. }
  8605. }
  8606. }
  8607. if invalidParams.Len() > 0 {
  8608. return invalidParams
  8609. }
  8610. return nil
  8611. }
  8612. // SetAttributes sets the Attributes field's value.
  8613. func (s *RegisterContainerInstanceInput) SetAttributes(v []*Attribute) *RegisterContainerInstanceInput {
  8614. s.Attributes = v
  8615. return s
  8616. }
  8617. // SetCluster sets the Cluster field's value.
  8618. func (s *RegisterContainerInstanceInput) SetCluster(v string) *RegisterContainerInstanceInput {
  8619. s.Cluster = &v
  8620. return s
  8621. }
  8622. // SetContainerInstanceArn sets the ContainerInstanceArn field's value.
  8623. func (s *RegisterContainerInstanceInput) SetContainerInstanceArn(v string) *RegisterContainerInstanceInput {
  8624. s.ContainerInstanceArn = &v
  8625. return s
  8626. }
  8627. // SetInstanceIdentityDocument sets the InstanceIdentityDocument field's value.
  8628. func (s *RegisterContainerInstanceInput) SetInstanceIdentityDocument(v string) *RegisterContainerInstanceInput {
  8629. s.InstanceIdentityDocument = &v
  8630. return s
  8631. }
  8632. // SetInstanceIdentityDocumentSignature sets the InstanceIdentityDocumentSignature field's value.
  8633. func (s *RegisterContainerInstanceInput) SetInstanceIdentityDocumentSignature(v string) *RegisterContainerInstanceInput {
  8634. s.InstanceIdentityDocumentSignature = &v
  8635. return s
  8636. }
  8637. // SetTags sets the Tags field's value.
  8638. func (s *RegisterContainerInstanceInput) SetTags(v []*Tag) *RegisterContainerInstanceInput {
  8639. s.Tags = v
  8640. return s
  8641. }
  8642. // SetTotalResources sets the TotalResources field's value.
  8643. func (s *RegisterContainerInstanceInput) SetTotalResources(v []*Resource) *RegisterContainerInstanceInput {
  8644. s.TotalResources = v
  8645. return s
  8646. }
  8647. // SetVersionInfo sets the VersionInfo field's value.
  8648. func (s *RegisterContainerInstanceInput) SetVersionInfo(v *VersionInfo) *RegisterContainerInstanceInput {
  8649. s.VersionInfo = v
  8650. return s
  8651. }
  8652. type RegisterContainerInstanceOutput struct {
  8653. _ struct{} `type:"structure"`
  8654. // The container instance that was registered.
  8655. ContainerInstance *ContainerInstance `locationName:"containerInstance" type:"structure"`
  8656. }
  8657. // String returns the string representation
  8658. func (s RegisterContainerInstanceOutput) String() string {
  8659. return awsutil.Prettify(s)
  8660. }
  8661. // GoString returns the string representation
  8662. func (s RegisterContainerInstanceOutput) GoString() string {
  8663. return s.String()
  8664. }
  8665. // SetContainerInstance sets the ContainerInstance field's value.
  8666. func (s *RegisterContainerInstanceOutput) SetContainerInstance(v *ContainerInstance) *RegisterContainerInstanceOutput {
  8667. s.ContainerInstance = v
  8668. return s
  8669. }
  8670. type RegisterTaskDefinitionInput struct {
  8671. _ struct{} `type:"structure"`
  8672. // A list of container definitions in JSON format that describe the different
  8673. // containers that make up your task.
  8674. //
  8675. // ContainerDefinitions is a required field
  8676. ContainerDefinitions []*ContainerDefinition `locationName:"containerDefinitions" type:"list" required:"true"`
  8677. // The number of CPU units used by the task. It can be expressed as an integer
  8678. // using CPU units, for example 1024, or as a string using vCPUs, for example
  8679. // 1 vCPU or 1 vcpu, in a task definition. String values are converted to an
  8680. // integer indicating the CPU units when the task definition is registered.
  8681. //
  8682. // Task-level CPU and memory parameters are ignored for Windows containers.
  8683. // We recommend specifying container-level resources for Windows containers.
  8684. //
  8685. // If you are using the EC2 launch type, this field is optional. Supported values
  8686. // are between 128 CPU units (0.125 vCPUs) and 10240 CPU units (10 vCPUs).
  8687. //
  8688. // If you are using the Fargate launch type, this field is required and you
  8689. // must use one of the following values, which determines your range of supported
  8690. // values for the memory parameter:
  8691. //
  8692. // * 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB),
  8693. // 2048 (2 GB)
  8694. //
  8695. // * 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072
  8696. // (3 GB), 4096 (4 GB)
  8697. //
  8698. // * 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096
  8699. // (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
  8700. //
  8701. // * 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384
  8702. // (16 GB) in increments of 1024 (1 GB)
  8703. //
  8704. // * 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720
  8705. // (30 GB) in increments of 1024 (1 GB)
  8706. Cpu *string `locationName:"cpu" type:"string"`
  8707. // The Amazon Resource Name (ARN) of the task execution role that the Amazon
  8708. // ECS container agent and the Docker daemon can assume.
  8709. ExecutionRoleArn *string `locationName:"executionRoleArn" type:"string"`
  8710. // You must specify a family for a task definition, which allows you to track
  8711. // multiple versions of the same task definition. The family is used as a name
  8712. // for your task definition. Up to 255 letters (uppercase and lowercase), numbers,
  8713. // hyphens, and underscores are allowed.
  8714. //
  8715. // Family is a required field
  8716. Family *string `locationName:"family" type:"string" required:"true"`
  8717. // The IPC resource namespace to use for the containers in the task. The valid
  8718. // values are host, task, or none. If host is specified, then all containers
  8719. // within the tasks that specified the host IPC mode on the same container instance
  8720. // share the same IPC resources with the host Amazon EC2 instance. If task is
  8721. // specified, all containers within the specified task share the same IPC resources.
  8722. // If none is specified, then IPC resources within the containers of a task
  8723. // are private and not shared with other containers in a task or on the container
  8724. // instance. If no value is specified, then the IPC resource namespace sharing
  8725. // depends on the Docker daemon setting on the container instance. For more
  8726. // information, see IPC settings (https://docs.docker.com/engine/reference/run/#ipc-settings---ipc)
  8727. // in the Docker run reference.
  8728. //
  8729. // If the host IPC mode is used, be aware that there is a heightened risk of
  8730. // undesired IPC namespace expose. For more information, see Docker security
  8731. // (https://docs.docker.com/engine/security/security/).
  8732. //
  8733. // If you are setting namespaced kernel parameters using systemControls for
  8734. // the containers in the task, the following will apply to your IPC resource
  8735. // namespace. For more information, see System Controls (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html)
  8736. // in the Amazon Elastic Container Service Developer Guide.
  8737. //
  8738. // * For tasks that use the host IPC mode, IPC namespace related systemControls
  8739. // are not supported.
  8740. //
  8741. // * For tasks that use the task IPC mode, IPC namespace related systemControls
  8742. // will apply to all containers within a task.
  8743. //
  8744. // This parameter is not supported for Windows containers or tasks using the
  8745. // Fargate launch type.
  8746. IpcMode *string `locationName:"ipcMode" type:"string" enum:"IpcMode"`
  8747. // The amount of memory (in MiB) used by the task. It can be expressed as an
  8748. // integer using MiB, for example 1024, or as a string using GB, for example
  8749. // 1GB or 1 GB, in a task definition. String values are converted to an integer
  8750. // indicating the MiB when the task definition is registered.
  8751. //
  8752. // Task-level CPU and memory parameters are ignored for Windows containers.
  8753. // We recommend specifying container-level resources for Windows containers.
  8754. //
  8755. // If using the EC2 launch type, this field is optional.
  8756. //
  8757. // If using the Fargate launch type, this field is required and you must use
  8758. // one of the following values, which determines your range of supported values
  8759. // for the cpu parameter:
  8760. //
  8761. // * 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25
  8762. // vCPU)
  8763. //
  8764. // * 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values:
  8765. // 512 (.5 vCPU)
  8766. //
  8767. // * 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168
  8768. // (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)
  8769. //
  8770. // * Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) -
  8771. // Available cpu values: 2048 (2 vCPU)
  8772. //
  8773. // * Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) -
  8774. // Available cpu values: 4096 (4 vCPU)
  8775. Memory *string `locationName:"memory" type:"string"`
  8776. // The Docker networking mode to use for the containers in the task. The valid
  8777. // values are none, bridge, awsvpc, and host. The default Docker network mode
  8778. // is bridge. If you are using the Fargate launch type, the awsvpc network mode
  8779. // is required. If you are using the EC2 launch type, any network mode can be
  8780. // used. If the network mode is set to none, you cannot specify port mappings
  8781. // in your container definitions, and the tasks containers do not have external
  8782. // connectivity. The host and awsvpc network modes offer the highest networking
  8783. // performance for containers because they use the EC2 network stack instead
  8784. // of the virtualized network stack provided by the bridge mode.
  8785. //
  8786. // With the host and awsvpc network modes, exposed container ports are mapped
  8787. // directly to the corresponding host port (for the host network mode) or the
  8788. // attached elastic network interface port (for the awsvpc network mode), so
  8789. // you cannot take advantage of dynamic host port mappings.
  8790. //
  8791. // If the network mode is awsvpc, the task is allocated an elastic network interface,
  8792. // and you must specify a NetworkConfiguration value when you create a service
  8793. // or run a task with the task definition. For more information, see Task Networking
  8794. // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html)
  8795. // in the Amazon Elastic Container Service Developer Guide.
  8796. //
  8797. // Currently, only Amazon ECS-optimized AMIs, other Amazon Linux variants with
  8798. // the ecs-init package, or AWS Fargate infrastructure support the awsvpc network
  8799. // mode.
  8800. //
  8801. // If the network mode is host, you cannot run multiple instantiations of the
  8802. // same task on a single container instance when port mappings are used.
  8803. //
  8804. // Docker for Windows uses different network modes than Docker for Linux. When
  8805. // you register a task definition with Windows containers, you must not specify
  8806. // a network mode. If you use the console to register a task definition with
  8807. // Windows containers, you must choose the <default> network mode object.
  8808. //
  8809. // For more information, see Network settings (https://docs.docker.com/engine/reference/run/#network-settings)
  8810. // in the Docker run reference.
  8811. NetworkMode *string `locationName:"networkMode" type:"string" enum:"NetworkMode"`
  8812. // The process namespace to use for the containers in the task. The valid values
  8813. // are host or task. If host is specified, then all containers within the tasks
  8814. // that specified the host PID mode on the same container instance share the
  8815. // same IPC resources with the host Amazon EC2 instance. If task is specified,
  8816. // all containers within the specified task share the same process namespace.
  8817. // If no value is specified, the default is a private namespace. For more information,
  8818. // see PID settings (https://docs.docker.com/engine/reference/run/#pid-settings---pid)
  8819. // in the Docker run reference.
  8820. //
  8821. // If the host PID mode is used, be aware that there is a heightened risk of
  8822. // undesired process namespace expose. For more information, see Docker security
  8823. // (https://docs.docker.com/engine/security/security/).
  8824. //
  8825. // This parameter is not supported for Windows containers or tasks using the
  8826. // Fargate launch type.
  8827. PidMode *string `locationName:"pidMode" type:"string" enum:"PidMode"`
  8828. // An array of placement constraint objects to use for the task. You can specify
  8829. // a maximum of 10 constraints per task (this limit includes constraints in
  8830. // the task definition and those specified at runtime).
  8831. PlacementConstraints []*TaskDefinitionPlacementConstraint `locationName:"placementConstraints" type:"list"`
  8832. // The launch type required by the task. If no value is specified, it defaults
  8833. // to EC2.
  8834. RequiresCompatibilities []*string `locationName:"requiresCompatibilities" type:"list"`
  8835. // The metadata that you apply to the task definition to help you categorize
  8836. // and organize them. Each tag consists of a key and an optional value, both
  8837. // of which you define. Tag keys can have a maximum character length of 128
  8838. // characters, and tag values can have a maximum length of 256 characters.
  8839. Tags []*Tag `locationName:"tags" type:"list"`
  8840. // The short name or full Amazon Resource Name (ARN) of the IAM role that containers
  8841. // in this task can assume. All containers in this task are granted the permissions
  8842. // that are specified in this role. For more information, see IAM Roles for
  8843. // Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html)
  8844. // in the Amazon Elastic Container Service Developer Guide.
  8845. TaskRoleArn *string `locationName:"taskRoleArn" type:"string"`
  8846. // A list of volume definitions in JSON format that containers in your task
  8847. // may use.
  8848. Volumes []*Volume `locationName:"volumes" type:"list"`
  8849. }
  8850. // String returns the string representation
  8851. func (s RegisterTaskDefinitionInput) String() string {
  8852. return awsutil.Prettify(s)
  8853. }
  8854. // GoString returns the string representation
  8855. func (s RegisterTaskDefinitionInput) GoString() string {
  8856. return s.String()
  8857. }
  8858. // Validate inspects the fields of the type to determine if they are valid.
  8859. func (s *RegisterTaskDefinitionInput) Validate() error {
  8860. invalidParams := request.ErrInvalidParams{Context: "RegisterTaskDefinitionInput"}
  8861. if s.ContainerDefinitions == nil {
  8862. invalidParams.Add(request.NewErrParamRequired("ContainerDefinitions"))
  8863. }
  8864. if s.Family == nil {
  8865. invalidParams.Add(request.NewErrParamRequired("Family"))
  8866. }
  8867. if s.ContainerDefinitions != nil {
  8868. for i, v := range s.ContainerDefinitions {
  8869. if v == nil {
  8870. continue
  8871. }
  8872. if err := v.Validate(); err != nil {
  8873. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContainerDefinitions", i), err.(request.ErrInvalidParams))
  8874. }
  8875. }
  8876. }
  8877. if s.Tags != nil {
  8878. for i, v := range s.Tags {
  8879. if v == nil {
  8880. continue
  8881. }
  8882. if err := v.Validate(); err != nil {
  8883. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  8884. }
  8885. }
  8886. }
  8887. if invalidParams.Len() > 0 {
  8888. return invalidParams
  8889. }
  8890. return nil
  8891. }
  8892. // SetContainerDefinitions sets the ContainerDefinitions field's value.
  8893. func (s *RegisterTaskDefinitionInput) SetContainerDefinitions(v []*ContainerDefinition) *RegisterTaskDefinitionInput {
  8894. s.ContainerDefinitions = v
  8895. return s
  8896. }
  8897. // SetCpu sets the Cpu field's value.
  8898. func (s *RegisterTaskDefinitionInput) SetCpu(v string) *RegisterTaskDefinitionInput {
  8899. s.Cpu = &v
  8900. return s
  8901. }
  8902. // SetExecutionRoleArn sets the ExecutionRoleArn field's value.
  8903. func (s *RegisterTaskDefinitionInput) SetExecutionRoleArn(v string) *RegisterTaskDefinitionInput {
  8904. s.ExecutionRoleArn = &v
  8905. return s
  8906. }
  8907. // SetFamily sets the Family field's value.
  8908. func (s *RegisterTaskDefinitionInput) SetFamily(v string) *RegisterTaskDefinitionInput {
  8909. s.Family = &v
  8910. return s
  8911. }
  8912. // SetIpcMode sets the IpcMode field's value.
  8913. func (s *RegisterTaskDefinitionInput) SetIpcMode(v string) *RegisterTaskDefinitionInput {
  8914. s.IpcMode = &v
  8915. return s
  8916. }
  8917. // SetMemory sets the Memory field's value.
  8918. func (s *RegisterTaskDefinitionInput) SetMemory(v string) *RegisterTaskDefinitionInput {
  8919. s.Memory = &v
  8920. return s
  8921. }
  8922. // SetNetworkMode sets the NetworkMode field's value.
  8923. func (s *RegisterTaskDefinitionInput) SetNetworkMode(v string) *RegisterTaskDefinitionInput {
  8924. s.NetworkMode = &v
  8925. return s
  8926. }
  8927. // SetPidMode sets the PidMode field's value.
  8928. func (s *RegisterTaskDefinitionInput) SetPidMode(v string) *RegisterTaskDefinitionInput {
  8929. s.PidMode = &v
  8930. return s
  8931. }
  8932. // SetPlacementConstraints sets the PlacementConstraints field's value.
  8933. func (s *RegisterTaskDefinitionInput) SetPlacementConstraints(v []*TaskDefinitionPlacementConstraint) *RegisterTaskDefinitionInput {
  8934. s.PlacementConstraints = v
  8935. return s
  8936. }
  8937. // SetRequiresCompatibilities sets the RequiresCompatibilities field's value.
  8938. func (s *RegisterTaskDefinitionInput) SetRequiresCompatibilities(v []*string) *RegisterTaskDefinitionInput {
  8939. s.RequiresCompatibilities = v
  8940. return s
  8941. }
  8942. // SetTags sets the Tags field's value.
  8943. func (s *RegisterTaskDefinitionInput) SetTags(v []*Tag) *RegisterTaskDefinitionInput {
  8944. s.Tags = v
  8945. return s
  8946. }
  8947. // SetTaskRoleArn sets the TaskRoleArn field's value.
  8948. func (s *RegisterTaskDefinitionInput) SetTaskRoleArn(v string) *RegisterTaskDefinitionInput {
  8949. s.TaskRoleArn = &v
  8950. return s
  8951. }
  8952. // SetVolumes sets the Volumes field's value.
  8953. func (s *RegisterTaskDefinitionInput) SetVolumes(v []*Volume) *RegisterTaskDefinitionInput {
  8954. s.Volumes = v
  8955. return s
  8956. }
  8957. type RegisterTaskDefinitionOutput struct {
  8958. _ struct{} `type:"structure"`
  8959. // The list of tags associated with the task definition.
  8960. Tags []*Tag `locationName:"tags" type:"list"`
  8961. // The full description of the registered task definition.
  8962. TaskDefinition *TaskDefinition `locationName:"taskDefinition" type:"structure"`
  8963. }
  8964. // String returns the string representation
  8965. func (s RegisterTaskDefinitionOutput) String() string {
  8966. return awsutil.Prettify(s)
  8967. }
  8968. // GoString returns the string representation
  8969. func (s RegisterTaskDefinitionOutput) GoString() string {
  8970. return s.String()
  8971. }
  8972. // SetTags sets the Tags field's value.
  8973. func (s *RegisterTaskDefinitionOutput) SetTags(v []*Tag) *RegisterTaskDefinitionOutput {
  8974. s.Tags = v
  8975. return s
  8976. }
  8977. // SetTaskDefinition sets the TaskDefinition field's value.
  8978. func (s *RegisterTaskDefinitionOutput) SetTaskDefinition(v *TaskDefinition) *RegisterTaskDefinitionOutput {
  8979. s.TaskDefinition = v
  8980. return s
  8981. }
  8982. // The repository credentials for private registry authentication.
  8983. type RepositoryCredentials struct {
  8984. _ struct{} `type:"structure"`
  8985. // The Amazon Resource Name (ARN) of the secret containing the private repository
  8986. // credentials.
  8987. //
  8988. // When you are using the Amazon ECS API, AWS CLI, or AWS SDK, if the secret
  8989. // exists in the same Region as the task that you are launching then you can
  8990. // use either the full ARN or the name of the secret. When you are using the
  8991. // AWS Management Console, you must specify the full ARN of the secret.
  8992. //
  8993. // CredentialsParameter is a required field
  8994. CredentialsParameter *string `locationName:"credentialsParameter" type:"string" required:"true"`
  8995. }
  8996. // String returns the string representation
  8997. func (s RepositoryCredentials) String() string {
  8998. return awsutil.Prettify(s)
  8999. }
  9000. // GoString returns the string representation
  9001. func (s RepositoryCredentials) GoString() string {
  9002. return s.String()
  9003. }
  9004. // Validate inspects the fields of the type to determine if they are valid.
  9005. func (s *RepositoryCredentials) Validate() error {
  9006. invalidParams := request.ErrInvalidParams{Context: "RepositoryCredentials"}
  9007. if s.CredentialsParameter == nil {
  9008. invalidParams.Add(request.NewErrParamRequired("CredentialsParameter"))
  9009. }
  9010. if invalidParams.Len() > 0 {
  9011. return invalidParams
  9012. }
  9013. return nil
  9014. }
  9015. // SetCredentialsParameter sets the CredentialsParameter field's value.
  9016. func (s *RepositoryCredentials) SetCredentialsParameter(v string) *RepositoryCredentials {
  9017. s.CredentialsParameter = &v
  9018. return s
  9019. }
  9020. // Describes the resources available for a container instance.
  9021. type Resource struct {
  9022. _ struct{} `type:"structure"`
  9023. // When the doubleValue type is set, the value of the resource must be a double
  9024. // precision floating-point type.
  9025. DoubleValue *float64 `locationName:"doubleValue" type:"double"`
  9026. // When the integerValue type is set, the value of the resource must be an integer.
  9027. IntegerValue *int64 `locationName:"integerValue" type:"integer"`
  9028. // When the longValue type is set, the value of the resource must be an extended
  9029. // precision floating-point type.
  9030. LongValue *int64 `locationName:"longValue" type:"long"`
  9031. // The name of the resource, such as CPU, MEMORY, PORTS, PORTS_UDP, or a user-defined
  9032. // resource.
  9033. Name *string `locationName:"name" type:"string"`
  9034. // When the stringSetValue type is set, the value of the resource must be a
  9035. // string type.
  9036. StringSetValue []*string `locationName:"stringSetValue" type:"list"`
  9037. // The type of the resource, such as INTEGER, DOUBLE, LONG, or STRINGSET.
  9038. Type *string `locationName:"type" type:"string"`
  9039. }
  9040. // String returns the string representation
  9041. func (s Resource) String() string {
  9042. return awsutil.Prettify(s)
  9043. }
  9044. // GoString returns the string representation
  9045. func (s Resource) GoString() string {
  9046. return s.String()
  9047. }
  9048. // SetDoubleValue sets the DoubleValue field's value.
  9049. func (s *Resource) SetDoubleValue(v float64) *Resource {
  9050. s.DoubleValue = &v
  9051. return s
  9052. }
  9053. // SetIntegerValue sets the IntegerValue field's value.
  9054. func (s *Resource) SetIntegerValue(v int64) *Resource {
  9055. s.IntegerValue = &v
  9056. return s
  9057. }
  9058. // SetLongValue sets the LongValue field's value.
  9059. func (s *Resource) SetLongValue(v int64) *Resource {
  9060. s.LongValue = &v
  9061. return s
  9062. }
  9063. // SetName sets the Name field's value.
  9064. func (s *Resource) SetName(v string) *Resource {
  9065. s.Name = &v
  9066. return s
  9067. }
  9068. // SetStringSetValue sets the StringSetValue field's value.
  9069. func (s *Resource) SetStringSetValue(v []*string) *Resource {
  9070. s.StringSetValue = v
  9071. return s
  9072. }
  9073. // SetType sets the Type field's value.
  9074. func (s *Resource) SetType(v string) *Resource {
  9075. s.Type = &v
  9076. return s
  9077. }
  9078. type RunTaskInput struct {
  9079. _ struct{} `type:"structure"`
  9080. // The short name or full Amazon Resource Name (ARN) of the cluster on which
  9081. // to run your task. If you do not specify a cluster, the default cluster is
  9082. // assumed.
  9083. Cluster *string `locationName:"cluster" type:"string"`
  9084. // The number of instantiations of the specified task to place on your cluster.
  9085. // You can specify up to 10 tasks per call.
  9086. Count *int64 `locationName:"count" type:"integer"`
  9087. // Specifies whether to enable Amazon ECS managed tags for the task. For more
  9088. // information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
  9089. // in the Amazon Elastic Container Service Developer Guide.
  9090. EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"`
  9091. // The name of the task group to associate with the task. The default value
  9092. // is the family name of the task definition (for example, family:my-family-name).
  9093. Group *string `locationName:"group" type:"string"`
  9094. // The launch type on which to run your task. For more information, see Amazon
  9095. // ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
  9096. // in the Amazon Elastic Container Service Developer Guide.
  9097. LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"`
  9098. // The network configuration for the task. This parameter is required for task
  9099. // definitions that use the awsvpc network mode to receive their own elastic
  9100. // network interface, and it is not supported for other network modes. For more
  9101. // information, see Task Networking (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html)
  9102. // in the Amazon Elastic Container Service Developer Guide.
  9103. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"`
  9104. // A list of container overrides in JSON format that specify the name of a container
  9105. // in the specified task definition and the overrides it should receive. You
  9106. // can override the default command for a container (that is specified in the
  9107. // task definition or Docker image) with a command override. You can also override
  9108. // existing environment variables (that are specified in the task definition
  9109. // or Docker image) on a container or add new environment variables to it with
  9110. // an environment override.
  9111. //
  9112. // A total of 8192 characters are allowed for overrides. This limit includes
  9113. // the JSON formatting characters of the override structure.
  9114. Overrides *TaskOverride `locationName:"overrides" type:"structure"`
  9115. // An array of placement constraint objects to use for the task. You can specify
  9116. // up to 10 constraints per task (including constraints in the task definition
  9117. // and those specified at runtime).
  9118. PlacementConstraints []*PlacementConstraint `locationName:"placementConstraints" type:"list"`
  9119. // The placement strategy objects to use for the task. You can specify a maximum
  9120. // of five strategy rules per task.
  9121. PlacementStrategy []*PlacementStrategy `locationName:"placementStrategy" type:"list"`
  9122. // The platform version the task should run. A platform version is only specified
  9123. // for tasks using the Fargate launch type. If one is not specified, the LATEST
  9124. // platform version is used by default. For more information, see AWS Fargate
  9125. // Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html)
  9126. // in the Amazon Elastic Container Service Developer Guide.
  9127. PlatformVersion *string `locationName:"platformVersion" type:"string"`
  9128. // Specifies whether to propagate the tags from the task definition or the service
  9129. // to the task. If no value is specified, the tags are not propagated.
  9130. PropagateTags *string `locationName:"propagateTags" type:"string" enum:"PropagateTags"`
  9131. // An optional tag specified when a task is started. For example, if you automatically
  9132. // trigger a task to run a batch process job, you could apply a unique identifier
  9133. // for that job to your task with the startedBy parameter. You can then identify
  9134. // which tasks belong to that job by filtering the results of a ListTasks call
  9135. // with the startedBy value. Up to 36 letters (uppercase and lowercase), numbers,
  9136. // hyphens, and underscores are allowed.
  9137. //
  9138. // If a task is started by an Amazon ECS service, then the startedBy parameter
  9139. // contains the deployment ID of the service that starts it.
  9140. StartedBy *string `locationName:"startedBy" type:"string"`
  9141. // The metadata that you apply to the task to help you categorize and organize
  9142. // them. Each tag consists of a key and an optional value, both of which you
  9143. // define. Tag keys can have a maximum character length of 128 characters, and
  9144. // tag values can have a maximum length of 256 characters.
  9145. Tags []*Tag `locationName:"tags" type:"list"`
  9146. // The family and revision (family:revision) or full ARN of the task definition
  9147. // to run. If a revision is not specified, the latest ACTIVE revision is used.
  9148. //
  9149. // TaskDefinition is a required field
  9150. TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"`
  9151. }
  9152. // String returns the string representation
  9153. func (s RunTaskInput) String() string {
  9154. return awsutil.Prettify(s)
  9155. }
  9156. // GoString returns the string representation
  9157. func (s RunTaskInput) GoString() string {
  9158. return s.String()
  9159. }
  9160. // Validate inspects the fields of the type to determine if they are valid.
  9161. func (s *RunTaskInput) Validate() error {
  9162. invalidParams := request.ErrInvalidParams{Context: "RunTaskInput"}
  9163. if s.TaskDefinition == nil {
  9164. invalidParams.Add(request.NewErrParamRequired("TaskDefinition"))
  9165. }
  9166. if s.NetworkConfiguration != nil {
  9167. if err := s.NetworkConfiguration.Validate(); err != nil {
  9168. invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams))
  9169. }
  9170. }
  9171. if s.Tags != nil {
  9172. for i, v := range s.Tags {
  9173. if v == nil {
  9174. continue
  9175. }
  9176. if err := v.Validate(); err != nil {
  9177. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  9178. }
  9179. }
  9180. }
  9181. if invalidParams.Len() > 0 {
  9182. return invalidParams
  9183. }
  9184. return nil
  9185. }
  9186. // SetCluster sets the Cluster field's value.
  9187. func (s *RunTaskInput) SetCluster(v string) *RunTaskInput {
  9188. s.Cluster = &v
  9189. return s
  9190. }
  9191. // SetCount sets the Count field's value.
  9192. func (s *RunTaskInput) SetCount(v int64) *RunTaskInput {
  9193. s.Count = &v
  9194. return s
  9195. }
  9196. // SetEnableECSManagedTags sets the EnableECSManagedTags field's value.
  9197. func (s *RunTaskInput) SetEnableECSManagedTags(v bool) *RunTaskInput {
  9198. s.EnableECSManagedTags = &v
  9199. return s
  9200. }
  9201. // SetGroup sets the Group field's value.
  9202. func (s *RunTaskInput) SetGroup(v string) *RunTaskInput {
  9203. s.Group = &v
  9204. return s
  9205. }
  9206. // SetLaunchType sets the LaunchType field's value.
  9207. func (s *RunTaskInput) SetLaunchType(v string) *RunTaskInput {
  9208. s.LaunchType = &v
  9209. return s
  9210. }
  9211. // SetNetworkConfiguration sets the NetworkConfiguration field's value.
  9212. func (s *RunTaskInput) SetNetworkConfiguration(v *NetworkConfiguration) *RunTaskInput {
  9213. s.NetworkConfiguration = v
  9214. return s
  9215. }
  9216. // SetOverrides sets the Overrides field's value.
  9217. func (s *RunTaskInput) SetOverrides(v *TaskOverride) *RunTaskInput {
  9218. s.Overrides = v
  9219. return s
  9220. }
  9221. // SetPlacementConstraints sets the PlacementConstraints field's value.
  9222. func (s *RunTaskInput) SetPlacementConstraints(v []*PlacementConstraint) *RunTaskInput {
  9223. s.PlacementConstraints = v
  9224. return s
  9225. }
  9226. // SetPlacementStrategy sets the PlacementStrategy field's value.
  9227. func (s *RunTaskInput) SetPlacementStrategy(v []*PlacementStrategy) *RunTaskInput {
  9228. s.PlacementStrategy = v
  9229. return s
  9230. }
  9231. // SetPlatformVersion sets the PlatformVersion field's value.
  9232. func (s *RunTaskInput) SetPlatformVersion(v string) *RunTaskInput {
  9233. s.PlatformVersion = &v
  9234. return s
  9235. }
  9236. // SetPropagateTags sets the PropagateTags field's value.
  9237. func (s *RunTaskInput) SetPropagateTags(v string) *RunTaskInput {
  9238. s.PropagateTags = &v
  9239. return s
  9240. }
  9241. // SetStartedBy sets the StartedBy field's value.
  9242. func (s *RunTaskInput) SetStartedBy(v string) *RunTaskInput {
  9243. s.StartedBy = &v
  9244. return s
  9245. }
  9246. // SetTags sets the Tags field's value.
  9247. func (s *RunTaskInput) SetTags(v []*Tag) *RunTaskInput {
  9248. s.Tags = v
  9249. return s
  9250. }
  9251. // SetTaskDefinition sets the TaskDefinition field's value.
  9252. func (s *RunTaskInput) SetTaskDefinition(v string) *RunTaskInput {
  9253. s.TaskDefinition = &v
  9254. return s
  9255. }
  9256. type RunTaskOutput struct {
  9257. _ struct{} `type:"structure"`
  9258. // Any failures associated with the call.
  9259. Failures []*Failure `locationName:"failures" type:"list"`
  9260. // A full description of the tasks that were run. The tasks that were successfully
  9261. // placed on your cluster are described here.
  9262. Tasks []*Task `locationName:"tasks" type:"list"`
  9263. }
  9264. // String returns the string representation
  9265. func (s RunTaskOutput) String() string {
  9266. return awsutil.Prettify(s)
  9267. }
  9268. // GoString returns the string representation
  9269. func (s RunTaskOutput) GoString() string {
  9270. return s.String()
  9271. }
  9272. // SetFailures sets the Failures field's value.
  9273. func (s *RunTaskOutput) SetFailures(v []*Failure) *RunTaskOutput {
  9274. s.Failures = v
  9275. return s
  9276. }
  9277. // SetTasks sets the Tasks field's value.
  9278. func (s *RunTaskOutput) SetTasks(v []*Task) *RunTaskOutput {
  9279. s.Tasks = v
  9280. return s
  9281. }
  9282. // A floating-point percentage of the desired number of tasks to place and keep
  9283. // running in the service. This is used when a service uses the CODE_DEPLOY
  9284. // deployment controller type.
  9285. type Scale struct {
  9286. _ struct{} `type:"structure"`
  9287. // The unit of measure for the scale value.
  9288. Unit *string `locationName:"unit" type:"string" enum:"ScaleUnit"`
  9289. // The value, specified as a percent total of a service's desiredCount, to scale
  9290. // the task set.
  9291. Value *float64 `locationName:"value" type:"double"`
  9292. }
  9293. // String returns the string representation
  9294. func (s Scale) String() string {
  9295. return awsutil.Prettify(s)
  9296. }
  9297. // GoString returns the string representation
  9298. func (s Scale) GoString() string {
  9299. return s.String()
  9300. }
  9301. // SetUnit sets the Unit field's value.
  9302. func (s *Scale) SetUnit(v string) *Scale {
  9303. s.Unit = &v
  9304. return s
  9305. }
  9306. // SetValue sets the Value field's value.
  9307. func (s *Scale) SetValue(v float64) *Scale {
  9308. s.Value = &v
  9309. return s
  9310. }
  9311. // An object representing the secret to expose to your container.
  9312. type Secret struct {
  9313. _ struct{} `type:"structure"`
  9314. // The value to set as the environment variable on the container.
  9315. //
  9316. // Name is a required field
  9317. Name *string `locationName:"name" type:"string" required:"true"`
  9318. // The secret to expose to the container. Supported values are either the full
  9319. // ARN or the name of the parameter in the AWS Systems Manager Parameter Store.
  9320. //
  9321. // ValueFrom is a required field
  9322. ValueFrom *string `locationName:"valueFrom" type:"string" required:"true"`
  9323. }
  9324. // String returns the string representation
  9325. func (s Secret) String() string {
  9326. return awsutil.Prettify(s)
  9327. }
  9328. // GoString returns the string representation
  9329. func (s Secret) GoString() string {
  9330. return s.String()
  9331. }
  9332. // Validate inspects the fields of the type to determine if they are valid.
  9333. func (s *Secret) Validate() error {
  9334. invalidParams := request.ErrInvalidParams{Context: "Secret"}
  9335. if s.Name == nil {
  9336. invalidParams.Add(request.NewErrParamRequired("Name"))
  9337. }
  9338. if s.ValueFrom == nil {
  9339. invalidParams.Add(request.NewErrParamRequired("ValueFrom"))
  9340. }
  9341. if invalidParams.Len() > 0 {
  9342. return invalidParams
  9343. }
  9344. return nil
  9345. }
  9346. // SetName sets the Name field's value.
  9347. func (s *Secret) SetName(v string) *Secret {
  9348. s.Name = &v
  9349. return s
  9350. }
  9351. // SetValueFrom sets the ValueFrom field's value.
  9352. func (s *Secret) SetValueFrom(v string) *Secret {
  9353. s.ValueFrom = &v
  9354. return s
  9355. }
  9356. // Details on a service within a cluster
  9357. type Service struct {
  9358. _ struct{} `type:"structure"`
  9359. // The Amazon Resource Name (ARN) of the cluster that hosts the service.
  9360. ClusterArn *string `locationName:"clusterArn" type:"string"`
  9361. // The Unix timestamp for when the service was created.
  9362. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"`
  9363. // The principal that created the service.
  9364. CreatedBy *string `locationName:"createdBy" type:"string"`
  9365. // Optional deployment parameters that control how many tasks run during the
  9366. // deployment and the ordering of stopping and starting tasks.
  9367. DeploymentConfiguration *DeploymentConfiguration `locationName:"deploymentConfiguration" type:"structure"`
  9368. // The deployment controller type the service is using.
  9369. DeploymentController *DeploymentController `locationName:"deploymentController" type:"structure"`
  9370. // The current state of deployments for the service.
  9371. Deployments []*Deployment `locationName:"deployments" type:"list"`
  9372. // The desired number of instantiations of the task definition to keep running
  9373. // on the service. This value is specified when the service is created with
  9374. // CreateService, and it can be modified with UpdateService.
  9375. DesiredCount *int64 `locationName:"desiredCount" type:"integer"`
  9376. // Specifies whether to enable Amazon ECS managed tags for the tasks in the
  9377. // service. For more information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
  9378. // in the Amazon Elastic Container Service Developer Guide.
  9379. EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"`
  9380. // The event stream for your service. A maximum of 100 of the latest events
  9381. // are displayed.
  9382. Events []*ServiceEvent `locationName:"events" type:"list"`
  9383. // The period of time, in seconds, that the Amazon ECS service scheduler ignores
  9384. // unhealthy Elastic Load Balancing target health checks after a task has first
  9385. // started.
  9386. HealthCheckGracePeriodSeconds *int64 `locationName:"healthCheckGracePeriodSeconds" type:"integer"`
  9387. // The launch type on which your service is running. For more information, see
  9388. // Amazon ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
  9389. // in the Amazon Elastic Container Service Developer Guide.
  9390. LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"`
  9391. // A list of Elastic Load Balancing load balancer objects, containing the load
  9392. // balancer name, the container name (as it appears in a container definition),
  9393. // and the container port to access from the load balancer.
  9394. //
  9395. // Services with tasks that use the awsvpc network mode (for example, those
  9396. // with the Fargate launch type) only support Application Load Balancers and
  9397. // Network Load Balancers. Classic Load Balancers are not supported. Also, when
  9398. // you create any target groups for these services, you must choose ip as the
  9399. // target type, not instance. Tasks that use the awsvpc network mode are associated
  9400. // with an elastic network interface, not an Amazon EC2 instance.
  9401. LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"`
  9402. // The VPC subnet and security group configuration for tasks that receive their
  9403. // own elastic network interface by using the awsvpc networking mode.
  9404. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"`
  9405. // The number of tasks in the cluster that are in the PENDING state.
  9406. PendingCount *int64 `locationName:"pendingCount" type:"integer"`
  9407. // The placement constraints for the tasks in the service.
  9408. PlacementConstraints []*PlacementConstraint `locationName:"placementConstraints" type:"list"`
  9409. // The placement strategy that determines how tasks for the service are placed.
  9410. PlacementStrategy []*PlacementStrategy `locationName:"placementStrategy" type:"list"`
  9411. // The platform version on which your tasks in the service are running. A platform
  9412. // version is only specified for tasks using the Fargate launch type. If one
  9413. // is not specified, the LATEST platform version is used by default. For more
  9414. // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html)
  9415. // in the Amazon Elastic Container Service Developer Guide.
  9416. PlatformVersion *string `locationName:"platformVersion" type:"string"`
  9417. // Specifies whether to propagate the tags from the task definition or the service
  9418. // to the task. If no value is specified, the tags are not propagated.
  9419. PropagateTags *string `locationName:"propagateTags" type:"string" enum:"PropagateTags"`
  9420. // The ARN of the IAM role associated with the service that allows the Amazon
  9421. // ECS container agent to register container instances with an Elastic Load
  9422. // Balancing load balancer.
  9423. RoleArn *string `locationName:"roleArn" type:"string"`
  9424. // The number of tasks in the cluster that are in the RUNNING state.
  9425. RunningCount *int64 `locationName:"runningCount" type:"integer"`
  9426. // The scheduling strategy to use for the service. For more information, see
  9427. // Services (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html).
  9428. //
  9429. // There are two service scheduler strategies available:
  9430. //
  9431. // * REPLICA-The replica scheduling strategy places and maintains the desired
  9432. // number of tasks across your cluster. By default, the service scheduler
  9433. // spreads tasks across Availability Zones. You can use task placement strategies
  9434. // and constraints to customize task placement decisions.
  9435. //
  9436. // * DAEMON-The daemon scheduling strategy deploys exactly one task on each
  9437. // container instance in your cluster. When you are using this strategy,
  9438. // do not specify a desired number of tasks or any task placement strategies.
  9439. //
  9440. // Fargate tasks do not support the DAEMON scheduling strategy.
  9441. SchedulingStrategy *string `locationName:"schedulingStrategy" type:"string" enum:"SchedulingStrategy"`
  9442. // The ARN that identifies the service. The ARN contains the arn:aws:ecs namespace,
  9443. // followed by the Region of the service, the AWS account ID of the service
  9444. // owner, the service namespace, and then the service name. For example, arn:aws:ecs:region:012345678910:service/my-service.
  9445. ServiceArn *string `locationName:"serviceArn" type:"string"`
  9446. // The name of your service. Up to 255 letters (uppercase and lowercase), numbers,
  9447. // hyphens, and underscores are allowed. Service names must be unique within
  9448. // a cluster, but you can have similarly named services in multiple clusters
  9449. // within a Region or across multiple Regions.
  9450. ServiceName *string `locationName:"serviceName" type:"string"`
  9451. ServiceRegistries []*ServiceRegistry `locationName:"serviceRegistries" type:"list"`
  9452. // The status of the service. The valid values are ACTIVE, DRAINING, or INACTIVE.
  9453. Status *string `locationName:"status" type:"string"`
  9454. // The metadata that you apply to the service to help you categorize and organize
  9455. // them. Each tag consists of a key and an optional value, both of which you
  9456. // define. Tag keys can have a maximum character length of 128 characters, and
  9457. // tag values can have a maximum length of 256 characters.
  9458. Tags []*Tag `locationName:"tags" type:"list"`
  9459. // The task definition to use for tasks in the service. This value is specified
  9460. // when the service is created with CreateService, and it can be modified with
  9461. // UpdateService.
  9462. TaskDefinition *string `locationName:"taskDefinition" type:"string"`
  9463. // Information about a set of Amazon ECS tasks in an AWS CodeDeploy deployment.
  9464. // An Amazon ECS task set includes details such as the desired number of tasks,
  9465. // how many tasks are running, and whether the task set serves production traffic.
  9466. TaskSets []*TaskSet `locationName:"taskSets" type:"list"`
  9467. }
  9468. // String returns the string representation
  9469. func (s Service) String() string {
  9470. return awsutil.Prettify(s)
  9471. }
  9472. // GoString returns the string representation
  9473. func (s Service) GoString() string {
  9474. return s.String()
  9475. }
  9476. // SetClusterArn sets the ClusterArn field's value.
  9477. func (s *Service) SetClusterArn(v string) *Service {
  9478. s.ClusterArn = &v
  9479. return s
  9480. }
  9481. // SetCreatedAt sets the CreatedAt field's value.
  9482. func (s *Service) SetCreatedAt(v time.Time) *Service {
  9483. s.CreatedAt = &v
  9484. return s
  9485. }
  9486. // SetCreatedBy sets the CreatedBy field's value.
  9487. func (s *Service) SetCreatedBy(v string) *Service {
  9488. s.CreatedBy = &v
  9489. return s
  9490. }
  9491. // SetDeploymentConfiguration sets the DeploymentConfiguration field's value.
  9492. func (s *Service) SetDeploymentConfiguration(v *DeploymentConfiguration) *Service {
  9493. s.DeploymentConfiguration = v
  9494. return s
  9495. }
  9496. // SetDeploymentController sets the DeploymentController field's value.
  9497. func (s *Service) SetDeploymentController(v *DeploymentController) *Service {
  9498. s.DeploymentController = v
  9499. return s
  9500. }
  9501. // SetDeployments sets the Deployments field's value.
  9502. func (s *Service) SetDeployments(v []*Deployment) *Service {
  9503. s.Deployments = v
  9504. return s
  9505. }
  9506. // SetDesiredCount sets the DesiredCount field's value.
  9507. func (s *Service) SetDesiredCount(v int64) *Service {
  9508. s.DesiredCount = &v
  9509. return s
  9510. }
  9511. // SetEnableECSManagedTags sets the EnableECSManagedTags field's value.
  9512. func (s *Service) SetEnableECSManagedTags(v bool) *Service {
  9513. s.EnableECSManagedTags = &v
  9514. return s
  9515. }
  9516. // SetEvents sets the Events field's value.
  9517. func (s *Service) SetEvents(v []*ServiceEvent) *Service {
  9518. s.Events = v
  9519. return s
  9520. }
  9521. // SetHealthCheckGracePeriodSeconds sets the HealthCheckGracePeriodSeconds field's value.
  9522. func (s *Service) SetHealthCheckGracePeriodSeconds(v int64) *Service {
  9523. s.HealthCheckGracePeriodSeconds = &v
  9524. return s
  9525. }
  9526. // SetLaunchType sets the LaunchType field's value.
  9527. func (s *Service) SetLaunchType(v string) *Service {
  9528. s.LaunchType = &v
  9529. return s
  9530. }
  9531. // SetLoadBalancers sets the LoadBalancers field's value.
  9532. func (s *Service) SetLoadBalancers(v []*LoadBalancer) *Service {
  9533. s.LoadBalancers = v
  9534. return s
  9535. }
  9536. // SetNetworkConfiguration sets the NetworkConfiguration field's value.
  9537. func (s *Service) SetNetworkConfiguration(v *NetworkConfiguration) *Service {
  9538. s.NetworkConfiguration = v
  9539. return s
  9540. }
  9541. // SetPendingCount sets the PendingCount field's value.
  9542. func (s *Service) SetPendingCount(v int64) *Service {
  9543. s.PendingCount = &v
  9544. return s
  9545. }
  9546. // SetPlacementConstraints sets the PlacementConstraints field's value.
  9547. func (s *Service) SetPlacementConstraints(v []*PlacementConstraint) *Service {
  9548. s.PlacementConstraints = v
  9549. return s
  9550. }
  9551. // SetPlacementStrategy sets the PlacementStrategy field's value.
  9552. func (s *Service) SetPlacementStrategy(v []*PlacementStrategy) *Service {
  9553. s.PlacementStrategy = v
  9554. return s
  9555. }
  9556. // SetPlatformVersion sets the PlatformVersion field's value.
  9557. func (s *Service) SetPlatformVersion(v string) *Service {
  9558. s.PlatformVersion = &v
  9559. return s
  9560. }
  9561. // SetPropagateTags sets the PropagateTags field's value.
  9562. func (s *Service) SetPropagateTags(v string) *Service {
  9563. s.PropagateTags = &v
  9564. return s
  9565. }
  9566. // SetRoleArn sets the RoleArn field's value.
  9567. func (s *Service) SetRoleArn(v string) *Service {
  9568. s.RoleArn = &v
  9569. return s
  9570. }
  9571. // SetRunningCount sets the RunningCount field's value.
  9572. func (s *Service) SetRunningCount(v int64) *Service {
  9573. s.RunningCount = &v
  9574. return s
  9575. }
  9576. // SetSchedulingStrategy sets the SchedulingStrategy field's value.
  9577. func (s *Service) SetSchedulingStrategy(v string) *Service {
  9578. s.SchedulingStrategy = &v
  9579. return s
  9580. }
  9581. // SetServiceArn sets the ServiceArn field's value.
  9582. func (s *Service) SetServiceArn(v string) *Service {
  9583. s.ServiceArn = &v
  9584. return s
  9585. }
  9586. // SetServiceName sets the ServiceName field's value.
  9587. func (s *Service) SetServiceName(v string) *Service {
  9588. s.ServiceName = &v
  9589. return s
  9590. }
  9591. // SetServiceRegistries sets the ServiceRegistries field's value.
  9592. func (s *Service) SetServiceRegistries(v []*ServiceRegistry) *Service {
  9593. s.ServiceRegistries = v
  9594. return s
  9595. }
  9596. // SetStatus sets the Status field's value.
  9597. func (s *Service) SetStatus(v string) *Service {
  9598. s.Status = &v
  9599. return s
  9600. }
  9601. // SetTags sets the Tags field's value.
  9602. func (s *Service) SetTags(v []*Tag) *Service {
  9603. s.Tags = v
  9604. return s
  9605. }
  9606. // SetTaskDefinition sets the TaskDefinition field's value.
  9607. func (s *Service) SetTaskDefinition(v string) *Service {
  9608. s.TaskDefinition = &v
  9609. return s
  9610. }
  9611. // SetTaskSets sets the TaskSets field's value.
  9612. func (s *Service) SetTaskSets(v []*TaskSet) *Service {
  9613. s.TaskSets = v
  9614. return s
  9615. }
  9616. // Details on an event associated with a service.
  9617. type ServiceEvent struct {
  9618. _ struct{} `type:"structure"`
  9619. // The Unix timestamp for when the event was triggered.
  9620. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"`
  9621. // The ID string of the event.
  9622. Id *string `locationName:"id" type:"string"`
  9623. // The event message.
  9624. Message *string `locationName:"message" type:"string"`
  9625. }
  9626. // String returns the string representation
  9627. func (s ServiceEvent) String() string {
  9628. return awsutil.Prettify(s)
  9629. }
  9630. // GoString returns the string representation
  9631. func (s ServiceEvent) GoString() string {
  9632. return s.String()
  9633. }
  9634. // SetCreatedAt sets the CreatedAt field's value.
  9635. func (s *ServiceEvent) SetCreatedAt(v time.Time) *ServiceEvent {
  9636. s.CreatedAt = &v
  9637. return s
  9638. }
  9639. // SetId sets the Id field's value.
  9640. func (s *ServiceEvent) SetId(v string) *ServiceEvent {
  9641. s.Id = &v
  9642. return s
  9643. }
  9644. // SetMessage sets the Message field's value.
  9645. func (s *ServiceEvent) SetMessage(v string) *ServiceEvent {
  9646. s.Message = &v
  9647. return s
  9648. }
  9649. // Details of the service registry.
  9650. type ServiceRegistry struct {
  9651. _ struct{} `type:"structure"`
  9652. // The container name value, already specified in the task definition, to be
  9653. // used for your service discovery service. If the task definition that your
  9654. // service task specifies uses the bridge or host network mode, you must specify
  9655. // a containerName and containerPort combination from the task definition. If
  9656. // the task definition that your service task specifies uses the awsvpc network
  9657. // mode and a type SRV DNS record is used, you must specify either a containerName
  9658. // and containerPort combination or a port value, but not both.
  9659. ContainerName *string `locationName:"containerName" type:"string"`
  9660. // The port value, already specified in the task definition, to be used for
  9661. // your service discovery service. If the task definition your service task
  9662. // specifies uses the bridge or host network mode, you must specify a containerName
  9663. // and containerPort combination from the task definition. If the task definition
  9664. // your service task specifies uses the awsvpc network mode and a type SRV DNS
  9665. // record is used, you must specify either a containerName and containerPort
  9666. // combination or a port value, but not both.
  9667. ContainerPort *int64 `locationName:"containerPort" type:"integer"`
  9668. // The port value used if your service discovery service specified an SRV record.
  9669. // This field may be used if both the awsvpc network mode and SRV records are
  9670. // used.
  9671. Port *int64 `locationName:"port" type:"integer"`
  9672. // The Amazon Resource Name (ARN) of the service registry. The currently supported
  9673. // service registry is Amazon Route 53 Auto Naming. For more information, see
  9674. // Service (https://docs.aws.amazon.com/Route53/latest/APIReference/API_autonaming_Service.html).
  9675. RegistryArn *string `locationName:"registryArn" type:"string"`
  9676. }
  9677. // String returns the string representation
  9678. func (s ServiceRegistry) String() string {
  9679. return awsutil.Prettify(s)
  9680. }
  9681. // GoString returns the string representation
  9682. func (s ServiceRegistry) GoString() string {
  9683. return s.String()
  9684. }
  9685. // SetContainerName sets the ContainerName field's value.
  9686. func (s *ServiceRegistry) SetContainerName(v string) *ServiceRegistry {
  9687. s.ContainerName = &v
  9688. return s
  9689. }
  9690. // SetContainerPort sets the ContainerPort field's value.
  9691. func (s *ServiceRegistry) SetContainerPort(v int64) *ServiceRegistry {
  9692. s.ContainerPort = &v
  9693. return s
  9694. }
  9695. // SetPort sets the Port field's value.
  9696. func (s *ServiceRegistry) SetPort(v int64) *ServiceRegistry {
  9697. s.Port = &v
  9698. return s
  9699. }
  9700. // SetRegistryArn sets the RegistryArn field's value.
  9701. func (s *ServiceRegistry) SetRegistryArn(v string) *ServiceRegistry {
  9702. s.RegistryArn = &v
  9703. return s
  9704. }
  9705. // The current account setting for a resource.
  9706. type Setting struct {
  9707. _ struct{} `type:"structure"`
  9708. // The account resource name.
  9709. Name *string `locationName:"name" type:"string" enum:"SettingName"`
  9710. // The ARN of the principal, which can be an IAM user, IAM role, or the root
  9711. // user. If this field is omitted, the authenticated user is assumed.
  9712. PrincipalArn *string `locationName:"principalArn" type:"string"`
  9713. // The current account setting for the resource name. If enabled, then the resource
  9714. // will receive the new Amazon Resource Name (ARN) and resource identifier (ID)
  9715. // format. If disabled, then the resource will receive the old Amazon Resource
  9716. // Name (ARN) and resource identifier (ID) format.
  9717. Value *string `locationName:"value" type:"string"`
  9718. }
  9719. // String returns the string representation
  9720. func (s Setting) String() string {
  9721. return awsutil.Prettify(s)
  9722. }
  9723. // GoString returns the string representation
  9724. func (s Setting) GoString() string {
  9725. return s.String()
  9726. }
  9727. // SetName sets the Name field's value.
  9728. func (s *Setting) SetName(v string) *Setting {
  9729. s.Name = &v
  9730. return s
  9731. }
  9732. // SetPrincipalArn sets the PrincipalArn field's value.
  9733. func (s *Setting) SetPrincipalArn(v string) *Setting {
  9734. s.PrincipalArn = &v
  9735. return s
  9736. }
  9737. // SetValue sets the Value field's value.
  9738. func (s *Setting) SetValue(v string) *Setting {
  9739. s.Value = &v
  9740. return s
  9741. }
  9742. type StartTaskInput struct {
  9743. _ struct{} `type:"structure"`
  9744. // The short name or full Amazon Resource Name (ARN) of the cluster on which
  9745. // to start your task. If you do not specify a cluster, the default cluster
  9746. // is assumed.
  9747. Cluster *string `locationName:"cluster" type:"string"`
  9748. // The container instance IDs or full ARN entries for the container instances
  9749. // on which you would like to place your task. You can specify up to 10 container
  9750. // instances.
  9751. //
  9752. // ContainerInstances is a required field
  9753. ContainerInstances []*string `locationName:"containerInstances" type:"list" required:"true"`
  9754. // Specifies whether to enable Amazon ECS managed tags for the task. For more
  9755. // information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
  9756. // in the Amazon Elastic Container Service Developer Guide.
  9757. EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"`
  9758. // The name of the task group to associate with the task. The default value
  9759. // is the family name of the task definition (for example, family:my-family-name).
  9760. Group *string `locationName:"group" type:"string"`
  9761. // The VPC subnet and security group configuration for tasks that receive their
  9762. // own elastic network interface by using the awsvpc networking mode.
  9763. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"`
  9764. // A list of container overrides in JSON format that specify the name of a container
  9765. // in the specified task definition and the overrides it should receive. You
  9766. // can override the default command for a container (that is specified in the
  9767. // task definition or Docker image) with a command override. You can also override
  9768. // existing environment variables (that are specified in the task definition
  9769. // or Docker image) on a container or add new environment variables to it with
  9770. // an environment override.
  9771. //
  9772. // A total of 8192 characters are allowed for overrides. This limit includes
  9773. // the JSON formatting characters of the override structure.
  9774. Overrides *TaskOverride `locationName:"overrides" type:"structure"`
  9775. // Specifies whether to propagate the tags from the task definition or the service
  9776. // to the task. If no value is specified, the tags are not propagated.
  9777. PropagateTags *string `locationName:"propagateTags" type:"string" enum:"PropagateTags"`
  9778. // An optional tag specified when a task is started. For example, if you automatically
  9779. // trigger a task to run a batch process job, you could apply a unique identifier
  9780. // for that job to your task with the startedBy parameter. You can then identify
  9781. // which tasks belong to that job by filtering the results of a ListTasks call
  9782. // with the startedBy value. Up to 36 letters (uppercase and lowercase), numbers,
  9783. // hyphens, and underscores are allowed.
  9784. //
  9785. // If a task is started by an Amazon ECS service, then the startedBy parameter
  9786. // contains the deployment ID of the service that starts it.
  9787. StartedBy *string `locationName:"startedBy" type:"string"`
  9788. // The metadata that you apply to the task to help you categorize and organize
  9789. // them. Each tag consists of a key and an optional value, both of which you
  9790. // define. Tag keys can have a maximum character length of 128 characters, and
  9791. // tag values can have a maximum length of 256 characters.
  9792. Tags []*Tag `locationName:"tags" type:"list"`
  9793. // The family and revision (family:revision) or full ARN of the task definition
  9794. // to start. If a revision is not specified, the latest ACTIVE revision is used.
  9795. //
  9796. // TaskDefinition is a required field
  9797. TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"`
  9798. }
  9799. // String returns the string representation
  9800. func (s StartTaskInput) String() string {
  9801. return awsutil.Prettify(s)
  9802. }
  9803. // GoString returns the string representation
  9804. func (s StartTaskInput) GoString() string {
  9805. return s.String()
  9806. }
  9807. // Validate inspects the fields of the type to determine if they are valid.
  9808. func (s *StartTaskInput) Validate() error {
  9809. invalidParams := request.ErrInvalidParams{Context: "StartTaskInput"}
  9810. if s.ContainerInstances == nil {
  9811. invalidParams.Add(request.NewErrParamRequired("ContainerInstances"))
  9812. }
  9813. if s.TaskDefinition == nil {
  9814. invalidParams.Add(request.NewErrParamRequired("TaskDefinition"))
  9815. }
  9816. if s.NetworkConfiguration != nil {
  9817. if err := s.NetworkConfiguration.Validate(); err != nil {
  9818. invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams))
  9819. }
  9820. }
  9821. if s.Tags != nil {
  9822. for i, v := range s.Tags {
  9823. if v == nil {
  9824. continue
  9825. }
  9826. if err := v.Validate(); err != nil {
  9827. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  9828. }
  9829. }
  9830. }
  9831. if invalidParams.Len() > 0 {
  9832. return invalidParams
  9833. }
  9834. return nil
  9835. }
  9836. // SetCluster sets the Cluster field's value.
  9837. func (s *StartTaskInput) SetCluster(v string) *StartTaskInput {
  9838. s.Cluster = &v
  9839. return s
  9840. }
  9841. // SetContainerInstances sets the ContainerInstances field's value.
  9842. func (s *StartTaskInput) SetContainerInstances(v []*string) *StartTaskInput {
  9843. s.ContainerInstances = v
  9844. return s
  9845. }
  9846. // SetEnableECSManagedTags sets the EnableECSManagedTags field's value.
  9847. func (s *StartTaskInput) SetEnableECSManagedTags(v bool) *StartTaskInput {
  9848. s.EnableECSManagedTags = &v
  9849. return s
  9850. }
  9851. // SetGroup sets the Group field's value.
  9852. func (s *StartTaskInput) SetGroup(v string) *StartTaskInput {
  9853. s.Group = &v
  9854. return s
  9855. }
  9856. // SetNetworkConfiguration sets the NetworkConfiguration field's value.
  9857. func (s *StartTaskInput) SetNetworkConfiguration(v *NetworkConfiguration) *StartTaskInput {
  9858. s.NetworkConfiguration = v
  9859. return s
  9860. }
  9861. // SetOverrides sets the Overrides field's value.
  9862. func (s *StartTaskInput) SetOverrides(v *TaskOverride) *StartTaskInput {
  9863. s.Overrides = v
  9864. return s
  9865. }
  9866. // SetPropagateTags sets the PropagateTags field's value.
  9867. func (s *StartTaskInput) SetPropagateTags(v string) *StartTaskInput {
  9868. s.PropagateTags = &v
  9869. return s
  9870. }
  9871. // SetStartedBy sets the StartedBy field's value.
  9872. func (s *StartTaskInput) SetStartedBy(v string) *StartTaskInput {
  9873. s.StartedBy = &v
  9874. return s
  9875. }
  9876. // SetTags sets the Tags field's value.
  9877. func (s *StartTaskInput) SetTags(v []*Tag) *StartTaskInput {
  9878. s.Tags = v
  9879. return s
  9880. }
  9881. // SetTaskDefinition sets the TaskDefinition field's value.
  9882. func (s *StartTaskInput) SetTaskDefinition(v string) *StartTaskInput {
  9883. s.TaskDefinition = &v
  9884. return s
  9885. }
  9886. type StartTaskOutput struct {
  9887. _ struct{} `type:"structure"`
  9888. // Any failures associated with the call.
  9889. Failures []*Failure `locationName:"failures" type:"list"`
  9890. // A full description of the tasks that were started. Each task that was successfully
  9891. // placed on your container instances is described.
  9892. Tasks []*Task `locationName:"tasks" type:"list"`
  9893. }
  9894. // String returns the string representation
  9895. func (s StartTaskOutput) String() string {
  9896. return awsutil.Prettify(s)
  9897. }
  9898. // GoString returns the string representation
  9899. func (s StartTaskOutput) GoString() string {
  9900. return s.String()
  9901. }
  9902. // SetFailures sets the Failures field's value.
  9903. func (s *StartTaskOutput) SetFailures(v []*Failure) *StartTaskOutput {
  9904. s.Failures = v
  9905. return s
  9906. }
  9907. // SetTasks sets the Tasks field's value.
  9908. func (s *StartTaskOutput) SetTasks(v []*Task) *StartTaskOutput {
  9909. s.Tasks = v
  9910. return s
  9911. }
  9912. type StopTaskInput struct {
  9913. _ struct{} `type:"structure"`
  9914. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  9915. // the task to stop. If you do not specify a cluster, the default cluster is
  9916. // assumed.
  9917. Cluster *string `locationName:"cluster" type:"string"`
  9918. // An optional message specified when a task is stopped. For example, if you
  9919. // are using a custom scheduler, you can use this parameter to specify the reason
  9920. // for stopping the task here, and the message appears in subsequent DescribeTasks
  9921. // API operations on this task. Up to 255 characters are allowed in this message.
  9922. Reason *string `locationName:"reason" type:"string"`
  9923. // The task ID or full ARN entry of the task to stop.
  9924. //
  9925. // Task is a required field
  9926. Task *string `locationName:"task" type:"string" required:"true"`
  9927. }
  9928. // String returns the string representation
  9929. func (s StopTaskInput) String() string {
  9930. return awsutil.Prettify(s)
  9931. }
  9932. // GoString returns the string representation
  9933. func (s StopTaskInput) GoString() string {
  9934. return s.String()
  9935. }
  9936. // Validate inspects the fields of the type to determine if they are valid.
  9937. func (s *StopTaskInput) Validate() error {
  9938. invalidParams := request.ErrInvalidParams{Context: "StopTaskInput"}
  9939. if s.Task == nil {
  9940. invalidParams.Add(request.NewErrParamRequired("Task"))
  9941. }
  9942. if invalidParams.Len() > 0 {
  9943. return invalidParams
  9944. }
  9945. return nil
  9946. }
  9947. // SetCluster sets the Cluster field's value.
  9948. func (s *StopTaskInput) SetCluster(v string) *StopTaskInput {
  9949. s.Cluster = &v
  9950. return s
  9951. }
  9952. // SetReason sets the Reason field's value.
  9953. func (s *StopTaskInput) SetReason(v string) *StopTaskInput {
  9954. s.Reason = &v
  9955. return s
  9956. }
  9957. // SetTask sets the Task field's value.
  9958. func (s *StopTaskInput) SetTask(v string) *StopTaskInput {
  9959. s.Task = &v
  9960. return s
  9961. }
  9962. type StopTaskOutput struct {
  9963. _ struct{} `type:"structure"`
  9964. // The task that was stopped.
  9965. Task *Task `locationName:"task" type:"structure"`
  9966. }
  9967. // String returns the string representation
  9968. func (s StopTaskOutput) String() string {
  9969. return awsutil.Prettify(s)
  9970. }
  9971. // GoString returns the string representation
  9972. func (s StopTaskOutput) GoString() string {
  9973. return s.String()
  9974. }
  9975. // SetTask sets the Task field's value.
  9976. func (s *StopTaskOutput) SetTask(v *Task) *StopTaskOutput {
  9977. s.Task = v
  9978. return s
  9979. }
  9980. type SubmitContainerStateChangeInput struct {
  9981. _ struct{} `type:"structure"`
  9982. // The short name or full ARN of the cluster that hosts the container.
  9983. Cluster *string `locationName:"cluster" type:"string"`
  9984. // The name of the container.
  9985. ContainerName *string `locationName:"containerName" type:"string"`
  9986. // The exit code returned for the state change request.
  9987. ExitCode *int64 `locationName:"exitCode" type:"integer"`
  9988. // The network bindings of the container.
  9989. NetworkBindings []*NetworkBinding `locationName:"networkBindings" type:"list"`
  9990. // The reason for the state change request.
  9991. Reason *string `locationName:"reason" type:"string"`
  9992. // The status of the state change request.
  9993. Status *string `locationName:"status" type:"string"`
  9994. // The task ID or full Amazon Resource Name (ARN) of the task that hosts the
  9995. // container.
  9996. Task *string `locationName:"task" type:"string"`
  9997. }
  9998. // String returns the string representation
  9999. func (s SubmitContainerStateChangeInput) String() string {
  10000. return awsutil.Prettify(s)
  10001. }
  10002. // GoString returns the string representation
  10003. func (s SubmitContainerStateChangeInput) GoString() string {
  10004. return s.String()
  10005. }
  10006. // SetCluster sets the Cluster field's value.
  10007. func (s *SubmitContainerStateChangeInput) SetCluster(v string) *SubmitContainerStateChangeInput {
  10008. s.Cluster = &v
  10009. return s
  10010. }
  10011. // SetContainerName sets the ContainerName field's value.
  10012. func (s *SubmitContainerStateChangeInput) SetContainerName(v string) *SubmitContainerStateChangeInput {
  10013. s.ContainerName = &v
  10014. return s
  10015. }
  10016. // SetExitCode sets the ExitCode field's value.
  10017. func (s *SubmitContainerStateChangeInput) SetExitCode(v int64) *SubmitContainerStateChangeInput {
  10018. s.ExitCode = &v
  10019. return s
  10020. }
  10021. // SetNetworkBindings sets the NetworkBindings field's value.
  10022. func (s *SubmitContainerStateChangeInput) SetNetworkBindings(v []*NetworkBinding) *SubmitContainerStateChangeInput {
  10023. s.NetworkBindings = v
  10024. return s
  10025. }
  10026. // SetReason sets the Reason field's value.
  10027. func (s *SubmitContainerStateChangeInput) SetReason(v string) *SubmitContainerStateChangeInput {
  10028. s.Reason = &v
  10029. return s
  10030. }
  10031. // SetStatus sets the Status field's value.
  10032. func (s *SubmitContainerStateChangeInput) SetStatus(v string) *SubmitContainerStateChangeInput {
  10033. s.Status = &v
  10034. return s
  10035. }
  10036. // SetTask sets the Task field's value.
  10037. func (s *SubmitContainerStateChangeInput) SetTask(v string) *SubmitContainerStateChangeInput {
  10038. s.Task = &v
  10039. return s
  10040. }
  10041. type SubmitContainerStateChangeOutput struct {
  10042. _ struct{} `type:"structure"`
  10043. // Acknowledgement of the state change.
  10044. Acknowledgment *string `locationName:"acknowledgment" type:"string"`
  10045. }
  10046. // String returns the string representation
  10047. func (s SubmitContainerStateChangeOutput) String() string {
  10048. return awsutil.Prettify(s)
  10049. }
  10050. // GoString returns the string representation
  10051. func (s SubmitContainerStateChangeOutput) GoString() string {
  10052. return s.String()
  10053. }
  10054. // SetAcknowledgment sets the Acknowledgment field's value.
  10055. func (s *SubmitContainerStateChangeOutput) SetAcknowledgment(v string) *SubmitContainerStateChangeOutput {
  10056. s.Acknowledgment = &v
  10057. return s
  10058. }
  10059. type SubmitTaskStateChangeInput struct {
  10060. _ struct{} `type:"structure"`
  10061. // Any attachments associated with the state change request.
  10062. Attachments []*AttachmentStateChange `locationName:"attachments" type:"list"`
  10063. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  10064. // the task.
  10065. Cluster *string `locationName:"cluster" type:"string"`
  10066. // Any containers associated with the state change request.
  10067. Containers []*ContainerStateChange `locationName:"containers" type:"list"`
  10068. // The Unix timestamp for when the task execution stopped.
  10069. ExecutionStoppedAt *time.Time `locationName:"executionStoppedAt" type:"timestamp"`
  10070. // The Unix timestamp for when the container image pull began.
  10071. PullStartedAt *time.Time `locationName:"pullStartedAt" type:"timestamp"`
  10072. // The Unix timestamp for when the container image pull completed.
  10073. PullStoppedAt *time.Time `locationName:"pullStoppedAt" type:"timestamp"`
  10074. // The reason for the state change request.
  10075. Reason *string `locationName:"reason" type:"string"`
  10076. // The status of the state change request.
  10077. Status *string `locationName:"status" type:"string"`
  10078. // The task ID or full ARN of the task in the state change request.
  10079. Task *string `locationName:"task" type:"string"`
  10080. }
  10081. // String returns the string representation
  10082. func (s SubmitTaskStateChangeInput) String() string {
  10083. return awsutil.Prettify(s)
  10084. }
  10085. // GoString returns the string representation
  10086. func (s SubmitTaskStateChangeInput) GoString() string {
  10087. return s.String()
  10088. }
  10089. // Validate inspects the fields of the type to determine if they are valid.
  10090. func (s *SubmitTaskStateChangeInput) Validate() error {
  10091. invalidParams := request.ErrInvalidParams{Context: "SubmitTaskStateChangeInput"}
  10092. if s.Attachments != nil {
  10093. for i, v := range s.Attachments {
  10094. if v == nil {
  10095. continue
  10096. }
  10097. if err := v.Validate(); err != nil {
  10098. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attachments", i), err.(request.ErrInvalidParams))
  10099. }
  10100. }
  10101. }
  10102. if invalidParams.Len() > 0 {
  10103. return invalidParams
  10104. }
  10105. return nil
  10106. }
  10107. // SetAttachments sets the Attachments field's value.
  10108. func (s *SubmitTaskStateChangeInput) SetAttachments(v []*AttachmentStateChange) *SubmitTaskStateChangeInput {
  10109. s.Attachments = v
  10110. return s
  10111. }
  10112. // SetCluster sets the Cluster field's value.
  10113. func (s *SubmitTaskStateChangeInput) SetCluster(v string) *SubmitTaskStateChangeInput {
  10114. s.Cluster = &v
  10115. return s
  10116. }
  10117. // SetContainers sets the Containers field's value.
  10118. func (s *SubmitTaskStateChangeInput) SetContainers(v []*ContainerStateChange) *SubmitTaskStateChangeInput {
  10119. s.Containers = v
  10120. return s
  10121. }
  10122. // SetExecutionStoppedAt sets the ExecutionStoppedAt field's value.
  10123. func (s *SubmitTaskStateChangeInput) SetExecutionStoppedAt(v time.Time) *SubmitTaskStateChangeInput {
  10124. s.ExecutionStoppedAt = &v
  10125. return s
  10126. }
  10127. // SetPullStartedAt sets the PullStartedAt field's value.
  10128. func (s *SubmitTaskStateChangeInput) SetPullStartedAt(v time.Time) *SubmitTaskStateChangeInput {
  10129. s.PullStartedAt = &v
  10130. return s
  10131. }
  10132. // SetPullStoppedAt sets the PullStoppedAt field's value.
  10133. func (s *SubmitTaskStateChangeInput) SetPullStoppedAt(v time.Time) *SubmitTaskStateChangeInput {
  10134. s.PullStoppedAt = &v
  10135. return s
  10136. }
  10137. // SetReason sets the Reason field's value.
  10138. func (s *SubmitTaskStateChangeInput) SetReason(v string) *SubmitTaskStateChangeInput {
  10139. s.Reason = &v
  10140. return s
  10141. }
  10142. // SetStatus sets the Status field's value.
  10143. func (s *SubmitTaskStateChangeInput) SetStatus(v string) *SubmitTaskStateChangeInput {
  10144. s.Status = &v
  10145. return s
  10146. }
  10147. // SetTask sets the Task field's value.
  10148. func (s *SubmitTaskStateChangeInput) SetTask(v string) *SubmitTaskStateChangeInput {
  10149. s.Task = &v
  10150. return s
  10151. }
  10152. type SubmitTaskStateChangeOutput struct {
  10153. _ struct{} `type:"structure"`
  10154. // Acknowledgement of the state change.
  10155. Acknowledgment *string `locationName:"acknowledgment" type:"string"`
  10156. }
  10157. // String returns the string representation
  10158. func (s SubmitTaskStateChangeOutput) String() string {
  10159. return awsutil.Prettify(s)
  10160. }
  10161. // GoString returns the string representation
  10162. func (s SubmitTaskStateChangeOutput) GoString() string {
  10163. return s.String()
  10164. }
  10165. // SetAcknowledgment sets the Acknowledgment field's value.
  10166. func (s *SubmitTaskStateChangeOutput) SetAcknowledgment(v string) *SubmitTaskStateChangeOutput {
  10167. s.Acknowledgment = &v
  10168. return s
  10169. }
  10170. // A list of namespaced kernel parameters to set in the container. This parameter
  10171. // maps to Sysctls in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate)
  10172. // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/)
  10173. // and the --sysctl option to docker run (https://docs.docker.com/engine/reference/run/).
  10174. //
  10175. // It is not recommended that you specify network-related systemControls parameters
  10176. // for multiple containers in a single task that also uses either the awsvpc
  10177. // or host network mode for the following reasons:
  10178. //
  10179. // * For tasks that use the awsvpc network mode, if you set systemControls
  10180. // for any container, it applies to all containers in the task. If you set
  10181. // different systemControls for multiple containers in a single task, the
  10182. // container that is started last determines which systemControls take effect.
  10183. //
  10184. // * For tasks that use the host network mode, the systemControls parameter
  10185. // applies to the container instance's kernel parameter as well as that of
  10186. // all containers of any tasks running on that container instance.
  10187. type SystemControl struct {
  10188. _ struct{} `type:"structure"`
  10189. // The namespaced kernel parameter for which to set a value.
  10190. Namespace *string `locationName:"namespace" type:"string"`
  10191. // The value for the namespaced kernel parameter specified in namespace.
  10192. Value *string `locationName:"value" type:"string"`
  10193. }
  10194. // String returns the string representation
  10195. func (s SystemControl) String() string {
  10196. return awsutil.Prettify(s)
  10197. }
  10198. // GoString returns the string representation
  10199. func (s SystemControl) GoString() string {
  10200. return s.String()
  10201. }
  10202. // SetNamespace sets the Namespace field's value.
  10203. func (s *SystemControl) SetNamespace(v string) *SystemControl {
  10204. s.Namespace = &v
  10205. return s
  10206. }
  10207. // SetValue sets the Value field's value.
  10208. func (s *SystemControl) SetValue(v string) *SystemControl {
  10209. s.Value = &v
  10210. return s
  10211. }
  10212. // The metadata that you apply to a resource to help you categorize and organize
  10213. // them. Each tag consists of a key and an optional value, both of which you
  10214. // define. Tag keys can have a maximum character length of 128 characters, and
  10215. // tag values can have a maximum length of 256 characters.
  10216. type Tag struct {
  10217. _ struct{} `type:"structure"`
  10218. // One part of a key-value pair that make up a tag. A key is a general label
  10219. // that acts like a category for more specific tag values.
  10220. Key *string `locationName:"key" min:"1" type:"string"`
  10221. // The optional part of a key-value pair that make up a tag. A value acts as
  10222. // a descriptor within a tag category (key).
  10223. Value *string `locationName:"value" type:"string"`
  10224. }
  10225. // String returns the string representation
  10226. func (s Tag) String() string {
  10227. return awsutil.Prettify(s)
  10228. }
  10229. // GoString returns the string representation
  10230. func (s Tag) GoString() string {
  10231. return s.String()
  10232. }
  10233. // Validate inspects the fields of the type to determine if they are valid.
  10234. func (s *Tag) Validate() error {
  10235. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  10236. if s.Key != nil && len(*s.Key) < 1 {
  10237. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10238. }
  10239. if invalidParams.Len() > 0 {
  10240. return invalidParams
  10241. }
  10242. return nil
  10243. }
  10244. // SetKey sets the Key field's value.
  10245. func (s *Tag) SetKey(v string) *Tag {
  10246. s.Key = &v
  10247. return s
  10248. }
  10249. // SetValue sets the Value field's value.
  10250. func (s *Tag) SetValue(v string) *Tag {
  10251. s.Value = &v
  10252. return s
  10253. }
  10254. type TagResourceInput struct {
  10255. _ struct{} `type:"structure"`
  10256. // The Amazon Resource Name (ARN) of the resource to which to add tags. Currently,
  10257. // the supported resources are Amazon ECS tasks, services, task definitions,
  10258. // clusters, and container instances.
  10259. //
  10260. // ResourceArn is a required field
  10261. ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"`
  10262. // The tags to add to the resource. A tag is an array of key-value pairs. Tag
  10263. // keys can have a maximum character length of 128 characters, and tag values
  10264. // can have a maximum length of 256 characters.
  10265. //
  10266. // Tags is a required field
  10267. Tags []*Tag `locationName:"tags" type:"list" required:"true"`
  10268. }
  10269. // String returns the string representation
  10270. func (s TagResourceInput) String() string {
  10271. return awsutil.Prettify(s)
  10272. }
  10273. // GoString returns the string representation
  10274. func (s TagResourceInput) GoString() string {
  10275. return s.String()
  10276. }
  10277. // Validate inspects the fields of the type to determine if they are valid.
  10278. func (s *TagResourceInput) Validate() error {
  10279. invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  10280. if s.ResourceArn == nil {
  10281. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  10282. }
  10283. if s.Tags == nil {
  10284. invalidParams.Add(request.NewErrParamRequired("Tags"))
  10285. }
  10286. if s.Tags != nil {
  10287. for i, v := range s.Tags {
  10288. if v == nil {
  10289. continue
  10290. }
  10291. if err := v.Validate(); err != nil {
  10292. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  10293. }
  10294. }
  10295. }
  10296. if invalidParams.Len() > 0 {
  10297. return invalidParams
  10298. }
  10299. return nil
  10300. }
  10301. // SetResourceArn sets the ResourceArn field's value.
  10302. func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput {
  10303. s.ResourceArn = &v
  10304. return s
  10305. }
  10306. // SetTags sets the Tags field's value.
  10307. func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
  10308. s.Tags = v
  10309. return s
  10310. }
  10311. type TagResourceOutput struct {
  10312. _ struct{} `type:"structure"`
  10313. }
  10314. // String returns the string representation
  10315. func (s TagResourceOutput) String() string {
  10316. return awsutil.Prettify(s)
  10317. }
  10318. // GoString returns the string representation
  10319. func (s TagResourceOutput) GoString() string {
  10320. return s.String()
  10321. }
  10322. // Details on a task in a cluster.
  10323. type Task struct {
  10324. _ struct{} `type:"structure"`
  10325. // The Elastic Network Adapter associated with the task if the task uses the
  10326. // awsvpc network mode.
  10327. Attachments []*Attachment `locationName:"attachments" type:"list"`
  10328. // The ARN of the cluster that hosts the task.
  10329. ClusterArn *string `locationName:"clusterArn" type:"string"`
  10330. // The connectivity status of a task.
  10331. Connectivity *string `locationName:"connectivity" type:"string" enum:"Connectivity"`
  10332. // The Unix timestamp for when the task last went into CONNECTED status.
  10333. ConnectivityAt *time.Time `locationName:"connectivityAt" type:"timestamp"`
  10334. // The ARN of the container instances that host the task.
  10335. ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"`
  10336. // The containers associated with the task.
  10337. Containers []*Container `locationName:"containers" type:"list"`
  10338. // The number of CPU units used by the task as expressed in a task definition.
  10339. // It can be expressed as an integer using CPU units, for example 1024. It can
  10340. // also be expressed as a string using vCPUs, for example 1 vCPU or 1 vcpu.
  10341. // String values are converted to an integer indicating the CPU units when the
  10342. // task definition is registered.
  10343. //
  10344. // If you are using the EC2 launch type, this field is optional. Supported values
  10345. // are between 128 CPU units (0.125 vCPUs) and 10240 CPU units (10 vCPUs).
  10346. //
  10347. // If you are using the Fargate launch type, this field is required and you
  10348. // must use one of the following values, which determines your range of supported
  10349. // values for the memory parameter:
  10350. //
  10351. // * 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB),
  10352. // 2048 (2 GB)
  10353. //
  10354. // * 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072
  10355. // (3 GB), 4096 (4 GB)
  10356. //
  10357. // * 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096
  10358. // (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
  10359. //
  10360. // * 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384
  10361. // (16 GB) in increments of 1024 (1 GB)
  10362. //
  10363. // * 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720
  10364. // (30 GB) in increments of 1024 (1 GB)
  10365. Cpu *string `locationName:"cpu" type:"string"`
  10366. // The Unix timestamp for when the task was created (the task entered the PENDING
  10367. // state).
  10368. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"`
  10369. // The desired status of the task. For more information, see Task Lifecycle
  10370. // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_life_cycle.html).
  10371. DesiredStatus *string `locationName:"desiredStatus" type:"string"`
  10372. // The Unix timestamp for when the task execution stopped.
  10373. ExecutionStoppedAt *time.Time `locationName:"executionStoppedAt" type:"timestamp"`
  10374. // The name of the task group associated with the task.
  10375. Group *string `locationName:"group" type:"string"`
  10376. // The health status for the task, which is determined by the health of the
  10377. // essential containers in the task. If all essential containers in the task
  10378. // are reporting as HEALTHY, then the task status also reports as HEALTHY. If
  10379. // any essential containers in the task are reporting as UNHEALTHY or UNKNOWN,
  10380. // then the task status also reports as UNHEALTHY or UNKNOWN, accordingly.
  10381. //
  10382. // The Amazon ECS container agent does not monitor or report on Docker health
  10383. // checks that are embedded in a container image (such as those specified in
  10384. // a parent image or from the image's Dockerfile) and not specified in the container
  10385. // definition. Health check parameters that are specified in a container definition
  10386. // override any Docker health checks that exist in the container image.
  10387. HealthStatus *string `locationName:"healthStatus" type:"string" enum:"HealthStatus"`
  10388. // The last known status of the task. For more information, see Task Lifecycle
  10389. // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_life_cycle.html).
  10390. LastStatus *string `locationName:"lastStatus" type:"string"`
  10391. // The launch type on which your task is running. For more information, see
  10392. // Amazon ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
  10393. // in the Amazon Elastic Container Service Developer Guide.
  10394. LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"`
  10395. // The amount of memory (in MiB) used by the task as expressed in a task definition.
  10396. // It can be expressed as an integer using MiB, for example 1024. It can also
  10397. // be expressed as a string using GB, for example 1GB or 1 GB. String values
  10398. // are converted to an integer indicating the MiB when the task definition is
  10399. // registered.
  10400. //
  10401. // If you are using the EC2 launch type, this field is optional.
  10402. //
  10403. // If you are using the Fargate launch type, this field is required and you
  10404. // must use one of the following values, which determines your range of supported
  10405. // values for the cpu parameter:
  10406. //
  10407. // * 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25
  10408. // vCPU)
  10409. //
  10410. // * 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values:
  10411. // 512 (.5 vCPU)
  10412. //
  10413. // * 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168
  10414. // (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)
  10415. //
  10416. // * Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) -
  10417. // Available cpu values: 2048 (2 vCPU)
  10418. //
  10419. // * Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) -
  10420. // Available cpu values: 4096 (4 vCPU)
  10421. Memory *string `locationName:"memory" type:"string"`
  10422. // One or more container overrides.
  10423. Overrides *TaskOverride `locationName:"overrides" type:"structure"`
  10424. // The platform version on which your task is running. A platform version is
  10425. // only specified for tasks using the Fargate launch type. If one is not specified,
  10426. // the LATEST platform version is used by default. For more information, see
  10427. // AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html)
  10428. // in the Amazon Elastic Container Service Developer Guide.
  10429. PlatformVersion *string `locationName:"platformVersion" type:"string"`
  10430. // The Unix timestamp for when the container image pull began.
  10431. PullStartedAt *time.Time `locationName:"pullStartedAt" type:"timestamp"`
  10432. // The Unix timestamp for when the container image pull completed.
  10433. PullStoppedAt *time.Time `locationName:"pullStoppedAt" type:"timestamp"`
  10434. // The Unix timestamp for when the task started (the task transitioned from
  10435. // the PENDING state to the RUNNING state).
  10436. StartedAt *time.Time `locationName:"startedAt" type:"timestamp"`
  10437. // The tag specified when a task is started. If the task is started by an Amazon
  10438. // ECS service, then the startedBy parameter contains the deployment ID of the
  10439. // service that starts it.
  10440. StartedBy *string `locationName:"startedBy" type:"string"`
  10441. // The stop code indicating why a task was stopped. The stoppedReason may contain
  10442. // additional details.
  10443. StopCode *string `locationName:"stopCode" type:"string" enum:"TaskStopCode"`
  10444. // The Unix timestamp for when the task was stopped (the task transitioned from
  10445. // the RUNNING state to the STOPPED state).
  10446. StoppedAt *time.Time `locationName:"stoppedAt" type:"timestamp"`
  10447. // The reason that the task was stopped.
  10448. StoppedReason *string `locationName:"stoppedReason" type:"string"`
  10449. // The Unix timestamp for when the task stops (transitions from the RUNNING
  10450. // state to STOPPED).
  10451. StoppingAt *time.Time `locationName:"stoppingAt" type:"timestamp"`
  10452. // The metadata that you apply to the task to help you categorize and organize
  10453. // them. Each tag consists of a key and an optional value, both of which you
  10454. // define. Tag keys can have a maximum character length of 128 characters, and
  10455. // tag values can have a maximum length of 256 characters.
  10456. Tags []*Tag `locationName:"tags" type:"list"`
  10457. // The Amazon Resource Name (ARN) of the task.
  10458. TaskArn *string `locationName:"taskArn" type:"string"`
  10459. // The ARN of the task definition that creates the task.
  10460. TaskDefinitionArn *string `locationName:"taskDefinitionArn" type:"string"`
  10461. // The version counter for the task. Every time a task experiences a change
  10462. // that triggers a CloudWatch event, the version counter is incremented. If
  10463. // you are replicating your Amazon ECS task state with CloudWatch Events, you
  10464. // can compare the version of a task reported by the Amazon ECS API actionss
  10465. // with the version reported in CloudWatch Events for the task (inside the detail
  10466. // object) to verify that the version in your event stream is current.
  10467. Version *int64 `locationName:"version" type:"long"`
  10468. }
  10469. // String returns the string representation
  10470. func (s Task) String() string {
  10471. return awsutil.Prettify(s)
  10472. }
  10473. // GoString returns the string representation
  10474. func (s Task) GoString() string {
  10475. return s.String()
  10476. }
  10477. // SetAttachments sets the Attachments field's value.
  10478. func (s *Task) SetAttachments(v []*Attachment) *Task {
  10479. s.Attachments = v
  10480. return s
  10481. }
  10482. // SetClusterArn sets the ClusterArn field's value.
  10483. func (s *Task) SetClusterArn(v string) *Task {
  10484. s.ClusterArn = &v
  10485. return s
  10486. }
  10487. // SetConnectivity sets the Connectivity field's value.
  10488. func (s *Task) SetConnectivity(v string) *Task {
  10489. s.Connectivity = &v
  10490. return s
  10491. }
  10492. // SetConnectivityAt sets the ConnectivityAt field's value.
  10493. func (s *Task) SetConnectivityAt(v time.Time) *Task {
  10494. s.ConnectivityAt = &v
  10495. return s
  10496. }
  10497. // SetContainerInstanceArn sets the ContainerInstanceArn field's value.
  10498. func (s *Task) SetContainerInstanceArn(v string) *Task {
  10499. s.ContainerInstanceArn = &v
  10500. return s
  10501. }
  10502. // SetContainers sets the Containers field's value.
  10503. func (s *Task) SetContainers(v []*Container) *Task {
  10504. s.Containers = v
  10505. return s
  10506. }
  10507. // SetCpu sets the Cpu field's value.
  10508. func (s *Task) SetCpu(v string) *Task {
  10509. s.Cpu = &v
  10510. return s
  10511. }
  10512. // SetCreatedAt sets the CreatedAt field's value.
  10513. func (s *Task) SetCreatedAt(v time.Time) *Task {
  10514. s.CreatedAt = &v
  10515. return s
  10516. }
  10517. // SetDesiredStatus sets the DesiredStatus field's value.
  10518. func (s *Task) SetDesiredStatus(v string) *Task {
  10519. s.DesiredStatus = &v
  10520. return s
  10521. }
  10522. // SetExecutionStoppedAt sets the ExecutionStoppedAt field's value.
  10523. func (s *Task) SetExecutionStoppedAt(v time.Time) *Task {
  10524. s.ExecutionStoppedAt = &v
  10525. return s
  10526. }
  10527. // SetGroup sets the Group field's value.
  10528. func (s *Task) SetGroup(v string) *Task {
  10529. s.Group = &v
  10530. return s
  10531. }
  10532. // SetHealthStatus sets the HealthStatus field's value.
  10533. func (s *Task) SetHealthStatus(v string) *Task {
  10534. s.HealthStatus = &v
  10535. return s
  10536. }
  10537. // SetLastStatus sets the LastStatus field's value.
  10538. func (s *Task) SetLastStatus(v string) *Task {
  10539. s.LastStatus = &v
  10540. return s
  10541. }
  10542. // SetLaunchType sets the LaunchType field's value.
  10543. func (s *Task) SetLaunchType(v string) *Task {
  10544. s.LaunchType = &v
  10545. return s
  10546. }
  10547. // SetMemory sets the Memory field's value.
  10548. func (s *Task) SetMemory(v string) *Task {
  10549. s.Memory = &v
  10550. return s
  10551. }
  10552. // SetOverrides sets the Overrides field's value.
  10553. func (s *Task) SetOverrides(v *TaskOverride) *Task {
  10554. s.Overrides = v
  10555. return s
  10556. }
  10557. // SetPlatformVersion sets the PlatformVersion field's value.
  10558. func (s *Task) SetPlatformVersion(v string) *Task {
  10559. s.PlatformVersion = &v
  10560. return s
  10561. }
  10562. // SetPullStartedAt sets the PullStartedAt field's value.
  10563. func (s *Task) SetPullStartedAt(v time.Time) *Task {
  10564. s.PullStartedAt = &v
  10565. return s
  10566. }
  10567. // SetPullStoppedAt sets the PullStoppedAt field's value.
  10568. func (s *Task) SetPullStoppedAt(v time.Time) *Task {
  10569. s.PullStoppedAt = &v
  10570. return s
  10571. }
  10572. // SetStartedAt sets the StartedAt field's value.
  10573. func (s *Task) SetStartedAt(v time.Time) *Task {
  10574. s.StartedAt = &v
  10575. return s
  10576. }
  10577. // SetStartedBy sets the StartedBy field's value.
  10578. func (s *Task) SetStartedBy(v string) *Task {
  10579. s.StartedBy = &v
  10580. return s
  10581. }
  10582. // SetStopCode sets the StopCode field's value.
  10583. func (s *Task) SetStopCode(v string) *Task {
  10584. s.StopCode = &v
  10585. return s
  10586. }
  10587. // SetStoppedAt sets the StoppedAt field's value.
  10588. func (s *Task) SetStoppedAt(v time.Time) *Task {
  10589. s.StoppedAt = &v
  10590. return s
  10591. }
  10592. // SetStoppedReason sets the StoppedReason field's value.
  10593. func (s *Task) SetStoppedReason(v string) *Task {
  10594. s.StoppedReason = &v
  10595. return s
  10596. }
  10597. // SetStoppingAt sets the StoppingAt field's value.
  10598. func (s *Task) SetStoppingAt(v time.Time) *Task {
  10599. s.StoppingAt = &v
  10600. return s
  10601. }
  10602. // SetTags sets the Tags field's value.
  10603. func (s *Task) SetTags(v []*Tag) *Task {
  10604. s.Tags = v
  10605. return s
  10606. }
  10607. // SetTaskArn sets the TaskArn field's value.
  10608. func (s *Task) SetTaskArn(v string) *Task {
  10609. s.TaskArn = &v
  10610. return s
  10611. }
  10612. // SetTaskDefinitionArn sets the TaskDefinitionArn field's value.
  10613. func (s *Task) SetTaskDefinitionArn(v string) *Task {
  10614. s.TaskDefinitionArn = &v
  10615. return s
  10616. }
  10617. // SetVersion sets the Version field's value.
  10618. func (s *Task) SetVersion(v int64) *Task {
  10619. s.Version = &v
  10620. return s
  10621. }
  10622. // Details of a task definition.
  10623. type TaskDefinition struct {
  10624. _ struct{} `type:"structure"`
  10625. // The launch type to use with your task. For more information, see Amazon ECS
  10626. // Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
  10627. // in the Amazon Elastic Container Service Developer Guide.
  10628. Compatibilities []*string `locationName:"compatibilities" type:"list"`
  10629. // A list of container definitions in JSON format that describe the different
  10630. // containers that make up your task. For more information about container definition
  10631. // parameters and defaults, see Amazon ECS Task Definitions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html)
  10632. // in the Amazon Elastic Container Service Developer Guide.
  10633. ContainerDefinitions []*ContainerDefinition `locationName:"containerDefinitions" type:"list"`
  10634. // The number of cpu units used by the task. If you are using the EC2 launch
  10635. // type, this field is optional and any value can be used. If you are using
  10636. // the Fargate launch type, this field is required and you must use one of the
  10637. // following values, which determines your range of valid values for the memory
  10638. // parameter:
  10639. //
  10640. // * 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB),
  10641. // 2048 (2 GB)
  10642. //
  10643. // * 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072
  10644. // (3 GB), 4096 (4 GB)
  10645. //
  10646. // * 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096
  10647. // (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
  10648. //
  10649. // * 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384
  10650. // (16 GB) in increments of 1024 (1 GB)
  10651. //
  10652. // * 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720
  10653. // (30 GB) in increments of 1024 (1 GB)
  10654. Cpu *string `locationName:"cpu" type:"string"`
  10655. // The Amazon Resource Name (ARN) of the task execution role that the Amazon
  10656. // ECS container agent and the Docker daemon can assume.
  10657. ExecutionRoleArn *string `locationName:"executionRoleArn" type:"string"`
  10658. // The family of your task definition, used as the definition name.
  10659. Family *string `locationName:"family" type:"string"`
  10660. // The IPC resource namespace to use for the containers in the task. The valid
  10661. // values are host, task, or none. If host is specified, then all containers
  10662. // within the tasks that specified the host IPC mode on the same container instance
  10663. // share the same IPC resources with the host Amazon EC2 instance. If task is
  10664. // specified, all containers within the specified task share the same IPC resources.
  10665. // If none is specified, then IPC resources within the containers of a task
  10666. // are private and not shared with other containers in a task or on the container
  10667. // instance. If no value is specified, then the IPC resource namespace sharing
  10668. // depends on the Docker daemon setting on the container instance. For more
  10669. // information, see IPC settings (https://docs.docker.com/engine/reference/run/#ipc-settings---ipc)
  10670. // in the Docker run reference.
  10671. //
  10672. // If the host IPC mode is used, be aware that there is a heightened risk of
  10673. // undesired IPC namespace expose. For more information, see Docker security
  10674. // (https://docs.docker.com/engine/security/security/).
  10675. //
  10676. // If you are setting namespaced kernel parameters using systemControls for
  10677. // the containers in the task, the following will apply to your IPC resource
  10678. // namespace. For more information, see System Controls (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html)
  10679. // in the Amazon Elastic Container Service Developer Guide.
  10680. //
  10681. // * For tasks that use the host IPC mode, IPC namespace related systemControls
  10682. // are not supported.
  10683. //
  10684. // * For tasks that use the task IPC mode, IPC namespace related systemControls
  10685. // will apply to all containers within a task.
  10686. //
  10687. // This parameter is not supported for Windows containers or tasks using the
  10688. // Fargate launch type.
  10689. IpcMode *string `locationName:"ipcMode" type:"string" enum:"IpcMode"`
  10690. // The amount (in MiB) of memory used by the task. If using the EC2 launch type,
  10691. // this field is optional and any value can be used. If using the Fargate launch
  10692. // type, this field is required and you must use one of the following values,
  10693. // which determines your range of valid values for the cpu parameter:
  10694. //
  10695. // * 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25
  10696. // vCPU)
  10697. //
  10698. // * 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values:
  10699. // 512 (.5 vCPU)
  10700. //
  10701. // * 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168
  10702. // (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)
  10703. //
  10704. // * Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) -
  10705. // Available cpu values: 2048 (2 vCPU)
  10706. //
  10707. // * Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) -
  10708. // Available cpu values: 4096 (4 vCPU)
  10709. Memory *string `locationName:"memory" type:"string"`
  10710. // The Docker networking mode to use for the containers in the task. The valid
  10711. // values are none, bridge, awsvpc, and host. The default Docker network mode
  10712. // is bridge. If you are using the Fargate launch type, the awsvpc network mode
  10713. // is required. If you are using the EC2 launch type, any network mode can be
  10714. // used. If the network mode is set to none, you cannot specify port mappings
  10715. // in your container definitions, and the tasks containers do not have external
  10716. // connectivity. The host and awsvpc network modes offer the highest networking
  10717. // performance for containers because they use the EC2 network stack instead
  10718. // of the virtualized network stack provided by the bridge mode.
  10719. //
  10720. // With the host and awsvpc network modes, exposed container ports are mapped
  10721. // directly to the corresponding host port (for the host network mode) or the
  10722. // attached elastic network interface port (for the awsvpc network mode), so
  10723. // you cannot take advantage of dynamic host port mappings.
  10724. //
  10725. // If the network mode is awsvpc, the task is allocated an elastic network interface,
  10726. // and you must specify a NetworkConfiguration value when you create a service
  10727. // or run a task with the task definition. For more information, see Task Networking
  10728. // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html)
  10729. // in the Amazon Elastic Container Service Developer Guide.
  10730. //
  10731. // Currently, only Amazon ECS-optimized AMIs, other Amazon Linux variants with
  10732. // the ecs-init package, or AWS Fargate infrastructure support the awsvpc network
  10733. // mode.
  10734. //
  10735. // If the network mode is host, you cannot run multiple instantiations of the
  10736. // same task on a single container instance when port mappings are used.
  10737. //
  10738. // Docker for Windows uses different network modes than Docker for Linux. When
  10739. // you register a task definition with Windows containers, you must not specify
  10740. // a network mode. If you use the console to register a task definition with
  10741. // Windows containers, you must choose the <default> network mode object.
  10742. //
  10743. // For more information, see Network settings (https://docs.docker.com/engine/reference/run/#network-settings)
  10744. // in the Docker run reference.
  10745. NetworkMode *string `locationName:"networkMode" type:"string" enum:"NetworkMode"`
  10746. // The process namespace to use for the containers in the task. The valid values
  10747. // are host or task. If host is specified, then all containers within the tasks
  10748. // that specified the host PID mode on the same container instance share the
  10749. // same IPC resources with the host Amazon EC2 instance. If task is specified,
  10750. // all containers within the specified task share the same process namespace.
  10751. // If no value is specified, the default is a private namespace. For more information,
  10752. // see PID settings (https://docs.docker.com/engine/reference/run/#pid-settings---pid)
  10753. // in the Docker run reference.
  10754. //
  10755. // If the host PID mode is used, be aware that there is a heightened risk of
  10756. // undesired process namespace expose. For more information, see Docker security
  10757. // (https://docs.docker.com/engine/security/security/).
  10758. //
  10759. // This parameter is not supported for Windows containers or tasks using the
  10760. // Fargate launch type.
  10761. PidMode *string `locationName:"pidMode" type:"string" enum:"PidMode"`
  10762. // An array of placement constraint objects to use for tasks. This field is
  10763. // not valid if you are using the Fargate launch type for your task.
  10764. PlacementConstraints []*TaskDefinitionPlacementConstraint `locationName:"placementConstraints" type:"list"`
  10765. // The container instance attributes required by your task. This field is not
  10766. // valid if you are using the Fargate launch type for your task.
  10767. RequiresAttributes []*Attribute `locationName:"requiresAttributes" type:"list"`
  10768. // The launch type that the task is using.
  10769. RequiresCompatibilities []*string `locationName:"requiresCompatibilities" type:"list"`
  10770. // The revision of the task in a particular family. The revision is a version
  10771. // number of a task definition in a family. When you register a task definition
  10772. // for the first time, the revision is 1. Each time that you register a new
  10773. // revision of a task definition in the same family, the revision value always
  10774. // increases by one, even if you have deregistered previous revisions in this
  10775. // family.
  10776. Revision *int64 `locationName:"revision" type:"integer"`
  10777. // The status of the task definition.
  10778. Status *string `locationName:"status" type:"string" enum:"TaskDefinitionStatus"`
  10779. // The full Amazon Resource Name (ARN) of the task definition.
  10780. TaskDefinitionArn *string `locationName:"taskDefinitionArn" type:"string"`
  10781. // The ARN of the IAM role that containers in this task can assume. All containers
  10782. // in this task are granted the permissions that are specified in this role.
  10783. //
  10784. // IAM roles for tasks on Windows require that the -EnableTaskIAMRole option
  10785. // is set when you launch the Amazon ECS-optimized Windows AMI. Your containers
  10786. // must also run some configuration code in order to take advantage of the feature.
  10787. // For more information, see Windows IAM Roles for Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows_task_IAM_roles.html)
  10788. // in the Amazon Elastic Container Service Developer Guide.
  10789. TaskRoleArn *string `locationName:"taskRoleArn" type:"string"`
  10790. // The list of volumes in a task.
  10791. //
  10792. // If you are using the Fargate launch type, the host and sourcePath parameters
  10793. // are not supported.
  10794. //
  10795. // For more information about volume definition parameters and defaults, see
  10796. // Amazon ECS Task Definitions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html)
  10797. // in the Amazon Elastic Container Service Developer Guide.
  10798. Volumes []*Volume `locationName:"volumes" type:"list"`
  10799. }
  10800. // String returns the string representation
  10801. func (s TaskDefinition) String() string {
  10802. return awsutil.Prettify(s)
  10803. }
  10804. // GoString returns the string representation
  10805. func (s TaskDefinition) GoString() string {
  10806. return s.String()
  10807. }
  10808. // SetCompatibilities sets the Compatibilities field's value.
  10809. func (s *TaskDefinition) SetCompatibilities(v []*string) *TaskDefinition {
  10810. s.Compatibilities = v
  10811. return s
  10812. }
  10813. // SetContainerDefinitions sets the ContainerDefinitions field's value.
  10814. func (s *TaskDefinition) SetContainerDefinitions(v []*ContainerDefinition) *TaskDefinition {
  10815. s.ContainerDefinitions = v
  10816. return s
  10817. }
  10818. // SetCpu sets the Cpu field's value.
  10819. func (s *TaskDefinition) SetCpu(v string) *TaskDefinition {
  10820. s.Cpu = &v
  10821. return s
  10822. }
  10823. // SetExecutionRoleArn sets the ExecutionRoleArn field's value.
  10824. func (s *TaskDefinition) SetExecutionRoleArn(v string) *TaskDefinition {
  10825. s.ExecutionRoleArn = &v
  10826. return s
  10827. }
  10828. // SetFamily sets the Family field's value.
  10829. func (s *TaskDefinition) SetFamily(v string) *TaskDefinition {
  10830. s.Family = &v
  10831. return s
  10832. }
  10833. // SetIpcMode sets the IpcMode field's value.
  10834. func (s *TaskDefinition) SetIpcMode(v string) *TaskDefinition {
  10835. s.IpcMode = &v
  10836. return s
  10837. }
  10838. // SetMemory sets the Memory field's value.
  10839. func (s *TaskDefinition) SetMemory(v string) *TaskDefinition {
  10840. s.Memory = &v
  10841. return s
  10842. }
  10843. // SetNetworkMode sets the NetworkMode field's value.
  10844. func (s *TaskDefinition) SetNetworkMode(v string) *TaskDefinition {
  10845. s.NetworkMode = &v
  10846. return s
  10847. }
  10848. // SetPidMode sets the PidMode field's value.
  10849. func (s *TaskDefinition) SetPidMode(v string) *TaskDefinition {
  10850. s.PidMode = &v
  10851. return s
  10852. }
  10853. // SetPlacementConstraints sets the PlacementConstraints field's value.
  10854. func (s *TaskDefinition) SetPlacementConstraints(v []*TaskDefinitionPlacementConstraint) *TaskDefinition {
  10855. s.PlacementConstraints = v
  10856. return s
  10857. }
  10858. // SetRequiresAttributes sets the RequiresAttributes field's value.
  10859. func (s *TaskDefinition) SetRequiresAttributes(v []*Attribute) *TaskDefinition {
  10860. s.RequiresAttributes = v
  10861. return s
  10862. }
  10863. // SetRequiresCompatibilities sets the RequiresCompatibilities field's value.
  10864. func (s *TaskDefinition) SetRequiresCompatibilities(v []*string) *TaskDefinition {
  10865. s.RequiresCompatibilities = v
  10866. return s
  10867. }
  10868. // SetRevision sets the Revision field's value.
  10869. func (s *TaskDefinition) SetRevision(v int64) *TaskDefinition {
  10870. s.Revision = &v
  10871. return s
  10872. }
  10873. // SetStatus sets the Status field's value.
  10874. func (s *TaskDefinition) SetStatus(v string) *TaskDefinition {
  10875. s.Status = &v
  10876. return s
  10877. }
  10878. // SetTaskDefinitionArn sets the TaskDefinitionArn field's value.
  10879. func (s *TaskDefinition) SetTaskDefinitionArn(v string) *TaskDefinition {
  10880. s.TaskDefinitionArn = &v
  10881. return s
  10882. }
  10883. // SetTaskRoleArn sets the TaskRoleArn field's value.
  10884. func (s *TaskDefinition) SetTaskRoleArn(v string) *TaskDefinition {
  10885. s.TaskRoleArn = &v
  10886. return s
  10887. }
  10888. // SetVolumes sets the Volumes field's value.
  10889. func (s *TaskDefinition) SetVolumes(v []*Volume) *TaskDefinition {
  10890. s.Volumes = v
  10891. return s
  10892. }
  10893. // An object representing a constraint on task placement in the task definition.
  10894. //
  10895. // If you are using the Fargate launch type, task placement constraints are
  10896. // not supported.
  10897. //
  10898. // For more information, see Task Placement Constraints (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html)
  10899. // in the Amazon Elastic Container Service Developer Guide.
  10900. type TaskDefinitionPlacementConstraint struct {
  10901. _ struct{} `type:"structure"`
  10902. // A cluster query language expression to apply to the constraint. For more
  10903. // information, see Cluster Query Language (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html)
  10904. // in the Amazon Elastic Container Service Developer Guide.
  10905. Expression *string `locationName:"expression" type:"string"`
  10906. // The type of constraint. The DistinctInstance constraint ensures that each
  10907. // task in a particular group is running on a different container instance.
  10908. // The MemberOf constraint restricts selection to be from a group of valid candidates.
  10909. Type *string `locationName:"type" type:"string" enum:"TaskDefinitionPlacementConstraintType"`
  10910. }
  10911. // String returns the string representation
  10912. func (s TaskDefinitionPlacementConstraint) String() string {
  10913. return awsutil.Prettify(s)
  10914. }
  10915. // GoString returns the string representation
  10916. func (s TaskDefinitionPlacementConstraint) GoString() string {
  10917. return s.String()
  10918. }
  10919. // SetExpression sets the Expression field's value.
  10920. func (s *TaskDefinitionPlacementConstraint) SetExpression(v string) *TaskDefinitionPlacementConstraint {
  10921. s.Expression = &v
  10922. return s
  10923. }
  10924. // SetType sets the Type field's value.
  10925. func (s *TaskDefinitionPlacementConstraint) SetType(v string) *TaskDefinitionPlacementConstraint {
  10926. s.Type = &v
  10927. return s
  10928. }
  10929. // The overrides associated with a task.
  10930. type TaskOverride struct {
  10931. _ struct{} `type:"structure"`
  10932. // One or more container overrides sent to a task.
  10933. ContainerOverrides []*ContainerOverride `locationName:"containerOverrides" type:"list"`
  10934. // The Amazon Resource Name (ARN) of the task execution role that the Amazon
  10935. // ECS container agent and the Docker daemon can assume.
  10936. ExecutionRoleArn *string `locationName:"executionRoleArn" type:"string"`
  10937. // The Amazon Resource Name (ARN) of the IAM role that containers in this task
  10938. // can assume. All containers in this task are granted the permissions that
  10939. // are specified in this role.
  10940. TaskRoleArn *string `locationName:"taskRoleArn" type:"string"`
  10941. }
  10942. // String returns the string representation
  10943. func (s TaskOverride) String() string {
  10944. return awsutil.Prettify(s)
  10945. }
  10946. // GoString returns the string representation
  10947. func (s TaskOverride) GoString() string {
  10948. return s.String()
  10949. }
  10950. // SetContainerOverrides sets the ContainerOverrides field's value.
  10951. func (s *TaskOverride) SetContainerOverrides(v []*ContainerOverride) *TaskOverride {
  10952. s.ContainerOverrides = v
  10953. return s
  10954. }
  10955. // SetExecutionRoleArn sets the ExecutionRoleArn field's value.
  10956. func (s *TaskOverride) SetExecutionRoleArn(v string) *TaskOverride {
  10957. s.ExecutionRoleArn = &v
  10958. return s
  10959. }
  10960. // SetTaskRoleArn sets the TaskRoleArn field's value.
  10961. func (s *TaskOverride) SetTaskRoleArn(v string) *TaskOverride {
  10962. s.TaskRoleArn = &v
  10963. return s
  10964. }
  10965. // Information about a set of Amazon ECS tasks in an AWS CodeDeploy deployment.
  10966. // An Amazon ECS task set includes details such as the desired number of tasks,
  10967. // how many tasks are running, and whether the task set serves production traffic.
  10968. type TaskSet struct {
  10969. _ struct{} `type:"structure"`
  10970. // The computed desired count for the task set. This is calculated by multiplying
  10971. // the service's desiredCount by the task set's scale percentage.
  10972. ComputedDesiredCount *int64 `locationName:"computedDesiredCount" type:"integer"`
  10973. // The Unix timestamp for when the task set was created.
  10974. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"`
  10975. // The deployment ID of the AWS CodeDeploy deployment.
  10976. ExternalId *string `locationName:"externalId" type:"string"`
  10977. // The ID of the task set.
  10978. Id *string `locationName:"id" type:"string"`
  10979. // The launch type the tasks in the task set are using. For more information,
  10980. // see Amazon ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
  10981. // in the Amazon Elastic Container Service Developer Guide.
  10982. LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"`
  10983. // Details on a load balancer that is used with a task set.
  10984. LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"`
  10985. // The network configuration for the task set.
  10986. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"`
  10987. // The number of tasks in the task set that are in the PENDING status during
  10988. // a deployment. A task in the PENDING state is preparing to enter the RUNNING
  10989. // state. A task set enters the PENDING status when it launches for the first
  10990. // time, or when it is restarted after being in the STOPPED state.
  10991. PendingCount *int64 `locationName:"pendingCount" type:"integer"`
  10992. // The platform version on which the tasks in the task set are running. A platform
  10993. // version is only specified for tasks using the Fargate launch type. If one
  10994. // is not specified, the LATEST platform version is used by default. For more
  10995. // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html)
  10996. // in the Amazon Elastic Container Service Developer Guide.
  10997. PlatformVersion *string `locationName:"platformVersion" type:"string"`
  10998. // The number of tasks in the task set that are in the RUNNING status during
  10999. // a deployment. A task in the RUNNING state is running and ready for use.
  11000. RunningCount *int64 `locationName:"runningCount" type:"integer"`
  11001. // A floating-point percentage of the desired number of tasks to place and keep
  11002. // running in the service.
  11003. Scale *Scale `locationName:"scale" type:"structure"`
  11004. // The stability status, which indicates whether the task set has reached a
  11005. // steady state. If the following conditions are met, the task set will be in
  11006. // STEADY_STATE:
  11007. //
  11008. // * The task runningCount is equal to the computedDesiredCount.
  11009. //
  11010. // * The pendingCount is 0.
  11011. //
  11012. // * There are no tasks running on container instances in the DRAINING status.
  11013. //
  11014. // * All tasks are reporting a healthy status from the load balancers, service
  11015. // discovery, and container health checks.
  11016. //
  11017. // If any of those conditions are not met, the stability status returns STABILIZING.
  11018. StabilityStatus *string `locationName:"stabilityStatus" type:"string" enum:"StabilityStatus"`
  11019. // The Unix timestamp for when the task set stability status was retrieved.
  11020. StabilityStatusAt *time.Time `locationName:"stabilityStatusAt" type:"timestamp"`
  11021. // The tag specified when a task set is started. If the task is started by an
  11022. // AWS CodeDeploy deployment, then the startedBy parameter is CODE_DEPLOY.
  11023. StartedBy *string `locationName:"startedBy" type:"string"`
  11024. // The status of the task set. The following describes each state:
  11025. //
  11026. // PRIMARYThe task set is serving production traffic.
  11027. //
  11028. // ACTIVEThe task set is not serving production traffic.
  11029. //
  11030. // DRAININGThe tasks in the task set are being stopped and their corresponding
  11031. // targets are being deregistered from their target group.
  11032. Status *string `locationName:"status" type:"string"`
  11033. // The task definition the task set is using.
  11034. TaskDefinition *string `locationName:"taskDefinition" type:"string"`
  11035. // The Amazon Resource Name (ARN) of the task set.
  11036. TaskSetArn *string `locationName:"taskSetArn" type:"string"`
  11037. // The Unix timestamp for when the task set was last updated.
  11038. UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp"`
  11039. }
  11040. // String returns the string representation
  11041. func (s TaskSet) String() string {
  11042. return awsutil.Prettify(s)
  11043. }
  11044. // GoString returns the string representation
  11045. func (s TaskSet) GoString() string {
  11046. return s.String()
  11047. }
  11048. // SetComputedDesiredCount sets the ComputedDesiredCount field's value.
  11049. func (s *TaskSet) SetComputedDesiredCount(v int64) *TaskSet {
  11050. s.ComputedDesiredCount = &v
  11051. return s
  11052. }
  11053. // SetCreatedAt sets the CreatedAt field's value.
  11054. func (s *TaskSet) SetCreatedAt(v time.Time) *TaskSet {
  11055. s.CreatedAt = &v
  11056. return s
  11057. }
  11058. // SetExternalId sets the ExternalId field's value.
  11059. func (s *TaskSet) SetExternalId(v string) *TaskSet {
  11060. s.ExternalId = &v
  11061. return s
  11062. }
  11063. // SetId sets the Id field's value.
  11064. func (s *TaskSet) SetId(v string) *TaskSet {
  11065. s.Id = &v
  11066. return s
  11067. }
  11068. // SetLaunchType sets the LaunchType field's value.
  11069. func (s *TaskSet) SetLaunchType(v string) *TaskSet {
  11070. s.LaunchType = &v
  11071. return s
  11072. }
  11073. // SetLoadBalancers sets the LoadBalancers field's value.
  11074. func (s *TaskSet) SetLoadBalancers(v []*LoadBalancer) *TaskSet {
  11075. s.LoadBalancers = v
  11076. return s
  11077. }
  11078. // SetNetworkConfiguration sets the NetworkConfiguration field's value.
  11079. func (s *TaskSet) SetNetworkConfiguration(v *NetworkConfiguration) *TaskSet {
  11080. s.NetworkConfiguration = v
  11081. return s
  11082. }
  11083. // SetPendingCount sets the PendingCount field's value.
  11084. func (s *TaskSet) SetPendingCount(v int64) *TaskSet {
  11085. s.PendingCount = &v
  11086. return s
  11087. }
  11088. // SetPlatformVersion sets the PlatformVersion field's value.
  11089. func (s *TaskSet) SetPlatformVersion(v string) *TaskSet {
  11090. s.PlatformVersion = &v
  11091. return s
  11092. }
  11093. // SetRunningCount sets the RunningCount field's value.
  11094. func (s *TaskSet) SetRunningCount(v int64) *TaskSet {
  11095. s.RunningCount = &v
  11096. return s
  11097. }
  11098. // SetScale sets the Scale field's value.
  11099. func (s *TaskSet) SetScale(v *Scale) *TaskSet {
  11100. s.Scale = v
  11101. return s
  11102. }
  11103. // SetStabilityStatus sets the StabilityStatus field's value.
  11104. func (s *TaskSet) SetStabilityStatus(v string) *TaskSet {
  11105. s.StabilityStatus = &v
  11106. return s
  11107. }
  11108. // SetStabilityStatusAt sets the StabilityStatusAt field's value.
  11109. func (s *TaskSet) SetStabilityStatusAt(v time.Time) *TaskSet {
  11110. s.StabilityStatusAt = &v
  11111. return s
  11112. }
  11113. // SetStartedBy sets the StartedBy field's value.
  11114. func (s *TaskSet) SetStartedBy(v string) *TaskSet {
  11115. s.StartedBy = &v
  11116. return s
  11117. }
  11118. // SetStatus sets the Status field's value.
  11119. func (s *TaskSet) SetStatus(v string) *TaskSet {
  11120. s.Status = &v
  11121. return s
  11122. }
  11123. // SetTaskDefinition sets the TaskDefinition field's value.
  11124. func (s *TaskSet) SetTaskDefinition(v string) *TaskSet {
  11125. s.TaskDefinition = &v
  11126. return s
  11127. }
  11128. // SetTaskSetArn sets the TaskSetArn field's value.
  11129. func (s *TaskSet) SetTaskSetArn(v string) *TaskSet {
  11130. s.TaskSetArn = &v
  11131. return s
  11132. }
  11133. // SetUpdatedAt sets the UpdatedAt field's value.
  11134. func (s *TaskSet) SetUpdatedAt(v time.Time) *TaskSet {
  11135. s.UpdatedAt = &v
  11136. return s
  11137. }
  11138. // The container path, mount options, and size of the tmpfs mount.
  11139. type Tmpfs struct {
  11140. _ struct{} `type:"structure"`
  11141. // The absolute file path where the tmpfs volume is to be mounted.
  11142. //
  11143. // ContainerPath is a required field
  11144. ContainerPath *string `locationName:"containerPath" type:"string" required:"true"`
  11145. // The list of tmpfs volume mount options.
  11146. //
  11147. // Valid values: "defaults" | "ro" | "rw" | "suid" | "nosuid" | "dev" | "nodev"
  11148. // | "exec" | "noexec" | "sync" | "async" | "dirsync" | "remount" | "mand" |
  11149. // "nomand" | "atime" | "noatime" | "diratime" | "nodiratime" | "bind" | "rbind"
  11150. // | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared"
  11151. // | "slave" | "rslave" | "relatime" | "norelatime" | "strictatime" | "nostrictatime"
  11152. // | "mode" | "uid" | "gid" | "nr_inodes" | "nr_blocks" | "mpol"
  11153. MountOptions []*string `locationName:"mountOptions" type:"list"`
  11154. // The size (in MiB) of the tmpfs volume.
  11155. //
  11156. // Size is a required field
  11157. Size *int64 `locationName:"size" type:"integer" required:"true"`
  11158. }
  11159. // String returns the string representation
  11160. func (s Tmpfs) String() string {
  11161. return awsutil.Prettify(s)
  11162. }
  11163. // GoString returns the string representation
  11164. func (s Tmpfs) GoString() string {
  11165. return s.String()
  11166. }
  11167. // Validate inspects the fields of the type to determine if they are valid.
  11168. func (s *Tmpfs) Validate() error {
  11169. invalidParams := request.ErrInvalidParams{Context: "Tmpfs"}
  11170. if s.ContainerPath == nil {
  11171. invalidParams.Add(request.NewErrParamRequired("ContainerPath"))
  11172. }
  11173. if s.Size == nil {
  11174. invalidParams.Add(request.NewErrParamRequired("Size"))
  11175. }
  11176. if invalidParams.Len() > 0 {
  11177. return invalidParams
  11178. }
  11179. return nil
  11180. }
  11181. // SetContainerPath sets the ContainerPath field's value.
  11182. func (s *Tmpfs) SetContainerPath(v string) *Tmpfs {
  11183. s.ContainerPath = &v
  11184. return s
  11185. }
  11186. // SetMountOptions sets the MountOptions field's value.
  11187. func (s *Tmpfs) SetMountOptions(v []*string) *Tmpfs {
  11188. s.MountOptions = v
  11189. return s
  11190. }
  11191. // SetSize sets the Size field's value.
  11192. func (s *Tmpfs) SetSize(v int64) *Tmpfs {
  11193. s.Size = &v
  11194. return s
  11195. }
  11196. // The ulimit settings to pass to the container.
  11197. type Ulimit struct {
  11198. _ struct{} `type:"structure"`
  11199. // The hard limit for the ulimit type.
  11200. //
  11201. // HardLimit is a required field
  11202. HardLimit *int64 `locationName:"hardLimit" type:"integer" required:"true"`
  11203. // The type of the ulimit.
  11204. //
  11205. // Name is a required field
  11206. Name *string `locationName:"name" type:"string" required:"true" enum:"UlimitName"`
  11207. // The soft limit for the ulimit type.
  11208. //
  11209. // SoftLimit is a required field
  11210. SoftLimit *int64 `locationName:"softLimit" type:"integer" required:"true"`
  11211. }
  11212. // String returns the string representation
  11213. func (s Ulimit) String() string {
  11214. return awsutil.Prettify(s)
  11215. }
  11216. // GoString returns the string representation
  11217. func (s Ulimit) GoString() string {
  11218. return s.String()
  11219. }
  11220. // Validate inspects the fields of the type to determine if they are valid.
  11221. func (s *Ulimit) Validate() error {
  11222. invalidParams := request.ErrInvalidParams{Context: "Ulimit"}
  11223. if s.HardLimit == nil {
  11224. invalidParams.Add(request.NewErrParamRequired("HardLimit"))
  11225. }
  11226. if s.Name == nil {
  11227. invalidParams.Add(request.NewErrParamRequired("Name"))
  11228. }
  11229. if s.SoftLimit == nil {
  11230. invalidParams.Add(request.NewErrParamRequired("SoftLimit"))
  11231. }
  11232. if invalidParams.Len() > 0 {
  11233. return invalidParams
  11234. }
  11235. return nil
  11236. }
  11237. // SetHardLimit sets the HardLimit field's value.
  11238. func (s *Ulimit) SetHardLimit(v int64) *Ulimit {
  11239. s.HardLimit = &v
  11240. return s
  11241. }
  11242. // SetName sets the Name field's value.
  11243. func (s *Ulimit) SetName(v string) *Ulimit {
  11244. s.Name = &v
  11245. return s
  11246. }
  11247. // SetSoftLimit sets the SoftLimit field's value.
  11248. func (s *Ulimit) SetSoftLimit(v int64) *Ulimit {
  11249. s.SoftLimit = &v
  11250. return s
  11251. }
  11252. type UntagResourceInput struct {
  11253. _ struct{} `type:"structure"`
  11254. // The Amazon Resource Name (ARN) of the resource from which to delete tags.
  11255. // Currently, the supported resources are Amazon ECS tasks, services, task definitions,
  11256. // clusters, and container instances.
  11257. //
  11258. // ResourceArn is a required field
  11259. ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"`
  11260. // The keys of the tags to be removed.
  11261. //
  11262. // TagKeys is a required field
  11263. TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"`
  11264. }
  11265. // String returns the string representation
  11266. func (s UntagResourceInput) String() string {
  11267. return awsutil.Prettify(s)
  11268. }
  11269. // GoString returns the string representation
  11270. func (s UntagResourceInput) GoString() string {
  11271. return s.String()
  11272. }
  11273. // Validate inspects the fields of the type to determine if they are valid.
  11274. func (s *UntagResourceInput) Validate() error {
  11275. invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  11276. if s.ResourceArn == nil {
  11277. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  11278. }
  11279. if s.TagKeys == nil {
  11280. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  11281. }
  11282. if invalidParams.Len() > 0 {
  11283. return invalidParams
  11284. }
  11285. return nil
  11286. }
  11287. // SetResourceArn sets the ResourceArn field's value.
  11288. func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput {
  11289. s.ResourceArn = &v
  11290. return s
  11291. }
  11292. // SetTagKeys sets the TagKeys field's value.
  11293. func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
  11294. s.TagKeys = v
  11295. return s
  11296. }
  11297. type UntagResourceOutput struct {
  11298. _ struct{} `type:"structure"`
  11299. }
  11300. // String returns the string representation
  11301. func (s UntagResourceOutput) String() string {
  11302. return awsutil.Prettify(s)
  11303. }
  11304. // GoString returns the string representation
  11305. func (s UntagResourceOutput) GoString() string {
  11306. return s.String()
  11307. }
  11308. type UpdateContainerAgentInput struct {
  11309. _ struct{} `type:"structure"`
  11310. // The short name or full Amazon Resource Name (ARN) of the cluster that your
  11311. // container instance is running on. If you do not specify a cluster, the default
  11312. // cluster is assumed.
  11313. Cluster *string `locationName:"cluster" type:"string"`
  11314. // The container instance ID or full ARN entries for the container instance
  11315. // on which you would like to update the Amazon ECS container agent.
  11316. //
  11317. // ContainerInstance is a required field
  11318. ContainerInstance *string `locationName:"containerInstance" type:"string" required:"true"`
  11319. }
  11320. // String returns the string representation
  11321. func (s UpdateContainerAgentInput) String() string {
  11322. return awsutil.Prettify(s)
  11323. }
  11324. // GoString returns the string representation
  11325. func (s UpdateContainerAgentInput) GoString() string {
  11326. return s.String()
  11327. }
  11328. // Validate inspects the fields of the type to determine if they are valid.
  11329. func (s *UpdateContainerAgentInput) Validate() error {
  11330. invalidParams := request.ErrInvalidParams{Context: "UpdateContainerAgentInput"}
  11331. if s.ContainerInstance == nil {
  11332. invalidParams.Add(request.NewErrParamRequired("ContainerInstance"))
  11333. }
  11334. if invalidParams.Len() > 0 {
  11335. return invalidParams
  11336. }
  11337. return nil
  11338. }
  11339. // SetCluster sets the Cluster field's value.
  11340. func (s *UpdateContainerAgentInput) SetCluster(v string) *UpdateContainerAgentInput {
  11341. s.Cluster = &v
  11342. return s
  11343. }
  11344. // SetContainerInstance sets the ContainerInstance field's value.
  11345. func (s *UpdateContainerAgentInput) SetContainerInstance(v string) *UpdateContainerAgentInput {
  11346. s.ContainerInstance = &v
  11347. return s
  11348. }
  11349. type UpdateContainerAgentOutput struct {
  11350. _ struct{} `type:"structure"`
  11351. // The container instance for which the container agent was updated.
  11352. ContainerInstance *ContainerInstance `locationName:"containerInstance" type:"structure"`
  11353. }
  11354. // String returns the string representation
  11355. func (s UpdateContainerAgentOutput) String() string {
  11356. return awsutil.Prettify(s)
  11357. }
  11358. // GoString returns the string representation
  11359. func (s UpdateContainerAgentOutput) GoString() string {
  11360. return s.String()
  11361. }
  11362. // SetContainerInstance sets the ContainerInstance field's value.
  11363. func (s *UpdateContainerAgentOutput) SetContainerInstance(v *ContainerInstance) *UpdateContainerAgentOutput {
  11364. s.ContainerInstance = v
  11365. return s
  11366. }
  11367. type UpdateContainerInstancesStateInput struct {
  11368. _ struct{} `type:"structure"`
  11369. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  11370. // the container instance to update. If you do not specify a cluster, the default
  11371. // cluster is assumed.
  11372. Cluster *string `locationName:"cluster" type:"string"`
  11373. // A list of container instance IDs or full ARN entries.
  11374. //
  11375. // ContainerInstances is a required field
  11376. ContainerInstances []*string `locationName:"containerInstances" type:"list" required:"true"`
  11377. // The container instance state with which to update the container instance.
  11378. //
  11379. // Status is a required field
  11380. Status *string `locationName:"status" type:"string" required:"true" enum:"ContainerInstanceStatus"`
  11381. }
  11382. // String returns the string representation
  11383. func (s UpdateContainerInstancesStateInput) String() string {
  11384. return awsutil.Prettify(s)
  11385. }
  11386. // GoString returns the string representation
  11387. func (s UpdateContainerInstancesStateInput) GoString() string {
  11388. return s.String()
  11389. }
  11390. // Validate inspects the fields of the type to determine if they are valid.
  11391. func (s *UpdateContainerInstancesStateInput) Validate() error {
  11392. invalidParams := request.ErrInvalidParams{Context: "UpdateContainerInstancesStateInput"}
  11393. if s.ContainerInstances == nil {
  11394. invalidParams.Add(request.NewErrParamRequired("ContainerInstances"))
  11395. }
  11396. if s.Status == nil {
  11397. invalidParams.Add(request.NewErrParamRequired("Status"))
  11398. }
  11399. if invalidParams.Len() > 0 {
  11400. return invalidParams
  11401. }
  11402. return nil
  11403. }
  11404. // SetCluster sets the Cluster field's value.
  11405. func (s *UpdateContainerInstancesStateInput) SetCluster(v string) *UpdateContainerInstancesStateInput {
  11406. s.Cluster = &v
  11407. return s
  11408. }
  11409. // SetContainerInstances sets the ContainerInstances field's value.
  11410. func (s *UpdateContainerInstancesStateInput) SetContainerInstances(v []*string) *UpdateContainerInstancesStateInput {
  11411. s.ContainerInstances = v
  11412. return s
  11413. }
  11414. // SetStatus sets the Status field's value.
  11415. func (s *UpdateContainerInstancesStateInput) SetStatus(v string) *UpdateContainerInstancesStateInput {
  11416. s.Status = &v
  11417. return s
  11418. }
  11419. type UpdateContainerInstancesStateOutput struct {
  11420. _ struct{} `type:"structure"`
  11421. // The list of container instances.
  11422. ContainerInstances []*ContainerInstance `locationName:"containerInstances" type:"list"`
  11423. // Any failures associated with the call.
  11424. Failures []*Failure `locationName:"failures" type:"list"`
  11425. }
  11426. // String returns the string representation
  11427. func (s UpdateContainerInstancesStateOutput) String() string {
  11428. return awsutil.Prettify(s)
  11429. }
  11430. // GoString returns the string representation
  11431. func (s UpdateContainerInstancesStateOutput) GoString() string {
  11432. return s.String()
  11433. }
  11434. // SetContainerInstances sets the ContainerInstances field's value.
  11435. func (s *UpdateContainerInstancesStateOutput) SetContainerInstances(v []*ContainerInstance) *UpdateContainerInstancesStateOutput {
  11436. s.ContainerInstances = v
  11437. return s
  11438. }
  11439. // SetFailures sets the Failures field's value.
  11440. func (s *UpdateContainerInstancesStateOutput) SetFailures(v []*Failure) *UpdateContainerInstancesStateOutput {
  11441. s.Failures = v
  11442. return s
  11443. }
  11444. type UpdateServiceInput struct {
  11445. _ struct{} `type:"structure"`
  11446. // The short name or full Amazon Resource Name (ARN) of the cluster that your
  11447. // service is running on. If you do not specify a cluster, the default cluster
  11448. // is assumed.
  11449. Cluster *string `locationName:"cluster" type:"string"`
  11450. // Optional deployment parameters that control how many tasks run during the
  11451. // deployment and the ordering of stopping and starting tasks.
  11452. DeploymentConfiguration *DeploymentConfiguration `locationName:"deploymentConfiguration" type:"structure"`
  11453. // The number of instantiations of the task to place and keep running in your
  11454. // service.
  11455. DesiredCount *int64 `locationName:"desiredCount" type:"integer"`
  11456. // Whether to force a new deployment of the service. Deployments are not forced
  11457. // by default. You can use this option to trigger a new deployment with no service
  11458. // definition changes. For example, you can update a service's tasks to use
  11459. // a newer Docker image with the same image/tag combination (my_image:latest)
  11460. // or to roll Fargate tasks onto a newer platform version.
  11461. ForceNewDeployment *bool `locationName:"forceNewDeployment" type:"boolean"`
  11462. // The period of time, in seconds, that the Amazon ECS service scheduler should
  11463. // ignore unhealthy Elastic Load Balancing target health checks after a task
  11464. // has first started. This is only valid if your service is configured to use
  11465. // a load balancer. If your service's tasks take a while to start and respond
  11466. // to Elastic Load Balancing health checks, you can specify a health check grace
  11467. // period of up to 1,800 seconds. During that time, the ECS service scheduler
  11468. // ignores the Elastic Load Balancing health check status. This grace period
  11469. // can prevent the ECS service scheduler from marking tasks as unhealthy and
  11470. // stopping them before they have time to come up.
  11471. HealthCheckGracePeriodSeconds *int64 `locationName:"healthCheckGracePeriodSeconds" type:"integer"`
  11472. // The network configuration for the service. This parameter is required for
  11473. // task definitions that use the awsvpc network mode to receive their own elastic
  11474. // network interface, and it is not supported for other network modes. For more
  11475. // information, see Task Networking (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html)
  11476. // in the Amazon Elastic Container Service Developer Guide.
  11477. //
  11478. // Updating a service to add a subnet to a list of existing subnets does not
  11479. // trigger a service deployment. For example, if your network configuration
  11480. // change is to keep the existing subnets and simply add another subnet to the
  11481. // network configuration, this does not trigger a new service deployment.
  11482. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"`
  11483. // The platform version on which your tasks in the service are running. A platform
  11484. // version is only specified for tasks using the Fargate launch type. If one
  11485. // is not specified, the LATEST platform version is used by default. For more
  11486. // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html)
  11487. // in the Amazon Elastic Container Service Developer Guide.
  11488. PlatformVersion *string `locationName:"platformVersion" type:"string"`
  11489. // The name of the service to update.
  11490. //
  11491. // Service is a required field
  11492. Service *string `locationName:"service" type:"string" required:"true"`
  11493. // The family and revision (family:revision) or full ARN of the task definition
  11494. // to run in your service. If a revision is not specified, the latest ACTIVE
  11495. // revision is used. If you modify the task definition with UpdateService, Amazon
  11496. // ECS spawns a task with the new version of the task definition and then stops
  11497. // an old task after the new version is running.
  11498. TaskDefinition *string `locationName:"taskDefinition" type:"string"`
  11499. }
  11500. // String returns the string representation
  11501. func (s UpdateServiceInput) String() string {
  11502. return awsutil.Prettify(s)
  11503. }
  11504. // GoString returns the string representation
  11505. func (s UpdateServiceInput) GoString() string {
  11506. return s.String()
  11507. }
  11508. // Validate inspects the fields of the type to determine if they are valid.
  11509. func (s *UpdateServiceInput) Validate() error {
  11510. invalidParams := request.ErrInvalidParams{Context: "UpdateServiceInput"}
  11511. if s.Service == nil {
  11512. invalidParams.Add(request.NewErrParamRequired("Service"))
  11513. }
  11514. if s.NetworkConfiguration != nil {
  11515. if err := s.NetworkConfiguration.Validate(); err != nil {
  11516. invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams))
  11517. }
  11518. }
  11519. if invalidParams.Len() > 0 {
  11520. return invalidParams
  11521. }
  11522. return nil
  11523. }
  11524. // SetCluster sets the Cluster field's value.
  11525. func (s *UpdateServiceInput) SetCluster(v string) *UpdateServiceInput {
  11526. s.Cluster = &v
  11527. return s
  11528. }
  11529. // SetDeploymentConfiguration sets the DeploymentConfiguration field's value.
  11530. func (s *UpdateServiceInput) SetDeploymentConfiguration(v *DeploymentConfiguration) *UpdateServiceInput {
  11531. s.DeploymentConfiguration = v
  11532. return s
  11533. }
  11534. // SetDesiredCount sets the DesiredCount field's value.
  11535. func (s *UpdateServiceInput) SetDesiredCount(v int64) *UpdateServiceInput {
  11536. s.DesiredCount = &v
  11537. return s
  11538. }
  11539. // SetForceNewDeployment sets the ForceNewDeployment field's value.
  11540. func (s *UpdateServiceInput) SetForceNewDeployment(v bool) *UpdateServiceInput {
  11541. s.ForceNewDeployment = &v
  11542. return s
  11543. }
  11544. // SetHealthCheckGracePeriodSeconds sets the HealthCheckGracePeriodSeconds field's value.
  11545. func (s *UpdateServiceInput) SetHealthCheckGracePeriodSeconds(v int64) *UpdateServiceInput {
  11546. s.HealthCheckGracePeriodSeconds = &v
  11547. return s
  11548. }
  11549. // SetNetworkConfiguration sets the NetworkConfiguration field's value.
  11550. func (s *UpdateServiceInput) SetNetworkConfiguration(v *NetworkConfiguration) *UpdateServiceInput {
  11551. s.NetworkConfiguration = v
  11552. return s
  11553. }
  11554. // SetPlatformVersion sets the PlatformVersion field's value.
  11555. func (s *UpdateServiceInput) SetPlatformVersion(v string) *UpdateServiceInput {
  11556. s.PlatformVersion = &v
  11557. return s
  11558. }
  11559. // SetService sets the Service field's value.
  11560. func (s *UpdateServiceInput) SetService(v string) *UpdateServiceInput {
  11561. s.Service = &v
  11562. return s
  11563. }
  11564. // SetTaskDefinition sets the TaskDefinition field's value.
  11565. func (s *UpdateServiceInput) SetTaskDefinition(v string) *UpdateServiceInput {
  11566. s.TaskDefinition = &v
  11567. return s
  11568. }
  11569. type UpdateServiceOutput struct {
  11570. _ struct{} `type:"structure"`
  11571. // The full description of your service following the update call.
  11572. Service *Service `locationName:"service" type:"structure"`
  11573. }
  11574. // String returns the string representation
  11575. func (s UpdateServiceOutput) String() string {
  11576. return awsutil.Prettify(s)
  11577. }
  11578. // GoString returns the string representation
  11579. func (s UpdateServiceOutput) GoString() string {
  11580. return s.String()
  11581. }
  11582. // SetService sets the Service field's value.
  11583. func (s *UpdateServiceOutput) SetService(v *Service) *UpdateServiceOutput {
  11584. s.Service = v
  11585. return s
  11586. }
  11587. // The Docker and Amazon ECS container agent version information about a container
  11588. // instance.
  11589. type VersionInfo struct {
  11590. _ struct{} `type:"structure"`
  11591. // The Git commit hash for the Amazon ECS container agent build on the amazon-ecs-agent
  11592. // (https://github.com/aws/amazon-ecs-agent/commits/master) GitHub repository.
  11593. AgentHash *string `locationName:"agentHash" type:"string"`
  11594. // The version number of the Amazon ECS container agent.
  11595. AgentVersion *string `locationName:"agentVersion" type:"string"`
  11596. // The Docker version running on the container instance.
  11597. DockerVersion *string `locationName:"dockerVersion" type:"string"`
  11598. }
  11599. // String returns the string representation
  11600. func (s VersionInfo) String() string {
  11601. return awsutil.Prettify(s)
  11602. }
  11603. // GoString returns the string representation
  11604. func (s VersionInfo) GoString() string {
  11605. return s.String()
  11606. }
  11607. // SetAgentHash sets the AgentHash field's value.
  11608. func (s *VersionInfo) SetAgentHash(v string) *VersionInfo {
  11609. s.AgentHash = &v
  11610. return s
  11611. }
  11612. // SetAgentVersion sets the AgentVersion field's value.
  11613. func (s *VersionInfo) SetAgentVersion(v string) *VersionInfo {
  11614. s.AgentVersion = &v
  11615. return s
  11616. }
  11617. // SetDockerVersion sets the DockerVersion field's value.
  11618. func (s *VersionInfo) SetDockerVersion(v string) *VersionInfo {
  11619. s.DockerVersion = &v
  11620. return s
  11621. }
  11622. // A data volume used in a task definition. For tasks that use a Docker volume,
  11623. // specify a DockerVolumeConfiguration. For tasks that use a bind mount host
  11624. // volume, specify a host and optional sourcePath. For more information, see
  11625. // Using Data Volumes in Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html).
  11626. type Volume struct {
  11627. _ struct{} `type:"structure"`
  11628. // This parameter is specified when you are using Docker volumes. Docker volumes
  11629. // are only supported when you are using the EC2 launch type. Windows containers
  11630. // only support the use of the local driver. To use bind mounts, specify a host
  11631. // instead.
  11632. DockerVolumeConfiguration *DockerVolumeConfiguration `locationName:"dockerVolumeConfiguration" type:"structure"`
  11633. // This parameter is specified when you are using bind mount host volumes. Bind
  11634. // mount host volumes are supported when you are using either the EC2 or Fargate
  11635. // launch types. The contents of the host parameter determine whether your bind
  11636. // mount host volume persists on the host container instance and where it is
  11637. // stored. If the host parameter is empty, then the Docker daemon assigns a
  11638. // host path for your data volume. However, the data is not guaranteed to persist
  11639. // after the containers associated with it stop running.
  11640. //
  11641. // Windows containers can mount whole directories on the same drive as $env:ProgramData.
  11642. // Windows containers cannot mount directories on a different drive, and mount
  11643. // point cannot be across drives. For example, you can mount C:\my\path:C:\my\path
  11644. // and D:\:D:\, but not D:\my\path:C:\my\path or D:\:C:\my\path.
  11645. Host *HostVolumeProperties `locationName:"host" type:"structure"`
  11646. // The name of the volume. Up to 255 letters (uppercase and lowercase), numbers,
  11647. // hyphens, and underscores are allowed. This name is referenced in the sourceVolume
  11648. // parameter of container definition mountPoints.
  11649. Name *string `locationName:"name" type:"string"`
  11650. }
  11651. // String returns the string representation
  11652. func (s Volume) String() string {
  11653. return awsutil.Prettify(s)
  11654. }
  11655. // GoString returns the string representation
  11656. func (s Volume) GoString() string {
  11657. return s.String()
  11658. }
  11659. // SetDockerVolumeConfiguration sets the DockerVolumeConfiguration field's value.
  11660. func (s *Volume) SetDockerVolumeConfiguration(v *DockerVolumeConfiguration) *Volume {
  11661. s.DockerVolumeConfiguration = v
  11662. return s
  11663. }
  11664. // SetHost sets the Host field's value.
  11665. func (s *Volume) SetHost(v *HostVolumeProperties) *Volume {
  11666. s.Host = v
  11667. return s
  11668. }
  11669. // SetName sets the Name field's value.
  11670. func (s *Volume) SetName(v string) *Volume {
  11671. s.Name = &v
  11672. return s
  11673. }
  11674. // Details on a data volume from another container in the same task definition.
  11675. type VolumeFrom struct {
  11676. _ struct{} `type:"structure"`
  11677. // If this value is true, the container has read-only access to the volume.
  11678. // If this value is false, then the container can write to the volume. The default
  11679. // value is false.
  11680. ReadOnly *bool `locationName:"readOnly" type:"boolean"`
  11681. // The name of another container within the same task definition from which
  11682. // to mount volumes.
  11683. SourceContainer *string `locationName:"sourceContainer" type:"string"`
  11684. }
  11685. // String returns the string representation
  11686. func (s VolumeFrom) String() string {
  11687. return awsutil.Prettify(s)
  11688. }
  11689. // GoString returns the string representation
  11690. func (s VolumeFrom) GoString() string {
  11691. return s.String()
  11692. }
  11693. // SetReadOnly sets the ReadOnly field's value.
  11694. func (s *VolumeFrom) SetReadOnly(v bool) *VolumeFrom {
  11695. s.ReadOnly = &v
  11696. return s
  11697. }
  11698. // SetSourceContainer sets the SourceContainer field's value.
  11699. func (s *VolumeFrom) SetSourceContainer(v string) *VolumeFrom {
  11700. s.SourceContainer = &v
  11701. return s
  11702. }
  11703. const (
  11704. // AgentUpdateStatusPending is a AgentUpdateStatus enum value
  11705. AgentUpdateStatusPending = "PENDING"
  11706. // AgentUpdateStatusStaging is a AgentUpdateStatus enum value
  11707. AgentUpdateStatusStaging = "STAGING"
  11708. // AgentUpdateStatusStaged is a AgentUpdateStatus enum value
  11709. AgentUpdateStatusStaged = "STAGED"
  11710. // AgentUpdateStatusUpdating is a AgentUpdateStatus enum value
  11711. AgentUpdateStatusUpdating = "UPDATING"
  11712. // AgentUpdateStatusUpdated is a AgentUpdateStatus enum value
  11713. AgentUpdateStatusUpdated = "UPDATED"
  11714. // AgentUpdateStatusFailed is a AgentUpdateStatus enum value
  11715. AgentUpdateStatusFailed = "FAILED"
  11716. )
  11717. const (
  11718. // AssignPublicIpEnabled is a AssignPublicIp enum value
  11719. AssignPublicIpEnabled = "ENABLED"
  11720. // AssignPublicIpDisabled is a AssignPublicIp enum value
  11721. AssignPublicIpDisabled = "DISABLED"
  11722. )
  11723. const (
  11724. // ClusterFieldStatistics is a ClusterField enum value
  11725. ClusterFieldStatistics = "STATISTICS"
  11726. // ClusterFieldTags is a ClusterField enum value
  11727. ClusterFieldTags = "TAGS"
  11728. )
  11729. const (
  11730. // CompatibilityEc2 is a Compatibility enum value
  11731. CompatibilityEc2 = "EC2"
  11732. // CompatibilityFargate is a Compatibility enum value
  11733. CompatibilityFargate = "FARGATE"
  11734. )
  11735. const (
  11736. // ConnectivityConnected is a Connectivity enum value
  11737. ConnectivityConnected = "CONNECTED"
  11738. // ConnectivityDisconnected is a Connectivity enum value
  11739. ConnectivityDisconnected = "DISCONNECTED"
  11740. )
  11741. const (
  11742. // ContainerInstanceFieldTags is a ContainerInstanceField enum value
  11743. ContainerInstanceFieldTags = "TAGS"
  11744. )
  11745. const (
  11746. // ContainerInstanceStatusActive is a ContainerInstanceStatus enum value
  11747. ContainerInstanceStatusActive = "ACTIVE"
  11748. // ContainerInstanceStatusDraining is a ContainerInstanceStatus enum value
  11749. ContainerInstanceStatusDraining = "DRAINING"
  11750. )
  11751. const (
  11752. // DeploymentControllerTypeEcs is a DeploymentControllerType enum value
  11753. DeploymentControllerTypeEcs = "ECS"
  11754. // DeploymentControllerTypeCodeDeploy is a DeploymentControllerType enum value
  11755. DeploymentControllerTypeCodeDeploy = "CODE_DEPLOY"
  11756. )
  11757. const (
  11758. // DesiredStatusRunning is a DesiredStatus enum value
  11759. DesiredStatusRunning = "RUNNING"
  11760. // DesiredStatusPending is a DesiredStatus enum value
  11761. DesiredStatusPending = "PENDING"
  11762. // DesiredStatusStopped is a DesiredStatus enum value
  11763. DesiredStatusStopped = "STOPPED"
  11764. )
  11765. const (
  11766. // DeviceCgroupPermissionRead is a DeviceCgroupPermission enum value
  11767. DeviceCgroupPermissionRead = "read"
  11768. // DeviceCgroupPermissionWrite is a DeviceCgroupPermission enum value
  11769. DeviceCgroupPermissionWrite = "write"
  11770. // DeviceCgroupPermissionMknod is a DeviceCgroupPermission enum value
  11771. DeviceCgroupPermissionMknod = "mknod"
  11772. )
  11773. const (
  11774. // HealthStatusHealthy is a HealthStatus enum value
  11775. HealthStatusHealthy = "HEALTHY"
  11776. // HealthStatusUnhealthy is a HealthStatus enum value
  11777. HealthStatusUnhealthy = "UNHEALTHY"
  11778. // HealthStatusUnknown is a HealthStatus enum value
  11779. HealthStatusUnknown = "UNKNOWN"
  11780. )
  11781. const (
  11782. // IpcModeHost is a IpcMode enum value
  11783. IpcModeHost = "host"
  11784. // IpcModeTask is a IpcMode enum value
  11785. IpcModeTask = "task"
  11786. // IpcModeNone is a IpcMode enum value
  11787. IpcModeNone = "none"
  11788. )
  11789. const (
  11790. // LaunchTypeEc2 is a LaunchType enum value
  11791. LaunchTypeEc2 = "EC2"
  11792. // LaunchTypeFargate is a LaunchType enum value
  11793. LaunchTypeFargate = "FARGATE"
  11794. )
  11795. const (
  11796. // LogDriverJsonFile is a LogDriver enum value
  11797. LogDriverJsonFile = "json-file"
  11798. // LogDriverSyslog is a LogDriver enum value
  11799. LogDriverSyslog = "syslog"
  11800. // LogDriverJournald is a LogDriver enum value
  11801. LogDriverJournald = "journald"
  11802. // LogDriverGelf is a LogDriver enum value
  11803. LogDriverGelf = "gelf"
  11804. // LogDriverFluentd is a LogDriver enum value
  11805. LogDriverFluentd = "fluentd"
  11806. // LogDriverAwslogs is a LogDriver enum value
  11807. LogDriverAwslogs = "awslogs"
  11808. // LogDriverSplunk is a LogDriver enum value
  11809. LogDriverSplunk = "splunk"
  11810. )
  11811. const (
  11812. // NetworkModeBridge is a NetworkMode enum value
  11813. NetworkModeBridge = "bridge"
  11814. // NetworkModeHost is a NetworkMode enum value
  11815. NetworkModeHost = "host"
  11816. // NetworkModeAwsvpc is a NetworkMode enum value
  11817. NetworkModeAwsvpc = "awsvpc"
  11818. // NetworkModeNone is a NetworkMode enum value
  11819. NetworkModeNone = "none"
  11820. )
  11821. const (
  11822. // PidModeHost is a PidMode enum value
  11823. PidModeHost = "host"
  11824. // PidModeTask is a PidMode enum value
  11825. PidModeTask = "task"
  11826. )
  11827. const (
  11828. // PlacementConstraintTypeDistinctInstance is a PlacementConstraintType enum value
  11829. PlacementConstraintTypeDistinctInstance = "distinctInstance"
  11830. // PlacementConstraintTypeMemberOf is a PlacementConstraintType enum value
  11831. PlacementConstraintTypeMemberOf = "memberOf"
  11832. )
  11833. const (
  11834. // PlacementStrategyTypeRandom is a PlacementStrategyType enum value
  11835. PlacementStrategyTypeRandom = "random"
  11836. // PlacementStrategyTypeSpread is a PlacementStrategyType enum value
  11837. PlacementStrategyTypeSpread = "spread"
  11838. // PlacementStrategyTypeBinpack is a PlacementStrategyType enum value
  11839. PlacementStrategyTypeBinpack = "binpack"
  11840. )
  11841. const (
  11842. // PropagateTagsTaskDefinition is a PropagateTags enum value
  11843. PropagateTagsTaskDefinition = "TASK_DEFINITION"
  11844. // PropagateTagsService is a PropagateTags enum value
  11845. PropagateTagsService = "SERVICE"
  11846. )
  11847. const (
  11848. // ScaleUnitPercent is a ScaleUnit enum value
  11849. ScaleUnitPercent = "PERCENT"
  11850. )
  11851. const (
  11852. // SchedulingStrategyReplica is a SchedulingStrategy enum value
  11853. SchedulingStrategyReplica = "REPLICA"
  11854. // SchedulingStrategyDaemon is a SchedulingStrategy enum value
  11855. SchedulingStrategyDaemon = "DAEMON"
  11856. )
  11857. const (
  11858. // ScopeTask is a Scope enum value
  11859. ScopeTask = "task"
  11860. // ScopeShared is a Scope enum value
  11861. ScopeShared = "shared"
  11862. )
  11863. const (
  11864. // ServiceFieldTags is a ServiceField enum value
  11865. ServiceFieldTags = "TAGS"
  11866. )
  11867. const (
  11868. // SettingNameServiceLongArnFormat is a SettingName enum value
  11869. SettingNameServiceLongArnFormat = "serviceLongArnFormat"
  11870. // SettingNameTaskLongArnFormat is a SettingName enum value
  11871. SettingNameTaskLongArnFormat = "taskLongArnFormat"
  11872. // SettingNameContainerInstanceLongArnFormat is a SettingName enum value
  11873. SettingNameContainerInstanceLongArnFormat = "containerInstanceLongArnFormat"
  11874. )
  11875. const (
  11876. // SortOrderAsc is a SortOrder enum value
  11877. SortOrderAsc = "ASC"
  11878. // SortOrderDesc is a SortOrder enum value
  11879. SortOrderDesc = "DESC"
  11880. )
  11881. const (
  11882. // StabilityStatusSteadyState is a StabilityStatus enum value
  11883. StabilityStatusSteadyState = "STEADY_STATE"
  11884. // StabilityStatusStabilizing is a StabilityStatus enum value
  11885. StabilityStatusStabilizing = "STABILIZING"
  11886. )
  11887. const (
  11888. // TargetTypeContainerInstance is a TargetType enum value
  11889. TargetTypeContainerInstance = "container-instance"
  11890. )
  11891. const (
  11892. // TaskDefinitionFamilyStatusActive is a TaskDefinitionFamilyStatus enum value
  11893. TaskDefinitionFamilyStatusActive = "ACTIVE"
  11894. // TaskDefinitionFamilyStatusInactive is a TaskDefinitionFamilyStatus enum value
  11895. TaskDefinitionFamilyStatusInactive = "INACTIVE"
  11896. // TaskDefinitionFamilyStatusAll is a TaskDefinitionFamilyStatus enum value
  11897. TaskDefinitionFamilyStatusAll = "ALL"
  11898. )
  11899. const (
  11900. // TaskDefinitionFieldTags is a TaskDefinitionField enum value
  11901. TaskDefinitionFieldTags = "TAGS"
  11902. )
  11903. const (
  11904. // TaskDefinitionPlacementConstraintTypeMemberOf is a TaskDefinitionPlacementConstraintType enum value
  11905. TaskDefinitionPlacementConstraintTypeMemberOf = "memberOf"
  11906. )
  11907. const (
  11908. // TaskDefinitionStatusActive is a TaskDefinitionStatus enum value
  11909. TaskDefinitionStatusActive = "ACTIVE"
  11910. // TaskDefinitionStatusInactive is a TaskDefinitionStatus enum value
  11911. TaskDefinitionStatusInactive = "INACTIVE"
  11912. )
  11913. const (
  11914. // TaskFieldTags is a TaskField enum value
  11915. TaskFieldTags = "TAGS"
  11916. )
  11917. const (
  11918. // TaskStopCodeTaskFailedToStart is a TaskStopCode enum value
  11919. TaskStopCodeTaskFailedToStart = "TaskFailedToStart"
  11920. // TaskStopCodeEssentialContainerExited is a TaskStopCode enum value
  11921. TaskStopCodeEssentialContainerExited = "EssentialContainerExited"
  11922. // TaskStopCodeUserInitiated is a TaskStopCode enum value
  11923. TaskStopCodeUserInitiated = "UserInitiated"
  11924. )
  11925. const (
  11926. // TransportProtocolTcp is a TransportProtocol enum value
  11927. TransportProtocolTcp = "tcp"
  11928. // TransportProtocolUdp is a TransportProtocol enum value
  11929. TransportProtocolUdp = "udp"
  11930. )
  11931. const (
  11932. // UlimitNameCore is a UlimitName enum value
  11933. UlimitNameCore = "core"
  11934. // UlimitNameCpu is a UlimitName enum value
  11935. UlimitNameCpu = "cpu"
  11936. // UlimitNameData is a UlimitName enum value
  11937. UlimitNameData = "data"
  11938. // UlimitNameFsize is a UlimitName enum value
  11939. UlimitNameFsize = "fsize"
  11940. // UlimitNameLocks is a UlimitName enum value
  11941. UlimitNameLocks = "locks"
  11942. // UlimitNameMemlock is a UlimitName enum value
  11943. UlimitNameMemlock = "memlock"
  11944. // UlimitNameMsgqueue is a UlimitName enum value
  11945. UlimitNameMsgqueue = "msgqueue"
  11946. // UlimitNameNice is a UlimitName enum value
  11947. UlimitNameNice = "nice"
  11948. // UlimitNameNofile is a UlimitName enum value
  11949. UlimitNameNofile = "nofile"
  11950. // UlimitNameNproc is a UlimitName enum value
  11951. UlimitNameNproc = "nproc"
  11952. // UlimitNameRss is a UlimitName enum value
  11953. UlimitNameRss = "rss"
  11954. // UlimitNameRtprio is a UlimitName enum value
  11955. UlimitNameRtprio = "rtprio"
  11956. // UlimitNameRttime is a UlimitName enum value
  11957. UlimitNameRttime = "rttime"
  11958. // UlimitNameSigpending is a UlimitName enum value
  11959. UlimitNameSigpending = "sigpending"
  11960. // UlimitNameStack is a UlimitName enum value
  11961. UlimitNameStack = "stack"
  11962. )