api.go 183 KB

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