api.go 221 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package ecs provides a client for Amazon EC2 Container Service.
  3. package ecs
  4. import (
  5. "fmt"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. )
  10. const opCreateCluster = "CreateCluster"
  11. // CreateClusterRequest generates a "aws/request.Request" representing the
  12. // client's request for the CreateCluster operation. The "output" return
  13. // value can be used to capture response data after the request's "Send" method
  14. // is called.
  15. //
  16. // See CreateCluster for usage and error information.
  17. //
  18. // Creating a request object using this method should be used when you want to inject
  19. // custom logic into the request's lifecycle using a custom handler, or if you want to
  20. // access properties on the request object before or after sending the request. If
  21. // you just want the service response, call the CreateCluster method directly
  22. // instead.
  23. //
  24. // Note: You must call the "Send" method on the returned request object in order
  25. // to execute the request.
  26. //
  27. // // Example sending a request using the CreateClusterRequest method.
  28. // req, resp := client.CreateClusterRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. func (c *ECS) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) {
  36. op := &request.Operation{
  37. Name: opCreateCluster,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/",
  40. }
  41. if input == nil {
  42. input = &CreateClusterInput{}
  43. }
  44. req = c.newRequest(op, input, output)
  45. output = &CreateClusterOutput{}
  46. req.Data = output
  47. return
  48. }
  49. // CreateCluster API operation for Amazon EC2 Container Service.
  50. //
  51. // Creates a new Amazon ECS cluster. By default, your account receives a default
  52. // cluster when you launch your first container instance. However, you can create
  53. // your own cluster with a unique name with the CreateCluster action.
  54. //
  55. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  56. // with awserr.Error's Code and Message methods to get detailed information about
  57. // the error.
  58. //
  59. // See the AWS API reference guide for Amazon EC2 Container Service's
  60. // API operation CreateCluster for usage and error information.
  61. //
  62. // Returned Error Codes:
  63. // * ServerException
  64. // These errors are usually caused by a server issue.
  65. //
  66. // * ClientException
  67. // These errors are usually caused by a client action, such as using an action
  68. // or resource on behalf of a user that doesn't have permission to use the action
  69. // or resource, or specifying an identifier that is not valid.
  70. //
  71. // * InvalidParameterException
  72. // The specified parameter is invalid. Review the available parameters for the
  73. // API request.
  74. //
  75. func (c *ECS) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) {
  76. req, out := c.CreateClusterRequest(input)
  77. err := req.Send()
  78. return out, err
  79. }
  80. const opCreateService = "CreateService"
  81. // CreateServiceRequest generates a "aws/request.Request" representing the
  82. // client's request for the CreateService operation. The "output" return
  83. // value can be used to capture response data after the request's "Send" method
  84. // is called.
  85. //
  86. // See CreateService for usage and error information.
  87. //
  88. // Creating a request object using this method should be used when you want to inject
  89. // custom logic into the request's lifecycle using a custom handler, or if you want to
  90. // access properties on the request object before or after sending the request. If
  91. // you just want the service response, call the CreateService method directly
  92. // instead.
  93. //
  94. // Note: You must call the "Send" method on the returned request object in order
  95. // to execute the request.
  96. //
  97. // // Example sending a request using the CreateServiceRequest method.
  98. // req, resp := client.CreateServiceRequest(params)
  99. //
  100. // err := req.Send()
  101. // if err == nil { // resp is now filled
  102. // fmt.Println(resp)
  103. // }
  104. //
  105. func (c *ECS) CreateServiceRequest(input *CreateServiceInput) (req *request.Request, output *CreateServiceOutput) {
  106. op := &request.Operation{
  107. Name: opCreateService,
  108. HTTPMethod: "POST",
  109. HTTPPath: "/",
  110. }
  111. if input == nil {
  112. input = &CreateServiceInput{}
  113. }
  114. req = c.newRequest(op, input, output)
  115. output = &CreateServiceOutput{}
  116. req.Data = output
  117. return
  118. }
  119. // CreateService API operation for Amazon EC2 Container Service.
  120. //
  121. // Runs and maintains a desired number of tasks from a specified task definition.
  122. // If the number of tasks running in a service drops below desiredCount, Amazon
  123. // ECS spawns another copy of the task in the specified cluster. To update an
  124. // existing service, see UpdateService.
  125. //
  126. // In addition to maintaining the desired count of tasks in your service, you
  127. // can optionally run your service behind a load balancer. The load balancer
  128. // distributes traffic across the tasks that are associated with the service.
  129. // For more information, see Service Load Balancing (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html)
  130. // in the Amazon EC2 Container Service Developer Guide.
  131. //
  132. // You can optionally specify a deployment configuration for your service. During
  133. // a deployment (which is triggered by changing the task definition or the desired
  134. // count of a service with an UpdateService operation), the service scheduler
  135. // uses the minimumHealthyPercent and maximumPercent parameters to determine
  136. // the deployment strategy.
  137. //
  138. // The minimumHealthyPercent represents a lower limit on the number of your
  139. // service's tasks that must remain in the RUNNING state during a deployment,
  140. // as a percentage of the desiredCount (rounded up to the nearest integer).
  141. // This parameter enables you to deploy without using additional cluster capacity.
  142. // For example, if your service has a desiredCount of four tasks and a minimumHealthyPercent
  143. // of 50%, the scheduler may stop two existing tasks to free up cluster capacity
  144. // before starting two new tasks. Tasks for services that do not use a load
  145. // balancer are considered healthy if they are in the RUNNING state; tasks for
  146. // services that do use a load balancer are considered healthy if they are in
  147. // the RUNNING state and the container instance it is hosted on is reported
  148. // as healthy by the load balancer. The default value for minimumHealthyPercent
  149. // is 50% in the console and 100% for the AWS CLI, the AWS SDKs, and the APIs.
  150. //
  151. // The maximumPercent parameter represents an upper limit on the number of your
  152. // service's tasks that are allowed in the RUNNING or PENDING state during a
  153. // deployment, as a percentage of the desiredCount (rounded down to the nearest
  154. // integer). This parameter enables you to define the deployment batch size.
  155. // For example, if your service has a desiredCount of four tasks and a maximumPercent
  156. // value of 200%, the scheduler may start four new tasks before stopping the
  157. // four older tasks (provided that the cluster resources required to do this
  158. // are available). The default value for maximumPercent is 200%.
  159. //
  160. // When the service scheduler launches new tasks, it attempts to balance them
  161. // across the Availability Zones in your cluster with the following logic:
  162. //
  163. // * Determine which of the container instances in your cluster can support
  164. // your service's task definition (for example, they have the required CPU,
  165. // memory, ports, and container instance attributes).
  166. //
  167. // * Sort the valid container instances by the fewest number of running tasks
  168. // for this service in the same Availability Zone as the instance. For example,
  169. // if zone A has one running service task and zones B and C each have zero,
  170. // valid container instances in either zone B or C are considered optimal
  171. // for placement.
  172. //
  173. // * Place the new service task on a valid container instance in an optimal
  174. // Availability Zone (based on the previous steps), favoring container instances
  175. // with the fewest number of running tasks for this service.
  176. //
  177. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  178. // with awserr.Error's Code and Message methods to get detailed information about
  179. // the error.
  180. //
  181. // See the AWS API reference guide for Amazon EC2 Container Service's
  182. // API operation CreateService for usage and error information.
  183. //
  184. // Returned Error Codes:
  185. // * ServerException
  186. // These errors are usually caused by a server issue.
  187. //
  188. // * ClientException
  189. // These errors are usually caused by a client action, such as using an action
  190. // or resource on behalf of a user that doesn't have permission to use the action
  191. // or resource, or specifying an identifier that is not valid.
  192. //
  193. // * InvalidParameterException
  194. // The specified parameter is invalid. Review the available parameters for the
  195. // API request.
  196. //
  197. // * ClusterNotFoundException
  198. // The specified cluster could not be found. You can view your available clusters
  199. // with ListClusters. Amazon ECS clusters are region-specific.
  200. //
  201. func (c *ECS) CreateService(input *CreateServiceInput) (*CreateServiceOutput, error) {
  202. req, out := c.CreateServiceRequest(input)
  203. err := req.Send()
  204. return out, err
  205. }
  206. const opDeleteCluster = "DeleteCluster"
  207. // DeleteClusterRequest generates a "aws/request.Request" representing the
  208. // client's request for the DeleteCluster operation. The "output" return
  209. // value can be used to capture response data after the request's "Send" method
  210. // is called.
  211. //
  212. // See DeleteCluster for usage and error information.
  213. //
  214. // Creating a request object using this method should be used when you want to inject
  215. // custom logic into the request's lifecycle using a custom handler, or if you want to
  216. // access properties on the request object before or after sending the request. If
  217. // you just want the service response, call the DeleteCluster method directly
  218. // instead.
  219. //
  220. // Note: You must call the "Send" method on the returned request object in order
  221. // to execute the request.
  222. //
  223. // // Example sending a request using the DeleteClusterRequest method.
  224. // req, resp := client.DeleteClusterRequest(params)
  225. //
  226. // err := req.Send()
  227. // if err == nil { // resp is now filled
  228. // fmt.Println(resp)
  229. // }
  230. //
  231. func (c *ECS) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) {
  232. op := &request.Operation{
  233. Name: opDeleteCluster,
  234. HTTPMethod: "POST",
  235. HTTPPath: "/",
  236. }
  237. if input == nil {
  238. input = &DeleteClusterInput{}
  239. }
  240. req = c.newRequest(op, input, output)
  241. output = &DeleteClusterOutput{}
  242. req.Data = output
  243. return
  244. }
  245. // DeleteCluster API operation for Amazon EC2 Container Service.
  246. //
  247. // Deletes the specified cluster. You must deregister all container instances
  248. // from this cluster before you may delete it. You can list the container instances
  249. // in a cluster with ListContainerInstances and deregister them with DeregisterContainerInstance.
  250. //
  251. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  252. // with awserr.Error's Code and Message methods to get detailed information about
  253. // the error.
  254. //
  255. // See the AWS API reference guide for Amazon EC2 Container Service's
  256. // API operation DeleteCluster for usage and error information.
  257. //
  258. // Returned Error Codes:
  259. // * ServerException
  260. // These errors are usually caused by a server issue.
  261. //
  262. // * ClientException
  263. // These errors are usually caused by a client action, such as using an action
  264. // or resource on behalf of a user that doesn't have permission to use the action
  265. // or resource, or specifying an identifier that is not valid.
  266. //
  267. // * InvalidParameterException
  268. // The specified parameter is invalid. Review the available parameters for the
  269. // API request.
  270. //
  271. // * ClusterNotFoundException
  272. // The specified cluster could not be found. You can view your available clusters
  273. // with ListClusters. Amazon ECS clusters are region-specific.
  274. //
  275. // * ClusterContainsContainerInstancesException
  276. // You cannot delete a cluster that has registered container instances. You
  277. // must first deregister the container instances before you can delete the cluster.
  278. // For more information, see DeregisterContainerInstance.
  279. //
  280. // * ClusterContainsServicesException
  281. // You cannot delete a cluster that contains services. You must first update
  282. // the service to reduce its desired task count to 0 and then delete the service.
  283. // For more information, see UpdateService and DeleteService.
  284. //
  285. func (c *ECS) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) {
  286. req, out := c.DeleteClusterRequest(input)
  287. err := req.Send()
  288. return out, err
  289. }
  290. const opDeleteService = "DeleteService"
  291. // DeleteServiceRequest generates a "aws/request.Request" representing the
  292. // client's request for the DeleteService operation. The "output" return
  293. // value can be used to capture response data after the request's "Send" method
  294. // is called.
  295. //
  296. // See DeleteService for usage and error information.
  297. //
  298. // Creating a request object using this method should be used when you want to inject
  299. // custom logic into the request's lifecycle using a custom handler, or if you want to
  300. // access properties on the request object before or after sending the request. If
  301. // you just want the service response, call the DeleteService method directly
  302. // instead.
  303. //
  304. // Note: You must call the "Send" method on the returned request object in order
  305. // to execute the request.
  306. //
  307. // // Example sending a request using the DeleteServiceRequest method.
  308. // req, resp := client.DeleteServiceRequest(params)
  309. //
  310. // err := req.Send()
  311. // if err == nil { // resp is now filled
  312. // fmt.Println(resp)
  313. // }
  314. //
  315. func (c *ECS) DeleteServiceRequest(input *DeleteServiceInput) (req *request.Request, output *DeleteServiceOutput) {
  316. op := &request.Operation{
  317. Name: opDeleteService,
  318. HTTPMethod: "POST",
  319. HTTPPath: "/",
  320. }
  321. if input == nil {
  322. input = &DeleteServiceInput{}
  323. }
  324. req = c.newRequest(op, input, output)
  325. output = &DeleteServiceOutput{}
  326. req.Data = output
  327. return
  328. }
  329. // DeleteService API operation for Amazon EC2 Container Service.
  330. //
  331. // Deletes a specified service within a cluster. You can delete a service if
  332. // you have no running tasks in it and the desired task count is zero. If the
  333. // service is actively maintaining tasks, you cannot delete it, and you must
  334. // update the service to a desired task count of zero. For more information,
  335. // see UpdateService.
  336. //
  337. // When you delete a service, if there are still running tasks that require
  338. // cleanup, the service status moves from ACTIVE to DRAINING, and the service
  339. // is no longer visible in the console or in ListServices API operations. After
  340. // the tasks have stopped, then the service status moves from DRAINING to INACTIVE.
  341. // Services in the DRAINING or INACTIVE status can still be viewed with DescribeServices
  342. // API operations; however, in the future, INACTIVE services may be cleaned
  343. // up and purged from Amazon ECS record keeping, and DescribeServices API operations
  344. // on those services will return a ServiceNotFoundException error.
  345. //
  346. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  347. // with awserr.Error's Code and Message methods to get detailed information about
  348. // the error.
  349. //
  350. // See the AWS API reference guide for Amazon EC2 Container Service's
  351. // API operation DeleteService for usage and error information.
  352. //
  353. // Returned Error Codes:
  354. // * ServerException
  355. // These errors are usually caused by a server issue.
  356. //
  357. // * ClientException
  358. // These errors are usually caused by a client action, such as using an action
  359. // or resource on behalf of a user that doesn't have permission to use the action
  360. // or resource, or specifying an identifier that is not valid.
  361. //
  362. // * InvalidParameterException
  363. // The specified parameter is invalid. Review the available parameters for the
  364. // API request.
  365. //
  366. // * ClusterNotFoundException
  367. // The specified cluster could not be found. You can view your available clusters
  368. // with ListClusters. Amazon ECS clusters are region-specific.
  369. //
  370. // * ServiceNotFoundException
  371. // The specified service could not be found. You can view your available services
  372. // with ListServices. Amazon ECS services are cluster-specific and region-specific.
  373. //
  374. func (c *ECS) DeleteService(input *DeleteServiceInput) (*DeleteServiceOutput, error) {
  375. req, out := c.DeleteServiceRequest(input)
  376. err := req.Send()
  377. return out, err
  378. }
  379. const opDeregisterContainerInstance = "DeregisterContainerInstance"
  380. // DeregisterContainerInstanceRequest generates a "aws/request.Request" representing the
  381. // client's request for the DeregisterContainerInstance operation. The "output" return
  382. // value can be used to capture response data after the request's "Send" method
  383. // is called.
  384. //
  385. // See DeregisterContainerInstance for usage and error information.
  386. //
  387. // Creating a request object using this method should be used when you want to inject
  388. // custom logic into the request's lifecycle using a custom handler, or if you want to
  389. // access properties on the request object before or after sending the request. If
  390. // you just want the service response, call the DeregisterContainerInstance method directly
  391. // instead.
  392. //
  393. // Note: You must call the "Send" method on the returned request object in order
  394. // to execute the request.
  395. //
  396. // // Example sending a request using the DeregisterContainerInstanceRequest method.
  397. // req, resp := client.DeregisterContainerInstanceRequest(params)
  398. //
  399. // err := req.Send()
  400. // if err == nil { // resp is now filled
  401. // fmt.Println(resp)
  402. // }
  403. //
  404. func (c *ECS) DeregisterContainerInstanceRequest(input *DeregisterContainerInstanceInput) (req *request.Request, output *DeregisterContainerInstanceOutput) {
  405. op := &request.Operation{
  406. Name: opDeregisterContainerInstance,
  407. HTTPMethod: "POST",
  408. HTTPPath: "/",
  409. }
  410. if input == nil {
  411. input = &DeregisterContainerInstanceInput{}
  412. }
  413. req = c.newRequest(op, input, output)
  414. output = &DeregisterContainerInstanceOutput{}
  415. req.Data = output
  416. return
  417. }
  418. // DeregisterContainerInstance API operation for Amazon EC2 Container Service.
  419. //
  420. // Deregisters an Amazon ECS container instance from the specified cluster.
  421. // This instance is no longer available to run tasks.
  422. //
  423. // If you intend to use the container instance for some other purpose after
  424. // deregistration, you should stop all of the tasks running on the container
  425. // instance before deregistration to avoid any orphaned tasks from consuming
  426. // resources.
  427. //
  428. // Deregistering a container instance removes the instance from a cluster, but
  429. // it does not terminate the EC2 instance; if you are finished using the instance,
  430. // be sure to terminate it in the Amazon EC2 console to stop billing.
  431. //
  432. // If you terminate a running container instance, Amazon ECS automatically deregisters
  433. // the instance from your cluster (stopped container instances or instances
  434. // with disconnected agents are not automatically deregistered when terminated).
  435. //
  436. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  437. // with awserr.Error's Code and Message methods to get detailed information about
  438. // the error.
  439. //
  440. // See the AWS API reference guide for Amazon EC2 Container Service's
  441. // API operation DeregisterContainerInstance for usage and error information.
  442. //
  443. // Returned Error Codes:
  444. // * ServerException
  445. // These errors are usually caused by a server issue.
  446. //
  447. // * ClientException
  448. // These errors are usually caused by a client action, such as using an action
  449. // or resource on behalf of a user that doesn't have permission to use the action
  450. // or resource, or specifying an identifier that is not valid.
  451. //
  452. // * InvalidParameterException
  453. // The specified parameter is invalid. Review the available parameters for the
  454. // API request.
  455. //
  456. // * ClusterNotFoundException
  457. // The specified cluster could not be found. You can view your available clusters
  458. // with ListClusters. Amazon ECS clusters are region-specific.
  459. //
  460. func (c *ECS) DeregisterContainerInstance(input *DeregisterContainerInstanceInput) (*DeregisterContainerInstanceOutput, error) {
  461. req, out := c.DeregisterContainerInstanceRequest(input)
  462. err := req.Send()
  463. return out, err
  464. }
  465. const opDeregisterTaskDefinition = "DeregisterTaskDefinition"
  466. // DeregisterTaskDefinitionRequest generates a "aws/request.Request" representing the
  467. // client's request for the DeregisterTaskDefinition operation. The "output" return
  468. // value can be used to capture response data after the request's "Send" method
  469. // is called.
  470. //
  471. // See DeregisterTaskDefinition for usage and error information.
  472. //
  473. // Creating a request object using this method should be used when you want to inject
  474. // custom logic into the request's lifecycle using a custom handler, or if you want to
  475. // access properties on the request object before or after sending the request. If
  476. // you just want the service response, call the DeregisterTaskDefinition method directly
  477. // instead.
  478. //
  479. // Note: You must call the "Send" method on the returned request object in order
  480. // to execute the request.
  481. //
  482. // // Example sending a request using the DeregisterTaskDefinitionRequest method.
  483. // req, resp := client.DeregisterTaskDefinitionRequest(params)
  484. //
  485. // err := req.Send()
  486. // if err == nil { // resp is now filled
  487. // fmt.Println(resp)
  488. // }
  489. //
  490. func (c *ECS) DeregisterTaskDefinitionRequest(input *DeregisterTaskDefinitionInput) (req *request.Request, output *DeregisterTaskDefinitionOutput) {
  491. op := &request.Operation{
  492. Name: opDeregisterTaskDefinition,
  493. HTTPMethod: "POST",
  494. HTTPPath: "/",
  495. }
  496. if input == nil {
  497. input = &DeregisterTaskDefinitionInput{}
  498. }
  499. req = c.newRequest(op, input, output)
  500. output = &DeregisterTaskDefinitionOutput{}
  501. req.Data = output
  502. return
  503. }
  504. // DeregisterTaskDefinition API operation for Amazon EC2 Container Service.
  505. //
  506. // Deregisters the specified task definition by family and revision. Upon deregistration,
  507. // the task definition is marked as INACTIVE. Existing tasks and services that
  508. // reference an INACTIVE task definition continue to run without disruption.
  509. // Existing services that reference an INACTIVE task definition can still scale
  510. // up or down by modifying the service's desired count.
  511. //
  512. // You cannot use an INACTIVE task definition to run new tasks or create new
  513. // services, and you cannot update an existing service to reference an INACTIVE
  514. // task definition (although there may be up to a 10 minute window following
  515. // deregistration where these restrictions have not yet taken effect).
  516. //
  517. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  518. // with awserr.Error's Code and Message methods to get detailed information about
  519. // the error.
  520. //
  521. // See the AWS API reference guide for Amazon EC2 Container Service's
  522. // API operation DeregisterTaskDefinition for usage and error information.
  523. //
  524. // Returned Error Codes:
  525. // * ServerException
  526. // These errors are usually caused by a server issue.
  527. //
  528. // * ClientException
  529. // These errors are usually caused by a client action, such as using an action
  530. // or resource on behalf of a user that doesn't have permission to use the action
  531. // or resource, or specifying an identifier that is not valid.
  532. //
  533. // * InvalidParameterException
  534. // The specified parameter is invalid. Review the available parameters for the
  535. // API request.
  536. //
  537. func (c *ECS) DeregisterTaskDefinition(input *DeregisterTaskDefinitionInput) (*DeregisterTaskDefinitionOutput, error) {
  538. req, out := c.DeregisterTaskDefinitionRequest(input)
  539. err := req.Send()
  540. return out, err
  541. }
  542. const opDescribeClusters = "DescribeClusters"
  543. // DescribeClustersRequest generates a "aws/request.Request" representing the
  544. // client's request for the DescribeClusters operation. The "output" return
  545. // value can be used to capture response data after the request's "Send" method
  546. // is called.
  547. //
  548. // See DescribeClusters for usage and error information.
  549. //
  550. // Creating a request object using this method should be used when you want to inject
  551. // custom logic into the request's lifecycle using a custom handler, or if you want to
  552. // access properties on the request object before or after sending the request. If
  553. // you just want the service response, call the DescribeClusters method directly
  554. // instead.
  555. //
  556. // Note: You must call the "Send" method on the returned request object in order
  557. // to execute the request.
  558. //
  559. // // Example sending a request using the DescribeClustersRequest method.
  560. // req, resp := client.DescribeClustersRequest(params)
  561. //
  562. // err := req.Send()
  563. // if err == nil { // resp is now filled
  564. // fmt.Println(resp)
  565. // }
  566. //
  567. func (c *ECS) DescribeClustersRequest(input *DescribeClustersInput) (req *request.Request, output *DescribeClustersOutput) {
  568. op := &request.Operation{
  569. Name: opDescribeClusters,
  570. HTTPMethod: "POST",
  571. HTTPPath: "/",
  572. }
  573. if input == nil {
  574. input = &DescribeClustersInput{}
  575. }
  576. req = c.newRequest(op, input, output)
  577. output = &DescribeClustersOutput{}
  578. req.Data = output
  579. return
  580. }
  581. // DescribeClusters API operation for Amazon EC2 Container Service.
  582. //
  583. // Describes one or more of your clusters.
  584. //
  585. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  586. // with awserr.Error's Code and Message methods to get detailed information about
  587. // the error.
  588. //
  589. // See the AWS API reference guide for Amazon EC2 Container Service's
  590. // API operation DescribeClusters for usage and error information.
  591. //
  592. // Returned Error Codes:
  593. // * ServerException
  594. // These errors are usually caused by a server issue.
  595. //
  596. // * ClientException
  597. // These errors are usually caused by a client action, such as using an action
  598. // or resource on behalf of a user that doesn't have permission to use the action
  599. // or resource, or specifying an identifier that is not valid.
  600. //
  601. // * InvalidParameterException
  602. // The specified parameter is invalid. Review the available parameters for the
  603. // API request.
  604. //
  605. func (c *ECS) DescribeClusters(input *DescribeClustersInput) (*DescribeClustersOutput, error) {
  606. req, out := c.DescribeClustersRequest(input)
  607. err := req.Send()
  608. return out, err
  609. }
  610. const opDescribeContainerInstances = "DescribeContainerInstances"
  611. // DescribeContainerInstancesRequest generates a "aws/request.Request" representing the
  612. // client's request for the DescribeContainerInstances operation. The "output" return
  613. // value can be used to capture response data after the request's "Send" method
  614. // is called.
  615. //
  616. // See DescribeContainerInstances for usage and error information.
  617. //
  618. // Creating a request object using this method should be used when you want to inject
  619. // custom logic into the request's lifecycle using a custom handler, or if you want to
  620. // access properties on the request object before or after sending the request. If
  621. // you just want the service response, call the DescribeContainerInstances method directly
  622. // instead.
  623. //
  624. // Note: You must call the "Send" method on the returned request object in order
  625. // to execute the request.
  626. //
  627. // // Example sending a request using the DescribeContainerInstancesRequest method.
  628. // req, resp := client.DescribeContainerInstancesRequest(params)
  629. //
  630. // err := req.Send()
  631. // if err == nil { // resp is now filled
  632. // fmt.Println(resp)
  633. // }
  634. //
  635. func (c *ECS) DescribeContainerInstancesRequest(input *DescribeContainerInstancesInput) (req *request.Request, output *DescribeContainerInstancesOutput) {
  636. op := &request.Operation{
  637. Name: opDescribeContainerInstances,
  638. HTTPMethod: "POST",
  639. HTTPPath: "/",
  640. }
  641. if input == nil {
  642. input = &DescribeContainerInstancesInput{}
  643. }
  644. req = c.newRequest(op, input, output)
  645. output = &DescribeContainerInstancesOutput{}
  646. req.Data = output
  647. return
  648. }
  649. // DescribeContainerInstances API operation for Amazon EC2 Container Service.
  650. //
  651. // Describes Amazon EC2 Container Service container instances. Returns metadata
  652. // about registered and remaining resources on each container instance requested.
  653. //
  654. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  655. // with awserr.Error's Code and Message methods to get detailed information about
  656. // the error.
  657. //
  658. // See the AWS API reference guide for Amazon EC2 Container Service's
  659. // API operation DescribeContainerInstances for usage and error information.
  660. //
  661. // Returned Error Codes:
  662. // * ServerException
  663. // These errors are usually caused by a server issue.
  664. //
  665. // * ClientException
  666. // These errors are usually caused by a client action, such as using an action
  667. // or resource on behalf of a user that doesn't have permission to use the action
  668. // or resource, or specifying an identifier that is not valid.
  669. //
  670. // * InvalidParameterException
  671. // The specified parameter is invalid. Review the available parameters for the
  672. // API request.
  673. //
  674. // * ClusterNotFoundException
  675. // The specified cluster could not be found. You can view your available clusters
  676. // with ListClusters. Amazon ECS clusters are region-specific.
  677. //
  678. func (c *ECS) DescribeContainerInstances(input *DescribeContainerInstancesInput) (*DescribeContainerInstancesOutput, error) {
  679. req, out := c.DescribeContainerInstancesRequest(input)
  680. err := req.Send()
  681. return out, err
  682. }
  683. const opDescribeServices = "DescribeServices"
  684. // DescribeServicesRequest generates a "aws/request.Request" representing the
  685. // client's request for the DescribeServices operation. The "output" return
  686. // value can be used to capture response data after the request's "Send" method
  687. // is called.
  688. //
  689. // See DescribeServices for usage and error information.
  690. //
  691. // Creating a request object using this method should be used when you want to inject
  692. // custom logic into the request's lifecycle using a custom handler, or if you want to
  693. // access properties on the request object before or after sending the request. If
  694. // you just want the service response, call the DescribeServices method directly
  695. // instead.
  696. //
  697. // Note: You must call the "Send" method on the returned request object in order
  698. // to execute the request.
  699. //
  700. // // Example sending a request using the DescribeServicesRequest method.
  701. // req, resp := client.DescribeServicesRequest(params)
  702. //
  703. // err := req.Send()
  704. // if err == nil { // resp is now filled
  705. // fmt.Println(resp)
  706. // }
  707. //
  708. func (c *ECS) DescribeServicesRequest(input *DescribeServicesInput) (req *request.Request, output *DescribeServicesOutput) {
  709. op := &request.Operation{
  710. Name: opDescribeServices,
  711. HTTPMethod: "POST",
  712. HTTPPath: "/",
  713. }
  714. if input == nil {
  715. input = &DescribeServicesInput{}
  716. }
  717. req = c.newRequest(op, input, output)
  718. output = &DescribeServicesOutput{}
  719. req.Data = output
  720. return
  721. }
  722. // DescribeServices API operation for Amazon EC2 Container Service.
  723. //
  724. // Describes the specified services running in your cluster.
  725. //
  726. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  727. // with awserr.Error's Code and Message methods to get detailed information about
  728. // the error.
  729. //
  730. // See the AWS API reference guide for Amazon EC2 Container Service's
  731. // API operation DescribeServices for usage and error information.
  732. //
  733. // Returned Error Codes:
  734. // * ServerException
  735. // These errors are usually caused by a server issue.
  736. //
  737. // * ClientException
  738. // These errors are usually caused by a client action, such as using an action
  739. // or resource on behalf of a user that doesn't have permission to use the action
  740. // or resource, or specifying an identifier that is not valid.
  741. //
  742. // * InvalidParameterException
  743. // The specified parameter is invalid. Review the available parameters for the
  744. // API request.
  745. //
  746. // * ClusterNotFoundException
  747. // The specified cluster could not be found. You can view your available clusters
  748. // with ListClusters. Amazon ECS clusters are region-specific.
  749. //
  750. func (c *ECS) DescribeServices(input *DescribeServicesInput) (*DescribeServicesOutput, error) {
  751. req, out := c.DescribeServicesRequest(input)
  752. err := req.Send()
  753. return out, err
  754. }
  755. const opDescribeTaskDefinition = "DescribeTaskDefinition"
  756. // DescribeTaskDefinitionRequest generates a "aws/request.Request" representing the
  757. // client's request for the DescribeTaskDefinition operation. The "output" return
  758. // value can be used to capture response data after the request's "Send" method
  759. // is called.
  760. //
  761. // See DescribeTaskDefinition for usage and error information.
  762. //
  763. // Creating a request object using this method should be used when you want to inject
  764. // custom logic into the request's lifecycle using a custom handler, or if you want to
  765. // access properties on the request object before or after sending the request. If
  766. // you just want the service response, call the DescribeTaskDefinition method directly
  767. // instead.
  768. //
  769. // Note: You must call the "Send" method on the returned request object in order
  770. // to execute the request.
  771. //
  772. // // Example sending a request using the DescribeTaskDefinitionRequest method.
  773. // req, resp := client.DescribeTaskDefinitionRequest(params)
  774. //
  775. // err := req.Send()
  776. // if err == nil { // resp is now filled
  777. // fmt.Println(resp)
  778. // }
  779. //
  780. func (c *ECS) DescribeTaskDefinitionRequest(input *DescribeTaskDefinitionInput) (req *request.Request, output *DescribeTaskDefinitionOutput) {
  781. op := &request.Operation{
  782. Name: opDescribeTaskDefinition,
  783. HTTPMethod: "POST",
  784. HTTPPath: "/",
  785. }
  786. if input == nil {
  787. input = &DescribeTaskDefinitionInput{}
  788. }
  789. req = c.newRequest(op, input, output)
  790. output = &DescribeTaskDefinitionOutput{}
  791. req.Data = output
  792. return
  793. }
  794. // DescribeTaskDefinition API operation for Amazon EC2 Container Service.
  795. //
  796. // Describes a task definition. You can specify a family and revision to find
  797. // information about a specific task definition, or you can simply specify the
  798. // family to find the latest ACTIVE revision in that family.
  799. //
  800. // You can only describe INACTIVE task definitions while an active task or service
  801. // references them.
  802. //
  803. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  804. // with awserr.Error's Code and Message methods to get detailed information about
  805. // the error.
  806. //
  807. // See the AWS API reference guide for Amazon EC2 Container Service's
  808. // API operation DescribeTaskDefinition for usage and error information.
  809. //
  810. // Returned Error Codes:
  811. // * ServerException
  812. // These errors are usually caused by a server issue.
  813. //
  814. // * ClientException
  815. // These errors are usually caused by a client action, such as using an action
  816. // or resource on behalf of a user that doesn't have permission to use the action
  817. // or resource, or specifying an identifier that is not valid.
  818. //
  819. // * InvalidParameterException
  820. // The specified parameter is invalid. Review the available parameters for the
  821. // API request.
  822. //
  823. func (c *ECS) DescribeTaskDefinition(input *DescribeTaskDefinitionInput) (*DescribeTaskDefinitionOutput, error) {
  824. req, out := c.DescribeTaskDefinitionRequest(input)
  825. err := req.Send()
  826. return out, err
  827. }
  828. const opDescribeTasks = "DescribeTasks"
  829. // DescribeTasksRequest generates a "aws/request.Request" representing the
  830. // client's request for the DescribeTasks operation. The "output" return
  831. // value can be used to capture response data after the request's "Send" method
  832. // is called.
  833. //
  834. // See DescribeTasks for usage and error information.
  835. //
  836. // Creating a request object using this method should be used when you want to inject
  837. // custom logic into the request's lifecycle using a custom handler, or if you want to
  838. // access properties on the request object before or after sending the request. If
  839. // you just want the service response, call the DescribeTasks method directly
  840. // instead.
  841. //
  842. // Note: You must call the "Send" method on the returned request object in order
  843. // to execute the request.
  844. //
  845. // // Example sending a request using the DescribeTasksRequest method.
  846. // req, resp := client.DescribeTasksRequest(params)
  847. //
  848. // err := req.Send()
  849. // if err == nil { // resp is now filled
  850. // fmt.Println(resp)
  851. // }
  852. //
  853. func (c *ECS) DescribeTasksRequest(input *DescribeTasksInput) (req *request.Request, output *DescribeTasksOutput) {
  854. op := &request.Operation{
  855. Name: opDescribeTasks,
  856. HTTPMethod: "POST",
  857. HTTPPath: "/",
  858. }
  859. if input == nil {
  860. input = &DescribeTasksInput{}
  861. }
  862. req = c.newRequest(op, input, output)
  863. output = &DescribeTasksOutput{}
  864. req.Data = output
  865. return
  866. }
  867. // DescribeTasks API operation for Amazon EC2 Container Service.
  868. //
  869. // Describes a specified task or tasks.
  870. //
  871. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  872. // with awserr.Error's Code and Message methods to get detailed information about
  873. // the error.
  874. //
  875. // See the AWS API reference guide for Amazon EC2 Container Service's
  876. // API operation DescribeTasks for usage and error information.
  877. //
  878. // Returned Error Codes:
  879. // * ServerException
  880. // These errors are usually caused by a server issue.
  881. //
  882. // * ClientException
  883. // These errors are usually caused by a client action, such as using an action
  884. // or resource on behalf of a user that doesn't have permission to use the action
  885. // or resource, or specifying an identifier that is not valid.
  886. //
  887. // * InvalidParameterException
  888. // The specified parameter is invalid. Review the available parameters for the
  889. // API request.
  890. //
  891. // * ClusterNotFoundException
  892. // The specified cluster could not be found. You can view your available clusters
  893. // with ListClusters. Amazon ECS clusters are region-specific.
  894. //
  895. func (c *ECS) DescribeTasks(input *DescribeTasksInput) (*DescribeTasksOutput, error) {
  896. req, out := c.DescribeTasksRequest(input)
  897. err := req.Send()
  898. return out, err
  899. }
  900. const opDiscoverPollEndpoint = "DiscoverPollEndpoint"
  901. // DiscoverPollEndpointRequest generates a "aws/request.Request" representing the
  902. // client's request for the DiscoverPollEndpoint operation. The "output" return
  903. // value can be used to capture response data after the request's "Send" method
  904. // is called.
  905. //
  906. // See DiscoverPollEndpoint for usage and error information.
  907. //
  908. // Creating a request object using this method should be used when you want to inject
  909. // custom logic into the request's lifecycle using a custom handler, or if you want to
  910. // access properties on the request object before or after sending the request. If
  911. // you just want the service response, call the DiscoverPollEndpoint method directly
  912. // instead.
  913. //
  914. // Note: You must call the "Send" method on the returned request object in order
  915. // to execute the request.
  916. //
  917. // // Example sending a request using the DiscoverPollEndpointRequest method.
  918. // req, resp := client.DiscoverPollEndpointRequest(params)
  919. //
  920. // err := req.Send()
  921. // if err == nil { // resp is now filled
  922. // fmt.Println(resp)
  923. // }
  924. //
  925. func (c *ECS) DiscoverPollEndpointRequest(input *DiscoverPollEndpointInput) (req *request.Request, output *DiscoverPollEndpointOutput) {
  926. op := &request.Operation{
  927. Name: opDiscoverPollEndpoint,
  928. HTTPMethod: "POST",
  929. HTTPPath: "/",
  930. }
  931. if input == nil {
  932. input = &DiscoverPollEndpointInput{}
  933. }
  934. req = c.newRequest(op, input, output)
  935. output = &DiscoverPollEndpointOutput{}
  936. req.Data = output
  937. return
  938. }
  939. // DiscoverPollEndpoint API operation for Amazon EC2 Container Service.
  940. //
  941. // This action is only used by the Amazon EC2 Container Service agent, and it
  942. // is not intended for use outside of the agent.
  943. //
  944. // Returns an endpoint for the Amazon EC2 Container Service agent to poll for
  945. // updates.
  946. //
  947. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  948. // with awserr.Error's Code and Message methods to get detailed information about
  949. // the error.
  950. //
  951. // See the AWS API reference guide for Amazon EC2 Container Service's
  952. // API operation DiscoverPollEndpoint for usage and error information.
  953. //
  954. // Returned Error Codes:
  955. // * ServerException
  956. // These errors are usually caused by a server issue.
  957. //
  958. // * ClientException
  959. // These errors are usually caused by a client action, such as using an action
  960. // or resource on behalf of a user that doesn't have permission to use the action
  961. // or resource, or specifying an identifier that is not valid.
  962. //
  963. func (c *ECS) DiscoverPollEndpoint(input *DiscoverPollEndpointInput) (*DiscoverPollEndpointOutput, error) {
  964. req, out := c.DiscoverPollEndpointRequest(input)
  965. err := req.Send()
  966. return out, err
  967. }
  968. const opListClusters = "ListClusters"
  969. // ListClustersRequest generates a "aws/request.Request" representing the
  970. // client's request for the ListClusters operation. The "output" return
  971. // value can be used to capture response data after the request's "Send" method
  972. // is called.
  973. //
  974. // See ListClusters for usage and error information.
  975. //
  976. // Creating a request object using this method should be used when you want to inject
  977. // custom logic into the request's lifecycle using a custom handler, or if you want to
  978. // access properties on the request object before or after sending the request. If
  979. // you just want the service response, call the ListClusters method directly
  980. // instead.
  981. //
  982. // Note: You must call the "Send" method on the returned request object in order
  983. // to execute the request.
  984. //
  985. // // Example sending a request using the ListClustersRequest method.
  986. // req, resp := client.ListClustersRequest(params)
  987. //
  988. // err := req.Send()
  989. // if err == nil { // resp is now filled
  990. // fmt.Println(resp)
  991. // }
  992. //
  993. func (c *ECS) ListClustersRequest(input *ListClustersInput) (req *request.Request, output *ListClustersOutput) {
  994. op := &request.Operation{
  995. Name: opListClusters,
  996. HTTPMethod: "POST",
  997. HTTPPath: "/",
  998. Paginator: &request.Paginator{
  999. InputTokens: []string{"nextToken"},
  1000. OutputTokens: []string{"nextToken"},
  1001. LimitToken: "maxResults",
  1002. TruncationToken: "",
  1003. },
  1004. }
  1005. if input == nil {
  1006. input = &ListClustersInput{}
  1007. }
  1008. req = c.newRequest(op, input, output)
  1009. output = &ListClustersOutput{}
  1010. req.Data = output
  1011. return
  1012. }
  1013. // ListClusters API operation for Amazon EC2 Container Service.
  1014. //
  1015. // Returns a list of existing clusters.
  1016. //
  1017. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1018. // with awserr.Error's Code and Message methods to get detailed information about
  1019. // the error.
  1020. //
  1021. // See the AWS API reference guide for Amazon EC2 Container Service's
  1022. // API operation ListClusters for usage and error information.
  1023. //
  1024. // Returned Error Codes:
  1025. // * ServerException
  1026. // These errors are usually caused by a server issue.
  1027. //
  1028. // * ClientException
  1029. // These errors are usually caused by a client action, such as using an action
  1030. // or resource on behalf of a user that doesn't have permission to use the action
  1031. // or resource, or specifying an identifier that is not valid.
  1032. //
  1033. // * InvalidParameterException
  1034. // The specified parameter is invalid. Review the available parameters for the
  1035. // API request.
  1036. //
  1037. func (c *ECS) ListClusters(input *ListClustersInput) (*ListClustersOutput, error) {
  1038. req, out := c.ListClustersRequest(input)
  1039. err := req.Send()
  1040. return out, err
  1041. }
  1042. // ListClustersPages iterates over the pages of a ListClusters operation,
  1043. // calling the "fn" function with the response data for each page. To stop
  1044. // iterating, return false from the fn function.
  1045. //
  1046. // See ListClusters method for more information on how to use this operation.
  1047. //
  1048. // Note: This operation can generate multiple requests to a service.
  1049. //
  1050. // // Example iterating over at most 3 pages of a ListClusters operation.
  1051. // pageNum := 0
  1052. // err := client.ListClustersPages(params,
  1053. // func(page *ListClustersOutput, lastPage bool) bool {
  1054. // pageNum++
  1055. // fmt.Println(page)
  1056. // return pageNum <= 3
  1057. // })
  1058. //
  1059. func (c *ECS) ListClustersPages(input *ListClustersInput, fn func(p *ListClustersOutput, lastPage bool) (shouldContinue bool)) error {
  1060. page, _ := c.ListClustersRequest(input)
  1061. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1062. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1063. return fn(p.(*ListClustersOutput), lastPage)
  1064. })
  1065. }
  1066. const opListContainerInstances = "ListContainerInstances"
  1067. // ListContainerInstancesRequest generates a "aws/request.Request" representing the
  1068. // client's request for the ListContainerInstances operation. The "output" return
  1069. // value can be used to capture response data after the request's "Send" method
  1070. // is called.
  1071. //
  1072. // See ListContainerInstances for usage and error information.
  1073. //
  1074. // Creating a request object using this method should be used when you want to inject
  1075. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1076. // access properties on the request object before or after sending the request. If
  1077. // you just want the service response, call the ListContainerInstances method directly
  1078. // instead.
  1079. //
  1080. // Note: You must call the "Send" method on the returned request object in order
  1081. // to execute the request.
  1082. //
  1083. // // Example sending a request using the ListContainerInstancesRequest method.
  1084. // req, resp := client.ListContainerInstancesRequest(params)
  1085. //
  1086. // err := req.Send()
  1087. // if err == nil { // resp is now filled
  1088. // fmt.Println(resp)
  1089. // }
  1090. //
  1091. func (c *ECS) ListContainerInstancesRequest(input *ListContainerInstancesInput) (req *request.Request, output *ListContainerInstancesOutput) {
  1092. op := &request.Operation{
  1093. Name: opListContainerInstances,
  1094. HTTPMethod: "POST",
  1095. HTTPPath: "/",
  1096. Paginator: &request.Paginator{
  1097. InputTokens: []string{"nextToken"},
  1098. OutputTokens: []string{"nextToken"},
  1099. LimitToken: "maxResults",
  1100. TruncationToken: "",
  1101. },
  1102. }
  1103. if input == nil {
  1104. input = &ListContainerInstancesInput{}
  1105. }
  1106. req = c.newRequest(op, input, output)
  1107. output = &ListContainerInstancesOutput{}
  1108. req.Data = output
  1109. return
  1110. }
  1111. // ListContainerInstances API operation for Amazon EC2 Container Service.
  1112. //
  1113. // Returns a list of container instances in a specified cluster.
  1114. //
  1115. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1116. // with awserr.Error's Code and Message methods to get detailed information about
  1117. // the error.
  1118. //
  1119. // See the AWS API reference guide for Amazon EC2 Container Service's
  1120. // API operation ListContainerInstances for usage and error information.
  1121. //
  1122. // Returned Error Codes:
  1123. // * ServerException
  1124. // These errors are usually caused by a server issue.
  1125. //
  1126. // * ClientException
  1127. // These errors are usually caused by a client action, such as using an action
  1128. // or resource on behalf of a user that doesn't have permission to use the action
  1129. // or resource, or specifying an identifier that is not valid.
  1130. //
  1131. // * InvalidParameterException
  1132. // The specified parameter is invalid. Review the available parameters for the
  1133. // API request.
  1134. //
  1135. // * ClusterNotFoundException
  1136. // The specified cluster could not be found. You can view your available clusters
  1137. // with ListClusters. Amazon ECS clusters are region-specific.
  1138. //
  1139. func (c *ECS) ListContainerInstances(input *ListContainerInstancesInput) (*ListContainerInstancesOutput, error) {
  1140. req, out := c.ListContainerInstancesRequest(input)
  1141. err := req.Send()
  1142. return out, err
  1143. }
  1144. // ListContainerInstancesPages iterates over the pages of a ListContainerInstances operation,
  1145. // calling the "fn" function with the response data for each page. To stop
  1146. // iterating, return false from the fn function.
  1147. //
  1148. // See ListContainerInstances method for more information on how to use this operation.
  1149. //
  1150. // Note: This operation can generate multiple requests to a service.
  1151. //
  1152. // // Example iterating over at most 3 pages of a ListContainerInstances operation.
  1153. // pageNum := 0
  1154. // err := client.ListContainerInstancesPages(params,
  1155. // func(page *ListContainerInstancesOutput, lastPage bool) bool {
  1156. // pageNum++
  1157. // fmt.Println(page)
  1158. // return pageNum <= 3
  1159. // })
  1160. //
  1161. func (c *ECS) ListContainerInstancesPages(input *ListContainerInstancesInput, fn func(p *ListContainerInstancesOutput, lastPage bool) (shouldContinue bool)) error {
  1162. page, _ := c.ListContainerInstancesRequest(input)
  1163. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1164. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1165. return fn(p.(*ListContainerInstancesOutput), lastPage)
  1166. })
  1167. }
  1168. const opListServices = "ListServices"
  1169. // ListServicesRequest generates a "aws/request.Request" representing the
  1170. // client's request for the ListServices operation. The "output" return
  1171. // value can be used to capture response data after the request's "Send" method
  1172. // is called.
  1173. //
  1174. // See ListServices for usage and error information.
  1175. //
  1176. // Creating a request object using this method should be used when you want to inject
  1177. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1178. // access properties on the request object before or after sending the request. If
  1179. // you just want the service response, call the ListServices method directly
  1180. // instead.
  1181. //
  1182. // Note: You must call the "Send" method on the returned request object in order
  1183. // to execute the request.
  1184. //
  1185. // // Example sending a request using the ListServicesRequest method.
  1186. // req, resp := client.ListServicesRequest(params)
  1187. //
  1188. // err := req.Send()
  1189. // if err == nil { // resp is now filled
  1190. // fmt.Println(resp)
  1191. // }
  1192. //
  1193. func (c *ECS) ListServicesRequest(input *ListServicesInput) (req *request.Request, output *ListServicesOutput) {
  1194. op := &request.Operation{
  1195. Name: opListServices,
  1196. HTTPMethod: "POST",
  1197. HTTPPath: "/",
  1198. Paginator: &request.Paginator{
  1199. InputTokens: []string{"nextToken"},
  1200. OutputTokens: []string{"nextToken"},
  1201. LimitToken: "maxResults",
  1202. TruncationToken: "",
  1203. },
  1204. }
  1205. if input == nil {
  1206. input = &ListServicesInput{}
  1207. }
  1208. req = c.newRequest(op, input, output)
  1209. output = &ListServicesOutput{}
  1210. req.Data = output
  1211. return
  1212. }
  1213. // ListServices API operation for Amazon EC2 Container Service.
  1214. //
  1215. // Lists the services that are running in a specified cluster.
  1216. //
  1217. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1218. // with awserr.Error's Code and Message methods to get detailed information about
  1219. // the error.
  1220. //
  1221. // See the AWS API reference guide for Amazon EC2 Container Service's
  1222. // API operation ListServices for usage and error information.
  1223. //
  1224. // Returned Error Codes:
  1225. // * ServerException
  1226. // These errors are usually caused by a server issue.
  1227. //
  1228. // * ClientException
  1229. // These errors are usually caused by a client action, such as using an action
  1230. // or resource on behalf of a user that doesn't have permission to use the action
  1231. // or resource, or specifying an identifier that is not valid.
  1232. //
  1233. // * InvalidParameterException
  1234. // The specified parameter is invalid. Review the available parameters for the
  1235. // API request.
  1236. //
  1237. // * ClusterNotFoundException
  1238. // The specified cluster could not be found. You can view your available clusters
  1239. // with ListClusters. Amazon ECS clusters are region-specific.
  1240. //
  1241. func (c *ECS) ListServices(input *ListServicesInput) (*ListServicesOutput, error) {
  1242. req, out := c.ListServicesRequest(input)
  1243. err := req.Send()
  1244. return out, err
  1245. }
  1246. // ListServicesPages iterates over the pages of a ListServices operation,
  1247. // calling the "fn" function with the response data for each page. To stop
  1248. // iterating, return false from the fn function.
  1249. //
  1250. // See ListServices method for more information on how to use this operation.
  1251. //
  1252. // Note: This operation can generate multiple requests to a service.
  1253. //
  1254. // // Example iterating over at most 3 pages of a ListServices operation.
  1255. // pageNum := 0
  1256. // err := client.ListServicesPages(params,
  1257. // func(page *ListServicesOutput, lastPage bool) bool {
  1258. // pageNum++
  1259. // fmt.Println(page)
  1260. // return pageNum <= 3
  1261. // })
  1262. //
  1263. func (c *ECS) ListServicesPages(input *ListServicesInput, fn func(p *ListServicesOutput, lastPage bool) (shouldContinue bool)) error {
  1264. page, _ := c.ListServicesRequest(input)
  1265. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1266. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1267. return fn(p.(*ListServicesOutput), lastPage)
  1268. })
  1269. }
  1270. const opListTaskDefinitionFamilies = "ListTaskDefinitionFamilies"
  1271. // ListTaskDefinitionFamiliesRequest generates a "aws/request.Request" representing the
  1272. // client's request for the ListTaskDefinitionFamilies operation. The "output" return
  1273. // value can be used to capture response data after the request's "Send" method
  1274. // is called.
  1275. //
  1276. // See ListTaskDefinitionFamilies for usage and error information.
  1277. //
  1278. // Creating a request object using this method should be used when you want to inject
  1279. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1280. // access properties on the request object before or after sending the request. If
  1281. // you just want the service response, call the ListTaskDefinitionFamilies method directly
  1282. // instead.
  1283. //
  1284. // Note: You must call the "Send" method on the returned request object in order
  1285. // to execute the request.
  1286. //
  1287. // // Example sending a request using the ListTaskDefinitionFamiliesRequest method.
  1288. // req, resp := client.ListTaskDefinitionFamiliesRequest(params)
  1289. //
  1290. // err := req.Send()
  1291. // if err == nil { // resp is now filled
  1292. // fmt.Println(resp)
  1293. // }
  1294. //
  1295. func (c *ECS) ListTaskDefinitionFamiliesRequest(input *ListTaskDefinitionFamiliesInput) (req *request.Request, output *ListTaskDefinitionFamiliesOutput) {
  1296. op := &request.Operation{
  1297. Name: opListTaskDefinitionFamilies,
  1298. HTTPMethod: "POST",
  1299. HTTPPath: "/",
  1300. Paginator: &request.Paginator{
  1301. InputTokens: []string{"nextToken"},
  1302. OutputTokens: []string{"nextToken"},
  1303. LimitToken: "maxResults",
  1304. TruncationToken: "",
  1305. },
  1306. }
  1307. if input == nil {
  1308. input = &ListTaskDefinitionFamiliesInput{}
  1309. }
  1310. req = c.newRequest(op, input, output)
  1311. output = &ListTaskDefinitionFamiliesOutput{}
  1312. req.Data = output
  1313. return
  1314. }
  1315. // ListTaskDefinitionFamilies API operation for Amazon EC2 Container Service.
  1316. //
  1317. // Returns a list of task definition families that are registered to your account
  1318. // (which may include task definition families that no longer have any ACTIVE
  1319. // task definition revisions).
  1320. //
  1321. // You can filter out task definition families that do not contain any ACTIVE
  1322. // task definition revisions by setting the status parameter to ACTIVE. You
  1323. // can also filter the results with the familyPrefix parameter.
  1324. //
  1325. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1326. // with awserr.Error's Code and Message methods to get detailed information about
  1327. // the error.
  1328. //
  1329. // See the AWS API reference guide for Amazon EC2 Container Service's
  1330. // API operation ListTaskDefinitionFamilies for usage and error information.
  1331. //
  1332. // Returned Error Codes:
  1333. // * ServerException
  1334. // These errors are usually caused by a server issue.
  1335. //
  1336. // * ClientException
  1337. // These errors are usually caused by a client action, such as using an action
  1338. // or resource on behalf of a user that doesn't have permission to use the action
  1339. // or resource, or specifying an identifier that is not valid.
  1340. //
  1341. // * InvalidParameterException
  1342. // The specified parameter is invalid. Review the available parameters for the
  1343. // API request.
  1344. //
  1345. func (c *ECS) ListTaskDefinitionFamilies(input *ListTaskDefinitionFamiliesInput) (*ListTaskDefinitionFamiliesOutput, error) {
  1346. req, out := c.ListTaskDefinitionFamiliesRequest(input)
  1347. err := req.Send()
  1348. return out, err
  1349. }
  1350. // ListTaskDefinitionFamiliesPages iterates over the pages of a ListTaskDefinitionFamilies operation,
  1351. // calling the "fn" function with the response data for each page. To stop
  1352. // iterating, return false from the fn function.
  1353. //
  1354. // See ListTaskDefinitionFamilies method for more information on how to use this operation.
  1355. //
  1356. // Note: This operation can generate multiple requests to a service.
  1357. //
  1358. // // Example iterating over at most 3 pages of a ListTaskDefinitionFamilies operation.
  1359. // pageNum := 0
  1360. // err := client.ListTaskDefinitionFamiliesPages(params,
  1361. // func(page *ListTaskDefinitionFamiliesOutput, lastPage bool) bool {
  1362. // pageNum++
  1363. // fmt.Println(page)
  1364. // return pageNum <= 3
  1365. // })
  1366. //
  1367. func (c *ECS) ListTaskDefinitionFamiliesPages(input *ListTaskDefinitionFamiliesInput, fn func(p *ListTaskDefinitionFamiliesOutput, lastPage bool) (shouldContinue bool)) error {
  1368. page, _ := c.ListTaskDefinitionFamiliesRequest(input)
  1369. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1370. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1371. return fn(p.(*ListTaskDefinitionFamiliesOutput), lastPage)
  1372. })
  1373. }
  1374. const opListTaskDefinitions = "ListTaskDefinitions"
  1375. // ListTaskDefinitionsRequest generates a "aws/request.Request" representing the
  1376. // client's request for the ListTaskDefinitions operation. The "output" return
  1377. // value can be used to capture response data after the request's "Send" method
  1378. // is called.
  1379. //
  1380. // See ListTaskDefinitions for usage and error information.
  1381. //
  1382. // Creating a request object using this method should be used when you want to inject
  1383. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1384. // access properties on the request object before or after sending the request. If
  1385. // you just want the service response, call the ListTaskDefinitions method directly
  1386. // instead.
  1387. //
  1388. // Note: You must call the "Send" method on the returned request object in order
  1389. // to execute the request.
  1390. //
  1391. // // Example sending a request using the ListTaskDefinitionsRequest method.
  1392. // req, resp := client.ListTaskDefinitionsRequest(params)
  1393. //
  1394. // err := req.Send()
  1395. // if err == nil { // resp is now filled
  1396. // fmt.Println(resp)
  1397. // }
  1398. //
  1399. func (c *ECS) ListTaskDefinitionsRequest(input *ListTaskDefinitionsInput) (req *request.Request, output *ListTaskDefinitionsOutput) {
  1400. op := &request.Operation{
  1401. Name: opListTaskDefinitions,
  1402. HTTPMethod: "POST",
  1403. HTTPPath: "/",
  1404. Paginator: &request.Paginator{
  1405. InputTokens: []string{"nextToken"},
  1406. OutputTokens: []string{"nextToken"},
  1407. LimitToken: "maxResults",
  1408. TruncationToken: "",
  1409. },
  1410. }
  1411. if input == nil {
  1412. input = &ListTaskDefinitionsInput{}
  1413. }
  1414. req = c.newRequest(op, input, output)
  1415. output = &ListTaskDefinitionsOutput{}
  1416. req.Data = output
  1417. return
  1418. }
  1419. // ListTaskDefinitions API operation for Amazon EC2 Container Service.
  1420. //
  1421. // Returns a list of task definitions that are registered to your account. You
  1422. // can filter the results by family name with the familyPrefix parameter or
  1423. // by status with the status parameter.
  1424. //
  1425. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1426. // with awserr.Error's Code and Message methods to get detailed information about
  1427. // the error.
  1428. //
  1429. // See the AWS API reference guide for Amazon EC2 Container Service's
  1430. // API operation ListTaskDefinitions for usage and error information.
  1431. //
  1432. // Returned Error Codes:
  1433. // * ServerException
  1434. // These errors are usually caused by a server issue.
  1435. //
  1436. // * ClientException
  1437. // These errors are usually caused by a client action, such as using an action
  1438. // or resource on behalf of a user that doesn't have permission to use the action
  1439. // or resource, or specifying an identifier that is not valid.
  1440. //
  1441. // * InvalidParameterException
  1442. // The specified parameter is invalid. Review the available parameters for the
  1443. // API request.
  1444. //
  1445. func (c *ECS) ListTaskDefinitions(input *ListTaskDefinitionsInput) (*ListTaskDefinitionsOutput, error) {
  1446. req, out := c.ListTaskDefinitionsRequest(input)
  1447. err := req.Send()
  1448. return out, err
  1449. }
  1450. // ListTaskDefinitionsPages iterates over the pages of a ListTaskDefinitions operation,
  1451. // calling the "fn" function with the response data for each page. To stop
  1452. // iterating, return false from the fn function.
  1453. //
  1454. // See ListTaskDefinitions method for more information on how to use this operation.
  1455. //
  1456. // Note: This operation can generate multiple requests to a service.
  1457. //
  1458. // // Example iterating over at most 3 pages of a ListTaskDefinitions operation.
  1459. // pageNum := 0
  1460. // err := client.ListTaskDefinitionsPages(params,
  1461. // func(page *ListTaskDefinitionsOutput, lastPage bool) bool {
  1462. // pageNum++
  1463. // fmt.Println(page)
  1464. // return pageNum <= 3
  1465. // })
  1466. //
  1467. func (c *ECS) ListTaskDefinitionsPages(input *ListTaskDefinitionsInput, fn func(p *ListTaskDefinitionsOutput, lastPage bool) (shouldContinue bool)) error {
  1468. page, _ := c.ListTaskDefinitionsRequest(input)
  1469. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1470. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1471. return fn(p.(*ListTaskDefinitionsOutput), lastPage)
  1472. })
  1473. }
  1474. const opListTasks = "ListTasks"
  1475. // ListTasksRequest generates a "aws/request.Request" representing the
  1476. // client's request for the ListTasks operation. The "output" return
  1477. // value can be used to capture response data after the request's "Send" method
  1478. // is called.
  1479. //
  1480. // See ListTasks for usage and error information.
  1481. //
  1482. // Creating a request object using this method should be used when you want to inject
  1483. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1484. // access properties on the request object before or after sending the request. If
  1485. // you just want the service response, call the ListTasks method directly
  1486. // instead.
  1487. //
  1488. // Note: You must call the "Send" method on the returned request object in order
  1489. // to execute the request.
  1490. //
  1491. // // Example sending a request using the ListTasksRequest method.
  1492. // req, resp := client.ListTasksRequest(params)
  1493. //
  1494. // err := req.Send()
  1495. // if err == nil { // resp is now filled
  1496. // fmt.Println(resp)
  1497. // }
  1498. //
  1499. func (c *ECS) ListTasksRequest(input *ListTasksInput) (req *request.Request, output *ListTasksOutput) {
  1500. op := &request.Operation{
  1501. Name: opListTasks,
  1502. HTTPMethod: "POST",
  1503. HTTPPath: "/",
  1504. Paginator: &request.Paginator{
  1505. InputTokens: []string{"nextToken"},
  1506. OutputTokens: []string{"nextToken"},
  1507. LimitToken: "maxResults",
  1508. TruncationToken: "",
  1509. },
  1510. }
  1511. if input == nil {
  1512. input = &ListTasksInput{}
  1513. }
  1514. req = c.newRequest(op, input, output)
  1515. output = &ListTasksOutput{}
  1516. req.Data = output
  1517. return
  1518. }
  1519. // ListTasks API operation for Amazon EC2 Container Service.
  1520. //
  1521. // Returns a list of tasks for a specified cluster. You can filter the results
  1522. // by family name, by a particular container instance, or by the desired status
  1523. // of the task with the family, containerInstance, and desiredStatus parameters.
  1524. //
  1525. // Recently-stopped tasks might appear in the returned results. Currently, stopped
  1526. // tasks appear in the returned results for at least one hour.
  1527. //
  1528. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1529. // with awserr.Error's Code and Message methods to get detailed information about
  1530. // the error.
  1531. //
  1532. // See the AWS API reference guide for Amazon EC2 Container Service's
  1533. // API operation ListTasks for usage and error information.
  1534. //
  1535. // Returned Error Codes:
  1536. // * ServerException
  1537. // These errors are usually caused by a server issue.
  1538. //
  1539. // * ClientException
  1540. // These errors are usually caused by a client action, such as using an action
  1541. // or resource on behalf of a user that doesn't have permission to use the action
  1542. // or resource, or specifying an identifier that is not valid.
  1543. //
  1544. // * InvalidParameterException
  1545. // The specified parameter is invalid. Review the available parameters for the
  1546. // API request.
  1547. //
  1548. // * ClusterNotFoundException
  1549. // The specified cluster could not be found. You can view your available clusters
  1550. // with ListClusters. Amazon ECS clusters are region-specific.
  1551. //
  1552. // * ServiceNotFoundException
  1553. // The specified service could not be found. You can view your available services
  1554. // with ListServices. Amazon ECS services are cluster-specific and region-specific.
  1555. //
  1556. func (c *ECS) ListTasks(input *ListTasksInput) (*ListTasksOutput, error) {
  1557. req, out := c.ListTasksRequest(input)
  1558. err := req.Send()
  1559. return out, err
  1560. }
  1561. // ListTasksPages iterates over the pages of a ListTasks operation,
  1562. // calling the "fn" function with the response data for each page. To stop
  1563. // iterating, return false from the fn function.
  1564. //
  1565. // See ListTasks method for more information on how to use this operation.
  1566. //
  1567. // Note: This operation can generate multiple requests to a service.
  1568. //
  1569. // // Example iterating over at most 3 pages of a ListTasks operation.
  1570. // pageNum := 0
  1571. // err := client.ListTasksPages(params,
  1572. // func(page *ListTasksOutput, lastPage bool) bool {
  1573. // pageNum++
  1574. // fmt.Println(page)
  1575. // return pageNum <= 3
  1576. // })
  1577. //
  1578. func (c *ECS) ListTasksPages(input *ListTasksInput, fn func(p *ListTasksOutput, lastPage bool) (shouldContinue bool)) error {
  1579. page, _ := c.ListTasksRequest(input)
  1580. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1581. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1582. return fn(p.(*ListTasksOutput), lastPage)
  1583. })
  1584. }
  1585. const opRegisterContainerInstance = "RegisterContainerInstance"
  1586. // RegisterContainerInstanceRequest generates a "aws/request.Request" representing the
  1587. // client's request for the RegisterContainerInstance operation. The "output" return
  1588. // value can be used to capture response data after the request's "Send" method
  1589. // is called.
  1590. //
  1591. // See RegisterContainerInstance for usage and error information.
  1592. //
  1593. // Creating a request object using this method should be used when you want to inject
  1594. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1595. // access properties on the request object before or after sending the request. If
  1596. // you just want the service response, call the RegisterContainerInstance method directly
  1597. // instead.
  1598. //
  1599. // Note: You must call the "Send" method on the returned request object in order
  1600. // to execute the request.
  1601. //
  1602. // // Example sending a request using the RegisterContainerInstanceRequest method.
  1603. // req, resp := client.RegisterContainerInstanceRequest(params)
  1604. //
  1605. // err := req.Send()
  1606. // if err == nil { // resp is now filled
  1607. // fmt.Println(resp)
  1608. // }
  1609. //
  1610. func (c *ECS) RegisterContainerInstanceRequest(input *RegisterContainerInstanceInput) (req *request.Request, output *RegisterContainerInstanceOutput) {
  1611. op := &request.Operation{
  1612. Name: opRegisterContainerInstance,
  1613. HTTPMethod: "POST",
  1614. HTTPPath: "/",
  1615. }
  1616. if input == nil {
  1617. input = &RegisterContainerInstanceInput{}
  1618. }
  1619. req = c.newRequest(op, input, output)
  1620. output = &RegisterContainerInstanceOutput{}
  1621. req.Data = output
  1622. return
  1623. }
  1624. // RegisterContainerInstance API operation for Amazon EC2 Container Service.
  1625. //
  1626. // This action is only used by the Amazon EC2 Container Service agent, and it
  1627. // is not intended for use outside of the agent.
  1628. //
  1629. // Registers an EC2 instance into the specified cluster. This instance becomes
  1630. // available to place containers on.
  1631. //
  1632. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1633. // with awserr.Error's Code and Message methods to get detailed information about
  1634. // the error.
  1635. //
  1636. // See the AWS API reference guide for Amazon EC2 Container Service's
  1637. // API operation RegisterContainerInstance for usage and error information.
  1638. //
  1639. // Returned Error Codes:
  1640. // * ServerException
  1641. // These errors are usually caused by a server issue.
  1642. //
  1643. // * ClientException
  1644. // These errors are usually caused by a client action, such as using an action
  1645. // or resource on behalf of a user that doesn't have permission to use the action
  1646. // or resource, or specifying an identifier that is not valid.
  1647. //
  1648. func (c *ECS) RegisterContainerInstance(input *RegisterContainerInstanceInput) (*RegisterContainerInstanceOutput, error) {
  1649. req, out := c.RegisterContainerInstanceRequest(input)
  1650. err := req.Send()
  1651. return out, err
  1652. }
  1653. const opRegisterTaskDefinition = "RegisterTaskDefinition"
  1654. // RegisterTaskDefinitionRequest generates a "aws/request.Request" representing the
  1655. // client's request for the RegisterTaskDefinition operation. The "output" return
  1656. // value can be used to capture response data after the request's "Send" method
  1657. // is called.
  1658. //
  1659. // See RegisterTaskDefinition for usage and error information.
  1660. //
  1661. // Creating a request object using this method should be used when you want to inject
  1662. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1663. // access properties on the request object before or after sending the request. If
  1664. // you just want the service response, call the RegisterTaskDefinition method directly
  1665. // instead.
  1666. //
  1667. // Note: You must call the "Send" method on the returned request object in order
  1668. // to execute the request.
  1669. //
  1670. // // Example sending a request using the RegisterTaskDefinitionRequest method.
  1671. // req, resp := client.RegisterTaskDefinitionRequest(params)
  1672. //
  1673. // err := req.Send()
  1674. // if err == nil { // resp is now filled
  1675. // fmt.Println(resp)
  1676. // }
  1677. //
  1678. func (c *ECS) RegisterTaskDefinitionRequest(input *RegisterTaskDefinitionInput) (req *request.Request, output *RegisterTaskDefinitionOutput) {
  1679. op := &request.Operation{
  1680. Name: opRegisterTaskDefinition,
  1681. HTTPMethod: "POST",
  1682. HTTPPath: "/",
  1683. }
  1684. if input == nil {
  1685. input = &RegisterTaskDefinitionInput{}
  1686. }
  1687. req = c.newRequest(op, input, output)
  1688. output = &RegisterTaskDefinitionOutput{}
  1689. req.Data = output
  1690. return
  1691. }
  1692. // RegisterTaskDefinition API operation for Amazon EC2 Container Service.
  1693. //
  1694. // Registers a new task definition from the supplied family and containerDefinitions.
  1695. // Optionally, you can add data volumes to your containers with the volumes
  1696. // parameter. For more information about task definition parameters and defaults,
  1697. // see Amazon ECS Task Definitions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html)
  1698. // in the Amazon EC2 Container Service Developer Guide.
  1699. //
  1700. // You can specify an IAM role for your task with the taskRoleArn parameter.
  1701. // When you specify an IAM role for a task, its containers can then use the
  1702. // latest versions of the AWS CLI or SDKs to make API requests to the AWS services
  1703. // that are specified in the IAM policy associated with the role. For more information,
  1704. // see IAM Roles for Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html)
  1705. // in the Amazon EC2 Container Service Developer Guide.
  1706. //
  1707. // You can specify a Docker networking mode for the containers in your task
  1708. // definition with the networkMode parameter. The available network modes correspond
  1709. // to those described in Network settings (https://docs.docker.com/engine/reference/run/#/network-settings)
  1710. // in the Docker run reference.
  1711. //
  1712. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1713. // with awserr.Error's Code and Message methods to get detailed information about
  1714. // the error.
  1715. //
  1716. // See the AWS API reference guide for Amazon EC2 Container Service's
  1717. // API operation RegisterTaskDefinition for usage and error information.
  1718. //
  1719. // Returned Error Codes:
  1720. // * ServerException
  1721. // These errors are usually caused by a server issue.
  1722. //
  1723. // * ClientException
  1724. // These errors are usually caused by a client action, such as using an action
  1725. // or resource on behalf of a user that doesn't have permission to use the action
  1726. // or resource, or specifying an identifier that is not valid.
  1727. //
  1728. // * InvalidParameterException
  1729. // The specified parameter is invalid. Review the available parameters for the
  1730. // API request.
  1731. //
  1732. func (c *ECS) RegisterTaskDefinition(input *RegisterTaskDefinitionInput) (*RegisterTaskDefinitionOutput, error) {
  1733. req, out := c.RegisterTaskDefinitionRequest(input)
  1734. err := req.Send()
  1735. return out, err
  1736. }
  1737. const opRunTask = "RunTask"
  1738. // RunTaskRequest generates a "aws/request.Request" representing the
  1739. // client's request for the RunTask operation. The "output" return
  1740. // value can be used to capture response data after the request's "Send" method
  1741. // is called.
  1742. //
  1743. // See RunTask for usage and error information.
  1744. //
  1745. // Creating a request object using this method should be used when you want to inject
  1746. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1747. // access properties on the request object before or after sending the request. If
  1748. // you just want the service response, call the RunTask method directly
  1749. // instead.
  1750. //
  1751. // Note: You must call the "Send" method on the returned request object in order
  1752. // to execute the request.
  1753. //
  1754. // // Example sending a request using the RunTaskRequest method.
  1755. // req, resp := client.RunTaskRequest(params)
  1756. //
  1757. // err := req.Send()
  1758. // if err == nil { // resp is now filled
  1759. // fmt.Println(resp)
  1760. // }
  1761. //
  1762. func (c *ECS) RunTaskRequest(input *RunTaskInput) (req *request.Request, output *RunTaskOutput) {
  1763. op := &request.Operation{
  1764. Name: opRunTask,
  1765. HTTPMethod: "POST",
  1766. HTTPPath: "/",
  1767. }
  1768. if input == nil {
  1769. input = &RunTaskInput{}
  1770. }
  1771. req = c.newRequest(op, input, output)
  1772. output = &RunTaskOutput{}
  1773. req.Data = output
  1774. return
  1775. }
  1776. // RunTask API operation for Amazon EC2 Container Service.
  1777. //
  1778. // Start a task using random placement and the default Amazon ECS scheduler.
  1779. // To use your own scheduler or place a task on a specific container instance,
  1780. // use StartTask instead.
  1781. //
  1782. // The count parameter is limited to 10 tasks per call.
  1783. //
  1784. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1785. // with awserr.Error's Code and Message methods to get detailed information about
  1786. // the error.
  1787. //
  1788. // See the AWS API reference guide for Amazon EC2 Container Service's
  1789. // API operation RunTask for usage and error information.
  1790. //
  1791. // Returned Error Codes:
  1792. // * ServerException
  1793. // These errors are usually caused by a server issue.
  1794. //
  1795. // * ClientException
  1796. // These errors are usually caused by a client action, such as using an action
  1797. // or resource on behalf of a user that doesn't have permission to use the action
  1798. // or resource, or specifying an identifier that is not valid.
  1799. //
  1800. // * InvalidParameterException
  1801. // The specified parameter is invalid. Review the available parameters for the
  1802. // API request.
  1803. //
  1804. // * ClusterNotFoundException
  1805. // The specified cluster could not be found. You can view your available clusters
  1806. // with ListClusters. Amazon ECS clusters are region-specific.
  1807. //
  1808. func (c *ECS) RunTask(input *RunTaskInput) (*RunTaskOutput, error) {
  1809. req, out := c.RunTaskRequest(input)
  1810. err := req.Send()
  1811. return out, err
  1812. }
  1813. const opStartTask = "StartTask"
  1814. // StartTaskRequest generates a "aws/request.Request" representing the
  1815. // client's request for the StartTask operation. The "output" return
  1816. // value can be used to capture response data after the request's "Send" method
  1817. // is called.
  1818. //
  1819. // See StartTask for usage and error information.
  1820. //
  1821. // Creating a request object using this method should be used when you want to inject
  1822. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1823. // access properties on the request object before or after sending the request. If
  1824. // you just want the service response, call the StartTask method directly
  1825. // instead.
  1826. //
  1827. // Note: You must call the "Send" method on the returned request object in order
  1828. // to execute the request.
  1829. //
  1830. // // Example sending a request using the StartTaskRequest method.
  1831. // req, resp := client.StartTaskRequest(params)
  1832. //
  1833. // err := req.Send()
  1834. // if err == nil { // resp is now filled
  1835. // fmt.Println(resp)
  1836. // }
  1837. //
  1838. func (c *ECS) StartTaskRequest(input *StartTaskInput) (req *request.Request, output *StartTaskOutput) {
  1839. op := &request.Operation{
  1840. Name: opStartTask,
  1841. HTTPMethod: "POST",
  1842. HTTPPath: "/",
  1843. }
  1844. if input == nil {
  1845. input = &StartTaskInput{}
  1846. }
  1847. req = c.newRequest(op, input, output)
  1848. output = &StartTaskOutput{}
  1849. req.Data = output
  1850. return
  1851. }
  1852. // StartTask API operation for Amazon EC2 Container Service.
  1853. //
  1854. // Starts a new task from the specified task definition on the specified container
  1855. // instance or instances. To use the default Amazon ECS scheduler to place your
  1856. // task, use RunTask instead.
  1857. //
  1858. // The list of container instances to start tasks on is limited to 10.
  1859. //
  1860. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1861. // with awserr.Error's Code and Message methods to get detailed information about
  1862. // the error.
  1863. //
  1864. // See the AWS API reference guide for Amazon EC2 Container Service's
  1865. // API operation StartTask for usage and error information.
  1866. //
  1867. // Returned Error Codes:
  1868. // * ServerException
  1869. // These errors are usually caused by a server issue.
  1870. //
  1871. // * ClientException
  1872. // These errors are usually caused by a client action, such as using an action
  1873. // or resource on behalf of a user that doesn't have permission to use the action
  1874. // or resource, or specifying an identifier that is not valid.
  1875. //
  1876. // * InvalidParameterException
  1877. // The specified parameter is invalid. Review the available parameters for the
  1878. // API request.
  1879. //
  1880. // * ClusterNotFoundException
  1881. // The specified cluster could not be found. You can view your available clusters
  1882. // with ListClusters. Amazon ECS clusters are region-specific.
  1883. //
  1884. func (c *ECS) StartTask(input *StartTaskInput) (*StartTaskOutput, error) {
  1885. req, out := c.StartTaskRequest(input)
  1886. err := req.Send()
  1887. return out, err
  1888. }
  1889. const opStopTask = "StopTask"
  1890. // StopTaskRequest generates a "aws/request.Request" representing the
  1891. // client's request for the StopTask operation. The "output" return
  1892. // value can be used to capture response data after the request's "Send" method
  1893. // is called.
  1894. //
  1895. // See StopTask for usage and error information.
  1896. //
  1897. // Creating a request object using this method should be used when you want to inject
  1898. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1899. // access properties on the request object before or after sending the request. If
  1900. // you just want the service response, call the StopTask method directly
  1901. // instead.
  1902. //
  1903. // Note: You must call the "Send" method on the returned request object in order
  1904. // to execute the request.
  1905. //
  1906. // // Example sending a request using the StopTaskRequest method.
  1907. // req, resp := client.StopTaskRequest(params)
  1908. //
  1909. // err := req.Send()
  1910. // if err == nil { // resp is now filled
  1911. // fmt.Println(resp)
  1912. // }
  1913. //
  1914. func (c *ECS) StopTaskRequest(input *StopTaskInput) (req *request.Request, output *StopTaskOutput) {
  1915. op := &request.Operation{
  1916. Name: opStopTask,
  1917. HTTPMethod: "POST",
  1918. HTTPPath: "/",
  1919. }
  1920. if input == nil {
  1921. input = &StopTaskInput{}
  1922. }
  1923. req = c.newRequest(op, input, output)
  1924. output = &StopTaskOutput{}
  1925. req.Data = output
  1926. return
  1927. }
  1928. // StopTask API operation for Amazon EC2 Container Service.
  1929. //
  1930. // Stops a running task.
  1931. //
  1932. // When StopTask is called on a task, the equivalent of docker stop is issued
  1933. // to the containers running in the task. This results in a SIGTERM and a 30-second
  1934. // timeout, after which SIGKILL is sent and the containers are forcibly stopped.
  1935. // If the container handles the SIGTERM gracefully and exits within 30 seconds
  1936. // from receiving it, no SIGKILL is sent.
  1937. //
  1938. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1939. // with awserr.Error's Code and Message methods to get detailed information about
  1940. // the error.
  1941. //
  1942. // See the AWS API reference guide for Amazon EC2 Container Service's
  1943. // API operation StopTask for usage and error information.
  1944. //
  1945. // Returned Error Codes:
  1946. // * ServerException
  1947. // These errors are usually caused by a server issue.
  1948. //
  1949. // * ClientException
  1950. // These errors are usually caused by a client action, such as using an action
  1951. // or resource on behalf of a user that doesn't have permission to use the action
  1952. // or resource, or specifying an identifier that is not valid.
  1953. //
  1954. // * InvalidParameterException
  1955. // The specified parameter is invalid. Review the available parameters for the
  1956. // API request.
  1957. //
  1958. // * ClusterNotFoundException
  1959. // The specified cluster could not be found. You can view your available clusters
  1960. // with ListClusters. Amazon ECS clusters are region-specific.
  1961. //
  1962. func (c *ECS) StopTask(input *StopTaskInput) (*StopTaskOutput, error) {
  1963. req, out := c.StopTaskRequest(input)
  1964. err := req.Send()
  1965. return out, err
  1966. }
  1967. const opSubmitContainerStateChange = "SubmitContainerStateChange"
  1968. // SubmitContainerStateChangeRequest generates a "aws/request.Request" representing the
  1969. // client's request for the SubmitContainerStateChange operation. The "output" return
  1970. // value can be used to capture response data after the request's "Send" method
  1971. // is called.
  1972. //
  1973. // See SubmitContainerStateChange for usage and error information.
  1974. //
  1975. // Creating a request object using this method should be used when you want to inject
  1976. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1977. // access properties on the request object before or after sending the request. If
  1978. // you just want the service response, call the SubmitContainerStateChange method directly
  1979. // instead.
  1980. //
  1981. // Note: You must call the "Send" method on the returned request object in order
  1982. // to execute the request.
  1983. //
  1984. // // Example sending a request using the SubmitContainerStateChangeRequest method.
  1985. // req, resp := client.SubmitContainerStateChangeRequest(params)
  1986. //
  1987. // err := req.Send()
  1988. // if err == nil { // resp is now filled
  1989. // fmt.Println(resp)
  1990. // }
  1991. //
  1992. func (c *ECS) SubmitContainerStateChangeRequest(input *SubmitContainerStateChangeInput) (req *request.Request, output *SubmitContainerStateChangeOutput) {
  1993. op := &request.Operation{
  1994. Name: opSubmitContainerStateChange,
  1995. HTTPMethod: "POST",
  1996. HTTPPath: "/",
  1997. }
  1998. if input == nil {
  1999. input = &SubmitContainerStateChangeInput{}
  2000. }
  2001. req = c.newRequest(op, input, output)
  2002. output = &SubmitContainerStateChangeOutput{}
  2003. req.Data = output
  2004. return
  2005. }
  2006. // SubmitContainerStateChange API operation for Amazon EC2 Container Service.
  2007. //
  2008. // This action is only used by the Amazon EC2 Container Service agent, and it
  2009. // is not intended for use outside of the agent.
  2010. //
  2011. // Sent to acknowledge that a container changed states.
  2012. //
  2013. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2014. // with awserr.Error's Code and Message methods to get detailed information about
  2015. // the error.
  2016. //
  2017. // See the AWS API reference guide for Amazon EC2 Container Service's
  2018. // API operation SubmitContainerStateChange for usage and error information.
  2019. //
  2020. // Returned Error Codes:
  2021. // * ServerException
  2022. // These errors are usually caused by a server issue.
  2023. //
  2024. // * ClientException
  2025. // These errors are usually caused by a client action, such as using an action
  2026. // or resource on behalf of a user that doesn't have permission to use the action
  2027. // or resource, or specifying an identifier that is not valid.
  2028. //
  2029. func (c *ECS) SubmitContainerStateChange(input *SubmitContainerStateChangeInput) (*SubmitContainerStateChangeOutput, error) {
  2030. req, out := c.SubmitContainerStateChangeRequest(input)
  2031. err := req.Send()
  2032. return out, err
  2033. }
  2034. const opSubmitTaskStateChange = "SubmitTaskStateChange"
  2035. // SubmitTaskStateChangeRequest generates a "aws/request.Request" representing the
  2036. // client's request for the SubmitTaskStateChange operation. The "output" return
  2037. // value can be used to capture response data after the request's "Send" method
  2038. // is called.
  2039. //
  2040. // See SubmitTaskStateChange for usage and error information.
  2041. //
  2042. // Creating a request object using this method should be used when you want to inject
  2043. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2044. // access properties on the request object before or after sending the request. If
  2045. // you just want the service response, call the SubmitTaskStateChange method directly
  2046. // instead.
  2047. //
  2048. // Note: You must call the "Send" method on the returned request object in order
  2049. // to execute the request.
  2050. //
  2051. // // Example sending a request using the SubmitTaskStateChangeRequest method.
  2052. // req, resp := client.SubmitTaskStateChangeRequest(params)
  2053. //
  2054. // err := req.Send()
  2055. // if err == nil { // resp is now filled
  2056. // fmt.Println(resp)
  2057. // }
  2058. //
  2059. func (c *ECS) SubmitTaskStateChangeRequest(input *SubmitTaskStateChangeInput) (req *request.Request, output *SubmitTaskStateChangeOutput) {
  2060. op := &request.Operation{
  2061. Name: opSubmitTaskStateChange,
  2062. HTTPMethod: "POST",
  2063. HTTPPath: "/",
  2064. }
  2065. if input == nil {
  2066. input = &SubmitTaskStateChangeInput{}
  2067. }
  2068. req = c.newRequest(op, input, output)
  2069. output = &SubmitTaskStateChangeOutput{}
  2070. req.Data = output
  2071. return
  2072. }
  2073. // SubmitTaskStateChange API operation for Amazon EC2 Container Service.
  2074. //
  2075. // This action is only used by the Amazon EC2 Container Service agent, and it
  2076. // is not intended for use outside of the agent.
  2077. //
  2078. // Sent to acknowledge that a task changed states.
  2079. //
  2080. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2081. // with awserr.Error's Code and Message methods to get detailed information about
  2082. // the error.
  2083. //
  2084. // See the AWS API reference guide for Amazon EC2 Container Service's
  2085. // API operation SubmitTaskStateChange for usage and error information.
  2086. //
  2087. // Returned Error Codes:
  2088. // * ServerException
  2089. // These errors are usually caused by a server issue.
  2090. //
  2091. // * ClientException
  2092. // These errors are usually caused by a client action, such as using an action
  2093. // or resource on behalf of a user that doesn't have permission to use the action
  2094. // or resource, or specifying an identifier that is not valid.
  2095. //
  2096. func (c *ECS) SubmitTaskStateChange(input *SubmitTaskStateChangeInput) (*SubmitTaskStateChangeOutput, error) {
  2097. req, out := c.SubmitTaskStateChangeRequest(input)
  2098. err := req.Send()
  2099. return out, err
  2100. }
  2101. const opUpdateContainerAgent = "UpdateContainerAgent"
  2102. // UpdateContainerAgentRequest generates a "aws/request.Request" representing the
  2103. // client's request for the UpdateContainerAgent operation. The "output" return
  2104. // value can be used to capture response data after the request's "Send" method
  2105. // is called.
  2106. //
  2107. // See UpdateContainerAgent for usage and error information.
  2108. //
  2109. // Creating a request object using this method should be used when you want to inject
  2110. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2111. // access properties on the request object before or after sending the request. If
  2112. // you just want the service response, call the UpdateContainerAgent method directly
  2113. // instead.
  2114. //
  2115. // Note: You must call the "Send" method on the returned request object in order
  2116. // to execute the request.
  2117. //
  2118. // // Example sending a request using the UpdateContainerAgentRequest method.
  2119. // req, resp := client.UpdateContainerAgentRequest(params)
  2120. //
  2121. // err := req.Send()
  2122. // if err == nil { // resp is now filled
  2123. // fmt.Println(resp)
  2124. // }
  2125. //
  2126. func (c *ECS) UpdateContainerAgentRequest(input *UpdateContainerAgentInput) (req *request.Request, output *UpdateContainerAgentOutput) {
  2127. op := &request.Operation{
  2128. Name: opUpdateContainerAgent,
  2129. HTTPMethod: "POST",
  2130. HTTPPath: "/",
  2131. }
  2132. if input == nil {
  2133. input = &UpdateContainerAgentInput{}
  2134. }
  2135. req = c.newRequest(op, input, output)
  2136. output = &UpdateContainerAgentOutput{}
  2137. req.Data = output
  2138. return
  2139. }
  2140. // UpdateContainerAgent API operation for Amazon EC2 Container Service.
  2141. //
  2142. // Updates the Amazon ECS container agent on a specified container instance.
  2143. // Updating the Amazon ECS container agent does not interrupt running tasks
  2144. // or services on the container instance. The process for updating the agent
  2145. // differs depending on whether your container instance was launched with the
  2146. // Amazon ECS-optimized AMI or another operating system.
  2147. //
  2148. // UpdateContainerAgent requires the Amazon ECS-optimized AMI or Amazon Linux
  2149. // with the ecs-init service installed and running. For help updating the Amazon
  2150. // ECS container agent on other operating systems, see Manually Updating the
  2151. // Amazon ECS Container Agent (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html#manually_update_agent)
  2152. // in the Amazon EC2 Container Service Developer Guide.
  2153. //
  2154. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2155. // with awserr.Error's Code and Message methods to get detailed information about
  2156. // the error.
  2157. //
  2158. // See the AWS API reference guide for Amazon EC2 Container Service's
  2159. // API operation UpdateContainerAgent for usage and error information.
  2160. //
  2161. // Returned Error Codes:
  2162. // * ServerException
  2163. // These errors are usually caused by a server issue.
  2164. //
  2165. // * ClientException
  2166. // These errors are usually caused by a client action, such as using an action
  2167. // or resource on behalf of a user that doesn't have permission to use the action
  2168. // or resource, or specifying an identifier that is not valid.
  2169. //
  2170. // * InvalidParameterException
  2171. // The specified parameter is invalid. Review the available parameters for the
  2172. // API request.
  2173. //
  2174. // * ClusterNotFoundException
  2175. // The specified cluster could not be found. You can view your available clusters
  2176. // with ListClusters. Amazon ECS clusters are region-specific.
  2177. //
  2178. // * UpdateInProgressException
  2179. // There is already a current Amazon ECS container agent update in progress
  2180. // on the specified container instance. If the container agent becomes disconnected
  2181. // while it is in a transitional stage, such as PENDING or STAGING, the update
  2182. // process can get stuck in that state. However, when the agent reconnects,
  2183. // it resumes where it stopped previously.
  2184. //
  2185. // * NoUpdateAvailableException
  2186. // There is no update available for this Amazon ECS container agent. This could
  2187. // be because the agent is already running the latest version, or it is so old
  2188. // that there is no update path to the current version.
  2189. //
  2190. // * MissingVersionException
  2191. // Amazon ECS is unable to determine the current version of the Amazon ECS container
  2192. // agent on the container instance and does not have enough information to proceed
  2193. // with an update. This could be because the agent running on the container
  2194. // instance is an older or custom version that does not use our version information.
  2195. //
  2196. func (c *ECS) UpdateContainerAgent(input *UpdateContainerAgentInput) (*UpdateContainerAgentOutput, error) {
  2197. req, out := c.UpdateContainerAgentRequest(input)
  2198. err := req.Send()
  2199. return out, err
  2200. }
  2201. const opUpdateService = "UpdateService"
  2202. // UpdateServiceRequest generates a "aws/request.Request" representing the
  2203. // client's request for the UpdateService operation. The "output" return
  2204. // value can be used to capture response data after the request's "Send" method
  2205. // is called.
  2206. //
  2207. // See UpdateService for usage and error information.
  2208. //
  2209. // Creating a request object using this method should be used when you want to inject
  2210. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2211. // access properties on the request object before or after sending the request. If
  2212. // you just want the service response, call the UpdateService method directly
  2213. // instead.
  2214. //
  2215. // Note: You must call the "Send" method on the returned request object in order
  2216. // to execute the request.
  2217. //
  2218. // // Example sending a request using the UpdateServiceRequest method.
  2219. // req, resp := client.UpdateServiceRequest(params)
  2220. //
  2221. // err := req.Send()
  2222. // if err == nil { // resp is now filled
  2223. // fmt.Println(resp)
  2224. // }
  2225. //
  2226. func (c *ECS) UpdateServiceRequest(input *UpdateServiceInput) (req *request.Request, output *UpdateServiceOutput) {
  2227. op := &request.Operation{
  2228. Name: opUpdateService,
  2229. HTTPMethod: "POST",
  2230. HTTPPath: "/",
  2231. }
  2232. if input == nil {
  2233. input = &UpdateServiceInput{}
  2234. }
  2235. req = c.newRequest(op, input, output)
  2236. output = &UpdateServiceOutput{}
  2237. req.Data = output
  2238. return
  2239. }
  2240. // UpdateService API operation for Amazon EC2 Container Service.
  2241. //
  2242. // Modifies the desired count, deployment configuration, or task definition
  2243. // used in a service.
  2244. //
  2245. // You can add to or subtract from the number of instantiations of a task definition
  2246. // in a service by specifying the cluster that the service is running in and
  2247. // a new desiredCount parameter.
  2248. //
  2249. // You can use UpdateService to modify your task definition and deploy a new
  2250. // version of your service.
  2251. //
  2252. // You can also update the deployment configuration of a service. When a deployment
  2253. // is triggered by updating the task definition of a service, the service scheduler
  2254. // uses the deployment configuration parameters, minimumHealthyPercent and maximumPercent,
  2255. // to determine the deployment strategy.
  2256. //
  2257. // If the minimumHealthyPercent is below 100%, the scheduler can ignore the
  2258. // desiredCount temporarily during a deployment. For example, if your service
  2259. // has a desiredCount of four tasks, a minimumHealthyPercent of 50% allows the
  2260. // scheduler to stop two existing tasks before starting two new tasks. Tasks
  2261. // for services that do not use a load balancer are considered healthy if they
  2262. // are in the RUNNING state; tasks for services that do use a load balancer
  2263. // are considered healthy if they are in the RUNNING state and the container
  2264. // instance it is hosted on is reported as healthy by the load balancer.
  2265. //
  2266. // The maximumPercent parameter represents an upper limit on the number of running
  2267. // tasks during a deployment, which enables you to define the deployment batch
  2268. // size. For example, if your service has a desiredCount of four tasks, a maximumPercent
  2269. // value of 200% starts four new tasks before stopping the four older tasks
  2270. // (provided that the cluster resources required to do this are available).
  2271. //
  2272. // When UpdateService stops a task during a deployment, the equivalent of docker
  2273. // stop is issued to the containers running in the task. This results in a SIGTERM
  2274. // and a 30-second timeout, after which SIGKILL is sent and the containers are
  2275. // forcibly stopped. If the container handles the SIGTERM gracefully and exits
  2276. // within 30 seconds from receiving it, no SIGKILL is sent.
  2277. //
  2278. // When the service scheduler launches new tasks, it attempts to balance them
  2279. // across the Availability Zones in your cluster with the following logic:
  2280. //
  2281. // * Determine which of the container instances in your cluster can support
  2282. // your service's task definition (for example, they have the required CPU,
  2283. // memory, ports, and container instance attributes).
  2284. //
  2285. // * Sort the valid container instances by the fewest number of running tasks
  2286. // for this service in the same Availability Zone as the instance. For example,
  2287. // if zone A has one running service task and zones B and C each have zero,
  2288. // valid container instances in either zone B or C are considered optimal
  2289. // for placement.
  2290. //
  2291. // * Place the new service task on a valid container instance in an optimal
  2292. // Availability Zone (based on the previous steps), favoring container instances
  2293. // with the fewest number of running tasks for this service.
  2294. //
  2295. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2296. // with awserr.Error's Code and Message methods to get detailed information about
  2297. // the error.
  2298. //
  2299. // See the AWS API reference guide for Amazon EC2 Container Service's
  2300. // API operation UpdateService for usage and error information.
  2301. //
  2302. // Returned Error Codes:
  2303. // * ServerException
  2304. // These errors are usually caused by a server issue.
  2305. //
  2306. // * ClientException
  2307. // These errors are usually caused by a client action, such as using an action
  2308. // or resource on behalf of a user that doesn't have permission to use the action
  2309. // or resource, or specifying an identifier that is not valid.
  2310. //
  2311. // * InvalidParameterException
  2312. // The specified parameter is invalid. Review the available parameters for the
  2313. // API request.
  2314. //
  2315. // * ClusterNotFoundException
  2316. // The specified cluster could not be found. You can view your available clusters
  2317. // with ListClusters. Amazon ECS clusters are region-specific.
  2318. //
  2319. // * ServiceNotFoundException
  2320. // The specified service could not be found. You can view your available services
  2321. // with ListServices. Amazon ECS services are cluster-specific and region-specific.
  2322. //
  2323. // * ServiceNotActiveException
  2324. // The specified service is not active. You cannot update a service that is
  2325. // not active. If you have previously deleted a service, you can re-create it
  2326. // with CreateService.
  2327. //
  2328. func (c *ECS) UpdateService(input *UpdateServiceInput) (*UpdateServiceOutput, error) {
  2329. req, out := c.UpdateServiceRequest(input)
  2330. err := req.Send()
  2331. return out, err
  2332. }
  2333. // The attributes applicable to a container instance when it is registered.
  2334. type Attribute struct {
  2335. _ struct{} `type:"structure"`
  2336. // The name of the container instance attribute.
  2337. //
  2338. // Name is a required field
  2339. Name *string `locationName:"name" type:"string" required:"true"`
  2340. // The value of the container instance attribute (at this time, the value here
  2341. // is Null, but this could change in future revisions for expandability).
  2342. Value *string `locationName:"value" type:"string"`
  2343. }
  2344. // String returns the string representation
  2345. func (s Attribute) String() string {
  2346. return awsutil.Prettify(s)
  2347. }
  2348. // GoString returns the string representation
  2349. func (s Attribute) GoString() string {
  2350. return s.String()
  2351. }
  2352. // Validate inspects the fields of the type to determine if they are valid.
  2353. func (s *Attribute) Validate() error {
  2354. invalidParams := request.ErrInvalidParams{Context: "Attribute"}
  2355. if s.Name == nil {
  2356. invalidParams.Add(request.NewErrParamRequired("Name"))
  2357. }
  2358. if invalidParams.Len() > 0 {
  2359. return invalidParams
  2360. }
  2361. return nil
  2362. }
  2363. // A regional grouping of one or more container instances on which you can run
  2364. // task requests. Each account receives a default cluster the first time you
  2365. // use the Amazon ECS service, but you may also create other clusters. Clusters
  2366. // may contain more than one instance type simultaneously.
  2367. type Cluster struct {
  2368. _ struct{} `type:"structure"`
  2369. // The number of services that are running on the cluster in an ACTIVE state.
  2370. // You can view these services with ListServices.
  2371. ActiveServicesCount *int64 `locationName:"activeServicesCount" type:"integer"`
  2372. // The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains
  2373. // the arn:aws:ecs namespace, followed by the region of the cluster, the AWS
  2374. // account ID of the cluster owner, the cluster namespace, and then the cluster
  2375. // name. For example, arn:aws:ecs:region:012345678910:cluster/test..
  2376. ClusterArn *string `locationName:"clusterArn" type:"string"`
  2377. // A user-generated string that you use to identify your cluster.
  2378. ClusterName *string `locationName:"clusterName" type:"string"`
  2379. // The number of tasks in the cluster that are in the PENDING state.
  2380. PendingTasksCount *int64 `locationName:"pendingTasksCount" type:"integer"`
  2381. // The number of container instances registered into the cluster.
  2382. RegisteredContainerInstancesCount *int64 `locationName:"registeredContainerInstancesCount" type:"integer"`
  2383. // The number of tasks in the cluster that are in the RUNNING state.
  2384. RunningTasksCount *int64 `locationName:"runningTasksCount" type:"integer"`
  2385. // The status of the cluster. The valid values are ACTIVE or INACTIVE. ACTIVE
  2386. // indicates that you can register container instances with the cluster and
  2387. // the associated instances can accept tasks.
  2388. Status *string `locationName:"status" type:"string"`
  2389. }
  2390. // String returns the string representation
  2391. func (s Cluster) String() string {
  2392. return awsutil.Prettify(s)
  2393. }
  2394. // GoString returns the string representation
  2395. func (s Cluster) GoString() string {
  2396. return s.String()
  2397. }
  2398. // A Docker container that is part of a task.
  2399. type Container struct {
  2400. _ struct{} `type:"structure"`
  2401. // The Amazon Resource Name (ARN) of the container.
  2402. ContainerArn *string `locationName:"containerArn" type:"string"`
  2403. // The exit code returned from the container.
  2404. ExitCode *int64 `locationName:"exitCode" type:"integer"`
  2405. // The last known status of the container.
  2406. LastStatus *string `locationName:"lastStatus" type:"string"`
  2407. // The name of the container.
  2408. Name *string `locationName:"name" type:"string"`
  2409. // The network bindings associated with the container.
  2410. NetworkBindings []*NetworkBinding `locationName:"networkBindings" type:"list"`
  2411. // A short (255 max characters) human-readable string to provide additional
  2412. // detail about a running or stopped container.
  2413. Reason *string `locationName:"reason" type:"string"`
  2414. // The Amazon Resource Name (ARN) of the task.
  2415. TaskArn *string `locationName:"taskArn" type:"string"`
  2416. }
  2417. // String returns the string representation
  2418. func (s Container) String() string {
  2419. return awsutil.Prettify(s)
  2420. }
  2421. // GoString returns the string representation
  2422. func (s Container) GoString() string {
  2423. return s.String()
  2424. }
  2425. // Container definitions are used in task definitions to describe the different
  2426. // containers that are launched as part of a task.
  2427. type ContainerDefinition struct {
  2428. _ struct{} `type:"structure"`
  2429. // The command that is passed to the container. This parameter maps to Cmd in
  2430. // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2431. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2432. // and the COMMAND parameter to docker run (https://docs.docker.com/engine/reference/run/).
  2433. // For more information, see https://docs.docker.com/engine/reference/builder/#cmd
  2434. // (https://docs.docker.com/engine/reference/builder/#cmd).
  2435. Command []*string `locationName:"command" type:"list"`
  2436. // The number of cpu units reserved for the container. A container instance
  2437. // has 1,024 cpu units for every CPU core. This parameter specifies the minimum
  2438. // amount of CPU to reserve for a container, and containers share unallocated
  2439. // CPU units with other containers on the instance with the same ratio as their
  2440. // allocated amount. This parameter maps to CpuShares in the Create a container
  2441. // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2442. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2443. // and the --cpu-shares option to docker run (https://docs.docker.com/engine/reference/run/).
  2444. //
  2445. // You can determine the number of CPU units that are available per EC2 instance
  2446. // type by multiplying the vCPUs listed for that instance type on the Amazon
  2447. // EC2 Instances (http://aws.amazon.com/ec2/instance-types/) detail page by
  2448. // 1,024.
  2449. //
  2450. // For example, if you run a single-container task on a single-core instance
  2451. // type with 512 CPU units specified for that container, and that is the only
  2452. // task running on the container instance, that container could use the full
  2453. // 1,024 CPU unit share at any given time. However, if you launched another
  2454. // copy of the same task on that container instance, each task would be guaranteed
  2455. // a minimum of 512 CPU units when needed, and each container could float to
  2456. // higher CPU usage if the other container was not using it, but if both tasks
  2457. // were 100% active all of the time, they would be limited to 512 CPU units.
  2458. //
  2459. // The Docker daemon on the container instance uses the CPU value to calculate
  2460. // the relative CPU share ratios for running containers. For more information,
  2461. // see CPU share constraint (https://docs.docker.com/engine/reference/run/#cpu-share-constraint)
  2462. // in the Docker documentation. The minimum valid CPU share value that the Linux
  2463. // kernel allows is 2; however, the CPU parameter is not required, and you can
  2464. // use CPU values below 2 in your container definitions. For CPU values below
  2465. // 2 (including null), the behavior varies based on your Amazon ECS container
  2466. // agent version:
  2467. //
  2468. // * Agent versions less than or equal to 1.1.0: Null and zero CPU values
  2469. // are passed to Docker as 0, which Docker then converts to 1,024 CPU shares.
  2470. // CPU values of 1 are passed to Docker as 1, which the Linux kernel converts
  2471. // to 2 CPU shares.
  2472. //
  2473. // * Agent versions greater than or equal to 1.2.0: Null, zero, and CPU values
  2474. // of 1 are passed to Docker as 2.
  2475. Cpu *int64 `locationName:"cpu" type:"integer"`
  2476. // When this parameter is true, networking is disabled within the container.
  2477. // This parameter maps to NetworkDisabled in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2478. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/).
  2479. DisableNetworking *bool `locationName:"disableNetworking" type:"boolean"`
  2480. // A list of DNS search domains that are presented to the container. This parameter
  2481. // maps to DnsSearch in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2482. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2483. // and the --dns-search option to docker run (https://docs.docker.com/engine/reference/run/).
  2484. DnsSearchDomains []*string `locationName:"dnsSearchDomains" type:"list"`
  2485. // A list of DNS servers that are presented to the container. This parameter
  2486. // maps to Dns in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2487. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2488. // and the --dns option to docker run (https://docs.docker.com/engine/reference/run/).
  2489. DnsServers []*string `locationName:"dnsServers" type:"list"`
  2490. // A key/value map of labels to add to the container. This parameter maps to
  2491. // Labels in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2492. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2493. // and the --label option to docker run (https://docs.docker.com/engine/reference/run/).
  2494. // This parameter requires version 1.18 of the Docker Remote API or greater
  2495. // on your container instance. To check the Docker Remote API version on your
  2496. // container instance, log into your container instance and run the following
  2497. // command: sudo docker version | grep "Server API version"
  2498. DockerLabels map[string]*string `locationName:"dockerLabels" type:"map"`
  2499. // A list of strings to provide custom labels for SELinux and AppArmor multi-level
  2500. // security systems. This parameter maps to SecurityOpt in the Create a container
  2501. // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2502. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2503. // and the --security-opt option to docker run (https://docs.docker.com/engine/reference/run/).
  2504. //
  2505. // The Amazon ECS container agent running on a container instance must register
  2506. // with the ECS_SELINUX_CAPABLE=true or ECS_APPARMOR_CAPABLE=true environment
  2507. // variables before containers placed on that instance can use these security
  2508. // options. For more information, see Amazon ECS Container Agent Configuration
  2509. // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html)
  2510. // in the Amazon EC2 Container Service Developer Guide.
  2511. DockerSecurityOptions []*string `locationName:"dockerSecurityOptions" type:"list"`
  2512. // Early versions of the Amazon ECS container agent do not properly handle entryPoint
  2513. // parameters. If you have problems using entryPoint, update your container
  2514. // agent or enter your commands and arguments as command array items instead.
  2515. //
  2516. // The entry point that is passed to the container. This parameter maps to Entrypoint
  2517. // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2518. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2519. // and the --entrypoint option to docker run (https://docs.docker.com/engine/reference/run/).
  2520. // For more information, see https://docs.docker.com/engine/reference/builder/#entrypoint
  2521. // (https://docs.docker.com/engine/reference/builder/#entrypoint).
  2522. EntryPoint []*string `locationName:"entryPoint" type:"list"`
  2523. // The environment variables to pass to a container. This parameter maps to
  2524. // Env in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2525. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2526. // and the --env option to docker run (https://docs.docker.com/engine/reference/run/).
  2527. //
  2528. // We do not recommend using plain text environment variables for sensitive
  2529. // information, such as credential data.
  2530. Environment []*KeyValuePair `locationName:"environment" type:"list"`
  2531. // If the essential parameter of a container is marked as true, and that container
  2532. // fails or stops for any reason, all other containers that are part of the
  2533. // task are stopped. If the essential parameter of a container is marked as
  2534. // false, then its failure does not affect the rest of the containers in a task.
  2535. // If this parameter is omitted, a container is assumed to be essential.
  2536. //
  2537. // All tasks must have at least one essential container. If you have an application
  2538. // that is composed of multiple containers, you should group containers that
  2539. // are used for a common purpose into components, and separate the different
  2540. // components into multiple task definitions. For more information, see Application
  2541. // Architecture (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/application_architecture.html)
  2542. // in the Amazon EC2 Container Service Developer Guide.
  2543. Essential *bool `locationName:"essential" type:"boolean"`
  2544. // A list of hostnames and IP address mappings to append to the /etc/hosts file
  2545. // on the container. This parameter maps to ExtraHosts in the Create a container
  2546. // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2547. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2548. // and the --add-host option to docker run (https://docs.docker.com/engine/reference/run/).
  2549. ExtraHosts []*HostEntry `locationName:"extraHosts" type:"list"`
  2550. // The hostname to use for your container. This parameter maps to Hostname in
  2551. // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2552. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2553. // and the --hostname option to docker run (https://docs.docker.com/engine/reference/run/).
  2554. Hostname *string `locationName:"hostname" type:"string"`
  2555. // The image used to start a container. This string is passed directly to the
  2556. // Docker daemon. Images in the Docker Hub registry are available by default.
  2557. // Other repositories are specified with repository-url/image:tag. Up to 255
  2558. // letters (uppercase and lowercase), numbers, hyphens, underscores, colons,
  2559. // periods, forward slashes, and number signs are allowed. This parameter maps
  2560. // to Image in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2561. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2562. // and the IMAGE parameter of docker run (https://docs.docker.com/engine/reference/run/).
  2563. //
  2564. // * Images in official repositories on Docker Hub use a single name (for
  2565. // example, ubuntu or mongo).
  2566. //
  2567. // * Images in other repositories on Docker Hub are qualified with an organization
  2568. // name (for example, amazon/amazon-ecs-agent).
  2569. //
  2570. // * Images in other online repositories are qualified further by a domain
  2571. // name (for example, quay.io/assemblyline/ubuntu).
  2572. Image *string `locationName:"image" type:"string"`
  2573. // The link parameter allows containers to communicate with each other without
  2574. // the need for port mappings, using the name parameter and optionally, an alias
  2575. // for the link. This construct is analogous to name:alias in Docker links.
  2576. // Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores
  2577. // are allowed for each name and alias. For more information on linking Docker
  2578. // containers, see https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/
  2579. // (https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/).
  2580. // This parameter maps to Links in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2581. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2582. // and the --link option to docker run (https://docs.docker.com/engine/reference/run/).
  2583. //
  2584. // Containers that are collocated on a single container instance may be able
  2585. // to communicate with each other without requiring links or host port mappings.
  2586. // Network isolation is achieved on the container instance using security groups
  2587. // and VPC settings.
  2588. Links []*string `locationName:"links" type:"list"`
  2589. // The log configuration specification for the container. This parameter maps
  2590. // to LogConfig in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2591. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2592. // and the --log-driver option to docker run (https://docs.docker.com/engine/reference/run/).
  2593. // By default, containers use the same logging driver that the Docker daemon
  2594. // uses; however the container may use a different logging driver than the Docker
  2595. // daemon by specifying a log driver with this parameter in the container definition.
  2596. // To use a different logging driver for a container, the log system must be
  2597. // configured properly on the container instance (or on a different log server
  2598. // for remote logging options). For more information on the options for different
  2599. // supported log drivers, see Configure logging drivers (https://docs.docker.com/engine/admin/logging/overview/)
  2600. // in the Docker documentation.
  2601. //
  2602. // Amazon ECS currently supports a subset of the logging drivers available to
  2603. // the Docker daemon (shown in the LogConfiguration data type). Currently unsupported
  2604. // log drivers may be available in future releases of the Amazon ECS container
  2605. // agent.
  2606. //
  2607. // This parameter requires version 1.18 of the Docker Remote API or greater
  2608. // on your container instance. To check the Docker Remote API version on your
  2609. // container instance, log into your container instance and run the following
  2610. // command: sudo docker version | grep "Server API version"
  2611. //
  2612. // The Amazon ECS container agent running on a container instance must register
  2613. // the logging drivers available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS
  2614. // environment variable before containers placed on that instance can use these
  2615. // log configuration options. For more information, see Amazon ECS Container
  2616. // Agent Configuration (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html)
  2617. // in the Amazon EC2 Container Service Developer Guide.
  2618. LogConfiguration *LogConfiguration `locationName:"logConfiguration" type:"structure"`
  2619. // The hard limit (in MiB) of memory to present to the container. If your container
  2620. // attempts to exceed the memory specified here, the container is killed. This
  2621. // parameter maps to Memory in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2622. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2623. // and the --memory option to docker run (https://docs.docker.com/engine/reference/run/).
  2624. //
  2625. // You must specify a non-zero integer for one or both of memory or memoryReservation
  2626. // in container definitions. If you specify both, memory must be greater than
  2627. // memoryReservation. If you specify memoryReservation, then that value is subtracted
  2628. // from the available memory resources for the container instance on which the
  2629. // container is placed; otherwise, the value of memory is used.
  2630. //
  2631. // The Docker daemon reserves a minimum of 4 MiB of memory for a container,
  2632. // so you should not specify fewer than 4 MiB of memory for your containers.
  2633. Memory *int64 `locationName:"memory" type:"integer"`
  2634. // The soft limit (in MiB) of memory to reserve for the container. When system
  2635. // memory is under heavy contention, Docker attempts to keep the container memory
  2636. // to this soft limit; however, your container can consume more memory when
  2637. // it needs to, up to either the hard limit specified with the memory parameter
  2638. // (if applicable), or all of the available memory on the container instance,
  2639. // whichever comes first. This parameter maps to MemoryReservation in the Create
  2640. // a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2641. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2642. // and the --memory-reservation option to docker run (https://docs.docker.com/engine/reference/run/).
  2643. //
  2644. // You must specify a non-zero integer for one or both of memory or memoryReservation
  2645. // in container definitions. If you specify both, memory must be greater than
  2646. // memoryReservation. If you specify memoryReservation, then that value is subtracted
  2647. // from the available memory resources for the container instance on which the
  2648. // container is placed; otherwise, the value of memory is used.
  2649. //
  2650. // For example, if your container normally uses 128 MiB of memory, but occasionally
  2651. // bursts to 256 MiB of memory for short periods of time, you can set a memoryReservation
  2652. // of 128 MiB, and a memory hard limit of 300 MiB. This configuration would
  2653. // allow the container to only reserve 128 MiB of memory from the remaining
  2654. // resources on the container instance, but also allow the container to consume
  2655. // more memory resources when needed.
  2656. MemoryReservation *int64 `locationName:"memoryReservation" type:"integer"`
  2657. // The mount points for data volumes in your container. This parameter maps
  2658. // to Volumes in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2659. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2660. // and the --volume option to docker run (https://docs.docker.com/engine/reference/run/).
  2661. MountPoints []*MountPoint `locationName:"mountPoints" type:"list"`
  2662. // The name of a container. If you are linking multiple containers together
  2663. // in a task definition, the name of one container can be entered in the links
  2664. // of another container to connect the containers. Up to 255 letters (uppercase
  2665. // and lowercase), numbers, hyphens, and underscores are allowed. This parameter
  2666. // maps to name in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2667. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2668. // and the --name option to docker run (https://docs.docker.com/engine/reference/run/).
  2669. Name *string `locationName:"name" type:"string"`
  2670. // The list of port mappings for the container. Port mappings allow containers
  2671. // to access ports on the host container instance to send or receive traffic.
  2672. // This parameter maps to PortBindings in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2673. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2674. // and the --publish option to docker run (https://docs.docker.com/engine/reference/run/).
  2675. // If the network mode of a task definition is set to none, then you cannot
  2676. // specify port mappings. If the network mode of a task definition is set to
  2677. // host, then host ports must either be undefined or they must match the container
  2678. // port in the port mapping.
  2679. //
  2680. // After a task reaches the RUNNING status, manual and automatic host and container
  2681. // port assignments are visible in the Network Bindings section of a container
  2682. // description of a selected task in the Amazon ECS console, or the networkBindings
  2683. // section DescribeTasks responses.
  2684. PortMappings []*PortMapping `locationName:"portMappings" type:"list"`
  2685. // When this parameter is true, the container is given elevated privileges on
  2686. // the host container instance (similar to the root user). This parameter maps
  2687. // to Privileged in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2688. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2689. // and the --privileged option to docker run (https://docs.docker.com/engine/reference/run/).
  2690. Privileged *bool `locationName:"privileged" type:"boolean"`
  2691. // When this parameter is true, the container is given read-only access to its
  2692. // root file system. This parameter maps to ReadonlyRootfs in the Create a container
  2693. // (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2694. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2695. // and the --read-only option to docker run.
  2696. ReadonlyRootFilesystem *bool `locationName:"readonlyRootFilesystem" type:"boolean"`
  2697. // A list of ulimits to set in the container. This parameter maps to Ulimits
  2698. // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2699. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2700. // and the --ulimit option to docker run (https://docs.docker.com/engine/reference/run/).
  2701. // Valid naming values are displayed in the Ulimit data type. This parameter
  2702. // requires version 1.18 of the Docker Remote API or greater on your container
  2703. // instance. To check the Docker Remote API version on your container instance,
  2704. // log into your container instance and run the following command: sudo docker
  2705. // version | grep "Server API version"
  2706. Ulimits []*Ulimit `locationName:"ulimits" type:"list"`
  2707. // The user name to use inside the container. This parameter maps to User in
  2708. // the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2709. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2710. // and the --user option to docker run (https://docs.docker.com/engine/reference/run/).
  2711. User *string `locationName:"user" type:"string"`
  2712. // Data volumes to mount from another container. This parameter maps to VolumesFrom
  2713. // in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2714. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2715. // and the --volumes-from option to docker run (https://docs.docker.com/engine/reference/run/).
  2716. VolumesFrom []*VolumeFrom `locationName:"volumesFrom" type:"list"`
  2717. // The working directory in which to run commands inside the container. This
  2718. // parameter maps to WorkingDir in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container)
  2719. // section of the Docker Remote API (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/)
  2720. // and the --workdir option to docker run (https://docs.docker.com/engine/reference/run/).
  2721. WorkingDirectory *string `locationName:"workingDirectory" type:"string"`
  2722. }
  2723. // String returns the string representation
  2724. func (s ContainerDefinition) String() string {
  2725. return awsutil.Prettify(s)
  2726. }
  2727. // GoString returns the string representation
  2728. func (s ContainerDefinition) GoString() string {
  2729. return s.String()
  2730. }
  2731. // Validate inspects the fields of the type to determine if they are valid.
  2732. func (s *ContainerDefinition) Validate() error {
  2733. invalidParams := request.ErrInvalidParams{Context: "ContainerDefinition"}
  2734. if s.ExtraHosts != nil {
  2735. for i, v := range s.ExtraHosts {
  2736. if v == nil {
  2737. continue
  2738. }
  2739. if err := v.Validate(); err != nil {
  2740. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ExtraHosts", i), err.(request.ErrInvalidParams))
  2741. }
  2742. }
  2743. }
  2744. if s.LogConfiguration != nil {
  2745. if err := s.LogConfiguration.Validate(); err != nil {
  2746. invalidParams.AddNested("LogConfiguration", err.(request.ErrInvalidParams))
  2747. }
  2748. }
  2749. if s.Ulimits != nil {
  2750. for i, v := range s.Ulimits {
  2751. if v == nil {
  2752. continue
  2753. }
  2754. if err := v.Validate(); err != nil {
  2755. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Ulimits", i), err.(request.ErrInvalidParams))
  2756. }
  2757. }
  2758. }
  2759. if invalidParams.Len() > 0 {
  2760. return invalidParams
  2761. }
  2762. return nil
  2763. }
  2764. // An EC2 instance that is running the Amazon ECS agent and has been registered
  2765. // with a cluster.
  2766. type ContainerInstance struct {
  2767. _ struct{} `type:"structure"`
  2768. // This parameter returns true if the agent is actually connected to Amazon
  2769. // ECS. Registered instances with an agent that may be unhealthy or stopped
  2770. // return false, and instances without a connected agent cannot accept placement
  2771. // requests.
  2772. AgentConnected *bool `locationName:"agentConnected" type:"boolean"`
  2773. // The status of the most recent agent update. If an update has never been requested,
  2774. // this value is NULL.
  2775. AgentUpdateStatus *string `locationName:"agentUpdateStatus" type:"string" enum:"AgentUpdateStatus"`
  2776. // The attributes set for the container instance by the Amazon ECS container
  2777. // agent at instance registration.
  2778. Attributes []*Attribute `locationName:"attributes" type:"list"`
  2779. // The Amazon Resource Name (ARN) of the container instance. The ARN contains
  2780. // the arn:aws:ecs namespace, followed by the region of the container instance,
  2781. // the AWS account ID of the container instance owner, the container-instance
  2782. // namespace, and then the container instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID.
  2783. ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"`
  2784. // The EC2 instance ID of the container instance.
  2785. Ec2InstanceId *string `locationName:"ec2InstanceId" type:"string"`
  2786. // The number of tasks on the container instance that are in the PENDING status.
  2787. PendingTasksCount *int64 `locationName:"pendingTasksCount" type:"integer"`
  2788. // For most resource types, this parameter describes the registered resources
  2789. // on the container instance that are in use by current tasks. For port resource
  2790. // types, this parameter describes the ports that were reserved by the Amazon
  2791. // ECS container agent when it registered the container instance with Amazon
  2792. // ECS.
  2793. RegisteredResources []*Resource `locationName:"registeredResources" type:"list"`
  2794. // For most resource types, this parameter describes the remaining resources
  2795. // of the container instance that are available for new tasks. For port resource
  2796. // types, this parameter describes the ports that are reserved by the Amazon
  2797. // ECS container agent and any containers that have reserved port mappings;
  2798. // any port that is not specified here is available for new tasks.
  2799. RemainingResources []*Resource `locationName:"remainingResources" type:"list"`
  2800. // The number of tasks on the container instance that are in the RUNNING status.
  2801. RunningTasksCount *int64 `locationName:"runningTasksCount" type:"integer"`
  2802. // The status of the container instance. The valid values are ACTIVE or INACTIVE.
  2803. // ACTIVE indicates that the container instance can accept tasks.
  2804. Status *string `locationName:"status" type:"string"`
  2805. // The version information for the Amazon ECS container agent and Docker daemon
  2806. // running on the container instance.
  2807. VersionInfo *VersionInfo `locationName:"versionInfo" type:"structure"`
  2808. }
  2809. // String returns the string representation
  2810. func (s ContainerInstance) String() string {
  2811. return awsutil.Prettify(s)
  2812. }
  2813. // GoString returns the string representation
  2814. func (s ContainerInstance) GoString() string {
  2815. return s.String()
  2816. }
  2817. // The overrides that should be sent to a container.
  2818. type ContainerOverride struct {
  2819. _ struct{} `type:"structure"`
  2820. // The command to send to the container that overrides the default command from
  2821. // the Docker image or the task definition.
  2822. Command []*string `locationName:"command" type:"list"`
  2823. // The environment variables to send to the container. You can add new environment
  2824. // variables, which are added to the container at launch, or you can override
  2825. // the existing environment variables from the Docker image or the task definition.
  2826. Environment []*KeyValuePair `locationName:"environment" type:"list"`
  2827. // The name of the container that receives the override.
  2828. Name *string `locationName:"name" type:"string"`
  2829. }
  2830. // String returns the string representation
  2831. func (s ContainerOverride) String() string {
  2832. return awsutil.Prettify(s)
  2833. }
  2834. // GoString returns the string representation
  2835. func (s ContainerOverride) GoString() string {
  2836. return s.String()
  2837. }
  2838. type CreateClusterInput struct {
  2839. _ struct{} `type:"structure"`
  2840. // The name of your cluster. If you do not specify a name for your cluster,
  2841. // you create a cluster named default. Up to 255 letters (uppercase and lowercase),
  2842. // numbers, hyphens, and underscores are allowed.
  2843. ClusterName *string `locationName:"clusterName" type:"string"`
  2844. }
  2845. // String returns the string representation
  2846. func (s CreateClusterInput) String() string {
  2847. return awsutil.Prettify(s)
  2848. }
  2849. // GoString returns the string representation
  2850. func (s CreateClusterInput) GoString() string {
  2851. return s.String()
  2852. }
  2853. type CreateClusterOutput struct {
  2854. _ struct{} `type:"structure"`
  2855. // The full description of your new cluster.
  2856. Cluster *Cluster `locationName:"cluster" type:"structure"`
  2857. }
  2858. // String returns the string representation
  2859. func (s CreateClusterOutput) String() string {
  2860. return awsutil.Prettify(s)
  2861. }
  2862. // GoString returns the string representation
  2863. func (s CreateClusterOutput) GoString() string {
  2864. return s.String()
  2865. }
  2866. type CreateServiceInput struct {
  2867. _ struct{} `type:"structure"`
  2868. // Unique, case-sensitive identifier you provide to ensure the idempotency of
  2869. // the request. Up to 32 ASCII characters are allowed.
  2870. ClientToken *string `locationName:"clientToken" type:"string"`
  2871. // The short name or full Amazon Resource Name (ARN) of the cluster on which
  2872. // to run your service. If you do not specify a cluster, the default cluster
  2873. // is assumed.
  2874. Cluster *string `locationName:"cluster" type:"string"`
  2875. // Optional deployment parameters that control how many tasks run during the
  2876. // deployment and the ordering of stopping and starting tasks.
  2877. DeploymentConfiguration *DeploymentConfiguration `locationName:"deploymentConfiguration" type:"structure"`
  2878. // The number of instantiations of the specified task definition to place and
  2879. // keep running on your cluster.
  2880. //
  2881. // DesiredCount is a required field
  2882. DesiredCount *int64 `locationName:"desiredCount" type:"integer" required:"true"`
  2883. // A load balancer object representing the load balancer to use with your service.
  2884. // Currently, you are limited to one load balancer per service. After you create
  2885. // a service, the load balancer name, container name, and container port specified
  2886. // in the service definition are immutable.
  2887. //
  2888. // For Elastic Load Balancing Classic load balancers, this object must contain
  2889. // the load balancer name, the container name (as it appears in a container
  2890. // definition), and the container port to access from the load balancer. When
  2891. // a task from this service is placed on a container instance, the container
  2892. // instance is registered with the load balancer specified here.
  2893. //
  2894. // For Elastic Load Balancing Application load balancers, this object must contain
  2895. // the load balancer target group ARN, the container name (as it appears in
  2896. // a container definition), and the container port to access from the load balancer.
  2897. // When a task from this service is placed on a container instance, the container
  2898. // instance and port combination is registered as a target in the target group
  2899. // specified here.
  2900. LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"`
  2901. // The name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon
  2902. // ECS to make calls to your load balancer on your behalf. This parameter is
  2903. // required if you are using a load balancer with your service. If you specify
  2904. // the role parameter, you must also specify a load balancer object with the
  2905. // loadBalancers parameter.
  2906. //
  2907. // If your specified role has a path other than /, then you must either specify
  2908. // the full role ARN (this is recommended) or prefix the role name with the
  2909. // path. For example, if a role with the name bar has a path of /foo/ then you
  2910. // would specify /foo/bar as the role name. For more information, see Friendly
  2911. // Names and Paths (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-friendly-names)
  2912. // in the IAM User Guide.
  2913. Role *string `locationName:"role" type:"string"`
  2914. // The name of your service. Up to 255 letters (uppercase and lowercase), numbers,
  2915. // hyphens, and underscores are allowed. Service names must be unique within
  2916. // a cluster, but you can have similarly named services in multiple clusters
  2917. // within a region or across multiple regions.
  2918. //
  2919. // ServiceName is a required field
  2920. ServiceName *string `locationName:"serviceName" type:"string" required:"true"`
  2921. // The family and revision (family:revision) or full Amazon Resource Name (ARN)
  2922. // of the task definition to run in your service. If a revision is not specified,
  2923. // the latest ACTIVE revision is used.
  2924. //
  2925. // TaskDefinition is a required field
  2926. TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"`
  2927. }
  2928. // String returns the string representation
  2929. func (s CreateServiceInput) String() string {
  2930. return awsutil.Prettify(s)
  2931. }
  2932. // GoString returns the string representation
  2933. func (s CreateServiceInput) GoString() string {
  2934. return s.String()
  2935. }
  2936. // Validate inspects the fields of the type to determine if they are valid.
  2937. func (s *CreateServiceInput) Validate() error {
  2938. invalidParams := request.ErrInvalidParams{Context: "CreateServiceInput"}
  2939. if s.DesiredCount == nil {
  2940. invalidParams.Add(request.NewErrParamRequired("DesiredCount"))
  2941. }
  2942. if s.ServiceName == nil {
  2943. invalidParams.Add(request.NewErrParamRequired("ServiceName"))
  2944. }
  2945. if s.TaskDefinition == nil {
  2946. invalidParams.Add(request.NewErrParamRequired("TaskDefinition"))
  2947. }
  2948. if invalidParams.Len() > 0 {
  2949. return invalidParams
  2950. }
  2951. return nil
  2952. }
  2953. type CreateServiceOutput struct {
  2954. _ struct{} `type:"structure"`
  2955. // The full description of your service following the create call.
  2956. Service *Service `locationName:"service" type:"structure"`
  2957. }
  2958. // String returns the string representation
  2959. func (s CreateServiceOutput) String() string {
  2960. return awsutil.Prettify(s)
  2961. }
  2962. // GoString returns the string representation
  2963. func (s CreateServiceOutput) GoString() string {
  2964. return s.String()
  2965. }
  2966. type DeleteClusterInput struct {
  2967. _ struct{} `type:"structure"`
  2968. // The short name or full Amazon Resource Name (ARN) of the cluster to delete.
  2969. //
  2970. // Cluster is a required field
  2971. Cluster *string `locationName:"cluster" type:"string" required:"true"`
  2972. }
  2973. // String returns the string representation
  2974. func (s DeleteClusterInput) String() string {
  2975. return awsutil.Prettify(s)
  2976. }
  2977. // GoString returns the string representation
  2978. func (s DeleteClusterInput) GoString() string {
  2979. return s.String()
  2980. }
  2981. // Validate inspects the fields of the type to determine if they are valid.
  2982. func (s *DeleteClusterInput) Validate() error {
  2983. invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"}
  2984. if s.Cluster == nil {
  2985. invalidParams.Add(request.NewErrParamRequired("Cluster"))
  2986. }
  2987. if invalidParams.Len() > 0 {
  2988. return invalidParams
  2989. }
  2990. return nil
  2991. }
  2992. type DeleteClusterOutput struct {
  2993. _ struct{} `type:"structure"`
  2994. // The full description of the deleted cluster.
  2995. Cluster *Cluster `locationName:"cluster" type:"structure"`
  2996. }
  2997. // String returns the string representation
  2998. func (s DeleteClusterOutput) String() string {
  2999. return awsutil.Prettify(s)
  3000. }
  3001. // GoString returns the string representation
  3002. func (s DeleteClusterOutput) GoString() string {
  3003. return s.String()
  3004. }
  3005. type DeleteServiceInput struct {
  3006. _ struct{} `type:"structure"`
  3007. // The name of the cluster that hosts the service to delete. If you do not specify
  3008. // a cluster, the default cluster is assumed.
  3009. Cluster *string `locationName:"cluster" type:"string"`
  3010. // The name of the service to delete.
  3011. //
  3012. // Service is a required field
  3013. Service *string `locationName:"service" type:"string" required:"true"`
  3014. }
  3015. // String returns the string representation
  3016. func (s DeleteServiceInput) String() string {
  3017. return awsutil.Prettify(s)
  3018. }
  3019. // GoString returns the string representation
  3020. func (s DeleteServiceInput) GoString() string {
  3021. return s.String()
  3022. }
  3023. // Validate inspects the fields of the type to determine if they are valid.
  3024. func (s *DeleteServiceInput) Validate() error {
  3025. invalidParams := request.ErrInvalidParams{Context: "DeleteServiceInput"}
  3026. if s.Service == nil {
  3027. invalidParams.Add(request.NewErrParamRequired("Service"))
  3028. }
  3029. if invalidParams.Len() > 0 {
  3030. return invalidParams
  3031. }
  3032. return nil
  3033. }
  3034. type DeleteServiceOutput struct {
  3035. _ struct{} `type:"structure"`
  3036. // The full description of the deleted service.
  3037. Service *Service `locationName:"service" type:"structure"`
  3038. }
  3039. // String returns the string representation
  3040. func (s DeleteServiceOutput) String() string {
  3041. return awsutil.Prettify(s)
  3042. }
  3043. // GoString returns the string representation
  3044. func (s DeleteServiceOutput) GoString() string {
  3045. return s.String()
  3046. }
  3047. // The details of an Amazon ECS service deployment.
  3048. type Deployment struct {
  3049. _ struct{} `type:"structure"`
  3050. // The Unix timestamp for when the service was created.
  3051. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"`
  3052. // The most recent desired count of tasks that was specified for the service
  3053. // to deploy or maintain.
  3054. DesiredCount *int64 `locationName:"desiredCount" type:"integer"`
  3055. // The ID of the deployment.
  3056. Id *string `locationName:"id" type:"string"`
  3057. // The number of tasks in the deployment that are in the PENDING status.
  3058. PendingCount *int64 `locationName:"pendingCount" type:"integer"`
  3059. // The number of tasks in the deployment that are in the RUNNING status.
  3060. RunningCount *int64 `locationName:"runningCount" type:"integer"`
  3061. // The status of the deployment. Valid values are PRIMARY (for the most recent
  3062. // deployment), ACTIVE (for previous deployments that still have tasks running,
  3063. // but are being replaced with the PRIMARY deployment), and INACTIVE (for deployments
  3064. // that have been completely replaced).
  3065. Status *string `locationName:"status" type:"string"`
  3066. // The most recent task definition that was specified for the service to use.
  3067. TaskDefinition *string `locationName:"taskDefinition" type:"string"`
  3068. // The Unix timestamp for when the service was last updated.
  3069. UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"unix"`
  3070. }
  3071. // String returns the string representation
  3072. func (s Deployment) String() string {
  3073. return awsutil.Prettify(s)
  3074. }
  3075. // GoString returns the string representation
  3076. func (s Deployment) GoString() string {
  3077. return s.String()
  3078. }
  3079. // Optional deployment parameters that control how many tasks run during the
  3080. // deployment and the ordering of stopping and starting tasks.
  3081. type DeploymentConfiguration struct {
  3082. _ struct{} `type:"structure"`
  3083. // The upper limit (as a percentage of the service's desiredCount) of the number
  3084. // of tasks that are allowed in the RUNNING or PENDING state in a service during
  3085. // a deployment. The maximum number of tasks during a deployment is the desiredCount
  3086. // multiplied by the maximumPercent/100, rounded down to the nearest integer
  3087. // value.
  3088. MaximumPercent *int64 `locationName:"maximumPercent" type:"integer"`
  3089. // The lower limit (as a percentage of the service's desiredCount) of the number
  3090. // of running tasks that must remain in the RUNNING state in a service during
  3091. // a deployment. The minimum healthy tasks during a deployment is the desiredCount
  3092. // multiplied by the minimumHealthyPercent/100, rounded up to the nearest integer
  3093. // value.
  3094. MinimumHealthyPercent *int64 `locationName:"minimumHealthyPercent" type:"integer"`
  3095. }
  3096. // String returns the string representation
  3097. func (s DeploymentConfiguration) String() string {
  3098. return awsutil.Prettify(s)
  3099. }
  3100. // GoString returns the string representation
  3101. func (s DeploymentConfiguration) GoString() string {
  3102. return s.String()
  3103. }
  3104. type DeregisterContainerInstanceInput struct {
  3105. _ struct{} `type:"structure"`
  3106. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  3107. // the container instance to deregister. If you do not specify a cluster, the
  3108. // default cluster is assumed.
  3109. Cluster *string `locationName:"cluster" type:"string"`
  3110. // The container instance ID or full Amazon Resource Name (ARN) of the container
  3111. // instance to deregister. The ARN contains the arn:aws:ecs namespace, followed
  3112. // by the region of the container instance, the AWS account ID of the container
  3113. // instance owner, the container-instance namespace, and then the container
  3114. // instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID.
  3115. //
  3116. // ContainerInstance is a required field
  3117. ContainerInstance *string `locationName:"containerInstance" type:"string" required:"true"`
  3118. // Forces the deregistration of the container instance. If you have tasks running
  3119. // on the container instance when you deregister it with the force option, these
  3120. // tasks remain running until you terminate the instance or the tasks stop through
  3121. // some other means, but they are orphaned (no longer monitored or accounted
  3122. // for by Amazon ECS). If an orphaned task on your container instance is part
  3123. // of an Amazon ECS service, then the service scheduler starts another copy
  3124. // of that task, on a different container instance if possible.
  3125. //
  3126. // Any containers in orphaned service tasks that are registered with a Classic
  3127. // load balancer or an Application load balancer target group are deregistered,
  3128. // and they will begin connection draining according to the settings on the
  3129. // load balancer or target group.
  3130. Force *bool `locationName:"force" type:"boolean"`
  3131. }
  3132. // String returns the string representation
  3133. func (s DeregisterContainerInstanceInput) String() string {
  3134. return awsutil.Prettify(s)
  3135. }
  3136. // GoString returns the string representation
  3137. func (s DeregisterContainerInstanceInput) GoString() string {
  3138. return s.String()
  3139. }
  3140. // Validate inspects the fields of the type to determine if they are valid.
  3141. func (s *DeregisterContainerInstanceInput) Validate() error {
  3142. invalidParams := request.ErrInvalidParams{Context: "DeregisterContainerInstanceInput"}
  3143. if s.ContainerInstance == nil {
  3144. invalidParams.Add(request.NewErrParamRequired("ContainerInstance"))
  3145. }
  3146. if invalidParams.Len() > 0 {
  3147. return invalidParams
  3148. }
  3149. return nil
  3150. }
  3151. type DeregisterContainerInstanceOutput struct {
  3152. _ struct{} `type:"structure"`
  3153. // An EC2 instance that is running the Amazon ECS agent and has been registered
  3154. // with a cluster.
  3155. ContainerInstance *ContainerInstance `locationName:"containerInstance" type:"structure"`
  3156. }
  3157. // String returns the string representation
  3158. func (s DeregisterContainerInstanceOutput) String() string {
  3159. return awsutil.Prettify(s)
  3160. }
  3161. // GoString returns the string representation
  3162. func (s DeregisterContainerInstanceOutput) GoString() string {
  3163. return s.String()
  3164. }
  3165. type DeregisterTaskDefinitionInput struct {
  3166. _ struct{} `type:"structure"`
  3167. // The family and revision (family:revision) or full Amazon Resource Name (ARN)
  3168. // of the task definition to deregister. You must specify a revision.
  3169. //
  3170. // TaskDefinition is a required field
  3171. TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"`
  3172. }
  3173. // String returns the string representation
  3174. func (s DeregisterTaskDefinitionInput) String() string {
  3175. return awsutil.Prettify(s)
  3176. }
  3177. // GoString returns the string representation
  3178. func (s DeregisterTaskDefinitionInput) GoString() string {
  3179. return s.String()
  3180. }
  3181. // Validate inspects the fields of the type to determine if they are valid.
  3182. func (s *DeregisterTaskDefinitionInput) Validate() error {
  3183. invalidParams := request.ErrInvalidParams{Context: "DeregisterTaskDefinitionInput"}
  3184. if s.TaskDefinition == nil {
  3185. invalidParams.Add(request.NewErrParamRequired("TaskDefinition"))
  3186. }
  3187. if invalidParams.Len() > 0 {
  3188. return invalidParams
  3189. }
  3190. return nil
  3191. }
  3192. type DeregisterTaskDefinitionOutput struct {
  3193. _ struct{} `type:"structure"`
  3194. // The full description of the deregistered task.
  3195. TaskDefinition *TaskDefinition `locationName:"taskDefinition" type:"structure"`
  3196. }
  3197. // String returns the string representation
  3198. func (s DeregisterTaskDefinitionOutput) String() string {
  3199. return awsutil.Prettify(s)
  3200. }
  3201. // GoString returns the string representation
  3202. func (s DeregisterTaskDefinitionOutput) GoString() string {
  3203. return s.String()
  3204. }
  3205. type DescribeClustersInput struct {
  3206. _ struct{} `type:"structure"`
  3207. // A space-separated list of up to 100 cluster names or full cluster Amazon
  3208. // Resource Name (ARN) entries. If you do not specify a cluster, the default
  3209. // cluster is assumed.
  3210. Clusters []*string `locationName:"clusters" type:"list"`
  3211. }
  3212. // String returns the string representation
  3213. func (s DescribeClustersInput) String() string {
  3214. return awsutil.Prettify(s)
  3215. }
  3216. // GoString returns the string representation
  3217. func (s DescribeClustersInput) GoString() string {
  3218. return s.String()
  3219. }
  3220. type DescribeClustersOutput struct {
  3221. _ struct{} `type:"structure"`
  3222. // The list of clusters.
  3223. Clusters []*Cluster `locationName:"clusters" type:"list"`
  3224. // Any failures associated with the call.
  3225. Failures []*Failure `locationName:"failures" type:"list"`
  3226. }
  3227. // String returns the string representation
  3228. func (s DescribeClustersOutput) String() string {
  3229. return awsutil.Prettify(s)
  3230. }
  3231. // GoString returns the string representation
  3232. func (s DescribeClustersOutput) GoString() string {
  3233. return s.String()
  3234. }
  3235. type DescribeContainerInstancesInput struct {
  3236. _ struct{} `type:"structure"`
  3237. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  3238. // the container instances to describe. If you do not specify a cluster, the
  3239. // default cluster is assumed.
  3240. Cluster *string `locationName:"cluster" type:"string"`
  3241. // A space-separated list of container instance IDs or full Amazon Resource
  3242. // Name (ARN) entries.
  3243. //
  3244. // ContainerInstances is a required field
  3245. ContainerInstances []*string `locationName:"containerInstances" type:"list" required:"true"`
  3246. }
  3247. // String returns the string representation
  3248. func (s DescribeContainerInstancesInput) String() string {
  3249. return awsutil.Prettify(s)
  3250. }
  3251. // GoString returns the string representation
  3252. func (s DescribeContainerInstancesInput) GoString() string {
  3253. return s.String()
  3254. }
  3255. // Validate inspects the fields of the type to determine if they are valid.
  3256. func (s *DescribeContainerInstancesInput) Validate() error {
  3257. invalidParams := request.ErrInvalidParams{Context: "DescribeContainerInstancesInput"}
  3258. if s.ContainerInstances == nil {
  3259. invalidParams.Add(request.NewErrParamRequired("ContainerInstances"))
  3260. }
  3261. if invalidParams.Len() > 0 {
  3262. return invalidParams
  3263. }
  3264. return nil
  3265. }
  3266. type DescribeContainerInstancesOutput struct {
  3267. _ struct{} `type:"structure"`
  3268. // The list of container instances.
  3269. ContainerInstances []*ContainerInstance `locationName:"containerInstances" type:"list"`
  3270. // Any failures associated with the call.
  3271. Failures []*Failure `locationName:"failures" type:"list"`
  3272. }
  3273. // String returns the string representation
  3274. func (s DescribeContainerInstancesOutput) String() string {
  3275. return awsutil.Prettify(s)
  3276. }
  3277. // GoString returns the string representation
  3278. func (s DescribeContainerInstancesOutput) GoString() string {
  3279. return s.String()
  3280. }
  3281. type DescribeServicesInput struct {
  3282. _ struct{} `type:"structure"`
  3283. // The name of the cluster that hosts the service to describe. If you do not
  3284. // specify a cluster, the default cluster is assumed.
  3285. Cluster *string `locationName:"cluster" type:"string"`
  3286. // A list of services to describe. You may specify up to 10 services to describe
  3287. // in a single operation.
  3288. //
  3289. // Services is a required field
  3290. Services []*string `locationName:"services" type:"list" required:"true"`
  3291. }
  3292. // String returns the string representation
  3293. func (s DescribeServicesInput) String() string {
  3294. return awsutil.Prettify(s)
  3295. }
  3296. // GoString returns the string representation
  3297. func (s DescribeServicesInput) GoString() string {
  3298. return s.String()
  3299. }
  3300. // Validate inspects the fields of the type to determine if they are valid.
  3301. func (s *DescribeServicesInput) Validate() error {
  3302. invalidParams := request.ErrInvalidParams{Context: "DescribeServicesInput"}
  3303. if s.Services == nil {
  3304. invalidParams.Add(request.NewErrParamRequired("Services"))
  3305. }
  3306. if invalidParams.Len() > 0 {
  3307. return invalidParams
  3308. }
  3309. return nil
  3310. }
  3311. type DescribeServicesOutput struct {
  3312. _ struct{} `type:"structure"`
  3313. // Any failures associated with the call.
  3314. Failures []*Failure `locationName:"failures" type:"list"`
  3315. // The list of services described.
  3316. Services []*Service `locationName:"services" type:"list"`
  3317. }
  3318. // String returns the string representation
  3319. func (s DescribeServicesOutput) String() string {
  3320. return awsutil.Prettify(s)
  3321. }
  3322. // GoString returns the string representation
  3323. func (s DescribeServicesOutput) GoString() string {
  3324. return s.String()
  3325. }
  3326. type DescribeTaskDefinitionInput struct {
  3327. _ struct{} `type:"structure"`
  3328. // The family for the latest ACTIVE revision, family and revision (family:revision)
  3329. // for a specific revision in the family, or full Amazon Resource Name (ARN)
  3330. // of the task definition to describe.
  3331. //
  3332. // TaskDefinition is a required field
  3333. TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"`
  3334. }
  3335. // String returns the string representation
  3336. func (s DescribeTaskDefinitionInput) String() string {
  3337. return awsutil.Prettify(s)
  3338. }
  3339. // GoString returns the string representation
  3340. func (s DescribeTaskDefinitionInput) GoString() string {
  3341. return s.String()
  3342. }
  3343. // Validate inspects the fields of the type to determine if they are valid.
  3344. func (s *DescribeTaskDefinitionInput) Validate() error {
  3345. invalidParams := request.ErrInvalidParams{Context: "DescribeTaskDefinitionInput"}
  3346. if s.TaskDefinition == nil {
  3347. invalidParams.Add(request.NewErrParamRequired("TaskDefinition"))
  3348. }
  3349. if invalidParams.Len() > 0 {
  3350. return invalidParams
  3351. }
  3352. return nil
  3353. }
  3354. type DescribeTaskDefinitionOutput struct {
  3355. _ struct{} `type:"structure"`
  3356. // The full task definition description.
  3357. TaskDefinition *TaskDefinition `locationName:"taskDefinition" type:"structure"`
  3358. }
  3359. // String returns the string representation
  3360. func (s DescribeTaskDefinitionOutput) String() string {
  3361. return awsutil.Prettify(s)
  3362. }
  3363. // GoString returns the string representation
  3364. func (s DescribeTaskDefinitionOutput) GoString() string {
  3365. return s.String()
  3366. }
  3367. type DescribeTasksInput struct {
  3368. _ struct{} `type:"structure"`
  3369. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  3370. // the task to describe. If you do not specify a cluster, the default cluster
  3371. // is assumed.
  3372. Cluster *string `locationName:"cluster" type:"string"`
  3373. // A space-separated list of task IDs or full Amazon Resource Name (ARN) entries.
  3374. //
  3375. // Tasks is a required field
  3376. Tasks []*string `locationName:"tasks" type:"list" required:"true"`
  3377. }
  3378. // String returns the string representation
  3379. func (s DescribeTasksInput) String() string {
  3380. return awsutil.Prettify(s)
  3381. }
  3382. // GoString returns the string representation
  3383. func (s DescribeTasksInput) GoString() string {
  3384. return s.String()
  3385. }
  3386. // Validate inspects the fields of the type to determine if they are valid.
  3387. func (s *DescribeTasksInput) Validate() error {
  3388. invalidParams := request.ErrInvalidParams{Context: "DescribeTasksInput"}
  3389. if s.Tasks == nil {
  3390. invalidParams.Add(request.NewErrParamRequired("Tasks"))
  3391. }
  3392. if invalidParams.Len() > 0 {
  3393. return invalidParams
  3394. }
  3395. return nil
  3396. }
  3397. type DescribeTasksOutput struct {
  3398. _ struct{} `type:"structure"`
  3399. // Any failures associated with the call.
  3400. Failures []*Failure `locationName:"failures" type:"list"`
  3401. // The list of tasks.
  3402. Tasks []*Task `locationName:"tasks" type:"list"`
  3403. }
  3404. // String returns the string representation
  3405. func (s DescribeTasksOutput) String() string {
  3406. return awsutil.Prettify(s)
  3407. }
  3408. // GoString returns the string representation
  3409. func (s DescribeTasksOutput) GoString() string {
  3410. return s.String()
  3411. }
  3412. type DiscoverPollEndpointInput struct {
  3413. _ struct{} `type:"structure"`
  3414. // The cluster that the container instance belongs to.
  3415. Cluster *string `locationName:"cluster" type:"string"`
  3416. // The container instance ID or full Amazon Resource Name (ARN) of the container
  3417. // instance. The ARN contains the arn:aws:ecs namespace, followed by the region
  3418. // of the container instance, the AWS account ID of the container instance owner,
  3419. // the container-instance namespace, and then the container instance ID. For
  3420. // example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID.
  3421. ContainerInstance *string `locationName:"containerInstance" type:"string"`
  3422. }
  3423. // String returns the string representation
  3424. func (s DiscoverPollEndpointInput) String() string {
  3425. return awsutil.Prettify(s)
  3426. }
  3427. // GoString returns the string representation
  3428. func (s DiscoverPollEndpointInput) GoString() string {
  3429. return s.String()
  3430. }
  3431. type DiscoverPollEndpointOutput struct {
  3432. _ struct{} `type:"structure"`
  3433. // The endpoint for the Amazon ECS agent to poll.
  3434. Endpoint *string `locationName:"endpoint" type:"string"`
  3435. // The telemetry endpoint for the Amazon ECS agent.
  3436. TelemetryEndpoint *string `locationName:"telemetryEndpoint" type:"string"`
  3437. }
  3438. // String returns the string representation
  3439. func (s DiscoverPollEndpointOutput) String() string {
  3440. return awsutil.Prettify(s)
  3441. }
  3442. // GoString returns the string representation
  3443. func (s DiscoverPollEndpointOutput) GoString() string {
  3444. return s.String()
  3445. }
  3446. // A failed resource.
  3447. type Failure struct {
  3448. _ struct{} `type:"structure"`
  3449. // The Amazon Resource Name (ARN) of the failed resource.
  3450. Arn *string `locationName:"arn" type:"string"`
  3451. // The reason for the failure.
  3452. Reason *string `locationName:"reason" type:"string"`
  3453. }
  3454. // String returns the string representation
  3455. func (s Failure) String() string {
  3456. return awsutil.Prettify(s)
  3457. }
  3458. // GoString returns the string representation
  3459. func (s Failure) GoString() string {
  3460. return s.String()
  3461. }
  3462. // Hostnames and IP address entries that are added to the /etc/hosts file of
  3463. // a container via the extraHosts parameter of its ContainerDefinition.
  3464. type HostEntry struct {
  3465. _ struct{} `type:"structure"`
  3466. // The hostname to use in the /etc/hosts entry.
  3467. //
  3468. // Hostname is a required field
  3469. Hostname *string `locationName:"hostname" type:"string" required:"true"`
  3470. // The IP address to use in the /etc/hosts entry.
  3471. //
  3472. // IpAddress is a required field
  3473. IpAddress *string `locationName:"ipAddress" type:"string" required:"true"`
  3474. }
  3475. // String returns the string representation
  3476. func (s HostEntry) String() string {
  3477. return awsutil.Prettify(s)
  3478. }
  3479. // GoString returns the string representation
  3480. func (s HostEntry) GoString() string {
  3481. return s.String()
  3482. }
  3483. // Validate inspects the fields of the type to determine if they are valid.
  3484. func (s *HostEntry) Validate() error {
  3485. invalidParams := request.ErrInvalidParams{Context: "HostEntry"}
  3486. if s.Hostname == nil {
  3487. invalidParams.Add(request.NewErrParamRequired("Hostname"))
  3488. }
  3489. if s.IpAddress == nil {
  3490. invalidParams.Add(request.NewErrParamRequired("IpAddress"))
  3491. }
  3492. if invalidParams.Len() > 0 {
  3493. return invalidParams
  3494. }
  3495. return nil
  3496. }
  3497. // Details on a container instance host volume.
  3498. type HostVolumeProperties struct {
  3499. _ struct{} `type:"structure"`
  3500. // The path on the host container instance that is presented to the container.
  3501. // If this parameter is empty, then the Docker daemon has assigned a host path
  3502. // for you. If the host parameter contains a sourcePath file location, then
  3503. // the data volume persists at the specified location on the host container
  3504. // instance until you delete it manually. If the sourcePath value does not exist
  3505. // on the host container instance, the Docker daemon creates it. If the location
  3506. // does exist, the contents of the source path folder are exported.
  3507. SourcePath *string `locationName:"sourcePath" type:"string"`
  3508. }
  3509. // String returns the string representation
  3510. func (s HostVolumeProperties) String() string {
  3511. return awsutil.Prettify(s)
  3512. }
  3513. // GoString returns the string representation
  3514. func (s HostVolumeProperties) GoString() string {
  3515. return s.String()
  3516. }
  3517. // A key and value pair object.
  3518. type KeyValuePair struct {
  3519. _ struct{} `type:"structure"`
  3520. // The name of the key value pair. For environment variables, this is the name
  3521. // of the environment variable.
  3522. Name *string `locationName:"name" type:"string"`
  3523. // The value of the key value pair. For environment variables, this is the value
  3524. // of the environment variable.
  3525. Value *string `locationName:"value" type:"string"`
  3526. }
  3527. // String returns the string representation
  3528. func (s KeyValuePair) String() string {
  3529. return awsutil.Prettify(s)
  3530. }
  3531. // GoString returns the string representation
  3532. func (s KeyValuePair) GoString() string {
  3533. return s.String()
  3534. }
  3535. type ListClustersInput struct {
  3536. _ struct{} `type:"structure"`
  3537. // The maximum number of cluster results returned by ListClusters in paginated
  3538. // output. When this parameter is used, ListClusters only returns maxResults
  3539. // results in a single page along with a nextToken response element. The remaining
  3540. // results of the initial request can be seen by sending another ListClusters
  3541. // request with the returned nextToken value. This value can be between 1 and
  3542. // 100. If this parameter is not used, then ListClusters returns up to 100 results
  3543. // and a nextToken value if applicable.
  3544. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  3545. // The nextToken value returned from a previous paginated ListClusters request
  3546. // where maxResults was used and the results exceeded the value of that parameter.
  3547. // Pagination continues from the end of the previous results that returned the
  3548. // nextToken value. This value is null when there are no more results to return.
  3549. //
  3550. // This token should be treated as an opaque identifier that is only used to
  3551. // retrieve the next items in a list and not for other programmatic purposes.
  3552. NextToken *string `locationName:"nextToken" type:"string"`
  3553. }
  3554. // String returns the string representation
  3555. func (s ListClustersInput) String() string {
  3556. return awsutil.Prettify(s)
  3557. }
  3558. // GoString returns the string representation
  3559. func (s ListClustersInput) GoString() string {
  3560. return s.String()
  3561. }
  3562. type ListClustersOutput struct {
  3563. _ struct{} `type:"structure"`
  3564. // The list of full Amazon Resource Name (ARN) entries for each cluster associated
  3565. // with your account.
  3566. ClusterArns []*string `locationName:"clusterArns" type:"list"`
  3567. // The nextToken value to include in a future ListClusters request. When the
  3568. // results of a ListClusters request exceed maxResults, this value can be used
  3569. // to retrieve the next page of results. This value is null when there are no
  3570. // more results to return.
  3571. NextToken *string `locationName:"nextToken" type:"string"`
  3572. }
  3573. // String returns the string representation
  3574. func (s ListClustersOutput) String() string {
  3575. return awsutil.Prettify(s)
  3576. }
  3577. // GoString returns the string representation
  3578. func (s ListClustersOutput) GoString() string {
  3579. return s.String()
  3580. }
  3581. type ListContainerInstancesInput struct {
  3582. _ struct{} `type:"structure"`
  3583. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  3584. // the container instances to list. If you do not specify a cluster, the default
  3585. // cluster is assumed.
  3586. Cluster *string `locationName:"cluster" type:"string"`
  3587. // The maximum number of container instance results returned by ListContainerInstances
  3588. // in paginated output. When this parameter is used, ListContainerInstances
  3589. // only returns maxResults results in a single page along with a nextToken response
  3590. // element. The remaining results of the initial request can be seen by sending
  3591. // another ListContainerInstances request with the returned nextToken value.
  3592. // This value can be between 1 and 100. If this parameter is not used, then
  3593. // ListContainerInstances returns up to 100 results and a nextToken value if
  3594. // applicable.
  3595. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  3596. // The nextToken value returned from a previous paginated ListContainerInstances
  3597. // request where maxResults was used and the results exceeded the value of that
  3598. // parameter. Pagination continues from the end of the previous results that
  3599. // returned the nextToken value. This value is null when there are no more results
  3600. // to return.
  3601. //
  3602. // This token should be treated as an opaque identifier that is only used to
  3603. // retrieve the next items in a list and not for other programmatic purposes.
  3604. NextToken *string `locationName:"nextToken" type:"string"`
  3605. }
  3606. // String returns the string representation
  3607. func (s ListContainerInstancesInput) String() string {
  3608. return awsutil.Prettify(s)
  3609. }
  3610. // GoString returns the string representation
  3611. func (s ListContainerInstancesInput) GoString() string {
  3612. return s.String()
  3613. }
  3614. type ListContainerInstancesOutput struct {
  3615. _ struct{} `type:"structure"`
  3616. // The list of container instances with full Amazon Resource Name (ARN) entries
  3617. // for each container instance associated with the specified cluster.
  3618. ContainerInstanceArns []*string `locationName:"containerInstanceArns" type:"list"`
  3619. // The nextToken value to include in a future ListContainerInstances request.
  3620. // When the results of a ListContainerInstances request exceed maxResults, this
  3621. // value can be used to retrieve the next page of results. This value is null
  3622. // when there are no more results to return.
  3623. NextToken *string `locationName:"nextToken" type:"string"`
  3624. }
  3625. // String returns the string representation
  3626. func (s ListContainerInstancesOutput) String() string {
  3627. return awsutil.Prettify(s)
  3628. }
  3629. // GoString returns the string representation
  3630. func (s ListContainerInstancesOutput) GoString() string {
  3631. return s.String()
  3632. }
  3633. type ListServicesInput struct {
  3634. _ struct{} `type:"structure"`
  3635. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  3636. // the services to list. If you do not specify a cluster, the default cluster
  3637. // is assumed.
  3638. Cluster *string `locationName:"cluster" type:"string"`
  3639. // The maximum number of container instance results returned by ListServices
  3640. // in paginated output. When this parameter is used, ListServices only returns
  3641. // maxResults results in a single page along with a nextToken response element.
  3642. // The remaining results of the initial request can be seen by sending another
  3643. // ListServices request with the returned nextToken value. This value can be
  3644. // between 1 and 10. If this parameter is not used, then ListServices returns
  3645. // up to 10 results and a nextToken value if applicable.
  3646. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  3647. // The nextToken value returned from a previous paginated ListServices request
  3648. // where maxResults was used and the results exceeded the value of that parameter.
  3649. // Pagination continues from the end of the previous results that returned the
  3650. // nextToken value. This value is null when there are no more results to return.
  3651. //
  3652. // This token should be treated as an opaque identifier that is only used to
  3653. // retrieve the next items in a list and not for other programmatic purposes.
  3654. NextToken *string `locationName:"nextToken" type:"string"`
  3655. }
  3656. // String returns the string representation
  3657. func (s ListServicesInput) String() string {
  3658. return awsutil.Prettify(s)
  3659. }
  3660. // GoString returns the string representation
  3661. func (s ListServicesInput) GoString() string {
  3662. return s.String()
  3663. }
  3664. type ListServicesOutput struct {
  3665. _ struct{} `type:"structure"`
  3666. // The nextToken value to include in a future ListServices request. When the
  3667. // results of a ListServices request exceed maxResults, this value can be used
  3668. // to retrieve the next page of results. This value is null when there are no
  3669. // more results to return.
  3670. NextToken *string `locationName:"nextToken" type:"string"`
  3671. // The list of full Amazon Resource Name (ARN) entries for each service associated
  3672. // with the specified cluster.
  3673. ServiceArns []*string `locationName:"serviceArns" type:"list"`
  3674. }
  3675. // String returns the string representation
  3676. func (s ListServicesOutput) String() string {
  3677. return awsutil.Prettify(s)
  3678. }
  3679. // GoString returns the string representation
  3680. func (s ListServicesOutput) GoString() string {
  3681. return s.String()
  3682. }
  3683. type ListTaskDefinitionFamiliesInput struct {
  3684. _ struct{} `type:"structure"`
  3685. // The familyPrefix is a string that is used to filter the results of ListTaskDefinitionFamilies.
  3686. // If you specify a familyPrefix, only task definition family names that begin
  3687. // with the familyPrefix string are returned.
  3688. FamilyPrefix *string `locationName:"familyPrefix" type:"string"`
  3689. // The maximum number of task definition family results returned by ListTaskDefinitionFamilies
  3690. // in paginated output. When this parameter is used, ListTaskDefinitions only
  3691. // returns maxResults results in a single page along with a nextToken response
  3692. // element. The remaining results of the initial request can be seen by sending
  3693. // another ListTaskDefinitionFamilies request with the returned nextToken value.
  3694. // This value can be between 1 and 100. If this parameter is not used, then
  3695. // ListTaskDefinitionFamilies returns up to 100 results and a nextToken value
  3696. // if applicable.
  3697. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  3698. // The nextToken value returned from a previous paginated ListTaskDefinitionFamilies
  3699. // request where maxResults was used and the results exceeded the value of that
  3700. // parameter. Pagination continues from the end of the previous results that
  3701. // returned the nextToken value. This value is null when there are no more results
  3702. // to return.
  3703. //
  3704. // This token should be treated as an opaque identifier that is only used to
  3705. // retrieve the next items in a list and not for other programmatic purposes.
  3706. NextToken *string `locationName:"nextToken" type:"string"`
  3707. // The task definition family status with which to filter the ListTaskDefinitionFamilies
  3708. // results. By default, both ACTIVE and INACTIVE task definition families are
  3709. // listed. If this parameter is set to ACTIVE, only task definition families
  3710. // that have an ACTIVE task definition revision are returned. If this parameter
  3711. // is set to INACTIVE, only task definition families that do not have any ACTIVE
  3712. // task definition revisions are returned. If you paginate the resulting output,
  3713. // be sure to keep the status value constant in each subsequent request.
  3714. Status *string `locationName:"status" type:"string" enum:"TaskDefinitionFamilyStatus"`
  3715. }
  3716. // String returns the string representation
  3717. func (s ListTaskDefinitionFamiliesInput) String() string {
  3718. return awsutil.Prettify(s)
  3719. }
  3720. // GoString returns the string representation
  3721. func (s ListTaskDefinitionFamiliesInput) GoString() string {
  3722. return s.String()
  3723. }
  3724. type ListTaskDefinitionFamiliesOutput struct {
  3725. _ struct{} `type:"structure"`
  3726. // The list of task definition family names that match the ListTaskDefinitionFamilies
  3727. // request.
  3728. Families []*string `locationName:"families" type:"list"`
  3729. // The nextToken value to include in a future ListTaskDefinitionFamilies request.
  3730. // When the results of a ListTaskDefinitionFamilies request exceed maxResults,
  3731. // this value can be used to retrieve the next page of results. This value is
  3732. // null when there are no more results to return.
  3733. NextToken *string `locationName:"nextToken" type:"string"`
  3734. }
  3735. // String returns the string representation
  3736. func (s ListTaskDefinitionFamiliesOutput) String() string {
  3737. return awsutil.Prettify(s)
  3738. }
  3739. // GoString returns the string representation
  3740. func (s ListTaskDefinitionFamiliesOutput) GoString() string {
  3741. return s.String()
  3742. }
  3743. type ListTaskDefinitionsInput struct {
  3744. _ struct{} `type:"structure"`
  3745. // The full family name with which to filter the ListTaskDefinitions results.
  3746. // Specifying a familyPrefix limits the listed task definitions to task definition
  3747. // revisions that belong to that family.
  3748. FamilyPrefix *string `locationName:"familyPrefix" type:"string"`
  3749. // The maximum number of task definition results returned by ListTaskDefinitions
  3750. // in paginated output. When this parameter is used, ListTaskDefinitions only
  3751. // returns maxResults results in a single page along with a nextToken response
  3752. // element. The remaining results of the initial request can be seen by sending
  3753. // another ListTaskDefinitions request with the returned nextToken value. This
  3754. // value can be between 1 and 100. If this parameter is not used, then ListTaskDefinitions
  3755. // returns up to 100 results and a nextToken value if applicable.
  3756. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  3757. // The nextToken value returned from a previous paginated ListTaskDefinitions
  3758. // request where maxResults was used and the results exceeded the value of that
  3759. // parameter. Pagination continues from the end of the previous results that
  3760. // returned the nextToken value. This value is null when there are no more results
  3761. // to return.
  3762. //
  3763. // This token should be treated as an opaque identifier that is only used to
  3764. // retrieve the next items in a list and not for other programmatic purposes.
  3765. NextToken *string `locationName:"nextToken" type:"string"`
  3766. // The order in which to sort the results. Valid values are ASC and DESC. By
  3767. // default (ASC), task definitions are listed lexicographically by family name
  3768. // and in ascending numerical order by revision so that the newest task definitions
  3769. // in a family are listed last. Setting this parameter to DESC reverses the
  3770. // sort order on family name and revision so that the newest task definitions
  3771. // in a family are listed first.
  3772. Sort *string `locationName:"sort" type:"string" enum:"SortOrder"`
  3773. // The task definition status with which to filter the ListTaskDefinitions results.
  3774. // By default, only ACTIVE task definitions are listed. By setting this parameter
  3775. // to INACTIVE, you can view task definitions that are INACTIVE as long as an
  3776. // active task or service still references them. If you paginate the resulting
  3777. // output, be sure to keep the status value constant in each subsequent request.
  3778. Status *string `locationName:"status" type:"string" enum:"TaskDefinitionStatus"`
  3779. }
  3780. // String returns the string representation
  3781. func (s ListTaskDefinitionsInput) String() string {
  3782. return awsutil.Prettify(s)
  3783. }
  3784. // GoString returns the string representation
  3785. func (s ListTaskDefinitionsInput) GoString() string {
  3786. return s.String()
  3787. }
  3788. type ListTaskDefinitionsOutput struct {
  3789. _ struct{} `type:"structure"`
  3790. // The nextToken value to include in a future ListTaskDefinitions request. When
  3791. // the results of a ListTaskDefinitions request exceed maxResults, this value
  3792. // can be used to retrieve the next page of results. This value is null when
  3793. // there are no more results to return.
  3794. NextToken *string `locationName:"nextToken" type:"string"`
  3795. // The list of task definition Amazon Resource Name (ARN) entries for the ListTaskDefinitions
  3796. // request.
  3797. TaskDefinitionArns []*string `locationName:"taskDefinitionArns" type:"list"`
  3798. }
  3799. // String returns the string representation
  3800. func (s ListTaskDefinitionsOutput) String() string {
  3801. return awsutil.Prettify(s)
  3802. }
  3803. // GoString returns the string representation
  3804. func (s ListTaskDefinitionsOutput) GoString() string {
  3805. return s.String()
  3806. }
  3807. type ListTasksInput struct {
  3808. _ struct{} `type:"structure"`
  3809. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  3810. // the tasks to list. If you do not specify a cluster, the default cluster is
  3811. // assumed.
  3812. Cluster *string `locationName:"cluster" type:"string"`
  3813. // The container instance ID or full Amazon Resource Name (ARN) of the container
  3814. // instance with which to filter the ListTasks results. Specifying a containerInstance
  3815. // limits the results to tasks that belong to that container instance.
  3816. ContainerInstance *string `locationName:"containerInstance" type:"string"`
  3817. // The task desired status with which to filter the ListTasks results. Specifying
  3818. // a desiredStatus of STOPPED limits the results to tasks that ECS has set the
  3819. // desired status to STOPPED, which can be useful for debugging tasks that are
  3820. // not starting properly or have died or finished. The default status filter
  3821. // is RUNNING, which shows tasks that ECS has set the desired status to RUNNING.
  3822. //
  3823. // Although you can filter results based on a desired status of PENDING, this
  3824. // will not return any results because ECS never sets the desired status of
  3825. // a task to that value (only a task's lastStatus may have a value of PENDING).
  3826. DesiredStatus *string `locationName:"desiredStatus" type:"string" enum:"DesiredStatus"`
  3827. // The name of the family with which to filter the ListTasks results. Specifying
  3828. // a family limits the results to tasks that belong to that family.
  3829. Family *string `locationName:"family" type:"string"`
  3830. // The maximum number of task results returned by ListTasks in paginated output.
  3831. // When this parameter is used, ListTasks only returns maxResults results in
  3832. // a single page along with a nextToken response element. The remaining results
  3833. // of the initial request can be seen by sending another ListTasks request with
  3834. // the returned nextToken value. This value can be between 1 and 100. If this
  3835. // parameter is not used, then ListTasks returns up to 100 results and a nextToken
  3836. // value if applicable.
  3837. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  3838. // The nextToken value returned from a previous paginated ListTasks request
  3839. // where maxResults was used and the results exceeded the value of that parameter.
  3840. // Pagination continues from the end of the previous results that returned the
  3841. // nextToken value. This value is null when there are no more results to return.
  3842. //
  3843. // This token should be treated as an opaque identifier that is only used to
  3844. // retrieve the next items in a list and not for other programmatic purposes.
  3845. NextToken *string `locationName:"nextToken" type:"string"`
  3846. // The name of the service with which to filter the ListTasks results. Specifying
  3847. // a serviceName limits the results to tasks that belong to that service.
  3848. ServiceName *string `locationName:"serviceName" type:"string"`
  3849. // The startedBy value with which to filter the task results. Specifying a startedBy
  3850. // value limits the results to tasks that were started with that value.
  3851. StartedBy *string `locationName:"startedBy" type:"string"`
  3852. }
  3853. // String returns the string representation
  3854. func (s ListTasksInput) String() string {
  3855. return awsutil.Prettify(s)
  3856. }
  3857. // GoString returns the string representation
  3858. func (s ListTasksInput) GoString() string {
  3859. return s.String()
  3860. }
  3861. type ListTasksOutput struct {
  3862. _ struct{} `type:"structure"`
  3863. // The nextToken value to include in a future ListTasks request. When the results
  3864. // of a ListTasks request exceed maxResults, this value can be used to retrieve
  3865. // the next page of results. This value is null when there are no more results
  3866. // to return.
  3867. NextToken *string `locationName:"nextToken" type:"string"`
  3868. // The list of task Amazon Resource Name (ARN) entries for the ListTasks request.
  3869. TaskArns []*string `locationName:"taskArns" type:"list"`
  3870. }
  3871. // String returns the string representation
  3872. func (s ListTasksOutput) String() string {
  3873. return awsutil.Prettify(s)
  3874. }
  3875. // GoString returns the string representation
  3876. func (s ListTasksOutput) GoString() string {
  3877. return s.String()
  3878. }
  3879. // Details on a load balancer that is used with a service.
  3880. type LoadBalancer struct {
  3881. _ struct{} `type:"structure"`
  3882. // The name of the container (as it appears in a container definition) to associate
  3883. // with the load balancer.
  3884. ContainerName *string `locationName:"containerName" type:"string"`
  3885. // The port on the container to associate with the load balancer. This port
  3886. // must correspond to a containerPort in the service's task definition. Your
  3887. // container instances must allow ingress traffic on the hostPort of the port
  3888. // mapping.
  3889. ContainerPort *int64 `locationName:"containerPort" type:"integer"`
  3890. // The name of the load balancer.
  3891. LoadBalancerName *string `locationName:"loadBalancerName" type:"string"`
  3892. // The full Amazon Resource Name (ARN) of the Elastic Load Balancing target
  3893. // group associated with a service.
  3894. TargetGroupArn *string `locationName:"targetGroupArn" type:"string"`
  3895. }
  3896. // String returns the string representation
  3897. func (s LoadBalancer) String() string {
  3898. return awsutil.Prettify(s)
  3899. }
  3900. // GoString returns the string representation
  3901. func (s LoadBalancer) GoString() string {
  3902. return s.String()
  3903. }
  3904. // Log configuration options to send to a custom log driver for the container.
  3905. type LogConfiguration struct {
  3906. _ struct{} `type:"structure"`
  3907. // The log driver to use for the container. The valid values listed for this
  3908. // parameter are log drivers that the Amazon ECS container agent can communicate
  3909. // with by default.
  3910. //
  3911. // If you have a custom driver that is not listed above that you would like
  3912. // to work with the Amazon ECS container agent, you can fork the Amazon ECS
  3913. // container agent project that is available on GitHub (https://github.com/aws/amazon-ecs-agent)
  3914. // and customize it to work with that driver. We encourage you to submit pull
  3915. // requests for changes that you would like to have included. However, Amazon
  3916. // Web Services does not currently provide support for running modified copies
  3917. // of this software.
  3918. //
  3919. // This parameter requires version 1.18 of the Docker Remote API or greater
  3920. // on your container instance. To check the Docker Remote API version on your
  3921. // container instance, log into your container instance and run the following
  3922. // command: sudo docker version | grep "Server API version"
  3923. //
  3924. // LogDriver is a required field
  3925. LogDriver *string `locationName:"logDriver" type:"string" required:"true" enum:"LogDriver"`
  3926. // The configuration options to send to the log driver. This parameter requires
  3927. // version 1.19 of the Docker Remote API or greater on your container instance.
  3928. // To check the Docker Remote API version on your container instance, log into
  3929. // your container instance and run the following command: sudo docker version
  3930. // | grep "Server API version"
  3931. Options map[string]*string `locationName:"options" type:"map"`
  3932. }
  3933. // String returns the string representation
  3934. func (s LogConfiguration) String() string {
  3935. return awsutil.Prettify(s)
  3936. }
  3937. // GoString returns the string representation
  3938. func (s LogConfiguration) GoString() string {
  3939. return s.String()
  3940. }
  3941. // Validate inspects the fields of the type to determine if they are valid.
  3942. func (s *LogConfiguration) Validate() error {
  3943. invalidParams := request.ErrInvalidParams{Context: "LogConfiguration"}
  3944. if s.LogDriver == nil {
  3945. invalidParams.Add(request.NewErrParamRequired("LogDriver"))
  3946. }
  3947. if invalidParams.Len() > 0 {
  3948. return invalidParams
  3949. }
  3950. return nil
  3951. }
  3952. // Details on a volume mount point that is used in a container definition.
  3953. type MountPoint struct {
  3954. _ struct{} `type:"structure"`
  3955. // The path on the container to mount the host volume at.
  3956. ContainerPath *string `locationName:"containerPath" type:"string"`
  3957. // If this value is true, the container has read-only access to the volume.
  3958. // If this value is false, then the container can write to the volume. The default
  3959. // value is false.
  3960. ReadOnly *bool `locationName:"readOnly" type:"boolean"`
  3961. // The name of the volume to mount.
  3962. SourceVolume *string `locationName:"sourceVolume" type:"string"`
  3963. }
  3964. // String returns the string representation
  3965. func (s MountPoint) String() string {
  3966. return awsutil.Prettify(s)
  3967. }
  3968. // GoString returns the string representation
  3969. func (s MountPoint) GoString() string {
  3970. return s.String()
  3971. }
  3972. // Details on the network bindings between a container and its host container
  3973. // instance. After a task reaches the RUNNING status, manual and automatic host
  3974. // and container port assignments are visible in the networkBindings section
  3975. // of DescribeTasks API responses.
  3976. type NetworkBinding struct {
  3977. _ struct{} `type:"structure"`
  3978. // The IP address that the container is bound to on the container instance.
  3979. BindIP *string `locationName:"bindIP" type:"string"`
  3980. // The port number on the container that is be used with the network binding.
  3981. ContainerPort *int64 `locationName:"containerPort" type:"integer"`
  3982. // The port number on the host that is used with the network binding.
  3983. HostPort *int64 `locationName:"hostPort" type:"integer"`
  3984. // The protocol used for the network binding.
  3985. Protocol *string `locationName:"protocol" type:"string" enum:"TransportProtocol"`
  3986. }
  3987. // String returns the string representation
  3988. func (s NetworkBinding) String() string {
  3989. return awsutil.Prettify(s)
  3990. }
  3991. // GoString returns the string representation
  3992. func (s NetworkBinding) GoString() string {
  3993. return s.String()
  3994. }
  3995. // Port mappings allow containers to access ports on the host container instance
  3996. // to send or receive traffic. Port mappings are specified as part of the container
  3997. // definition. After a task reaches the RUNNING status, manual and automatic
  3998. // host and container port assignments are visible in the networkBindings section
  3999. // of DescribeTasks API responses.
  4000. type PortMapping struct {
  4001. _ struct{} `type:"structure"`
  4002. // The port number on the container that is bound to the user-specified or automatically
  4003. // assigned host port. If you specify a container port and not a host port,
  4004. // your container automatically receives a host port in the ephemeral port range
  4005. // (for more information, see hostPort). Port mappings that are automatically
  4006. // assigned in this way do not count toward the 100 reserved ports limit of
  4007. // a container instance.
  4008. ContainerPort *int64 `locationName:"containerPort" type:"integer"`
  4009. // The port number on the container instance to reserve for your container.
  4010. // You can specify a non-reserved host port for your container port mapping,
  4011. // or you can omit the hostPort (or set it to 0) while specifying a containerPort
  4012. // and your container automatically receives a port in the ephemeral port range
  4013. // for your container instance operating system and Docker version.
  4014. //
  4015. // The default ephemeral port range is 49153 to 65535, and this range is used
  4016. // for Docker versions prior to 1.6.0. For Docker version 1.6.0 and later, the
  4017. // Docker daemon tries to read the ephemeral port range from /proc/sys/net/ipv4/ip_local_port_range;
  4018. // if this kernel parameter is unavailable, the default ephemeral port range
  4019. // is used. You should not attempt to specify a host port in the ephemeral port
  4020. // range, because these are reserved for automatic assignment. In general, ports
  4021. // below 32768 are outside of the ephemeral port range.
  4022. //
  4023. // The default reserved ports are 22 for SSH, the Docker ports 2375 and 2376,
  4024. // and the Amazon ECS container agent ports 51678 and 51679. Any host port that
  4025. // was previously specified in a running task is also reserved while the task
  4026. // is running (after a task stops, the host port is released).The current reserved
  4027. // ports are displayed in the remainingResources of DescribeContainerInstances
  4028. // output, and a container instance may have up to 100 reserved ports at a time,
  4029. // including the default reserved ports (automatically assigned ports do not
  4030. // count toward the 100 reserved ports limit).
  4031. HostPort *int64 `locationName:"hostPort" type:"integer"`
  4032. // The protocol used for the port mapping. Valid values are tcp and udp. The
  4033. // default is tcp.
  4034. Protocol *string `locationName:"protocol" type:"string" enum:"TransportProtocol"`
  4035. }
  4036. // String returns the string representation
  4037. func (s PortMapping) String() string {
  4038. return awsutil.Prettify(s)
  4039. }
  4040. // GoString returns the string representation
  4041. func (s PortMapping) GoString() string {
  4042. return s.String()
  4043. }
  4044. type RegisterContainerInstanceInput struct {
  4045. _ struct{} `type:"structure"`
  4046. // The container instance attributes that this container instance supports.
  4047. Attributes []*Attribute `locationName:"attributes" type:"list"`
  4048. // The short name or full Amazon Resource Name (ARN) of the cluster with which
  4049. // to register your container instance. If you do not specify a cluster, the
  4050. // default cluster is assumed.
  4051. Cluster *string `locationName:"cluster" type:"string"`
  4052. // The Amazon Resource Name (ARN) of the container instance (if it was previously
  4053. // registered).
  4054. ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"`
  4055. // The instance identity document for the EC2 instance to register. This document
  4056. // can be found by running the following command from the instance: curl http://169.254.169.254/latest/dynamic/instance-identity/document/
  4057. InstanceIdentityDocument *string `locationName:"instanceIdentityDocument" type:"string"`
  4058. // The instance identity document signature for the EC2 instance to register.
  4059. // This signature can be found by running the following command from the instance:
  4060. // curl http://169.254.169.254/latest/dynamic/instance-identity/signature/
  4061. InstanceIdentityDocumentSignature *string `locationName:"instanceIdentityDocumentSignature" type:"string"`
  4062. // The resources available on the instance.
  4063. TotalResources []*Resource `locationName:"totalResources" type:"list"`
  4064. // The version information for the Amazon ECS container agent and Docker daemon
  4065. // running on the container instance.
  4066. VersionInfo *VersionInfo `locationName:"versionInfo" type:"structure"`
  4067. }
  4068. // String returns the string representation
  4069. func (s RegisterContainerInstanceInput) String() string {
  4070. return awsutil.Prettify(s)
  4071. }
  4072. // GoString returns the string representation
  4073. func (s RegisterContainerInstanceInput) GoString() string {
  4074. return s.String()
  4075. }
  4076. // Validate inspects the fields of the type to determine if they are valid.
  4077. func (s *RegisterContainerInstanceInput) Validate() error {
  4078. invalidParams := request.ErrInvalidParams{Context: "RegisterContainerInstanceInput"}
  4079. if s.Attributes != nil {
  4080. for i, v := range s.Attributes {
  4081. if v == nil {
  4082. continue
  4083. }
  4084. if err := v.Validate(); err != nil {
  4085. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
  4086. }
  4087. }
  4088. }
  4089. if invalidParams.Len() > 0 {
  4090. return invalidParams
  4091. }
  4092. return nil
  4093. }
  4094. type RegisterContainerInstanceOutput struct {
  4095. _ struct{} `type:"structure"`
  4096. // An EC2 instance that is running the Amazon ECS agent and has been registered
  4097. // with a cluster.
  4098. ContainerInstance *ContainerInstance `locationName:"containerInstance" type:"structure"`
  4099. }
  4100. // String returns the string representation
  4101. func (s RegisterContainerInstanceOutput) String() string {
  4102. return awsutil.Prettify(s)
  4103. }
  4104. // GoString returns the string representation
  4105. func (s RegisterContainerInstanceOutput) GoString() string {
  4106. return s.String()
  4107. }
  4108. type RegisterTaskDefinitionInput struct {
  4109. _ struct{} `type:"structure"`
  4110. // A list of container definitions in JSON format that describe the different
  4111. // containers that make up your task.
  4112. //
  4113. // ContainerDefinitions is a required field
  4114. ContainerDefinitions []*ContainerDefinition `locationName:"containerDefinitions" type:"list" required:"true"`
  4115. // You must specify a family for a task definition, which allows you to track
  4116. // multiple versions of the same task definition. The family is used as a name
  4117. // for your task definition. Up to 255 letters (uppercase and lowercase), numbers,
  4118. // hyphens, and underscores are allowed.
  4119. //
  4120. // Family is a required field
  4121. Family *string `locationName:"family" type:"string" required:"true"`
  4122. // The Docker networking mode to use for the containers in the task. The valid
  4123. // values are none, bridge, and host.
  4124. //
  4125. // The default Docker network mode is bridge. If the network mode is set to
  4126. // none, you cannot specify port mappings in your container definitions, and
  4127. // the task's containers do not have external connectivity. The host network
  4128. // mode offers the highest networking performance for containers because they
  4129. // use the host network stack instead of the virtualized network stack provided
  4130. // by the bridge mode; however, exposed container ports are mapped directly
  4131. // to the corresponding host port, so you cannot take advantage of dynamic host
  4132. // port mappings or run multiple instantiations of the same task on a single
  4133. // container instance if port mappings are used.
  4134. //
  4135. // For more information, see Network settings (https://docs.docker.com/engine/reference/run/#network-settings)
  4136. // in the Docker run reference.
  4137. NetworkMode *string `locationName:"networkMode" type:"string" enum:"NetworkMode"`
  4138. // The short name or full Amazon Resource Name (ARN) of the IAM role that containers
  4139. // in this task can assume. All containers in this task are granted the permissions
  4140. // that are specified in this role. For more information, see IAM Roles for
  4141. // Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html)
  4142. // in the Amazon EC2 Container Service Developer Guide.
  4143. TaskRoleArn *string `locationName:"taskRoleArn" type:"string"`
  4144. // A list of volume definitions in JSON format that containers in your task
  4145. // may use.
  4146. Volumes []*Volume `locationName:"volumes" type:"list"`
  4147. }
  4148. // String returns the string representation
  4149. func (s RegisterTaskDefinitionInput) String() string {
  4150. return awsutil.Prettify(s)
  4151. }
  4152. // GoString returns the string representation
  4153. func (s RegisterTaskDefinitionInput) GoString() string {
  4154. return s.String()
  4155. }
  4156. // Validate inspects the fields of the type to determine if they are valid.
  4157. func (s *RegisterTaskDefinitionInput) Validate() error {
  4158. invalidParams := request.ErrInvalidParams{Context: "RegisterTaskDefinitionInput"}
  4159. if s.ContainerDefinitions == nil {
  4160. invalidParams.Add(request.NewErrParamRequired("ContainerDefinitions"))
  4161. }
  4162. if s.Family == nil {
  4163. invalidParams.Add(request.NewErrParamRequired("Family"))
  4164. }
  4165. if s.ContainerDefinitions != nil {
  4166. for i, v := range s.ContainerDefinitions {
  4167. if v == nil {
  4168. continue
  4169. }
  4170. if err := v.Validate(); err != nil {
  4171. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContainerDefinitions", i), err.(request.ErrInvalidParams))
  4172. }
  4173. }
  4174. }
  4175. if invalidParams.Len() > 0 {
  4176. return invalidParams
  4177. }
  4178. return nil
  4179. }
  4180. type RegisterTaskDefinitionOutput struct {
  4181. _ struct{} `type:"structure"`
  4182. // The full description of the registered task definition.
  4183. TaskDefinition *TaskDefinition `locationName:"taskDefinition" type:"structure"`
  4184. }
  4185. // String returns the string representation
  4186. func (s RegisterTaskDefinitionOutput) String() string {
  4187. return awsutil.Prettify(s)
  4188. }
  4189. // GoString returns the string representation
  4190. func (s RegisterTaskDefinitionOutput) GoString() string {
  4191. return s.String()
  4192. }
  4193. // Describes the resources available for a container instance.
  4194. type Resource struct {
  4195. _ struct{} `type:"structure"`
  4196. // When the doubleValue type is set, the value of the resource must be a double
  4197. // precision floating-point type.
  4198. DoubleValue *float64 `locationName:"doubleValue" type:"double"`
  4199. // When the integerValue type is set, the value of the resource must be an integer.
  4200. IntegerValue *int64 `locationName:"integerValue" type:"integer"`
  4201. // When the longValue type is set, the value of the resource must be an extended
  4202. // precision floating-point type.
  4203. LongValue *int64 `locationName:"longValue" type:"long"`
  4204. // The name of the resource, such as CPU, MEMORY, PORTS, or a user-defined resource.
  4205. Name *string `locationName:"name" type:"string"`
  4206. // When the stringSetValue type is set, the value of the resource must be a
  4207. // string type.
  4208. StringSetValue []*string `locationName:"stringSetValue" type:"list"`
  4209. // The type of the resource, such as INTEGER, DOUBLE, LONG, or STRINGSET.
  4210. Type *string `locationName:"type" type:"string"`
  4211. }
  4212. // String returns the string representation
  4213. func (s Resource) String() string {
  4214. return awsutil.Prettify(s)
  4215. }
  4216. // GoString returns the string representation
  4217. func (s Resource) GoString() string {
  4218. return s.String()
  4219. }
  4220. type RunTaskInput struct {
  4221. _ struct{} `type:"structure"`
  4222. // The short name or full Amazon Resource Name (ARN) of the cluster on which
  4223. // to run your task. If you do not specify a cluster, the default cluster is
  4224. // assumed.
  4225. Cluster *string `locationName:"cluster" type:"string"`
  4226. // The number of instantiations of the specified task to place on your cluster.
  4227. //
  4228. // The count parameter is limited to 10 tasks per call.
  4229. Count *int64 `locationName:"count" type:"integer"`
  4230. // A list of container overrides in JSON format that specify the name of a container
  4231. // in the specified task definition and the overrides it should receive. You
  4232. // can override the default command for a container (that is specified in the
  4233. // task definition or Docker image) with a command override. You can also override
  4234. // existing environment variables (that are specified in the task definition
  4235. // or Docker image) on a container or add new environment variables to it with
  4236. // an environment override.
  4237. //
  4238. // A total of 8192 characters are allowed for overrides. This limit includes
  4239. // the JSON formatting characters of the override structure.
  4240. Overrides *TaskOverride `locationName:"overrides" type:"structure"`
  4241. // An optional tag specified when a task is started. For example if you automatically
  4242. // trigger a task to run a batch process job, you could apply a unique identifier
  4243. // for that job to your task with the startedBy parameter. You can then identify
  4244. // which tasks belong to that job by filtering the results of a ListTasks call
  4245. // with the startedBy value. Up to 36 letters (uppercase and lowercase), numbers,
  4246. // hyphens, and underscores are allowed.
  4247. //
  4248. // If a task is started by an Amazon ECS service, then the startedBy parameter
  4249. // contains the deployment ID of the service that starts it.
  4250. StartedBy *string `locationName:"startedBy" type:"string"`
  4251. // The family and revision (family:revision) or full Amazon Resource Name (ARN)
  4252. // of the task definition to run. If a revision is not specified, the latest
  4253. // ACTIVE revision is used.
  4254. //
  4255. // TaskDefinition is a required field
  4256. TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"`
  4257. }
  4258. // String returns the string representation
  4259. func (s RunTaskInput) String() string {
  4260. return awsutil.Prettify(s)
  4261. }
  4262. // GoString returns the string representation
  4263. func (s RunTaskInput) GoString() string {
  4264. return s.String()
  4265. }
  4266. // Validate inspects the fields of the type to determine if they are valid.
  4267. func (s *RunTaskInput) Validate() error {
  4268. invalidParams := request.ErrInvalidParams{Context: "RunTaskInput"}
  4269. if s.TaskDefinition == nil {
  4270. invalidParams.Add(request.NewErrParamRequired("TaskDefinition"))
  4271. }
  4272. if invalidParams.Len() > 0 {
  4273. return invalidParams
  4274. }
  4275. return nil
  4276. }
  4277. type RunTaskOutput struct {
  4278. _ struct{} `type:"structure"`
  4279. // Any failures associated with the call.
  4280. Failures []*Failure `locationName:"failures" type:"list"`
  4281. // A full description of the tasks that were run. Each task that was successfully
  4282. // placed on your cluster are described here.
  4283. Tasks []*Task `locationName:"tasks" type:"list"`
  4284. }
  4285. // String returns the string representation
  4286. func (s RunTaskOutput) String() string {
  4287. return awsutil.Prettify(s)
  4288. }
  4289. // GoString returns the string representation
  4290. func (s RunTaskOutput) GoString() string {
  4291. return s.String()
  4292. }
  4293. // Details on a service within a cluster
  4294. type Service struct {
  4295. _ struct{} `type:"structure"`
  4296. // The Amazon Resource Name (ARN) of the cluster that hosts the service.
  4297. ClusterArn *string `locationName:"clusterArn" type:"string"`
  4298. // The Unix timestamp for when the service was created.
  4299. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"`
  4300. // Optional deployment parameters that control how many tasks run during the
  4301. // deployment and the ordering of stopping and starting tasks.
  4302. DeploymentConfiguration *DeploymentConfiguration `locationName:"deploymentConfiguration" type:"structure"`
  4303. // The current state of deployments for the service.
  4304. Deployments []*Deployment `locationName:"deployments" type:"list"`
  4305. // The desired number of instantiations of the task definition to keep running
  4306. // on the service. This value is specified when the service is created with
  4307. // CreateService, and it can be modified with UpdateService.
  4308. DesiredCount *int64 `locationName:"desiredCount" type:"integer"`
  4309. // The event stream for your service. A maximum of 100 of the latest events
  4310. // are displayed.
  4311. Events []*ServiceEvent `locationName:"events" type:"list"`
  4312. // A list of Elastic Load Balancing load balancer objects, containing the load
  4313. // balancer name, the container name (as it appears in a container definition),
  4314. // and the container port to access from the load balancer.
  4315. LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"`
  4316. // The number of tasks in the cluster that are in the PENDING state.
  4317. PendingCount *int64 `locationName:"pendingCount" type:"integer"`
  4318. // The Amazon Resource Name (ARN) of the IAM role associated with the service
  4319. // that allows the Amazon ECS container agent to register container instances
  4320. // with an Elastic Load Balancing load balancer.
  4321. RoleArn *string `locationName:"roleArn" type:"string"`
  4322. // The number of tasks in the cluster that are in the RUNNING state.
  4323. RunningCount *int64 `locationName:"runningCount" type:"integer"`
  4324. // The Amazon Resource Name (ARN) that identifies the service. The ARN contains
  4325. // the arn:aws:ecs namespace, followed by the region of the service, the AWS
  4326. // account ID of the service owner, the service namespace, and then the service
  4327. // name. For example, arn:aws:ecs:region:012345678910:service/my-service.
  4328. ServiceArn *string `locationName:"serviceArn" type:"string"`
  4329. // The name of your service. Up to 255 letters (uppercase and lowercase), numbers,
  4330. // hyphens, and underscores are allowed. Service names must be unique within
  4331. // a cluster, but you can have similarly named services in multiple clusters
  4332. // within a region or across multiple regions.
  4333. ServiceName *string `locationName:"serviceName" type:"string"`
  4334. // The status of the service. The valid values are ACTIVE, DRAINING, or INACTIVE.
  4335. Status *string `locationName:"status" type:"string"`
  4336. // The task definition to use for tasks in the service. This value is specified
  4337. // when the service is created with CreateService, and it can be modified with
  4338. // UpdateService.
  4339. TaskDefinition *string `locationName:"taskDefinition" type:"string"`
  4340. }
  4341. // String returns the string representation
  4342. func (s Service) String() string {
  4343. return awsutil.Prettify(s)
  4344. }
  4345. // GoString returns the string representation
  4346. func (s Service) GoString() string {
  4347. return s.String()
  4348. }
  4349. // Details on an event associated with a service.
  4350. type ServiceEvent struct {
  4351. _ struct{} `type:"structure"`
  4352. // The Unix timestamp for when the event was triggered.
  4353. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"`
  4354. // The ID string of the event.
  4355. Id *string `locationName:"id" type:"string"`
  4356. // The event message.
  4357. Message *string `locationName:"message" type:"string"`
  4358. }
  4359. // String returns the string representation
  4360. func (s ServiceEvent) String() string {
  4361. return awsutil.Prettify(s)
  4362. }
  4363. // GoString returns the string representation
  4364. func (s ServiceEvent) GoString() string {
  4365. return s.String()
  4366. }
  4367. type StartTaskInput struct {
  4368. _ struct{} `type:"structure"`
  4369. // The short name or full Amazon Resource Name (ARN) of the cluster on which
  4370. // to start your task. If you do not specify a cluster, the default cluster
  4371. // is assumed.
  4372. Cluster *string `locationName:"cluster" type:"string"`
  4373. // The container instance IDs or full Amazon Resource Name (ARN) entries for
  4374. // the container instances on which you would like to place your task.
  4375. //
  4376. // The list of container instances to start tasks on is limited to 10.
  4377. //
  4378. // ContainerInstances is a required field
  4379. ContainerInstances []*string `locationName:"containerInstances" type:"list" required:"true"`
  4380. // A list of container overrides in JSON format that specify the name of a container
  4381. // in the specified task definition and the overrides it should receive. You
  4382. // can override the default command for a container (that is specified in the
  4383. // task definition or Docker image) with a command override. You can also override
  4384. // existing environment variables (that are specified in the task definition
  4385. // or Docker image) on a container or add new environment variables to it with
  4386. // an environment override.
  4387. //
  4388. // A total of 8192 characters are allowed for overrides. This limit includes
  4389. // the JSON formatting characters of the override structure.
  4390. Overrides *TaskOverride `locationName:"overrides" type:"structure"`
  4391. // An optional tag specified when a task is started. For example if you automatically
  4392. // trigger a task to run a batch process job, you could apply a unique identifier
  4393. // for that job to your task with the startedBy parameter. You can then identify
  4394. // which tasks belong to that job by filtering the results of a ListTasks call
  4395. // with the startedBy value. Up to 36 letters (uppercase and lowercase), numbers,
  4396. // hyphens, and underscores are allowed.
  4397. //
  4398. // If a task is started by an Amazon ECS service, then the startedBy parameter
  4399. // contains the deployment ID of the service that starts it.
  4400. StartedBy *string `locationName:"startedBy" type:"string"`
  4401. // The family and revision (family:revision) or full Amazon Resource Name (ARN)
  4402. // of the task definition to start. If a revision is not specified, the latest
  4403. // ACTIVE revision is used.
  4404. //
  4405. // TaskDefinition is a required field
  4406. TaskDefinition *string `locationName:"taskDefinition" type:"string" required:"true"`
  4407. }
  4408. // String returns the string representation
  4409. func (s StartTaskInput) String() string {
  4410. return awsutil.Prettify(s)
  4411. }
  4412. // GoString returns the string representation
  4413. func (s StartTaskInput) GoString() string {
  4414. return s.String()
  4415. }
  4416. // Validate inspects the fields of the type to determine if they are valid.
  4417. func (s *StartTaskInput) Validate() error {
  4418. invalidParams := request.ErrInvalidParams{Context: "StartTaskInput"}
  4419. if s.ContainerInstances == nil {
  4420. invalidParams.Add(request.NewErrParamRequired("ContainerInstances"))
  4421. }
  4422. if s.TaskDefinition == nil {
  4423. invalidParams.Add(request.NewErrParamRequired("TaskDefinition"))
  4424. }
  4425. if invalidParams.Len() > 0 {
  4426. return invalidParams
  4427. }
  4428. return nil
  4429. }
  4430. type StartTaskOutput struct {
  4431. _ struct{} `type:"structure"`
  4432. // Any failures associated with the call.
  4433. Failures []*Failure `locationName:"failures" type:"list"`
  4434. // A full description of the tasks that were started. Each task that was successfully
  4435. // placed on your container instances are described here.
  4436. Tasks []*Task `locationName:"tasks" type:"list"`
  4437. }
  4438. // String returns the string representation
  4439. func (s StartTaskOutput) String() string {
  4440. return awsutil.Prettify(s)
  4441. }
  4442. // GoString returns the string representation
  4443. func (s StartTaskOutput) GoString() string {
  4444. return s.String()
  4445. }
  4446. type StopTaskInput struct {
  4447. _ struct{} `type:"structure"`
  4448. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  4449. // the task to stop. If you do not specify a cluster, the default cluster is
  4450. // assumed.
  4451. Cluster *string `locationName:"cluster" type:"string"`
  4452. // An optional message specified when a task is stopped. For example, if you
  4453. // are using a custom scheduler, you can use this parameter to specify the reason
  4454. // for stopping the task here, and the message will appear in subsequent DescribeTasks
  4455. // API operations on this task. Up to 255 characters are allowed in this message.
  4456. Reason *string `locationName:"reason" type:"string"`
  4457. // The task ID or full Amazon Resource Name (ARN) entry of the task to stop.
  4458. //
  4459. // Task is a required field
  4460. Task *string `locationName:"task" type:"string" required:"true"`
  4461. }
  4462. // String returns the string representation
  4463. func (s StopTaskInput) String() string {
  4464. return awsutil.Prettify(s)
  4465. }
  4466. // GoString returns the string representation
  4467. func (s StopTaskInput) GoString() string {
  4468. return s.String()
  4469. }
  4470. // Validate inspects the fields of the type to determine if they are valid.
  4471. func (s *StopTaskInput) Validate() error {
  4472. invalidParams := request.ErrInvalidParams{Context: "StopTaskInput"}
  4473. if s.Task == nil {
  4474. invalidParams.Add(request.NewErrParamRequired("Task"))
  4475. }
  4476. if invalidParams.Len() > 0 {
  4477. return invalidParams
  4478. }
  4479. return nil
  4480. }
  4481. type StopTaskOutput struct {
  4482. _ struct{} `type:"structure"`
  4483. // Details on a task in a cluster.
  4484. Task *Task `locationName:"task" type:"structure"`
  4485. }
  4486. // String returns the string representation
  4487. func (s StopTaskOutput) String() string {
  4488. return awsutil.Prettify(s)
  4489. }
  4490. // GoString returns the string representation
  4491. func (s StopTaskOutput) GoString() string {
  4492. return s.String()
  4493. }
  4494. type SubmitContainerStateChangeInput struct {
  4495. _ struct{} `type:"structure"`
  4496. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  4497. // the container.
  4498. Cluster *string `locationName:"cluster" type:"string"`
  4499. // The name of the container.
  4500. ContainerName *string `locationName:"containerName" type:"string"`
  4501. // The exit code returned for the state change request.
  4502. ExitCode *int64 `locationName:"exitCode" type:"integer"`
  4503. // The network bindings of the container.
  4504. NetworkBindings []*NetworkBinding `locationName:"networkBindings" type:"list"`
  4505. // The reason for the state change request.
  4506. Reason *string `locationName:"reason" type:"string"`
  4507. // The status of the state change request.
  4508. Status *string `locationName:"status" type:"string"`
  4509. // The task ID or full Amazon Resource Name (ARN) of the task that hosts the
  4510. // container.
  4511. Task *string `locationName:"task" type:"string"`
  4512. }
  4513. // String returns the string representation
  4514. func (s SubmitContainerStateChangeInput) String() string {
  4515. return awsutil.Prettify(s)
  4516. }
  4517. // GoString returns the string representation
  4518. func (s SubmitContainerStateChangeInput) GoString() string {
  4519. return s.String()
  4520. }
  4521. type SubmitContainerStateChangeOutput struct {
  4522. _ struct{} `type:"structure"`
  4523. // Acknowledgement of the state change.
  4524. Acknowledgment *string `locationName:"acknowledgment" type:"string"`
  4525. }
  4526. // String returns the string representation
  4527. func (s SubmitContainerStateChangeOutput) String() string {
  4528. return awsutil.Prettify(s)
  4529. }
  4530. // GoString returns the string representation
  4531. func (s SubmitContainerStateChangeOutput) GoString() string {
  4532. return s.String()
  4533. }
  4534. type SubmitTaskStateChangeInput struct {
  4535. _ struct{} `type:"structure"`
  4536. // The short name or full Amazon Resource Name (ARN) of the cluster that hosts
  4537. // the task.
  4538. Cluster *string `locationName:"cluster" type:"string"`
  4539. // The reason for the state change request.
  4540. Reason *string `locationName:"reason" type:"string"`
  4541. // The status of the state change request.
  4542. Status *string `locationName:"status" type:"string"`
  4543. // The task ID or full Amazon Resource Name (ARN) of the task in the state change
  4544. // request.
  4545. Task *string `locationName:"task" type:"string"`
  4546. }
  4547. // String returns the string representation
  4548. func (s SubmitTaskStateChangeInput) String() string {
  4549. return awsutil.Prettify(s)
  4550. }
  4551. // GoString returns the string representation
  4552. func (s SubmitTaskStateChangeInput) GoString() string {
  4553. return s.String()
  4554. }
  4555. type SubmitTaskStateChangeOutput struct {
  4556. _ struct{} `type:"structure"`
  4557. // Acknowledgement of the state change.
  4558. Acknowledgment *string `locationName:"acknowledgment" type:"string"`
  4559. }
  4560. // String returns the string representation
  4561. func (s SubmitTaskStateChangeOutput) String() string {
  4562. return awsutil.Prettify(s)
  4563. }
  4564. // GoString returns the string representation
  4565. func (s SubmitTaskStateChangeOutput) GoString() string {
  4566. return s.String()
  4567. }
  4568. // Details on a task in a cluster.
  4569. type Task struct {
  4570. _ struct{} `type:"structure"`
  4571. // The Amazon Resource Name (ARN) of the cluster that hosts the task.
  4572. ClusterArn *string `locationName:"clusterArn" type:"string"`
  4573. // The Amazon Resource Name (ARN) of the container instances that host the task.
  4574. ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"`
  4575. // The containers associated with the task.
  4576. Containers []*Container `locationName:"containers" type:"list"`
  4577. // The Unix timestamp for when the task was created (the task entered the PENDING
  4578. // state).
  4579. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"`
  4580. // The desired status of the task.
  4581. DesiredStatus *string `locationName:"desiredStatus" type:"string"`
  4582. // The last known status of the task.
  4583. LastStatus *string `locationName:"lastStatus" type:"string"`
  4584. // One or more container overrides.
  4585. Overrides *TaskOverride `locationName:"overrides" type:"structure"`
  4586. // The Unix timestamp for when the task was started (the task transitioned from
  4587. // the PENDING state to the RUNNING state).
  4588. StartedAt *time.Time `locationName:"startedAt" type:"timestamp" timestampFormat:"unix"`
  4589. // The tag specified when a task is started. If the task is started by an Amazon
  4590. // ECS service, then the startedBy parameter contains the deployment ID of the
  4591. // service that starts it.
  4592. StartedBy *string `locationName:"startedBy" type:"string"`
  4593. // The Unix timestamp for when the task was stopped (the task transitioned from
  4594. // the RUNNING state to the STOPPED state).
  4595. StoppedAt *time.Time `locationName:"stoppedAt" type:"timestamp" timestampFormat:"unix"`
  4596. // The reason the task was stopped.
  4597. StoppedReason *string `locationName:"stoppedReason" type:"string"`
  4598. // The Amazon Resource Name (ARN) of the task.
  4599. TaskArn *string `locationName:"taskArn" type:"string"`
  4600. // The Amazon Resource Name (ARN) of the task definition that creates the task.
  4601. TaskDefinitionArn *string `locationName:"taskDefinitionArn" type:"string"`
  4602. }
  4603. // String returns the string representation
  4604. func (s Task) String() string {
  4605. return awsutil.Prettify(s)
  4606. }
  4607. // GoString returns the string representation
  4608. func (s Task) GoString() string {
  4609. return s.String()
  4610. }
  4611. // Details of a task definition.
  4612. type TaskDefinition struct {
  4613. _ struct{} `type:"structure"`
  4614. // A list of container definitions in JSON format that describe the different
  4615. // containers that make up your task. For more information about container definition
  4616. // parameters and defaults, see Amazon ECS Task Definitions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html)
  4617. // in the Amazon EC2 Container Service Developer Guide.
  4618. ContainerDefinitions []*ContainerDefinition `locationName:"containerDefinitions" type:"list"`
  4619. // The family of your task definition, used as the definition name.
  4620. Family *string `locationName:"family" type:"string"`
  4621. // The Docker networking mode to use for the containers in the task. The valid
  4622. // values are none, bridge, and host.
  4623. //
  4624. // If the network mode is none, the containers do not have external connectivity.
  4625. // The default Docker network mode is bridge. The host network mode offers the
  4626. // highest networking performance for containers because it uses the host network
  4627. // stack instead of the virtualized network stack provided by the bridge mode.
  4628. //
  4629. // For more information, see Network settings (https://docs.docker.com/engine/reference/run/#network-settings)
  4630. // in the Docker run reference.
  4631. NetworkMode *string `locationName:"networkMode" type:"string" enum:"NetworkMode"`
  4632. // The container instance attributes required by your task.
  4633. RequiresAttributes []*Attribute `locationName:"requiresAttributes" type:"list"`
  4634. // The revision of the task in a particular family. The revision is a version
  4635. // number of a task definition in a family. When you register a task definition
  4636. // for the first time, the revision is 1; each time you register a new revision
  4637. // of a task definition in the same family, the revision value always increases
  4638. // by one (even if you have deregistered previous revisions in this family).
  4639. Revision *int64 `locationName:"revision" type:"integer"`
  4640. // The status of the task definition.
  4641. Status *string `locationName:"status" type:"string" enum:"TaskDefinitionStatus"`
  4642. // The full Amazon Resource Name (ARN) of the task definition.
  4643. TaskDefinitionArn *string `locationName:"taskDefinitionArn" type:"string"`
  4644. // The Amazon Resource Name (ARN) of the IAM role that containers in this task
  4645. // can assume. All containers in this task are granted the permissions that
  4646. // are specified in this role.
  4647. TaskRoleArn *string `locationName:"taskRoleArn" type:"string"`
  4648. // The list of volumes in a task. For more information about volume definition
  4649. // parameters and defaults, see Amazon ECS Task Definitions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html)
  4650. // in the Amazon EC2 Container Service Developer Guide.
  4651. Volumes []*Volume `locationName:"volumes" type:"list"`
  4652. }
  4653. // String returns the string representation
  4654. func (s TaskDefinition) String() string {
  4655. return awsutil.Prettify(s)
  4656. }
  4657. // GoString returns the string representation
  4658. func (s TaskDefinition) GoString() string {
  4659. return s.String()
  4660. }
  4661. // The overrides associated with a task.
  4662. type TaskOverride struct {
  4663. _ struct{} `type:"structure"`
  4664. // One or more container overrides sent to a task.
  4665. ContainerOverrides []*ContainerOverride `locationName:"containerOverrides" type:"list"`
  4666. // The Amazon Resource Name (ARN) of the IAM role that containers in this task
  4667. // can assume. All containers in this task are granted the permissions that
  4668. // are specified in this role.
  4669. TaskRoleArn *string `locationName:"taskRoleArn" type:"string"`
  4670. }
  4671. // String returns the string representation
  4672. func (s TaskOverride) String() string {
  4673. return awsutil.Prettify(s)
  4674. }
  4675. // GoString returns the string representation
  4676. func (s TaskOverride) GoString() string {
  4677. return s.String()
  4678. }
  4679. // The ulimit settings to pass to the container.
  4680. type Ulimit struct {
  4681. _ struct{} `type:"structure"`
  4682. // The hard limit for the ulimit type.
  4683. //
  4684. // HardLimit is a required field
  4685. HardLimit *int64 `locationName:"hardLimit" type:"integer" required:"true"`
  4686. // The type of the ulimit.
  4687. //
  4688. // Name is a required field
  4689. Name *string `locationName:"name" type:"string" required:"true" enum:"UlimitName"`
  4690. // The soft limit for the ulimit type.
  4691. //
  4692. // SoftLimit is a required field
  4693. SoftLimit *int64 `locationName:"softLimit" type:"integer" required:"true"`
  4694. }
  4695. // String returns the string representation
  4696. func (s Ulimit) String() string {
  4697. return awsutil.Prettify(s)
  4698. }
  4699. // GoString returns the string representation
  4700. func (s Ulimit) GoString() string {
  4701. return s.String()
  4702. }
  4703. // Validate inspects the fields of the type to determine if they are valid.
  4704. func (s *Ulimit) Validate() error {
  4705. invalidParams := request.ErrInvalidParams{Context: "Ulimit"}
  4706. if s.HardLimit == nil {
  4707. invalidParams.Add(request.NewErrParamRequired("HardLimit"))
  4708. }
  4709. if s.Name == nil {
  4710. invalidParams.Add(request.NewErrParamRequired("Name"))
  4711. }
  4712. if s.SoftLimit == nil {
  4713. invalidParams.Add(request.NewErrParamRequired("SoftLimit"))
  4714. }
  4715. if invalidParams.Len() > 0 {
  4716. return invalidParams
  4717. }
  4718. return nil
  4719. }
  4720. type UpdateContainerAgentInput struct {
  4721. _ struct{} `type:"structure"`
  4722. // The short name or full Amazon Resource Name (ARN) of the cluster that your
  4723. // container instance is running on. If you do not specify a cluster, the default
  4724. // cluster is assumed.
  4725. Cluster *string `locationName:"cluster" type:"string"`
  4726. // The container instance ID or full Amazon Resource Name (ARN) entries for
  4727. // the container instance on which you would like to update the Amazon ECS container
  4728. // agent.
  4729. //
  4730. // ContainerInstance is a required field
  4731. ContainerInstance *string `locationName:"containerInstance" type:"string" required:"true"`
  4732. }
  4733. // String returns the string representation
  4734. func (s UpdateContainerAgentInput) String() string {
  4735. return awsutil.Prettify(s)
  4736. }
  4737. // GoString returns the string representation
  4738. func (s UpdateContainerAgentInput) GoString() string {
  4739. return s.String()
  4740. }
  4741. // Validate inspects the fields of the type to determine if they are valid.
  4742. func (s *UpdateContainerAgentInput) Validate() error {
  4743. invalidParams := request.ErrInvalidParams{Context: "UpdateContainerAgentInput"}
  4744. if s.ContainerInstance == nil {
  4745. invalidParams.Add(request.NewErrParamRequired("ContainerInstance"))
  4746. }
  4747. if invalidParams.Len() > 0 {
  4748. return invalidParams
  4749. }
  4750. return nil
  4751. }
  4752. type UpdateContainerAgentOutput struct {
  4753. _ struct{} `type:"structure"`
  4754. // An EC2 instance that is running the Amazon ECS agent and has been registered
  4755. // with a cluster.
  4756. ContainerInstance *ContainerInstance `locationName:"containerInstance" type:"structure"`
  4757. }
  4758. // String returns the string representation
  4759. func (s UpdateContainerAgentOutput) String() string {
  4760. return awsutil.Prettify(s)
  4761. }
  4762. // GoString returns the string representation
  4763. func (s UpdateContainerAgentOutput) GoString() string {
  4764. return s.String()
  4765. }
  4766. type UpdateServiceInput struct {
  4767. _ struct{} `type:"structure"`
  4768. // The short name or full Amazon Resource Name (ARN) of the cluster that your
  4769. // service is running on. If you do not specify a cluster, the default cluster
  4770. // is assumed.
  4771. Cluster *string `locationName:"cluster" type:"string"`
  4772. // Optional deployment parameters that control how many tasks run during the
  4773. // deployment and the ordering of stopping and starting tasks.
  4774. DeploymentConfiguration *DeploymentConfiguration `locationName:"deploymentConfiguration" type:"structure"`
  4775. // The number of instantiations of the task to place and keep running in your
  4776. // service.
  4777. DesiredCount *int64 `locationName:"desiredCount" type:"integer"`
  4778. // The name of the service to update.
  4779. //
  4780. // Service is a required field
  4781. Service *string `locationName:"service" type:"string" required:"true"`
  4782. // The family and revision (family:revision) or full Amazon Resource Name (ARN)
  4783. // of the task definition to run in your service. If a revision is not specified,
  4784. // the latest ACTIVE revision is used. If you modify the task definition with
  4785. // UpdateService, Amazon ECS spawns a task with the new version of the task
  4786. // definition and then stops an old task after the new version is running.
  4787. TaskDefinition *string `locationName:"taskDefinition" type:"string"`
  4788. }
  4789. // String returns the string representation
  4790. func (s UpdateServiceInput) String() string {
  4791. return awsutil.Prettify(s)
  4792. }
  4793. // GoString returns the string representation
  4794. func (s UpdateServiceInput) GoString() string {
  4795. return s.String()
  4796. }
  4797. // Validate inspects the fields of the type to determine if they are valid.
  4798. func (s *UpdateServiceInput) Validate() error {
  4799. invalidParams := request.ErrInvalidParams{Context: "UpdateServiceInput"}
  4800. if s.Service == nil {
  4801. invalidParams.Add(request.NewErrParamRequired("Service"))
  4802. }
  4803. if invalidParams.Len() > 0 {
  4804. return invalidParams
  4805. }
  4806. return nil
  4807. }
  4808. type UpdateServiceOutput struct {
  4809. _ struct{} `type:"structure"`
  4810. // The full description of your service following the update call.
  4811. Service *Service `locationName:"service" type:"structure"`
  4812. }
  4813. // String returns the string representation
  4814. func (s UpdateServiceOutput) String() string {
  4815. return awsutil.Prettify(s)
  4816. }
  4817. // GoString returns the string representation
  4818. func (s UpdateServiceOutput) GoString() string {
  4819. return s.String()
  4820. }
  4821. // The Docker and Amazon ECS container agent version information about a container
  4822. // instance.
  4823. type VersionInfo struct {
  4824. _ struct{} `type:"structure"`
  4825. // The Git commit hash for the Amazon ECS container agent build on the amazon-ecs-agent
  4826. // (https://github.com/aws/amazon-ecs-agent/commits/master) GitHub repository.
  4827. AgentHash *string `locationName:"agentHash" type:"string"`
  4828. // The version number of the Amazon ECS container agent.
  4829. AgentVersion *string `locationName:"agentVersion" type:"string"`
  4830. // The Docker version running on the container instance.
  4831. DockerVersion *string `locationName:"dockerVersion" type:"string"`
  4832. }
  4833. // String returns the string representation
  4834. func (s VersionInfo) String() string {
  4835. return awsutil.Prettify(s)
  4836. }
  4837. // GoString returns the string representation
  4838. func (s VersionInfo) GoString() string {
  4839. return s.String()
  4840. }
  4841. // A data volume used in a task definition.
  4842. type Volume struct {
  4843. _ struct{} `type:"structure"`
  4844. // The contents of the host parameter determine whether your data volume persists
  4845. // on the host container instance and where it is stored. If the host parameter
  4846. // is empty, then the Docker daemon assigns a host path for your data volume,
  4847. // but the data is not guaranteed to persist after the containers associated
  4848. // with it stop running.
  4849. Host *HostVolumeProperties `locationName:"host" type:"structure"`
  4850. // The name of the volume. Up to 255 letters (uppercase and lowercase), numbers,
  4851. // hyphens, and underscores are allowed. This name is referenced in the sourceVolume
  4852. // parameter of container definition mountPoints.
  4853. Name *string `locationName:"name" type:"string"`
  4854. }
  4855. // String returns the string representation
  4856. func (s Volume) String() string {
  4857. return awsutil.Prettify(s)
  4858. }
  4859. // GoString returns the string representation
  4860. func (s Volume) GoString() string {
  4861. return s.String()
  4862. }
  4863. // Details on a data volume from another container.
  4864. type VolumeFrom struct {
  4865. _ struct{} `type:"structure"`
  4866. // If this value is true, the container has read-only access to the volume.
  4867. // If this value is false, then the container can write to the volume. The default
  4868. // value is false.
  4869. ReadOnly *bool `locationName:"readOnly" type:"boolean"`
  4870. // The name of the container to mount volumes from.
  4871. SourceContainer *string `locationName:"sourceContainer" type:"string"`
  4872. }
  4873. // String returns the string representation
  4874. func (s VolumeFrom) String() string {
  4875. return awsutil.Prettify(s)
  4876. }
  4877. // GoString returns the string representation
  4878. func (s VolumeFrom) GoString() string {
  4879. return s.String()
  4880. }
  4881. const (
  4882. // AgentUpdateStatusPending is a AgentUpdateStatus enum value
  4883. AgentUpdateStatusPending = "PENDING"
  4884. // AgentUpdateStatusStaging is a AgentUpdateStatus enum value
  4885. AgentUpdateStatusStaging = "STAGING"
  4886. // AgentUpdateStatusStaged is a AgentUpdateStatus enum value
  4887. AgentUpdateStatusStaged = "STAGED"
  4888. // AgentUpdateStatusUpdating is a AgentUpdateStatus enum value
  4889. AgentUpdateStatusUpdating = "UPDATING"
  4890. // AgentUpdateStatusUpdated is a AgentUpdateStatus enum value
  4891. AgentUpdateStatusUpdated = "UPDATED"
  4892. // AgentUpdateStatusFailed is a AgentUpdateStatus enum value
  4893. AgentUpdateStatusFailed = "FAILED"
  4894. )
  4895. const (
  4896. // DesiredStatusRunning is a DesiredStatus enum value
  4897. DesiredStatusRunning = "RUNNING"
  4898. // DesiredStatusPending is a DesiredStatus enum value
  4899. DesiredStatusPending = "PENDING"
  4900. // DesiredStatusStopped is a DesiredStatus enum value
  4901. DesiredStatusStopped = "STOPPED"
  4902. )
  4903. const (
  4904. // LogDriverJsonFile is a LogDriver enum value
  4905. LogDriverJsonFile = "json-file"
  4906. // LogDriverSyslog is a LogDriver enum value
  4907. LogDriverSyslog = "syslog"
  4908. // LogDriverJournald is a LogDriver enum value
  4909. LogDriverJournald = "journald"
  4910. // LogDriverGelf is a LogDriver enum value
  4911. LogDriverGelf = "gelf"
  4912. // LogDriverFluentd is a LogDriver enum value
  4913. LogDriverFluentd = "fluentd"
  4914. // LogDriverAwslogs is a LogDriver enum value
  4915. LogDriverAwslogs = "awslogs"
  4916. // LogDriverSplunk is a LogDriver enum value
  4917. LogDriverSplunk = "splunk"
  4918. )
  4919. const (
  4920. // NetworkModeBridge is a NetworkMode enum value
  4921. NetworkModeBridge = "bridge"
  4922. // NetworkModeHost is a NetworkMode enum value
  4923. NetworkModeHost = "host"
  4924. // NetworkModeNone is a NetworkMode enum value
  4925. NetworkModeNone = "none"
  4926. )
  4927. const (
  4928. // SortOrderAsc is a SortOrder enum value
  4929. SortOrderAsc = "ASC"
  4930. // SortOrderDesc is a SortOrder enum value
  4931. SortOrderDesc = "DESC"
  4932. )
  4933. const (
  4934. // TaskDefinitionFamilyStatusActive is a TaskDefinitionFamilyStatus enum value
  4935. TaskDefinitionFamilyStatusActive = "ACTIVE"
  4936. // TaskDefinitionFamilyStatusInactive is a TaskDefinitionFamilyStatus enum value
  4937. TaskDefinitionFamilyStatusInactive = "INACTIVE"
  4938. // TaskDefinitionFamilyStatusAll is a TaskDefinitionFamilyStatus enum value
  4939. TaskDefinitionFamilyStatusAll = "ALL"
  4940. )
  4941. const (
  4942. // TaskDefinitionStatusActive is a TaskDefinitionStatus enum value
  4943. TaskDefinitionStatusActive = "ACTIVE"
  4944. // TaskDefinitionStatusInactive is a TaskDefinitionStatus enum value
  4945. TaskDefinitionStatusInactive = "INACTIVE"
  4946. )
  4947. const (
  4948. // TransportProtocolTcp is a TransportProtocol enum value
  4949. TransportProtocolTcp = "tcp"
  4950. // TransportProtocolUdp is a TransportProtocol enum value
  4951. TransportProtocolUdp = "udp"
  4952. )
  4953. const (
  4954. // UlimitNameCore is a UlimitName enum value
  4955. UlimitNameCore = "core"
  4956. // UlimitNameCpu is a UlimitName enum value
  4957. UlimitNameCpu = "cpu"
  4958. // UlimitNameData is a UlimitName enum value
  4959. UlimitNameData = "data"
  4960. // UlimitNameFsize is a UlimitName enum value
  4961. UlimitNameFsize = "fsize"
  4962. // UlimitNameLocks is a UlimitName enum value
  4963. UlimitNameLocks = "locks"
  4964. // UlimitNameMemlock is a UlimitName enum value
  4965. UlimitNameMemlock = "memlock"
  4966. // UlimitNameMsgqueue is a UlimitName enum value
  4967. UlimitNameMsgqueue = "msgqueue"
  4968. // UlimitNameNice is a UlimitName enum value
  4969. UlimitNameNice = "nice"
  4970. // UlimitNameNofile is a UlimitName enum value
  4971. UlimitNameNofile = "nofile"
  4972. // UlimitNameNproc is a UlimitName enum value
  4973. UlimitNameNproc = "nproc"
  4974. // UlimitNameRss is a UlimitName enum value
  4975. UlimitNameRss = "rss"
  4976. // UlimitNameRtprio is a UlimitName enum value
  4977. UlimitNameRtprio = "rtprio"
  4978. // UlimitNameRttime is a UlimitName enum value
  4979. UlimitNameRttime = "rttime"
  4980. // UlimitNameSigpending is a UlimitName enum value
  4981. UlimitNameSigpending = "sigpending"
  4982. // UlimitNameStack is a UlimitName enum value
  4983. UlimitNameStack = "stack"
  4984. )