api.go 166 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package emr provides a client for Amazon Elastic MapReduce.
  3. package emr
  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. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  11. )
  12. const opAddInstanceGroups = "AddInstanceGroups"
  13. // AddInstanceGroupsRequest generates a "aws/request.Request" representing the
  14. // client's request for the AddInstanceGroups operation. The "output" return
  15. // value can be used to capture response data after the request's "Send" method
  16. // is called.
  17. //
  18. // See AddInstanceGroups for usage and error information.
  19. //
  20. // Creating a request object using this method should be used when you want to inject
  21. // custom logic into the request's lifecycle using a custom handler, or if you want to
  22. // access properties on the request object before or after sending the request. If
  23. // you just want the service response, call the AddInstanceGroups method directly
  24. // instead.
  25. //
  26. // Note: You must call the "Send" method on the returned request object in order
  27. // to execute the request.
  28. //
  29. // // Example sending a request using the AddInstanceGroupsRequest method.
  30. // req, resp := client.AddInstanceGroupsRequest(params)
  31. //
  32. // err := req.Send()
  33. // if err == nil { // resp is now filled
  34. // fmt.Println(resp)
  35. // }
  36. //
  37. func (c *EMR) AddInstanceGroupsRequest(input *AddInstanceGroupsInput) (req *request.Request, output *AddInstanceGroupsOutput) {
  38. op := &request.Operation{
  39. Name: opAddInstanceGroups,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &AddInstanceGroupsInput{}
  45. }
  46. req = c.newRequest(op, input, output)
  47. output = &AddInstanceGroupsOutput{}
  48. req.Data = output
  49. return
  50. }
  51. // AddInstanceGroups API operation for Amazon Elastic MapReduce.
  52. //
  53. // AddInstanceGroups adds an instance group to a running cluster.
  54. //
  55. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  56. // with awserr.Error's Code and Message methods to get detailed information about
  57. // the error.
  58. //
  59. // See the AWS API reference guide for Amazon Elastic MapReduce's
  60. // API operation AddInstanceGroups for usage and error information.
  61. //
  62. // Returned Error Codes:
  63. // * InternalServerError
  64. // Indicates that an error occurred while processing the request and that the
  65. // request was not completed.
  66. //
  67. func (c *EMR) AddInstanceGroups(input *AddInstanceGroupsInput) (*AddInstanceGroupsOutput, error) {
  68. req, out := c.AddInstanceGroupsRequest(input)
  69. err := req.Send()
  70. return out, err
  71. }
  72. const opAddJobFlowSteps = "AddJobFlowSteps"
  73. // AddJobFlowStepsRequest generates a "aws/request.Request" representing the
  74. // client's request for the AddJobFlowSteps operation. The "output" return
  75. // value can be used to capture response data after the request's "Send" method
  76. // is called.
  77. //
  78. // See AddJobFlowSteps for usage and error information.
  79. //
  80. // Creating a request object using this method should be used when you want to inject
  81. // custom logic into the request's lifecycle using a custom handler, or if you want to
  82. // access properties on the request object before or after sending the request. If
  83. // you just want the service response, call the AddJobFlowSteps method directly
  84. // instead.
  85. //
  86. // Note: You must call the "Send" method on the returned request object in order
  87. // to execute the request.
  88. //
  89. // // Example sending a request using the AddJobFlowStepsRequest method.
  90. // req, resp := client.AddJobFlowStepsRequest(params)
  91. //
  92. // err := req.Send()
  93. // if err == nil { // resp is now filled
  94. // fmt.Println(resp)
  95. // }
  96. //
  97. func (c *EMR) AddJobFlowStepsRequest(input *AddJobFlowStepsInput) (req *request.Request, output *AddJobFlowStepsOutput) {
  98. op := &request.Operation{
  99. Name: opAddJobFlowSteps,
  100. HTTPMethod: "POST",
  101. HTTPPath: "/",
  102. }
  103. if input == nil {
  104. input = &AddJobFlowStepsInput{}
  105. }
  106. req = c.newRequest(op, input, output)
  107. output = &AddJobFlowStepsOutput{}
  108. req.Data = output
  109. return
  110. }
  111. // AddJobFlowSteps API operation for Amazon Elastic MapReduce.
  112. //
  113. // AddJobFlowSteps adds new steps to a running job flow. A maximum of 256 steps
  114. // are allowed in each job flow.
  115. //
  116. // If your job flow is long-running (such as a Hive data warehouse) or complex,
  117. // you may require more than 256 steps to process your data. You can bypass
  118. // the 256-step limitation in various ways, including using the SSH shell to
  119. // connect to the master node and submitting queries directly to the software
  120. // running on the master node, such as Hive and Hadoop. For more information
  121. // on how to do this, go to Add More than 256 Steps to a Job Flow (http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/AddMoreThan256Steps.html)
  122. // in the Amazon Elastic MapReduce Developer's Guide.
  123. //
  124. // A step specifies the location of a JAR file stored either on the master node
  125. // of the job flow or in Amazon S3. Each step is performed by the main function
  126. // of the main class of the JAR file. The main class can be specified either
  127. // in the manifest of the JAR or by using the MainFunction parameter of the
  128. // step.
  129. //
  130. // Elastic MapReduce executes each step in the order listed. For a step to be
  131. // considered complete, the main function must exit with a zero exit code and
  132. // all Hadoop jobs started while the step was running must have completed and
  133. // run successfully.
  134. //
  135. // You can only add steps to a job flow that is in one of the following states:
  136. // STARTING, BOOTSTRAPPING, RUNNING, or WAITING.
  137. //
  138. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  139. // with awserr.Error's Code and Message methods to get detailed information about
  140. // the error.
  141. //
  142. // See the AWS API reference guide for Amazon Elastic MapReduce's
  143. // API operation AddJobFlowSteps for usage and error information.
  144. //
  145. // Returned Error Codes:
  146. // * InternalServerError
  147. // Indicates that an error occurred while processing the request and that the
  148. // request was not completed.
  149. //
  150. func (c *EMR) AddJobFlowSteps(input *AddJobFlowStepsInput) (*AddJobFlowStepsOutput, error) {
  151. req, out := c.AddJobFlowStepsRequest(input)
  152. err := req.Send()
  153. return out, err
  154. }
  155. const opAddTags = "AddTags"
  156. // AddTagsRequest generates a "aws/request.Request" representing the
  157. // client's request for the AddTags operation. The "output" return
  158. // value can be used to capture response data after the request's "Send" method
  159. // is called.
  160. //
  161. // See AddTags for usage and error information.
  162. //
  163. // Creating a request object using this method should be used when you want to inject
  164. // custom logic into the request's lifecycle using a custom handler, or if you want to
  165. // access properties on the request object before or after sending the request. If
  166. // you just want the service response, call the AddTags method directly
  167. // instead.
  168. //
  169. // Note: You must call the "Send" method on the returned request object in order
  170. // to execute the request.
  171. //
  172. // // Example sending a request using the AddTagsRequest method.
  173. // req, resp := client.AddTagsRequest(params)
  174. //
  175. // err := req.Send()
  176. // if err == nil { // resp is now filled
  177. // fmt.Println(resp)
  178. // }
  179. //
  180. func (c *EMR) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) {
  181. op := &request.Operation{
  182. Name: opAddTags,
  183. HTTPMethod: "POST",
  184. HTTPPath: "/",
  185. }
  186. if input == nil {
  187. input = &AddTagsInput{}
  188. }
  189. req = c.newRequest(op, input, output)
  190. output = &AddTagsOutput{}
  191. req.Data = output
  192. return
  193. }
  194. // AddTags API operation for Amazon Elastic MapReduce.
  195. //
  196. // Adds tags to an Amazon EMR resource. Tags make it easier to associate clusters
  197. // in various ways, such as grouping clusters to track your Amazon EMR resource
  198. // allocation costs. For more information, see Tagging Amazon EMR Resources
  199. // (http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-plan-tags.html).
  200. //
  201. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  202. // with awserr.Error's Code and Message methods to get detailed information about
  203. // the error.
  204. //
  205. // See the AWS API reference guide for Amazon Elastic MapReduce's
  206. // API operation AddTags for usage and error information.
  207. //
  208. // Returned Error Codes:
  209. // * InternalServerException
  210. // This exception occurs when there is an internal failure in the EMR service.
  211. //
  212. // * InvalidRequestException
  213. // This exception occurs when there is something wrong with user input.
  214. //
  215. func (c *EMR) AddTags(input *AddTagsInput) (*AddTagsOutput, error) {
  216. req, out := c.AddTagsRequest(input)
  217. err := req.Send()
  218. return out, err
  219. }
  220. const opCreateSecurityConfiguration = "CreateSecurityConfiguration"
  221. // CreateSecurityConfigurationRequest generates a "aws/request.Request" representing the
  222. // client's request for the CreateSecurityConfiguration operation. The "output" return
  223. // value can be used to capture response data after the request's "Send" method
  224. // is called.
  225. //
  226. // See CreateSecurityConfiguration for usage and error information.
  227. //
  228. // Creating a request object using this method should be used when you want to inject
  229. // custom logic into the request's lifecycle using a custom handler, or if you want to
  230. // access properties on the request object before or after sending the request. If
  231. // you just want the service response, call the CreateSecurityConfiguration method directly
  232. // instead.
  233. //
  234. // Note: You must call the "Send" method on the returned request object in order
  235. // to execute the request.
  236. //
  237. // // Example sending a request using the CreateSecurityConfigurationRequest method.
  238. // req, resp := client.CreateSecurityConfigurationRequest(params)
  239. //
  240. // err := req.Send()
  241. // if err == nil { // resp is now filled
  242. // fmt.Println(resp)
  243. // }
  244. //
  245. func (c *EMR) CreateSecurityConfigurationRequest(input *CreateSecurityConfigurationInput) (req *request.Request, output *CreateSecurityConfigurationOutput) {
  246. op := &request.Operation{
  247. Name: opCreateSecurityConfiguration,
  248. HTTPMethod: "POST",
  249. HTTPPath: "/",
  250. }
  251. if input == nil {
  252. input = &CreateSecurityConfigurationInput{}
  253. }
  254. req = c.newRequest(op, input, output)
  255. output = &CreateSecurityConfigurationOutput{}
  256. req.Data = output
  257. return
  258. }
  259. // CreateSecurityConfiguration API operation for Amazon Elastic MapReduce.
  260. //
  261. // Creates a security configuration using EMR Security Configurations, which
  262. // are stored in the service. Security Configurations enable you to more easily
  263. // create a configuration, reuse it, and apply it whenever a cluster is created.
  264. //
  265. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  266. // with awserr.Error's Code and Message methods to get detailed information about
  267. // the error.
  268. //
  269. // See the AWS API reference guide for Amazon Elastic MapReduce's
  270. // API operation CreateSecurityConfiguration for usage and error information.
  271. //
  272. // Returned Error Codes:
  273. // * InternalServerException
  274. // This exception occurs when there is an internal failure in the EMR service.
  275. //
  276. // * InvalidRequestException
  277. // This exception occurs when there is something wrong with user input.
  278. //
  279. func (c *EMR) CreateSecurityConfiguration(input *CreateSecurityConfigurationInput) (*CreateSecurityConfigurationOutput, error) {
  280. req, out := c.CreateSecurityConfigurationRequest(input)
  281. err := req.Send()
  282. return out, err
  283. }
  284. const opDeleteSecurityConfiguration = "DeleteSecurityConfiguration"
  285. // DeleteSecurityConfigurationRequest generates a "aws/request.Request" representing the
  286. // client's request for the DeleteSecurityConfiguration operation. The "output" return
  287. // value can be used to capture response data after the request's "Send" method
  288. // is called.
  289. //
  290. // See DeleteSecurityConfiguration for usage and error information.
  291. //
  292. // Creating a request object using this method should be used when you want to inject
  293. // custom logic into the request's lifecycle using a custom handler, or if you want to
  294. // access properties on the request object before or after sending the request. If
  295. // you just want the service response, call the DeleteSecurityConfiguration method directly
  296. // instead.
  297. //
  298. // Note: You must call the "Send" method on the returned request object in order
  299. // to execute the request.
  300. //
  301. // // Example sending a request using the DeleteSecurityConfigurationRequest method.
  302. // req, resp := client.DeleteSecurityConfigurationRequest(params)
  303. //
  304. // err := req.Send()
  305. // if err == nil { // resp is now filled
  306. // fmt.Println(resp)
  307. // }
  308. //
  309. func (c *EMR) DeleteSecurityConfigurationRequest(input *DeleteSecurityConfigurationInput) (req *request.Request, output *DeleteSecurityConfigurationOutput) {
  310. op := &request.Operation{
  311. Name: opDeleteSecurityConfiguration,
  312. HTTPMethod: "POST",
  313. HTTPPath: "/",
  314. }
  315. if input == nil {
  316. input = &DeleteSecurityConfigurationInput{}
  317. }
  318. req = c.newRequest(op, input, output)
  319. output = &DeleteSecurityConfigurationOutput{}
  320. req.Data = output
  321. return
  322. }
  323. // DeleteSecurityConfiguration API operation for Amazon Elastic MapReduce.
  324. //
  325. // Deletes a security configuration.
  326. //
  327. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  328. // with awserr.Error's Code and Message methods to get detailed information about
  329. // the error.
  330. //
  331. // See the AWS API reference guide for Amazon Elastic MapReduce's
  332. // API operation DeleteSecurityConfiguration for usage and error information.
  333. //
  334. // Returned Error Codes:
  335. // * InternalServerException
  336. // This exception occurs when there is an internal failure in the EMR service.
  337. //
  338. // * InvalidRequestException
  339. // This exception occurs when there is something wrong with user input.
  340. //
  341. func (c *EMR) DeleteSecurityConfiguration(input *DeleteSecurityConfigurationInput) (*DeleteSecurityConfigurationOutput, error) {
  342. req, out := c.DeleteSecurityConfigurationRequest(input)
  343. err := req.Send()
  344. return out, err
  345. }
  346. const opDescribeCluster = "DescribeCluster"
  347. // DescribeClusterRequest generates a "aws/request.Request" representing the
  348. // client's request for the DescribeCluster operation. The "output" return
  349. // value can be used to capture response data after the request's "Send" method
  350. // is called.
  351. //
  352. // See DescribeCluster for usage and error information.
  353. //
  354. // Creating a request object using this method should be used when you want to inject
  355. // custom logic into the request's lifecycle using a custom handler, or if you want to
  356. // access properties on the request object before or after sending the request. If
  357. // you just want the service response, call the DescribeCluster method directly
  358. // instead.
  359. //
  360. // Note: You must call the "Send" method on the returned request object in order
  361. // to execute the request.
  362. //
  363. // // Example sending a request using the DescribeClusterRequest method.
  364. // req, resp := client.DescribeClusterRequest(params)
  365. //
  366. // err := req.Send()
  367. // if err == nil { // resp is now filled
  368. // fmt.Println(resp)
  369. // }
  370. //
  371. func (c *EMR) DescribeClusterRequest(input *DescribeClusterInput) (req *request.Request, output *DescribeClusterOutput) {
  372. op := &request.Operation{
  373. Name: opDescribeCluster,
  374. HTTPMethod: "POST",
  375. HTTPPath: "/",
  376. }
  377. if input == nil {
  378. input = &DescribeClusterInput{}
  379. }
  380. req = c.newRequest(op, input, output)
  381. output = &DescribeClusterOutput{}
  382. req.Data = output
  383. return
  384. }
  385. // DescribeCluster API operation for Amazon Elastic MapReduce.
  386. //
  387. // Provides cluster-level details including status, hardware and software configuration,
  388. // VPC settings, and so on. For information about the cluster steps, see ListSteps.
  389. //
  390. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  391. // with awserr.Error's Code and Message methods to get detailed information about
  392. // the error.
  393. //
  394. // See the AWS API reference guide for Amazon Elastic MapReduce's
  395. // API operation DescribeCluster for usage and error information.
  396. //
  397. // Returned Error Codes:
  398. // * InternalServerException
  399. // This exception occurs when there is an internal failure in the EMR service.
  400. //
  401. // * InvalidRequestException
  402. // This exception occurs when there is something wrong with user input.
  403. //
  404. func (c *EMR) DescribeCluster(input *DescribeClusterInput) (*DescribeClusterOutput, error) {
  405. req, out := c.DescribeClusterRequest(input)
  406. err := req.Send()
  407. return out, err
  408. }
  409. const opDescribeJobFlows = "DescribeJobFlows"
  410. // DescribeJobFlowsRequest generates a "aws/request.Request" representing the
  411. // client's request for the DescribeJobFlows operation. The "output" return
  412. // value can be used to capture response data after the request's "Send" method
  413. // is called.
  414. //
  415. // See DescribeJobFlows for usage and error information.
  416. //
  417. // Creating a request object using this method should be used when you want to inject
  418. // custom logic into the request's lifecycle using a custom handler, or if you want to
  419. // access properties on the request object before or after sending the request. If
  420. // you just want the service response, call the DescribeJobFlows method directly
  421. // instead.
  422. //
  423. // Note: You must call the "Send" method on the returned request object in order
  424. // to execute the request.
  425. //
  426. // // Example sending a request using the DescribeJobFlowsRequest method.
  427. // req, resp := client.DescribeJobFlowsRequest(params)
  428. //
  429. // err := req.Send()
  430. // if err == nil { // resp is now filled
  431. // fmt.Println(resp)
  432. // }
  433. //
  434. func (c *EMR) DescribeJobFlowsRequest(input *DescribeJobFlowsInput) (req *request.Request, output *DescribeJobFlowsOutput) {
  435. if c.Client.Config.Logger != nil {
  436. c.Client.Config.Logger.Log("This operation, DescribeJobFlows, has been deprecated")
  437. }
  438. op := &request.Operation{
  439. Name: opDescribeJobFlows,
  440. HTTPMethod: "POST",
  441. HTTPPath: "/",
  442. }
  443. if input == nil {
  444. input = &DescribeJobFlowsInput{}
  445. }
  446. req = c.newRequest(op, input, output)
  447. output = &DescribeJobFlowsOutput{}
  448. req.Data = output
  449. return
  450. }
  451. // DescribeJobFlows API operation for Amazon Elastic MapReduce.
  452. //
  453. // This API is deprecated and will eventually be removed. We recommend you use
  454. // ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions
  455. // instead.
  456. //
  457. // DescribeJobFlows returns a list of job flows that match all of the supplied
  458. // parameters. The parameters can include a list of job flow IDs, job flow states,
  459. // and restrictions on job flow creation date and time.
  460. //
  461. // Regardless of supplied parameters, only job flows created within the last
  462. // two months are returned.
  463. //
  464. // If no parameters are supplied, then job flows matching either of the following
  465. // criteria are returned:
  466. //
  467. // * Job flows created and completed in the last two weeks
  468. //
  469. // * Job flows created within the last two months that are in one of the
  470. // following states: RUNNING, WAITING, SHUTTING_DOWN, STARTING
  471. //
  472. // Amazon Elastic MapReduce can return a maximum of 512 job flow descriptions.
  473. //
  474. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  475. // with awserr.Error's Code and Message methods to get detailed information about
  476. // the error.
  477. //
  478. // See the AWS API reference guide for Amazon Elastic MapReduce's
  479. // API operation DescribeJobFlows for usage and error information.
  480. //
  481. // Returned Error Codes:
  482. // * InternalServerError
  483. // Indicates that an error occurred while processing the request and that the
  484. // request was not completed.
  485. //
  486. func (c *EMR) DescribeJobFlows(input *DescribeJobFlowsInput) (*DescribeJobFlowsOutput, error) {
  487. req, out := c.DescribeJobFlowsRequest(input)
  488. err := req.Send()
  489. return out, err
  490. }
  491. const opDescribeSecurityConfiguration = "DescribeSecurityConfiguration"
  492. // DescribeSecurityConfigurationRequest generates a "aws/request.Request" representing the
  493. // client's request for the DescribeSecurityConfiguration operation. The "output" return
  494. // value can be used to capture response data after the request's "Send" method
  495. // is called.
  496. //
  497. // See DescribeSecurityConfiguration for usage and error information.
  498. //
  499. // Creating a request object using this method should be used when you want to inject
  500. // custom logic into the request's lifecycle using a custom handler, or if you want to
  501. // access properties on the request object before or after sending the request. If
  502. // you just want the service response, call the DescribeSecurityConfiguration method directly
  503. // instead.
  504. //
  505. // Note: You must call the "Send" method on the returned request object in order
  506. // to execute the request.
  507. //
  508. // // Example sending a request using the DescribeSecurityConfigurationRequest method.
  509. // req, resp := client.DescribeSecurityConfigurationRequest(params)
  510. //
  511. // err := req.Send()
  512. // if err == nil { // resp is now filled
  513. // fmt.Println(resp)
  514. // }
  515. //
  516. func (c *EMR) DescribeSecurityConfigurationRequest(input *DescribeSecurityConfigurationInput) (req *request.Request, output *DescribeSecurityConfigurationOutput) {
  517. op := &request.Operation{
  518. Name: opDescribeSecurityConfiguration,
  519. HTTPMethod: "POST",
  520. HTTPPath: "/",
  521. }
  522. if input == nil {
  523. input = &DescribeSecurityConfigurationInput{}
  524. }
  525. req = c.newRequest(op, input, output)
  526. output = &DescribeSecurityConfigurationOutput{}
  527. req.Data = output
  528. return
  529. }
  530. // DescribeSecurityConfiguration API operation for Amazon Elastic MapReduce.
  531. //
  532. // Provides the details of a security configuration by returning the configuration
  533. // JSON.
  534. //
  535. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  536. // with awserr.Error's Code and Message methods to get detailed information about
  537. // the error.
  538. //
  539. // See the AWS API reference guide for Amazon Elastic MapReduce's
  540. // API operation DescribeSecurityConfiguration for usage and error information.
  541. //
  542. // Returned Error Codes:
  543. // * InternalServerException
  544. // This exception occurs when there is an internal failure in the EMR service.
  545. //
  546. // * InvalidRequestException
  547. // This exception occurs when there is something wrong with user input.
  548. //
  549. func (c *EMR) DescribeSecurityConfiguration(input *DescribeSecurityConfigurationInput) (*DescribeSecurityConfigurationOutput, error) {
  550. req, out := c.DescribeSecurityConfigurationRequest(input)
  551. err := req.Send()
  552. return out, err
  553. }
  554. const opDescribeStep = "DescribeStep"
  555. // DescribeStepRequest generates a "aws/request.Request" representing the
  556. // client's request for the DescribeStep operation. The "output" return
  557. // value can be used to capture response data after the request's "Send" method
  558. // is called.
  559. //
  560. // See DescribeStep for usage and error information.
  561. //
  562. // Creating a request object using this method should be used when you want to inject
  563. // custom logic into the request's lifecycle using a custom handler, or if you want to
  564. // access properties on the request object before or after sending the request. If
  565. // you just want the service response, call the DescribeStep method directly
  566. // instead.
  567. //
  568. // Note: You must call the "Send" method on the returned request object in order
  569. // to execute the request.
  570. //
  571. // // Example sending a request using the DescribeStepRequest method.
  572. // req, resp := client.DescribeStepRequest(params)
  573. //
  574. // err := req.Send()
  575. // if err == nil { // resp is now filled
  576. // fmt.Println(resp)
  577. // }
  578. //
  579. func (c *EMR) DescribeStepRequest(input *DescribeStepInput) (req *request.Request, output *DescribeStepOutput) {
  580. op := &request.Operation{
  581. Name: opDescribeStep,
  582. HTTPMethod: "POST",
  583. HTTPPath: "/",
  584. }
  585. if input == nil {
  586. input = &DescribeStepInput{}
  587. }
  588. req = c.newRequest(op, input, output)
  589. output = &DescribeStepOutput{}
  590. req.Data = output
  591. return
  592. }
  593. // DescribeStep API operation for Amazon Elastic MapReduce.
  594. //
  595. // Provides more detail about the cluster step.
  596. //
  597. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  598. // with awserr.Error's Code and Message methods to get detailed information about
  599. // the error.
  600. //
  601. // See the AWS API reference guide for Amazon Elastic MapReduce's
  602. // API operation DescribeStep for usage and error information.
  603. //
  604. // Returned Error Codes:
  605. // * InternalServerException
  606. // This exception occurs when there is an internal failure in the EMR service.
  607. //
  608. // * InvalidRequestException
  609. // This exception occurs when there is something wrong with user input.
  610. //
  611. func (c *EMR) DescribeStep(input *DescribeStepInput) (*DescribeStepOutput, error) {
  612. req, out := c.DescribeStepRequest(input)
  613. err := req.Send()
  614. return out, err
  615. }
  616. const opListBootstrapActions = "ListBootstrapActions"
  617. // ListBootstrapActionsRequest generates a "aws/request.Request" representing the
  618. // client's request for the ListBootstrapActions operation. The "output" return
  619. // value can be used to capture response data after the request's "Send" method
  620. // is called.
  621. //
  622. // See ListBootstrapActions for usage and error information.
  623. //
  624. // Creating a request object using this method should be used when you want to inject
  625. // custom logic into the request's lifecycle using a custom handler, or if you want to
  626. // access properties on the request object before or after sending the request. If
  627. // you just want the service response, call the ListBootstrapActions method directly
  628. // instead.
  629. //
  630. // Note: You must call the "Send" method on the returned request object in order
  631. // to execute the request.
  632. //
  633. // // Example sending a request using the ListBootstrapActionsRequest method.
  634. // req, resp := client.ListBootstrapActionsRequest(params)
  635. //
  636. // err := req.Send()
  637. // if err == nil { // resp is now filled
  638. // fmt.Println(resp)
  639. // }
  640. //
  641. func (c *EMR) ListBootstrapActionsRequest(input *ListBootstrapActionsInput) (req *request.Request, output *ListBootstrapActionsOutput) {
  642. op := &request.Operation{
  643. Name: opListBootstrapActions,
  644. HTTPMethod: "POST",
  645. HTTPPath: "/",
  646. Paginator: &request.Paginator{
  647. InputTokens: []string{"Marker"},
  648. OutputTokens: []string{"Marker"},
  649. LimitToken: "",
  650. TruncationToken: "",
  651. },
  652. }
  653. if input == nil {
  654. input = &ListBootstrapActionsInput{}
  655. }
  656. req = c.newRequest(op, input, output)
  657. output = &ListBootstrapActionsOutput{}
  658. req.Data = output
  659. return
  660. }
  661. // ListBootstrapActions API operation for Amazon Elastic MapReduce.
  662. //
  663. // Provides information about the bootstrap actions associated with a cluster.
  664. //
  665. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  666. // with awserr.Error's Code and Message methods to get detailed information about
  667. // the error.
  668. //
  669. // See the AWS API reference guide for Amazon Elastic MapReduce's
  670. // API operation ListBootstrapActions for usage and error information.
  671. //
  672. // Returned Error Codes:
  673. // * InternalServerException
  674. // This exception occurs when there is an internal failure in the EMR service.
  675. //
  676. // * InvalidRequestException
  677. // This exception occurs when there is something wrong with user input.
  678. //
  679. func (c *EMR) ListBootstrapActions(input *ListBootstrapActionsInput) (*ListBootstrapActionsOutput, error) {
  680. req, out := c.ListBootstrapActionsRequest(input)
  681. err := req.Send()
  682. return out, err
  683. }
  684. // ListBootstrapActionsPages iterates over the pages of a ListBootstrapActions operation,
  685. // calling the "fn" function with the response data for each page. To stop
  686. // iterating, return false from the fn function.
  687. //
  688. // See ListBootstrapActions method for more information on how to use this operation.
  689. //
  690. // Note: This operation can generate multiple requests to a service.
  691. //
  692. // // Example iterating over at most 3 pages of a ListBootstrapActions operation.
  693. // pageNum := 0
  694. // err := client.ListBootstrapActionsPages(params,
  695. // func(page *ListBootstrapActionsOutput, lastPage bool) bool {
  696. // pageNum++
  697. // fmt.Println(page)
  698. // return pageNum <= 3
  699. // })
  700. //
  701. func (c *EMR) ListBootstrapActionsPages(input *ListBootstrapActionsInput, fn func(p *ListBootstrapActionsOutput, lastPage bool) (shouldContinue bool)) error {
  702. page, _ := c.ListBootstrapActionsRequest(input)
  703. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  704. return page.EachPage(func(p interface{}, lastPage bool) bool {
  705. return fn(p.(*ListBootstrapActionsOutput), lastPage)
  706. })
  707. }
  708. const opListClusters = "ListClusters"
  709. // ListClustersRequest generates a "aws/request.Request" representing the
  710. // client's request for the ListClusters operation. The "output" return
  711. // value can be used to capture response data after the request's "Send" method
  712. // is called.
  713. //
  714. // See ListClusters for usage and error information.
  715. //
  716. // Creating a request object using this method should be used when you want to inject
  717. // custom logic into the request's lifecycle using a custom handler, or if you want to
  718. // access properties on the request object before or after sending the request. If
  719. // you just want the service response, call the ListClusters method directly
  720. // instead.
  721. //
  722. // Note: You must call the "Send" method on the returned request object in order
  723. // to execute the request.
  724. //
  725. // // Example sending a request using the ListClustersRequest method.
  726. // req, resp := client.ListClustersRequest(params)
  727. //
  728. // err := req.Send()
  729. // if err == nil { // resp is now filled
  730. // fmt.Println(resp)
  731. // }
  732. //
  733. func (c *EMR) ListClustersRequest(input *ListClustersInput) (req *request.Request, output *ListClustersOutput) {
  734. op := &request.Operation{
  735. Name: opListClusters,
  736. HTTPMethod: "POST",
  737. HTTPPath: "/",
  738. Paginator: &request.Paginator{
  739. InputTokens: []string{"Marker"},
  740. OutputTokens: []string{"Marker"},
  741. LimitToken: "",
  742. TruncationToken: "",
  743. },
  744. }
  745. if input == nil {
  746. input = &ListClustersInput{}
  747. }
  748. req = c.newRequest(op, input, output)
  749. output = &ListClustersOutput{}
  750. req.Data = output
  751. return
  752. }
  753. // ListClusters API operation for Amazon Elastic MapReduce.
  754. //
  755. // Provides the status of all clusters visible to this AWS account. Allows you
  756. // to filter the list of clusters based on certain criteria; for example, filtering
  757. // by cluster creation date and time or by status. This call returns a maximum
  758. // of 50 clusters per call, but returns a marker to track the paging of the
  759. // cluster list across multiple ListClusters calls.
  760. //
  761. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  762. // with awserr.Error's Code and Message methods to get detailed information about
  763. // the error.
  764. //
  765. // See the AWS API reference guide for Amazon Elastic MapReduce's
  766. // API operation ListClusters for usage and error information.
  767. //
  768. // Returned Error Codes:
  769. // * InternalServerException
  770. // This exception occurs when there is an internal failure in the EMR service.
  771. //
  772. // * InvalidRequestException
  773. // This exception occurs when there is something wrong with user input.
  774. //
  775. func (c *EMR) ListClusters(input *ListClustersInput) (*ListClustersOutput, error) {
  776. req, out := c.ListClustersRequest(input)
  777. err := req.Send()
  778. return out, err
  779. }
  780. // ListClustersPages iterates over the pages of a ListClusters operation,
  781. // calling the "fn" function with the response data for each page. To stop
  782. // iterating, return false from the fn function.
  783. //
  784. // See ListClusters method for more information on how to use this operation.
  785. //
  786. // Note: This operation can generate multiple requests to a service.
  787. //
  788. // // Example iterating over at most 3 pages of a ListClusters operation.
  789. // pageNum := 0
  790. // err := client.ListClustersPages(params,
  791. // func(page *ListClustersOutput, lastPage bool) bool {
  792. // pageNum++
  793. // fmt.Println(page)
  794. // return pageNum <= 3
  795. // })
  796. //
  797. func (c *EMR) ListClustersPages(input *ListClustersInput, fn func(p *ListClustersOutput, lastPage bool) (shouldContinue bool)) error {
  798. page, _ := c.ListClustersRequest(input)
  799. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  800. return page.EachPage(func(p interface{}, lastPage bool) bool {
  801. return fn(p.(*ListClustersOutput), lastPage)
  802. })
  803. }
  804. const opListInstanceGroups = "ListInstanceGroups"
  805. // ListInstanceGroupsRequest generates a "aws/request.Request" representing the
  806. // client's request for the ListInstanceGroups operation. The "output" return
  807. // value can be used to capture response data after the request's "Send" method
  808. // is called.
  809. //
  810. // See ListInstanceGroups for usage and error information.
  811. //
  812. // Creating a request object using this method should be used when you want to inject
  813. // custom logic into the request's lifecycle using a custom handler, or if you want to
  814. // access properties on the request object before or after sending the request. If
  815. // you just want the service response, call the ListInstanceGroups method directly
  816. // instead.
  817. //
  818. // Note: You must call the "Send" method on the returned request object in order
  819. // to execute the request.
  820. //
  821. // // Example sending a request using the ListInstanceGroupsRequest method.
  822. // req, resp := client.ListInstanceGroupsRequest(params)
  823. //
  824. // err := req.Send()
  825. // if err == nil { // resp is now filled
  826. // fmt.Println(resp)
  827. // }
  828. //
  829. func (c *EMR) ListInstanceGroupsRequest(input *ListInstanceGroupsInput) (req *request.Request, output *ListInstanceGroupsOutput) {
  830. op := &request.Operation{
  831. Name: opListInstanceGroups,
  832. HTTPMethod: "POST",
  833. HTTPPath: "/",
  834. Paginator: &request.Paginator{
  835. InputTokens: []string{"Marker"},
  836. OutputTokens: []string{"Marker"},
  837. LimitToken: "",
  838. TruncationToken: "",
  839. },
  840. }
  841. if input == nil {
  842. input = &ListInstanceGroupsInput{}
  843. }
  844. req = c.newRequest(op, input, output)
  845. output = &ListInstanceGroupsOutput{}
  846. req.Data = output
  847. return
  848. }
  849. // ListInstanceGroups API operation for Amazon Elastic MapReduce.
  850. //
  851. // Provides all available details about the instance groups in a cluster.
  852. //
  853. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  854. // with awserr.Error's Code and Message methods to get detailed information about
  855. // the error.
  856. //
  857. // See the AWS API reference guide for Amazon Elastic MapReduce's
  858. // API operation ListInstanceGroups for usage and error information.
  859. //
  860. // Returned Error Codes:
  861. // * InternalServerException
  862. // This exception occurs when there is an internal failure in the EMR service.
  863. //
  864. // * InvalidRequestException
  865. // This exception occurs when there is something wrong with user input.
  866. //
  867. func (c *EMR) ListInstanceGroups(input *ListInstanceGroupsInput) (*ListInstanceGroupsOutput, error) {
  868. req, out := c.ListInstanceGroupsRequest(input)
  869. err := req.Send()
  870. return out, err
  871. }
  872. // ListInstanceGroupsPages iterates over the pages of a ListInstanceGroups operation,
  873. // calling the "fn" function with the response data for each page. To stop
  874. // iterating, return false from the fn function.
  875. //
  876. // See ListInstanceGroups method for more information on how to use this operation.
  877. //
  878. // Note: This operation can generate multiple requests to a service.
  879. //
  880. // // Example iterating over at most 3 pages of a ListInstanceGroups operation.
  881. // pageNum := 0
  882. // err := client.ListInstanceGroupsPages(params,
  883. // func(page *ListInstanceGroupsOutput, lastPage bool) bool {
  884. // pageNum++
  885. // fmt.Println(page)
  886. // return pageNum <= 3
  887. // })
  888. //
  889. func (c *EMR) ListInstanceGroupsPages(input *ListInstanceGroupsInput, fn func(p *ListInstanceGroupsOutput, lastPage bool) (shouldContinue bool)) error {
  890. page, _ := c.ListInstanceGroupsRequest(input)
  891. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  892. return page.EachPage(func(p interface{}, lastPage bool) bool {
  893. return fn(p.(*ListInstanceGroupsOutput), lastPage)
  894. })
  895. }
  896. const opListInstances = "ListInstances"
  897. // ListInstancesRequest generates a "aws/request.Request" representing the
  898. // client's request for the ListInstances operation. The "output" return
  899. // value can be used to capture response data after the request's "Send" method
  900. // is called.
  901. //
  902. // See ListInstances for usage and error information.
  903. //
  904. // Creating a request object using this method should be used when you want to inject
  905. // custom logic into the request's lifecycle using a custom handler, or if you want to
  906. // access properties on the request object before or after sending the request. If
  907. // you just want the service response, call the ListInstances method directly
  908. // instead.
  909. //
  910. // Note: You must call the "Send" method on the returned request object in order
  911. // to execute the request.
  912. //
  913. // // Example sending a request using the ListInstancesRequest method.
  914. // req, resp := client.ListInstancesRequest(params)
  915. //
  916. // err := req.Send()
  917. // if err == nil { // resp is now filled
  918. // fmt.Println(resp)
  919. // }
  920. //
  921. func (c *EMR) ListInstancesRequest(input *ListInstancesInput) (req *request.Request, output *ListInstancesOutput) {
  922. op := &request.Operation{
  923. Name: opListInstances,
  924. HTTPMethod: "POST",
  925. HTTPPath: "/",
  926. Paginator: &request.Paginator{
  927. InputTokens: []string{"Marker"},
  928. OutputTokens: []string{"Marker"},
  929. LimitToken: "",
  930. TruncationToken: "",
  931. },
  932. }
  933. if input == nil {
  934. input = &ListInstancesInput{}
  935. }
  936. req = c.newRequest(op, input, output)
  937. output = &ListInstancesOutput{}
  938. req.Data = output
  939. return
  940. }
  941. // ListInstances API operation for Amazon Elastic MapReduce.
  942. //
  943. // Provides information about the cluster instances that Amazon EMR provisions
  944. // on behalf of a user when it creates the cluster. For example, this operation
  945. // indicates when the EC2 instances reach the Ready state, when instances become
  946. // available to Amazon EMR to use for jobs, and the IP addresses for cluster
  947. // instances, etc.
  948. //
  949. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  950. // with awserr.Error's Code and Message methods to get detailed information about
  951. // the error.
  952. //
  953. // See the AWS API reference guide for Amazon Elastic MapReduce's
  954. // API operation ListInstances for usage and error information.
  955. //
  956. // Returned Error Codes:
  957. // * InternalServerException
  958. // This exception occurs when there is an internal failure in the EMR service.
  959. //
  960. // * InvalidRequestException
  961. // This exception occurs when there is something wrong with user input.
  962. //
  963. func (c *EMR) ListInstances(input *ListInstancesInput) (*ListInstancesOutput, error) {
  964. req, out := c.ListInstancesRequest(input)
  965. err := req.Send()
  966. return out, err
  967. }
  968. // ListInstancesPages iterates over the pages of a ListInstances operation,
  969. // calling the "fn" function with the response data for each page. To stop
  970. // iterating, return false from the fn function.
  971. //
  972. // See ListInstances method for more information on how to use this operation.
  973. //
  974. // Note: This operation can generate multiple requests to a service.
  975. //
  976. // // Example iterating over at most 3 pages of a ListInstances operation.
  977. // pageNum := 0
  978. // err := client.ListInstancesPages(params,
  979. // func(page *ListInstancesOutput, lastPage bool) bool {
  980. // pageNum++
  981. // fmt.Println(page)
  982. // return pageNum <= 3
  983. // })
  984. //
  985. func (c *EMR) ListInstancesPages(input *ListInstancesInput, fn func(p *ListInstancesOutput, lastPage bool) (shouldContinue bool)) error {
  986. page, _ := c.ListInstancesRequest(input)
  987. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  988. return page.EachPage(func(p interface{}, lastPage bool) bool {
  989. return fn(p.(*ListInstancesOutput), lastPage)
  990. })
  991. }
  992. const opListSecurityConfigurations = "ListSecurityConfigurations"
  993. // ListSecurityConfigurationsRequest generates a "aws/request.Request" representing the
  994. // client's request for the ListSecurityConfigurations operation. The "output" return
  995. // value can be used to capture response data after the request's "Send" method
  996. // is called.
  997. //
  998. // See ListSecurityConfigurations for usage and error information.
  999. //
  1000. // Creating a request object using this method should be used when you want to inject
  1001. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1002. // access properties on the request object before or after sending the request. If
  1003. // you just want the service response, call the ListSecurityConfigurations method directly
  1004. // instead.
  1005. //
  1006. // Note: You must call the "Send" method on the returned request object in order
  1007. // to execute the request.
  1008. //
  1009. // // Example sending a request using the ListSecurityConfigurationsRequest method.
  1010. // req, resp := client.ListSecurityConfigurationsRequest(params)
  1011. //
  1012. // err := req.Send()
  1013. // if err == nil { // resp is now filled
  1014. // fmt.Println(resp)
  1015. // }
  1016. //
  1017. func (c *EMR) ListSecurityConfigurationsRequest(input *ListSecurityConfigurationsInput) (req *request.Request, output *ListSecurityConfigurationsOutput) {
  1018. op := &request.Operation{
  1019. Name: opListSecurityConfigurations,
  1020. HTTPMethod: "POST",
  1021. HTTPPath: "/",
  1022. }
  1023. if input == nil {
  1024. input = &ListSecurityConfigurationsInput{}
  1025. }
  1026. req = c.newRequest(op, input, output)
  1027. output = &ListSecurityConfigurationsOutput{}
  1028. req.Data = output
  1029. return
  1030. }
  1031. // ListSecurityConfigurations API operation for Amazon Elastic MapReduce.
  1032. //
  1033. // Lists all the security configurations visible to this account, providing
  1034. // their creation dates and times, and their names. This call returns a maximum
  1035. // of 50 clusters per call, but returns a marker to track the paging of the
  1036. // cluster list across multiple ListSecurityConfigurations calls.
  1037. //
  1038. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1039. // with awserr.Error's Code and Message methods to get detailed information about
  1040. // the error.
  1041. //
  1042. // See the AWS API reference guide for Amazon Elastic MapReduce's
  1043. // API operation ListSecurityConfigurations for usage and error information.
  1044. //
  1045. // Returned Error Codes:
  1046. // * InternalServerException
  1047. // This exception occurs when there is an internal failure in the EMR service.
  1048. //
  1049. // * InvalidRequestException
  1050. // This exception occurs when there is something wrong with user input.
  1051. //
  1052. func (c *EMR) ListSecurityConfigurations(input *ListSecurityConfigurationsInput) (*ListSecurityConfigurationsOutput, error) {
  1053. req, out := c.ListSecurityConfigurationsRequest(input)
  1054. err := req.Send()
  1055. return out, err
  1056. }
  1057. const opListSteps = "ListSteps"
  1058. // ListStepsRequest generates a "aws/request.Request" representing the
  1059. // client's request for the ListSteps operation. The "output" return
  1060. // value can be used to capture response data after the request's "Send" method
  1061. // is called.
  1062. //
  1063. // See ListSteps for usage and error information.
  1064. //
  1065. // Creating a request object using this method should be used when you want to inject
  1066. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1067. // access properties on the request object before or after sending the request. If
  1068. // you just want the service response, call the ListSteps method directly
  1069. // instead.
  1070. //
  1071. // Note: You must call the "Send" method on the returned request object in order
  1072. // to execute the request.
  1073. //
  1074. // // Example sending a request using the ListStepsRequest method.
  1075. // req, resp := client.ListStepsRequest(params)
  1076. //
  1077. // err := req.Send()
  1078. // if err == nil { // resp is now filled
  1079. // fmt.Println(resp)
  1080. // }
  1081. //
  1082. func (c *EMR) ListStepsRequest(input *ListStepsInput) (req *request.Request, output *ListStepsOutput) {
  1083. op := &request.Operation{
  1084. Name: opListSteps,
  1085. HTTPMethod: "POST",
  1086. HTTPPath: "/",
  1087. Paginator: &request.Paginator{
  1088. InputTokens: []string{"Marker"},
  1089. OutputTokens: []string{"Marker"},
  1090. LimitToken: "",
  1091. TruncationToken: "",
  1092. },
  1093. }
  1094. if input == nil {
  1095. input = &ListStepsInput{}
  1096. }
  1097. req = c.newRequest(op, input, output)
  1098. output = &ListStepsOutput{}
  1099. req.Data = output
  1100. return
  1101. }
  1102. // ListSteps API operation for Amazon Elastic MapReduce.
  1103. //
  1104. // Provides a list of steps for the cluster.
  1105. //
  1106. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1107. // with awserr.Error's Code and Message methods to get detailed information about
  1108. // the error.
  1109. //
  1110. // See the AWS API reference guide for Amazon Elastic MapReduce's
  1111. // API operation ListSteps for usage and error information.
  1112. //
  1113. // Returned Error Codes:
  1114. // * InternalServerException
  1115. // This exception occurs when there is an internal failure in the EMR service.
  1116. //
  1117. // * InvalidRequestException
  1118. // This exception occurs when there is something wrong with user input.
  1119. //
  1120. func (c *EMR) ListSteps(input *ListStepsInput) (*ListStepsOutput, error) {
  1121. req, out := c.ListStepsRequest(input)
  1122. err := req.Send()
  1123. return out, err
  1124. }
  1125. // ListStepsPages iterates over the pages of a ListSteps operation,
  1126. // calling the "fn" function with the response data for each page. To stop
  1127. // iterating, return false from the fn function.
  1128. //
  1129. // See ListSteps method for more information on how to use this operation.
  1130. //
  1131. // Note: This operation can generate multiple requests to a service.
  1132. //
  1133. // // Example iterating over at most 3 pages of a ListSteps operation.
  1134. // pageNum := 0
  1135. // err := client.ListStepsPages(params,
  1136. // func(page *ListStepsOutput, lastPage bool) bool {
  1137. // pageNum++
  1138. // fmt.Println(page)
  1139. // return pageNum <= 3
  1140. // })
  1141. //
  1142. func (c *EMR) ListStepsPages(input *ListStepsInput, fn func(p *ListStepsOutput, lastPage bool) (shouldContinue bool)) error {
  1143. page, _ := c.ListStepsRequest(input)
  1144. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1145. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1146. return fn(p.(*ListStepsOutput), lastPage)
  1147. })
  1148. }
  1149. const opModifyInstanceGroups = "ModifyInstanceGroups"
  1150. // ModifyInstanceGroupsRequest generates a "aws/request.Request" representing the
  1151. // client's request for the ModifyInstanceGroups operation. The "output" return
  1152. // value can be used to capture response data after the request's "Send" method
  1153. // is called.
  1154. //
  1155. // See ModifyInstanceGroups for usage and error information.
  1156. //
  1157. // Creating a request object using this method should be used when you want to inject
  1158. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1159. // access properties on the request object before or after sending the request. If
  1160. // you just want the service response, call the ModifyInstanceGroups method directly
  1161. // instead.
  1162. //
  1163. // Note: You must call the "Send" method on the returned request object in order
  1164. // to execute the request.
  1165. //
  1166. // // Example sending a request using the ModifyInstanceGroupsRequest method.
  1167. // req, resp := client.ModifyInstanceGroupsRequest(params)
  1168. //
  1169. // err := req.Send()
  1170. // if err == nil { // resp is now filled
  1171. // fmt.Println(resp)
  1172. // }
  1173. //
  1174. func (c *EMR) ModifyInstanceGroupsRequest(input *ModifyInstanceGroupsInput) (req *request.Request, output *ModifyInstanceGroupsOutput) {
  1175. op := &request.Operation{
  1176. Name: opModifyInstanceGroups,
  1177. HTTPMethod: "POST",
  1178. HTTPPath: "/",
  1179. }
  1180. if input == nil {
  1181. input = &ModifyInstanceGroupsInput{}
  1182. }
  1183. req = c.newRequest(op, input, output)
  1184. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1185. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1186. output = &ModifyInstanceGroupsOutput{}
  1187. req.Data = output
  1188. return
  1189. }
  1190. // ModifyInstanceGroups API operation for Amazon Elastic MapReduce.
  1191. //
  1192. // ModifyInstanceGroups modifies the number of nodes and configuration settings
  1193. // of an instance group. The input parameters include the new target instance
  1194. // count for the group and the instance group ID. The call will either succeed
  1195. // or fail atomically.
  1196. //
  1197. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1198. // with awserr.Error's Code and Message methods to get detailed information about
  1199. // the error.
  1200. //
  1201. // See the AWS API reference guide for Amazon Elastic MapReduce's
  1202. // API operation ModifyInstanceGroups for usage and error information.
  1203. //
  1204. // Returned Error Codes:
  1205. // * InternalServerError
  1206. // Indicates that an error occurred while processing the request and that the
  1207. // request was not completed.
  1208. //
  1209. func (c *EMR) ModifyInstanceGroups(input *ModifyInstanceGroupsInput) (*ModifyInstanceGroupsOutput, error) {
  1210. req, out := c.ModifyInstanceGroupsRequest(input)
  1211. err := req.Send()
  1212. return out, err
  1213. }
  1214. const opRemoveTags = "RemoveTags"
  1215. // RemoveTagsRequest generates a "aws/request.Request" representing the
  1216. // client's request for the RemoveTags operation. The "output" return
  1217. // value can be used to capture response data after the request's "Send" method
  1218. // is called.
  1219. //
  1220. // See RemoveTags for usage and error information.
  1221. //
  1222. // Creating a request object using this method should be used when you want to inject
  1223. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1224. // access properties on the request object before or after sending the request. If
  1225. // you just want the service response, call the RemoveTags method directly
  1226. // instead.
  1227. //
  1228. // Note: You must call the "Send" method on the returned request object in order
  1229. // to execute the request.
  1230. //
  1231. // // Example sending a request using the RemoveTagsRequest method.
  1232. // req, resp := client.RemoveTagsRequest(params)
  1233. //
  1234. // err := req.Send()
  1235. // if err == nil { // resp is now filled
  1236. // fmt.Println(resp)
  1237. // }
  1238. //
  1239. func (c *EMR) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) {
  1240. op := &request.Operation{
  1241. Name: opRemoveTags,
  1242. HTTPMethod: "POST",
  1243. HTTPPath: "/",
  1244. }
  1245. if input == nil {
  1246. input = &RemoveTagsInput{}
  1247. }
  1248. req = c.newRequest(op, input, output)
  1249. output = &RemoveTagsOutput{}
  1250. req.Data = output
  1251. return
  1252. }
  1253. // RemoveTags API operation for Amazon Elastic MapReduce.
  1254. //
  1255. // Removes tags from an Amazon EMR resource. Tags make it easier to associate
  1256. // clusters in various ways, such as grouping clusters to track your Amazon
  1257. // EMR resource allocation costs. For more information, see Tagging Amazon EMR
  1258. // Resources (http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-plan-tags.html).
  1259. //
  1260. // The following example removes the stack tag with value Prod from a cluster:
  1261. //
  1262. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1263. // with awserr.Error's Code and Message methods to get detailed information about
  1264. // the error.
  1265. //
  1266. // See the AWS API reference guide for Amazon Elastic MapReduce's
  1267. // API operation RemoveTags for usage and error information.
  1268. //
  1269. // Returned Error Codes:
  1270. // * InternalServerException
  1271. // This exception occurs when there is an internal failure in the EMR service.
  1272. //
  1273. // * InvalidRequestException
  1274. // This exception occurs when there is something wrong with user input.
  1275. //
  1276. func (c *EMR) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) {
  1277. req, out := c.RemoveTagsRequest(input)
  1278. err := req.Send()
  1279. return out, err
  1280. }
  1281. const opRunJobFlow = "RunJobFlow"
  1282. // RunJobFlowRequest generates a "aws/request.Request" representing the
  1283. // client's request for the RunJobFlow operation. The "output" return
  1284. // value can be used to capture response data after the request's "Send" method
  1285. // is called.
  1286. //
  1287. // See RunJobFlow for usage and error information.
  1288. //
  1289. // Creating a request object using this method should be used when you want to inject
  1290. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1291. // access properties on the request object before or after sending the request. If
  1292. // you just want the service response, call the RunJobFlow method directly
  1293. // instead.
  1294. //
  1295. // Note: You must call the "Send" method on the returned request object in order
  1296. // to execute the request.
  1297. //
  1298. // // Example sending a request using the RunJobFlowRequest method.
  1299. // req, resp := client.RunJobFlowRequest(params)
  1300. //
  1301. // err := req.Send()
  1302. // if err == nil { // resp is now filled
  1303. // fmt.Println(resp)
  1304. // }
  1305. //
  1306. func (c *EMR) RunJobFlowRequest(input *RunJobFlowInput) (req *request.Request, output *RunJobFlowOutput) {
  1307. op := &request.Operation{
  1308. Name: opRunJobFlow,
  1309. HTTPMethod: "POST",
  1310. HTTPPath: "/",
  1311. }
  1312. if input == nil {
  1313. input = &RunJobFlowInput{}
  1314. }
  1315. req = c.newRequest(op, input, output)
  1316. output = &RunJobFlowOutput{}
  1317. req.Data = output
  1318. return
  1319. }
  1320. // RunJobFlow API operation for Amazon Elastic MapReduce.
  1321. //
  1322. // RunJobFlow creates and starts running a new job flow. The job flow will run
  1323. // the steps specified. Once the job flow completes, the cluster is stopped
  1324. // and the HDFS partition is lost. To prevent loss of data, configure the last
  1325. // step of the job flow to store results in Amazon S3. If the JobFlowInstancesConfigKeepJobFlowAliveWhenNoSteps
  1326. // parameter is set to TRUE, the job flow will transition to the WAITING state
  1327. // rather than shutting down once the steps have completed.
  1328. //
  1329. // For additional protection, you can set the JobFlowInstancesConfigTerminationProtected
  1330. // parameter to TRUE to lock the job flow and prevent it from being terminated
  1331. // by API call, user intervention, or in the event of a job flow error.
  1332. //
  1333. // A maximum of 256 steps are allowed in each job flow.
  1334. //
  1335. // If your job flow is long-running (such as a Hive data warehouse) or complex,
  1336. // you may require more than 256 steps to process your data. You can bypass
  1337. // the 256-step limitation in various ways, including using the SSH shell to
  1338. // connect to the master node and submitting queries directly to the software
  1339. // running on the master node, such as Hive and Hadoop. For more information
  1340. // on how to do this, go to Add More than 256 Steps to a Job Flow (http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/AddMoreThan256Steps.html)
  1341. // in the Amazon Elastic MapReduce Developer's Guide.
  1342. //
  1343. // For long running job flows, we recommend that you periodically store your
  1344. // results.
  1345. //
  1346. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1347. // with awserr.Error's Code and Message methods to get detailed information about
  1348. // the error.
  1349. //
  1350. // See the AWS API reference guide for Amazon Elastic MapReduce's
  1351. // API operation RunJobFlow for usage and error information.
  1352. //
  1353. // Returned Error Codes:
  1354. // * InternalServerError
  1355. // Indicates that an error occurred while processing the request and that the
  1356. // request was not completed.
  1357. //
  1358. func (c *EMR) RunJobFlow(input *RunJobFlowInput) (*RunJobFlowOutput, error) {
  1359. req, out := c.RunJobFlowRequest(input)
  1360. err := req.Send()
  1361. return out, err
  1362. }
  1363. const opSetTerminationProtection = "SetTerminationProtection"
  1364. // SetTerminationProtectionRequest generates a "aws/request.Request" representing the
  1365. // client's request for the SetTerminationProtection operation. The "output" return
  1366. // value can be used to capture response data after the request's "Send" method
  1367. // is called.
  1368. //
  1369. // See SetTerminationProtection for usage and error information.
  1370. //
  1371. // Creating a request object using this method should be used when you want to inject
  1372. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1373. // access properties on the request object before or after sending the request. If
  1374. // you just want the service response, call the SetTerminationProtection method directly
  1375. // instead.
  1376. //
  1377. // Note: You must call the "Send" method on the returned request object in order
  1378. // to execute the request.
  1379. //
  1380. // // Example sending a request using the SetTerminationProtectionRequest method.
  1381. // req, resp := client.SetTerminationProtectionRequest(params)
  1382. //
  1383. // err := req.Send()
  1384. // if err == nil { // resp is now filled
  1385. // fmt.Println(resp)
  1386. // }
  1387. //
  1388. func (c *EMR) SetTerminationProtectionRequest(input *SetTerminationProtectionInput) (req *request.Request, output *SetTerminationProtectionOutput) {
  1389. op := &request.Operation{
  1390. Name: opSetTerminationProtection,
  1391. HTTPMethod: "POST",
  1392. HTTPPath: "/",
  1393. }
  1394. if input == nil {
  1395. input = &SetTerminationProtectionInput{}
  1396. }
  1397. req = c.newRequest(op, input, output)
  1398. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1399. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1400. output = &SetTerminationProtectionOutput{}
  1401. req.Data = output
  1402. return
  1403. }
  1404. // SetTerminationProtection API operation for Amazon Elastic MapReduce.
  1405. //
  1406. // SetTerminationProtection locks a job flow so the Amazon EC2 instances in
  1407. // the cluster cannot be terminated by user intervention, an API call, or in
  1408. // the event of a job-flow error. The cluster still terminates upon successful
  1409. // completion of the job flow. Calling SetTerminationProtection on a job flow
  1410. // is analogous to calling the Amazon EC2 DisableAPITermination API on all of
  1411. // the EC2 instances in a cluster.
  1412. //
  1413. // SetTerminationProtection is used to prevent accidental termination of a job
  1414. // flow and to ensure that in the event of an error, the instances will persist
  1415. // so you can recover any data stored in their ephemeral instance storage.
  1416. //
  1417. // To terminate a job flow that has been locked by setting SetTerminationProtection
  1418. // to true, you must first unlock the job flow by a subsequent call to SetTerminationProtection
  1419. // in which you set the value to false.
  1420. //
  1421. // For more information, go to Protecting a Job Flow from Termination (http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/UsingEMR_TerminationProtection.html)
  1422. // in the Amazon Elastic MapReduce Developer's Guide.
  1423. //
  1424. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1425. // with awserr.Error's Code and Message methods to get detailed information about
  1426. // the error.
  1427. //
  1428. // See the AWS API reference guide for Amazon Elastic MapReduce's
  1429. // API operation SetTerminationProtection for usage and error information.
  1430. //
  1431. // Returned Error Codes:
  1432. // * InternalServerError
  1433. // Indicates that an error occurred while processing the request and that the
  1434. // request was not completed.
  1435. //
  1436. func (c *EMR) SetTerminationProtection(input *SetTerminationProtectionInput) (*SetTerminationProtectionOutput, error) {
  1437. req, out := c.SetTerminationProtectionRequest(input)
  1438. err := req.Send()
  1439. return out, err
  1440. }
  1441. const opSetVisibleToAllUsers = "SetVisibleToAllUsers"
  1442. // SetVisibleToAllUsersRequest generates a "aws/request.Request" representing the
  1443. // client's request for the SetVisibleToAllUsers operation. The "output" return
  1444. // value can be used to capture response data after the request's "Send" method
  1445. // is called.
  1446. //
  1447. // See SetVisibleToAllUsers for usage and error information.
  1448. //
  1449. // Creating a request object using this method should be used when you want to inject
  1450. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1451. // access properties on the request object before or after sending the request. If
  1452. // you just want the service response, call the SetVisibleToAllUsers method directly
  1453. // instead.
  1454. //
  1455. // Note: You must call the "Send" method on the returned request object in order
  1456. // to execute the request.
  1457. //
  1458. // // Example sending a request using the SetVisibleToAllUsersRequest method.
  1459. // req, resp := client.SetVisibleToAllUsersRequest(params)
  1460. //
  1461. // err := req.Send()
  1462. // if err == nil { // resp is now filled
  1463. // fmt.Println(resp)
  1464. // }
  1465. //
  1466. func (c *EMR) SetVisibleToAllUsersRequest(input *SetVisibleToAllUsersInput) (req *request.Request, output *SetVisibleToAllUsersOutput) {
  1467. op := &request.Operation{
  1468. Name: opSetVisibleToAllUsers,
  1469. HTTPMethod: "POST",
  1470. HTTPPath: "/",
  1471. }
  1472. if input == nil {
  1473. input = &SetVisibleToAllUsersInput{}
  1474. }
  1475. req = c.newRequest(op, input, output)
  1476. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1477. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1478. output = &SetVisibleToAllUsersOutput{}
  1479. req.Data = output
  1480. return
  1481. }
  1482. // SetVisibleToAllUsers API operation for Amazon Elastic MapReduce.
  1483. //
  1484. // Sets whether all AWS Identity and Access Management (IAM) users under your
  1485. // account can access the specified job flows. This action works on running
  1486. // job flows. You can also set the visibility of a job flow when you launch
  1487. // it using the VisibleToAllUsers parameter of RunJobFlow. The SetVisibleToAllUsers
  1488. // action can be called only by an IAM user who created the job flow or the
  1489. // AWS account that owns the job flow.
  1490. //
  1491. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1492. // with awserr.Error's Code and Message methods to get detailed information about
  1493. // the error.
  1494. //
  1495. // See the AWS API reference guide for Amazon Elastic MapReduce's
  1496. // API operation SetVisibleToAllUsers for usage and error information.
  1497. //
  1498. // Returned Error Codes:
  1499. // * InternalServerError
  1500. // Indicates that an error occurred while processing the request and that the
  1501. // request was not completed.
  1502. //
  1503. func (c *EMR) SetVisibleToAllUsers(input *SetVisibleToAllUsersInput) (*SetVisibleToAllUsersOutput, error) {
  1504. req, out := c.SetVisibleToAllUsersRequest(input)
  1505. err := req.Send()
  1506. return out, err
  1507. }
  1508. const opTerminateJobFlows = "TerminateJobFlows"
  1509. // TerminateJobFlowsRequest generates a "aws/request.Request" representing the
  1510. // client's request for the TerminateJobFlows operation. The "output" return
  1511. // value can be used to capture response data after the request's "Send" method
  1512. // is called.
  1513. //
  1514. // See TerminateJobFlows for usage and error information.
  1515. //
  1516. // Creating a request object using this method should be used when you want to inject
  1517. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1518. // access properties on the request object before or after sending the request. If
  1519. // you just want the service response, call the TerminateJobFlows method directly
  1520. // instead.
  1521. //
  1522. // Note: You must call the "Send" method on the returned request object in order
  1523. // to execute the request.
  1524. //
  1525. // // Example sending a request using the TerminateJobFlowsRequest method.
  1526. // req, resp := client.TerminateJobFlowsRequest(params)
  1527. //
  1528. // err := req.Send()
  1529. // if err == nil { // resp is now filled
  1530. // fmt.Println(resp)
  1531. // }
  1532. //
  1533. func (c *EMR) TerminateJobFlowsRequest(input *TerminateJobFlowsInput) (req *request.Request, output *TerminateJobFlowsOutput) {
  1534. op := &request.Operation{
  1535. Name: opTerminateJobFlows,
  1536. HTTPMethod: "POST",
  1537. HTTPPath: "/",
  1538. }
  1539. if input == nil {
  1540. input = &TerminateJobFlowsInput{}
  1541. }
  1542. req = c.newRequest(op, input, output)
  1543. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1544. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1545. output = &TerminateJobFlowsOutput{}
  1546. req.Data = output
  1547. return
  1548. }
  1549. // TerminateJobFlows API operation for Amazon Elastic MapReduce.
  1550. //
  1551. // TerminateJobFlows shuts a list of job flows down. When a job flow is shut
  1552. // down, any step not yet completed is canceled and the EC2 instances on which
  1553. // the job flow is running are stopped. Any log files not already saved are
  1554. // uploaded to Amazon S3 if a LogUri was specified when the job flow was created.
  1555. //
  1556. // The maximum number of JobFlows allowed is 10. The call to TerminateJobFlows
  1557. // is asynchronous. Depending on the configuration of the job flow, it may take
  1558. // up to 5-20 minutes for the job flow to completely terminate and release allocated
  1559. // resources, such as Amazon EC2 instances.
  1560. //
  1561. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1562. // with awserr.Error's Code and Message methods to get detailed information about
  1563. // the error.
  1564. //
  1565. // See the AWS API reference guide for Amazon Elastic MapReduce's
  1566. // API operation TerminateJobFlows for usage and error information.
  1567. //
  1568. // Returned Error Codes:
  1569. // * InternalServerError
  1570. // Indicates that an error occurred while processing the request and that the
  1571. // request was not completed.
  1572. //
  1573. func (c *EMR) TerminateJobFlows(input *TerminateJobFlowsInput) (*TerminateJobFlowsOutput, error) {
  1574. req, out := c.TerminateJobFlowsRequest(input)
  1575. err := req.Send()
  1576. return out, err
  1577. }
  1578. // Input to an AddInstanceGroups call.
  1579. type AddInstanceGroupsInput struct {
  1580. _ struct{} `type:"structure"`
  1581. // Instance Groups to add.
  1582. //
  1583. // InstanceGroups is a required field
  1584. InstanceGroups []*InstanceGroupConfig `type:"list" required:"true"`
  1585. // Job flow in which to add the instance groups.
  1586. //
  1587. // JobFlowId is a required field
  1588. JobFlowId *string `type:"string" required:"true"`
  1589. }
  1590. // String returns the string representation
  1591. func (s AddInstanceGroupsInput) String() string {
  1592. return awsutil.Prettify(s)
  1593. }
  1594. // GoString returns the string representation
  1595. func (s AddInstanceGroupsInput) GoString() string {
  1596. return s.String()
  1597. }
  1598. // Validate inspects the fields of the type to determine if they are valid.
  1599. func (s *AddInstanceGroupsInput) Validate() error {
  1600. invalidParams := request.ErrInvalidParams{Context: "AddInstanceGroupsInput"}
  1601. if s.InstanceGroups == nil {
  1602. invalidParams.Add(request.NewErrParamRequired("InstanceGroups"))
  1603. }
  1604. if s.JobFlowId == nil {
  1605. invalidParams.Add(request.NewErrParamRequired("JobFlowId"))
  1606. }
  1607. if s.InstanceGroups != nil {
  1608. for i, v := range s.InstanceGroups {
  1609. if v == nil {
  1610. continue
  1611. }
  1612. if err := v.Validate(); err != nil {
  1613. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InstanceGroups", i), err.(request.ErrInvalidParams))
  1614. }
  1615. }
  1616. }
  1617. if invalidParams.Len() > 0 {
  1618. return invalidParams
  1619. }
  1620. return nil
  1621. }
  1622. // Output from an AddInstanceGroups call.
  1623. type AddInstanceGroupsOutput struct {
  1624. _ struct{} `type:"structure"`
  1625. // Instance group IDs of the newly created instance groups.
  1626. InstanceGroupIds []*string `type:"list"`
  1627. // The job flow ID in which the instance groups are added.
  1628. JobFlowId *string `type:"string"`
  1629. }
  1630. // String returns the string representation
  1631. func (s AddInstanceGroupsOutput) String() string {
  1632. return awsutil.Prettify(s)
  1633. }
  1634. // GoString returns the string representation
  1635. func (s AddInstanceGroupsOutput) GoString() string {
  1636. return s.String()
  1637. }
  1638. // The input argument to the AddJobFlowSteps operation.
  1639. type AddJobFlowStepsInput struct {
  1640. _ struct{} `type:"structure"`
  1641. // A string that uniquely identifies the job flow. This identifier is returned
  1642. // by RunJobFlow and can also be obtained from ListClusters.
  1643. //
  1644. // JobFlowId is a required field
  1645. JobFlowId *string `type:"string" required:"true"`
  1646. // A list of StepConfig to be executed by the job flow.
  1647. //
  1648. // Steps is a required field
  1649. Steps []*StepConfig `type:"list" required:"true"`
  1650. }
  1651. // String returns the string representation
  1652. func (s AddJobFlowStepsInput) String() string {
  1653. return awsutil.Prettify(s)
  1654. }
  1655. // GoString returns the string representation
  1656. func (s AddJobFlowStepsInput) GoString() string {
  1657. return s.String()
  1658. }
  1659. // Validate inspects the fields of the type to determine if they are valid.
  1660. func (s *AddJobFlowStepsInput) Validate() error {
  1661. invalidParams := request.ErrInvalidParams{Context: "AddJobFlowStepsInput"}
  1662. if s.JobFlowId == nil {
  1663. invalidParams.Add(request.NewErrParamRequired("JobFlowId"))
  1664. }
  1665. if s.Steps == nil {
  1666. invalidParams.Add(request.NewErrParamRequired("Steps"))
  1667. }
  1668. if s.Steps != nil {
  1669. for i, v := range s.Steps {
  1670. if v == nil {
  1671. continue
  1672. }
  1673. if err := v.Validate(); err != nil {
  1674. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Steps", i), err.(request.ErrInvalidParams))
  1675. }
  1676. }
  1677. }
  1678. if invalidParams.Len() > 0 {
  1679. return invalidParams
  1680. }
  1681. return nil
  1682. }
  1683. // The output for the AddJobFlowSteps operation.
  1684. type AddJobFlowStepsOutput struct {
  1685. _ struct{} `type:"structure"`
  1686. // The identifiers of the list of steps added to the job flow.
  1687. StepIds []*string `type:"list"`
  1688. }
  1689. // String returns the string representation
  1690. func (s AddJobFlowStepsOutput) String() string {
  1691. return awsutil.Prettify(s)
  1692. }
  1693. // GoString returns the string representation
  1694. func (s AddJobFlowStepsOutput) GoString() string {
  1695. return s.String()
  1696. }
  1697. // This input identifies a cluster and a list of tags to attach.
  1698. type AddTagsInput struct {
  1699. _ struct{} `type:"structure"`
  1700. // The Amazon EMR resource identifier to which tags will be added. This value
  1701. // must be a cluster identifier.
  1702. //
  1703. // ResourceId is a required field
  1704. ResourceId *string `type:"string" required:"true"`
  1705. // A list of tags to associate with a cluster and propagate to Amazon EC2 instances.
  1706. // Tags are user-defined key/value pairs that consist of a required key string
  1707. // with a maximum of 128 characters, and an optional value string with a maximum
  1708. // of 256 characters.
  1709. //
  1710. // Tags is a required field
  1711. Tags []*Tag `type:"list" required:"true"`
  1712. }
  1713. // String returns the string representation
  1714. func (s AddTagsInput) String() string {
  1715. return awsutil.Prettify(s)
  1716. }
  1717. // GoString returns the string representation
  1718. func (s AddTagsInput) GoString() string {
  1719. return s.String()
  1720. }
  1721. // Validate inspects the fields of the type to determine if they are valid.
  1722. func (s *AddTagsInput) Validate() error {
  1723. invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"}
  1724. if s.ResourceId == nil {
  1725. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  1726. }
  1727. if s.Tags == nil {
  1728. invalidParams.Add(request.NewErrParamRequired("Tags"))
  1729. }
  1730. if invalidParams.Len() > 0 {
  1731. return invalidParams
  1732. }
  1733. return nil
  1734. }
  1735. // This output indicates the result of adding tags to a resource.
  1736. type AddTagsOutput struct {
  1737. _ struct{} `type:"structure"`
  1738. }
  1739. // String returns the string representation
  1740. func (s AddTagsOutput) String() string {
  1741. return awsutil.Prettify(s)
  1742. }
  1743. // GoString returns the string representation
  1744. func (s AddTagsOutput) GoString() string {
  1745. return s.String()
  1746. }
  1747. // An application is any Amazon or third-party software that you can add to
  1748. // the cluster. This structure contains a list of strings that indicates the
  1749. // software to use with the cluster and accepts a user argument list. Amazon
  1750. // EMR accepts and forwards the argument list to the corresponding installation
  1751. // script as bootstrap action argument. For more information, see Launch a Job
  1752. // Flow on the MapR Distribution for Hadoop (http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-mapr.html).
  1753. // Currently supported values are:
  1754. //
  1755. // * "mapr-m3" - launch the job flow using MapR M3 Edition.
  1756. //
  1757. // * "mapr-m5" - launch the job flow using MapR M5 Edition.
  1758. //
  1759. // * "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5"
  1760. // - launch the job flow using MapR M3 or M5 Edition, respectively.
  1761. //
  1762. // In Amazon EMR releases 4.0 and greater, the only accepted parameter is the
  1763. // application name. To pass arguments to applications, you supply a configuration
  1764. // for each application.
  1765. type Application struct {
  1766. _ struct{} `type:"structure"`
  1767. // This option is for advanced users only. This is meta information about third-party
  1768. // applications that third-party vendors use for testing purposes.
  1769. AdditionalInfo map[string]*string `type:"map"`
  1770. // Arguments for Amazon EMR to pass to the application.
  1771. Args []*string `type:"list"`
  1772. // The name of the application.
  1773. Name *string `type:"string"`
  1774. // The version of the application.
  1775. Version *string `type:"string"`
  1776. }
  1777. // String returns the string representation
  1778. func (s Application) String() string {
  1779. return awsutil.Prettify(s)
  1780. }
  1781. // GoString returns the string representation
  1782. func (s Application) GoString() string {
  1783. return s.String()
  1784. }
  1785. type BootstrapActionConfig struct {
  1786. _ struct{} `type:"structure"`
  1787. // Name is a required field
  1788. Name *string `type:"string" required:"true"`
  1789. // ScriptBootstrapAction is a required field
  1790. ScriptBootstrapAction *ScriptBootstrapActionConfig `type:"structure" required:"true"`
  1791. }
  1792. // String returns the string representation
  1793. func (s BootstrapActionConfig) String() string {
  1794. return awsutil.Prettify(s)
  1795. }
  1796. // GoString returns the string representation
  1797. func (s BootstrapActionConfig) GoString() string {
  1798. return s.String()
  1799. }
  1800. // Validate inspects the fields of the type to determine if they are valid.
  1801. func (s *BootstrapActionConfig) Validate() error {
  1802. invalidParams := request.ErrInvalidParams{Context: "BootstrapActionConfig"}
  1803. if s.Name == nil {
  1804. invalidParams.Add(request.NewErrParamRequired("Name"))
  1805. }
  1806. if s.ScriptBootstrapAction == nil {
  1807. invalidParams.Add(request.NewErrParamRequired("ScriptBootstrapAction"))
  1808. }
  1809. if s.ScriptBootstrapAction != nil {
  1810. if err := s.ScriptBootstrapAction.Validate(); err != nil {
  1811. invalidParams.AddNested("ScriptBootstrapAction", err.(request.ErrInvalidParams))
  1812. }
  1813. }
  1814. if invalidParams.Len() > 0 {
  1815. return invalidParams
  1816. }
  1817. return nil
  1818. }
  1819. // Reports the configuration of a bootstrap action in a job flow.
  1820. type BootstrapActionDetail struct {
  1821. _ struct{} `type:"structure"`
  1822. // A description of the bootstrap action.
  1823. BootstrapActionConfig *BootstrapActionConfig `type:"structure"`
  1824. }
  1825. // String returns the string representation
  1826. func (s BootstrapActionDetail) String() string {
  1827. return awsutil.Prettify(s)
  1828. }
  1829. // GoString returns the string representation
  1830. func (s BootstrapActionDetail) GoString() string {
  1831. return s.String()
  1832. }
  1833. // The detailed description of the cluster.
  1834. type Cluster struct {
  1835. _ struct{} `type:"structure"`
  1836. // The applications installed on this cluster.
  1837. Applications []*Application `type:"list"`
  1838. // Specifies whether the cluster should terminate after completing all steps.
  1839. AutoTerminate *bool `type:"boolean"`
  1840. // Amazon EMR releases 4.x or later.
  1841. //
  1842. // The list of Configurations supplied to the EMR cluster.
  1843. Configurations []*Configuration `type:"list"`
  1844. // Provides information about the EC2 instances in a cluster grouped by category.
  1845. // For example, key name, subnet ID, IAM instance profile, and so on.
  1846. Ec2InstanceAttributes *Ec2InstanceAttributes `type:"structure"`
  1847. // The unique identifier for the cluster.
  1848. Id *string `type:"string"`
  1849. // The path to the Amazon S3 location where logs for this cluster are stored.
  1850. LogUri *string `type:"string"`
  1851. // The public DNS name of the master EC2 instance.
  1852. MasterPublicDnsName *string `type:"string"`
  1853. // The name of the cluster.
  1854. Name *string `type:"string"`
  1855. // An approximation of the cost of the job flow, represented in m1.small/hours.
  1856. // This value is incremented one time for every hour an m1.small instance runs.
  1857. // Larger instances are weighted more, so an EC2 instance that is roughly four
  1858. // times more expensive would result in the normalized instance hours being
  1859. // incremented by four. This result is only an approximation and does not reflect
  1860. // the actual billing rate.
  1861. NormalizedInstanceHours *int64 `type:"integer"`
  1862. // The release label for the Amazon EMR release. For Amazon EMR 3.x and 2.x
  1863. // AMIs, use amiVersion instead instead of ReleaseLabel.
  1864. ReleaseLabel *string `type:"string"`
  1865. // The AMI version requested for this cluster.
  1866. RequestedAmiVersion *string `type:"string"`
  1867. // The AMI version running on this cluster.
  1868. RunningAmiVersion *string `type:"string"`
  1869. // The name of the security configuration applied to the cluster.
  1870. SecurityConfiguration *string `type:"string"`
  1871. // The IAM role that will be assumed by the Amazon EMR service to access AWS
  1872. // resources on your behalf.
  1873. ServiceRole *string `type:"string"`
  1874. // The current status details about the cluster.
  1875. Status *ClusterStatus `type:"structure"`
  1876. // A list of tags associated with a cluster.
  1877. Tags []*Tag `type:"list"`
  1878. // Indicates whether Amazon EMR will lock the cluster to prevent the EC2 instances
  1879. // from being terminated by an API call or user intervention, or in the event
  1880. // of a cluster error.
  1881. TerminationProtected *bool `type:"boolean"`
  1882. // Indicates whether the job flow is visible to all IAM users of the AWS account
  1883. // associated with the job flow. If this value is set to true, all IAM users
  1884. // of that AWS account can view and manage the job flow if they have the proper
  1885. // policy permissions set. If this value is false, only the IAM user that created
  1886. // the cluster can view and manage it. This value can be changed using the SetVisibleToAllUsers
  1887. // action.
  1888. VisibleToAllUsers *bool `type:"boolean"`
  1889. }
  1890. // String returns the string representation
  1891. func (s Cluster) String() string {
  1892. return awsutil.Prettify(s)
  1893. }
  1894. // GoString returns the string representation
  1895. func (s Cluster) GoString() string {
  1896. return s.String()
  1897. }
  1898. // The reason that the cluster changed to its current state.
  1899. type ClusterStateChangeReason struct {
  1900. _ struct{} `type:"structure"`
  1901. // The programmatic code for the state change reason.
  1902. Code *string `type:"string" enum:"ClusterStateChangeReasonCode"`
  1903. // The descriptive message for the state change reason.
  1904. Message *string `type:"string"`
  1905. }
  1906. // String returns the string representation
  1907. func (s ClusterStateChangeReason) String() string {
  1908. return awsutil.Prettify(s)
  1909. }
  1910. // GoString returns the string representation
  1911. func (s ClusterStateChangeReason) GoString() string {
  1912. return s.String()
  1913. }
  1914. // The detailed status of the cluster.
  1915. type ClusterStatus struct {
  1916. _ struct{} `type:"structure"`
  1917. // The current state of the cluster.
  1918. State *string `type:"string" enum:"ClusterState"`
  1919. // The reason for the cluster status change.
  1920. StateChangeReason *ClusterStateChangeReason `type:"structure"`
  1921. // A timeline that represents the status of a cluster over the lifetime of the
  1922. // cluster.
  1923. Timeline *ClusterTimeline `type:"structure"`
  1924. }
  1925. // String returns the string representation
  1926. func (s ClusterStatus) String() string {
  1927. return awsutil.Prettify(s)
  1928. }
  1929. // GoString returns the string representation
  1930. func (s ClusterStatus) GoString() string {
  1931. return s.String()
  1932. }
  1933. // The summary description of the cluster.
  1934. type ClusterSummary struct {
  1935. _ struct{} `type:"structure"`
  1936. // The unique identifier for the cluster.
  1937. Id *string `type:"string"`
  1938. // The name of the cluster.
  1939. Name *string `type:"string"`
  1940. // An approximation of the cost of the job flow, represented in m1.small/hours.
  1941. // This value is incremented one time for every hour an m1.small instance runs.
  1942. // Larger instances are weighted more, so an EC2 instance that is roughly four
  1943. // times more expensive would result in the normalized instance hours being
  1944. // incremented by four. This result is only an approximation and does not reflect
  1945. // the actual billing rate.
  1946. NormalizedInstanceHours *int64 `type:"integer"`
  1947. // The details about the current status of the cluster.
  1948. Status *ClusterStatus `type:"structure"`
  1949. }
  1950. // String returns the string representation
  1951. func (s ClusterSummary) String() string {
  1952. return awsutil.Prettify(s)
  1953. }
  1954. // GoString returns the string representation
  1955. func (s ClusterSummary) GoString() string {
  1956. return s.String()
  1957. }
  1958. // Represents the timeline of the cluster's lifecycle.
  1959. type ClusterTimeline struct {
  1960. _ struct{} `type:"structure"`
  1961. // The creation date and time of the cluster.
  1962. CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  1963. // The date and time when the cluster was terminated.
  1964. EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  1965. // The date and time when the cluster was ready to execute steps.
  1966. ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  1967. }
  1968. // String returns the string representation
  1969. func (s ClusterTimeline) String() string {
  1970. return awsutil.Prettify(s)
  1971. }
  1972. // GoString returns the string representation
  1973. func (s ClusterTimeline) GoString() string {
  1974. return s.String()
  1975. }
  1976. // An entity describing an executable that runs on a cluster.
  1977. type Command struct {
  1978. _ struct{} `type:"structure"`
  1979. // Arguments for Amazon EMR to pass to the command for execution.
  1980. Args []*string `type:"list"`
  1981. // The name of the command.
  1982. Name *string `type:"string"`
  1983. // The Amazon S3 location of the command script.
  1984. ScriptPath *string `type:"string"`
  1985. }
  1986. // String returns the string representation
  1987. func (s Command) String() string {
  1988. return awsutil.Prettify(s)
  1989. }
  1990. // GoString returns the string representation
  1991. func (s Command) GoString() string {
  1992. return s.String()
  1993. }
  1994. // Amazon EMR releases 4.x or later.
  1995. //
  1996. // Specifies a hardware and software configuration of the EMR cluster. This
  1997. // includes configurations for applications and software bundled with Amazon
  1998. // EMR. The Configuration object is a JSON object which is defined by a classification
  1999. // and a set of properties. Configurations can be nested, so a configuration
  2000. // may have its own Configuration objects listed.
  2001. type Configuration struct {
  2002. _ struct{} `type:"structure"`
  2003. // The classification of a configuration. For more information see, Amazon EMR
  2004. // Configurations (http://docs.aws.amazon.com/ElasticMapReduce/latest/API/EmrConfigurations.html).
  2005. Classification *string `type:"string"`
  2006. // A list of configurations you apply to this configuration object.
  2007. Configurations []*Configuration `type:"list"`
  2008. // A set of properties supplied to the Configuration object.
  2009. Properties map[string]*string `type:"map"`
  2010. }
  2011. // String returns the string representation
  2012. func (s Configuration) String() string {
  2013. return awsutil.Prettify(s)
  2014. }
  2015. // GoString returns the string representation
  2016. func (s Configuration) GoString() string {
  2017. return s.String()
  2018. }
  2019. type CreateSecurityConfigurationInput struct {
  2020. _ struct{} `type:"structure"`
  2021. // The name of the security configuration.
  2022. //
  2023. // Name is a required field
  2024. Name *string `type:"string" required:"true"`
  2025. // The security configuration details in JSON format.
  2026. //
  2027. // SecurityConfiguration is a required field
  2028. SecurityConfiguration *string `type:"string" required:"true"`
  2029. }
  2030. // String returns the string representation
  2031. func (s CreateSecurityConfigurationInput) String() string {
  2032. return awsutil.Prettify(s)
  2033. }
  2034. // GoString returns the string representation
  2035. func (s CreateSecurityConfigurationInput) GoString() string {
  2036. return s.String()
  2037. }
  2038. // Validate inspects the fields of the type to determine if they are valid.
  2039. func (s *CreateSecurityConfigurationInput) Validate() error {
  2040. invalidParams := request.ErrInvalidParams{Context: "CreateSecurityConfigurationInput"}
  2041. if s.Name == nil {
  2042. invalidParams.Add(request.NewErrParamRequired("Name"))
  2043. }
  2044. if s.SecurityConfiguration == nil {
  2045. invalidParams.Add(request.NewErrParamRequired("SecurityConfiguration"))
  2046. }
  2047. if invalidParams.Len() > 0 {
  2048. return invalidParams
  2049. }
  2050. return nil
  2051. }
  2052. type CreateSecurityConfigurationOutput struct {
  2053. _ struct{} `type:"structure"`
  2054. // The date and time the security configuration was created.
  2055. //
  2056. // CreationDateTime is a required field
  2057. CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
  2058. // The name of the security configuration.
  2059. //
  2060. // Name is a required field
  2061. Name *string `type:"string" required:"true"`
  2062. }
  2063. // String returns the string representation
  2064. func (s CreateSecurityConfigurationOutput) String() string {
  2065. return awsutil.Prettify(s)
  2066. }
  2067. // GoString returns the string representation
  2068. func (s CreateSecurityConfigurationOutput) GoString() string {
  2069. return s.String()
  2070. }
  2071. type DeleteSecurityConfigurationInput struct {
  2072. _ struct{} `type:"structure"`
  2073. // The name of the security configuration.
  2074. //
  2075. // Name is a required field
  2076. Name *string `type:"string" required:"true"`
  2077. }
  2078. // String returns the string representation
  2079. func (s DeleteSecurityConfigurationInput) String() string {
  2080. return awsutil.Prettify(s)
  2081. }
  2082. // GoString returns the string representation
  2083. func (s DeleteSecurityConfigurationInput) GoString() string {
  2084. return s.String()
  2085. }
  2086. // Validate inspects the fields of the type to determine if they are valid.
  2087. func (s *DeleteSecurityConfigurationInput) Validate() error {
  2088. invalidParams := request.ErrInvalidParams{Context: "DeleteSecurityConfigurationInput"}
  2089. if s.Name == nil {
  2090. invalidParams.Add(request.NewErrParamRequired("Name"))
  2091. }
  2092. if invalidParams.Len() > 0 {
  2093. return invalidParams
  2094. }
  2095. return nil
  2096. }
  2097. type DeleteSecurityConfigurationOutput struct {
  2098. _ struct{} `type:"structure"`
  2099. }
  2100. // String returns the string representation
  2101. func (s DeleteSecurityConfigurationOutput) String() string {
  2102. return awsutil.Prettify(s)
  2103. }
  2104. // GoString returns the string representation
  2105. func (s DeleteSecurityConfigurationOutput) GoString() string {
  2106. return s.String()
  2107. }
  2108. // This input determines which cluster to describe.
  2109. type DescribeClusterInput struct {
  2110. _ struct{} `type:"structure"`
  2111. // The identifier of the cluster to describe.
  2112. //
  2113. // ClusterId is a required field
  2114. ClusterId *string `type:"string" required:"true"`
  2115. }
  2116. // String returns the string representation
  2117. func (s DescribeClusterInput) String() string {
  2118. return awsutil.Prettify(s)
  2119. }
  2120. // GoString returns the string representation
  2121. func (s DescribeClusterInput) GoString() string {
  2122. return s.String()
  2123. }
  2124. // Validate inspects the fields of the type to determine if they are valid.
  2125. func (s *DescribeClusterInput) Validate() error {
  2126. invalidParams := request.ErrInvalidParams{Context: "DescribeClusterInput"}
  2127. if s.ClusterId == nil {
  2128. invalidParams.Add(request.NewErrParamRequired("ClusterId"))
  2129. }
  2130. if invalidParams.Len() > 0 {
  2131. return invalidParams
  2132. }
  2133. return nil
  2134. }
  2135. // This output contains the description of the cluster.
  2136. type DescribeClusterOutput struct {
  2137. _ struct{} `type:"structure"`
  2138. // This output contains the details for the requested cluster.
  2139. Cluster *Cluster `type:"structure"`
  2140. }
  2141. // String returns the string representation
  2142. func (s DescribeClusterOutput) String() string {
  2143. return awsutil.Prettify(s)
  2144. }
  2145. // GoString returns the string representation
  2146. func (s DescribeClusterOutput) GoString() string {
  2147. return s.String()
  2148. }
  2149. // The input for the DescribeJobFlows operation.
  2150. type DescribeJobFlowsInput struct {
  2151. _ struct{} `type:"structure"`
  2152. // Return only job flows created after this date and time.
  2153. CreatedAfter *time.Time `type:"timestamp" timestampFormat:"unix"`
  2154. // Return only job flows created before this date and time.
  2155. CreatedBefore *time.Time `type:"timestamp" timestampFormat:"unix"`
  2156. // Return only job flows whose job flow ID is contained in this list.
  2157. JobFlowIds []*string `type:"list"`
  2158. // Return only job flows whose state is contained in this list.
  2159. JobFlowStates []*string `type:"list"`
  2160. }
  2161. // String returns the string representation
  2162. func (s DescribeJobFlowsInput) String() string {
  2163. return awsutil.Prettify(s)
  2164. }
  2165. // GoString returns the string representation
  2166. func (s DescribeJobFlowsInput) GoString() string {
  2167. return s.String()
  2168. }
  2169. // The output for the DescribeJobFlows operation.
  2170. type DescribeJobFlowsOutput struct {
  2171. _ struct{} `type:"structure"`
  2172. // A list of job flows matching the parameters supplied.
  2173. JobFlows []*JobFlowDetail `type:"list"`
  2174. }
  2175. // String returns the string representation
  2176. func (s DescribeJobFlowsOutput) String() string {
  2177. return awsutil.Prettify(s)
  2178. }
  2179. // GoString returns the string representation
  2180. func (s DescribeJobFlowsOutput) GoString() string {
  2181. return s.String()
  2182. }
  2183. type DescribeSecurityConfigurationInput struct {
  2184. _ struct{} `type:"structure"`
  2185. // The name of the security configuration.
  2186. //
  2187. // Name is a required field
  2188. Name *string `type:"string" required:"true"`
  2189. }
  2190. // String returns the string representation
  2191. func (s DescribeSecurityConfigurationInput) String() string {
  2192. return awsutil.Prettify(s)
  2193. }
  2194. // GoString returns the string representation
  2195. func (s DescribeSecurityConfigurationInput) GoString() string {
  2196. return s.String()
  2197. }
  2198. // Validate inspects the fields of the type to determine if they are valid.
  2199. func (s *DescribeSecurityConfigurationInput) Validate() error {
  2200. invalidParams := request.ErrInvalidParams{Context: "DescribeSecurityConfigurationInput"}
  2201. if s.Name == nil {
  2202. invalidParams.Add(request.NewErrParamRequired("Name"))
  2203. }
  2204. if invalidParams.Len() > 0 {
  2205. return invalidParams
  2206. }
  2207. return nil
  2208. }
  2209. type DescribeSecurityConfigurationOutput struct {
  2210. _ struct{} `type:"structure"`
  2211. // The date and time the security configuration was created
  2212. CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2213. // The name of the security configuration.
  2214. Name *string `type:"string"`
  2215. // The security configuration details in JSON format.
  2216. SecurityConfiguration *string `type:"string"`
  2217. }
  2218. // String returns the string representation
  2219. func (s DescribeSecurityConfigurationOutput) String() string {
  2220. return awsutil.Prettify(s)
  2221. }
  2222. // GoString returns the string representation
  2223. func (s DescribeSecurityConfigurationOutput) GoString() string {
  2224. return s.String()
  2225. }
  2226. // This input determines which step to describe.
  2227. type DescribeStepInput struct {
  2228. _ struct{} `type:"structure"`
  2229. // The identifier of the cluster with steps to describe.
  2230. //
  2231. // ClusterId is a required field
  2232. ClusterId *string `type:"string" required:"true"`
  2233. // The identifier of the step to describe.
  2234. //
  2235. // StepId is a required field
  2236. StepId *string `type:"string" required:"true"`
  2237. }
  2238. // String returns the string representation
  2239. func (s DescribeStepInput) String() string {
  2240. return awsutil.Prettify(s)
  2241. }
  2242. // GoString returns the string representation
  2243. func (s DescribeStepInput) GoString() string {
  2244. return s.String()
  2245. }
  2246. // Validate inspects the fields of the type to determine if they are valid.
  2247. func (s *DescribeStepInput) Validate() error {
  2248. invalidParams := request.ErrInvalidParams{Context: "DescribeStepInput"}
  2249. if s.ClusterId == nil {
  2250. invalidParams.Add(request.NewErrParamRequired("ClusterId"))
  2251. }
  2252. if s.StepId == nil {
  2253. invalidParams.Add(request.NewErrParamRequired("StepId"))
  2254. }
  2255. if invalidParams.Len() > 0 {
  2256. return invalidParams
  2257. }
  2258. return nil
  2259. }
  2260. // This output contains the description of the cluster step.
  2261. type DescribeStepOutput struct {
  2262. _ struct{} `type:"structure"`
  2263. // The step details for the requested step identifier.
  2264. Step *Step `type:"structure"`
  2265. }
  2266. // String returns the string representation
  2267. func (s DescribeStepOutput) String() string {
  2268. return awsutil.Prettify(s)
  2269. }
  2270. // GoString returns the string representation
  2271. func (s DescribeStepOutput) GoString() string {
  2272. return s.String()
  2273. }
  2274. // Configuration of requested EBS block device associated with the instance
  2275. // group.
  2276. type EbsBlockDevice struct {
  2277. _ struct{} `type:"structure"`
  2278. // The device name that is exposed to the instance, such as /dev/sdh.
  2279. Device *string `type:"string"`
  2280. // EBS volume specifications such as volume type, IOPS, and size(GiB) that will
  2281. // be requested for the EBS volume attached to an EC2 instance in the cluster.
  2282. VolumeSpecification *VolumeSpecification `type:"structure"`
  2283. }
  2284. // String returns the string representation
  2285. func (s EbsBlockDevice) String() string {
  2286. return awsutil.Prettify(s)
  2287. }
  2288. // GoString returns the string representation
  2289. func (s EbsBlockDevice) GoString() string {
  2290. return s.String()
  2291. }
  2292. // Configuration of requested EBS block device associated with the instance
  2293. // group with count of volumes that will be associated to every instance.
  2294. type EbsBlockDeviceConfig struct {
  2295. _ struct{} `type:"structure"`
  2296. // EBS volume specifications such as volume type, IOPS, and size(GiB) that will
  2297. // be requested for the EBS volume attached to an EC2 instance in the cluster.
  2298. //
  2299. // VolumeSpecification is a required field
  2300. VolumeSpecification *VolumeSpecification `type:"structure" required:"true"`
  2301. // Number of EBS volumes with specific volume configuration, that will be associated
  2302. // with every instance in the instance group
  2303. VolumesPerInstance *int64 `type:"integer"`
  2304. }
  2305. // String returns the string representation
  2306. func (s EbsBlockDeviceConfig) String() string {
  2307. return awsutil.Prettify(s)
  2308. }
  2309. // GoString returns the string representation
  2310. func (s EbsBlockDeviceConfig) GoString() string {
  2311. return s.String()
  2312. }
  2313. // Validate inspects the fields of the type to determine if they are valid.
  2314. func (s *EbsBlockDeviceConfig) Validate() error {
  2315. invalidParams := request.ErrInvalidParams{Context: "EbsBlockDeviceConfig"}
  2316. if s.VolumeSpecification == nil {
  2317. invalidParams.Add(request.NewErrParamRequired("VolumeSpecification"))
  2318. }
  2319. if s.VolumeSpecification != nil {
  2320. if err := s.VolumeSpecification.Validate(); err != nil {
  2321. invalidParams.AddNested("VolumeSpecification", err.(request.ErrInvalidParams))
  2322. }
  2323. }
  2324. if invalidParams.Len() > 0 {
  2325. return invalidParams
  2326. }
  2327. return nil
  2328. }
  2329. type EbsConfiguration struct {
  2330. _ struct{} `type:"structure"`
  2331. EbsBlockDeviceConfigs []*EbsBlockDeviceConfig `type:"list"`
  2332. EbsOptimized *bool `type:"boolean"`
  2333. }
  2334. // String returns the string representation
  2335. func (s EbsConfiguration) String() string {
  2336. return awsutil.Prettify(s)
  2337. }
  2338. // GoString returns the string representation
  2339. func (s EbsConfiguration) GoString() string {
  2340. return s.String()
  2341. }
  2342. // Validate inspects the fields of the type to determine if they are valid.
  2343. func (s *EbsConfiguration) Validate() error {
  2344. invalidParams := request.ErrInvalidParams{Context: "EbsConfiguration"}
  2345. if s.EbsBlockDeviceConfigs != nil {
  2346. for i, v := range s.EbsBlockDeviceConfigs {
  2347. if v == nil {
  2348. continue
  2349. }
  2350. if err := v.Validate(); err != nil {
  2351. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EbsBlockDeviceConfigs", i), err.(request.ErrInvalidParams))
  2352. }
  2353. }
  2354. }
  2355. if invalidParams.Len() > 0 {
  2356. return invalidParams
  2357. }
  2358. return nil
  2359. }
  2360. // EBS block device that's attached to an EC2 instance.
  2361. type EbsVolume struct {
  2362. _ struct{} `type:"structure"`
  2363. // The device name that is exposed to the instance, such as /dev/sdh.
  2364. Device *string `type:"string"`
  2365. // The volume identifier of the EBS volume.
  2366. VolumeId *string `type:"string"`
  2367. }
  2368. // String returns the string representation
  2369. func (s EbsVolume) String() string {
  2370. return awsutil.Prettify(s)
  2371. }
  2372. // GoString returns the string representation
  2373. func (s EbsVolume) GoString() string {
  2374. return s.String()
  2375. }
  2376. // Provides information about the EC2 instances in a cluster grouped by category.
  2377. // For example, key name, subnet ID, IAM instance profile, and so on.
  2378. type Ec2InstanceAttributes struct {
  2379. _ struct{} `type:"structure"`
  2380. // A list of additional Amazon EC2 security group IDs for the master node.
  2381. AdditionalMasterSecurityGroups []*string `type:"list"`
  2382. // A list of additional Amazon EC2 security group IDs for the slave nodes.
  2383. AdditionalSlaveSecurityGroups []*string `type:"list"`
  2384. // The Availability Zone in which the cluster will run.
  2385. Ec2AvailabilityZone *string `type:"string"`
  2386. // The name of the Amazon EC2 key pair to use when connecting with SSH into
  2387. // the master node as a user named "hadoop".
  2388. Ec2KeyName *string `type:"string"`
  2389. // To launch the job flow in Amazon VPC, set this parameter to the identifier
  2390. // of the Amazon VPC subnet where you want the job flow to launch. If you do
  2391. // not specify this value, the job flow is launched in the normal AWS cloud,
  2392. // outside of a VPC.
  2393. //
  2394. // Amazon VPC currently does not support cluster compute quadruple extra large
  2395. // (cc1.4xlarge) instances. Thus, you cannot specify the cc1.4xlarge instance
  2396. // type for nodes of a job flow launched in a VPC.
  2397. Ec2SubnetId *string `type:"string"`
  2398. // The identifier of the Amazon EC2 security group for the master node.
  2399. EmrManagedMasterSecurityGroup *string `type:"string"`
  2400. // The identifier of the Amazon EC2 security group for the slave nodes.
  2401. EmrManagedSlaveSecurityGroup *string `type:"string"`
  2402. // The IAM role that was specified when the job flow was launched. The EC2 instances
  2403. // of the job flow assume this role.
  2404. IamInstanceProfile *string `type:"string"`
  2405. // The identifier of the Amazon EC2 security group for the Amazon EMR service
  2406. // to access clusters in VPC private subnets.
  2407. ServiceAccessSecurityGroup *string `type:"string"`
  2408. }
  2409. // String returns the string representation
  2410. func (s Ec2InstanceAttributes) String() string {
  2411. return awsutil.Prettify(s)
  2412. }
  2413. // GoString returns the string representation
  2414. func (s Ec2InstanceAttributes) GoString() string {
  2415. return s.String()
  2416. }
  2417. // The details of the step failure. The service attempts to detect the root
  2418. // cause for many common failures.
  2419. type FailureDetails struct {
  2420. _ struct{} `type:"structure"`
  2421. // The path to the log file where the step failure root cause was originally
  2422. // recorded.
  2423. LogFile *string `type:"string"`
  2424. // The descriptive message including the error the EMR service has identified
  2425. // as the cause of step failure. This is text from an error log that describes
  2426. // the root cause of the failure.
  2427. Message *string `type:"string"`
  2428. // The reason for the step failure. In the case where the service cannot successfully
  2429. // determine the root cause of the failure, it returns "Unknown Error" as a
  2430. // reason.
  2431. Reason *string `type:"string"`
  2432. }
  2433. // String returns the string representation
  2434. func (s FailureDetails) String() string {
  2435. return awsutil.Prettify(s)
  2436. }
  2437. // GoString returns the string representation
  2438. func (s FailureDetails) GoString() string {
  2439. return s.String()
  2440. }
  2441. // A job flow step consisting of a JAR file whose main function will be executed.
  2442. // The main function submits a job for Hadoop to execute and waits for the job
  2443. // to finish or fail.
  2444. type HadoopJarStepConfig struct {
  2445. _ struct{} `type:"structure"`
  2446. // A list of command line arguments passed to the JAR file's main function when
  2447. // executed.
  2448. Args []*string `type:"list"`
  2449. // A path to a JAR file run during the step.
  2450. //
  2451. // Jar is a required field
  2452. Jar *string `type:"string" required:"true"`
  2453. // The name of the main class in the specified Java file. If not specified,
  2454. // the JAR file should specify a Main-Class in its manifest file.
  2455. MainClass *string `type:"string"`
  2456. // A list of Java properties that are set when the step runs. You can use these
  2457. // properties to pass key value pairs to your main function.
  2458. Properties []*KeyValue `type:"list"`
  2459. }
  2460. // String returns the string representation
  2461. func (s HadoopJarStepConfig) String() string {
  2462. return awsutil.Prettify(s)
  2463. }
  2464. // GoString returns the string representation
  2465. func (s HadoopJarStepConfig) GoString() string {
  2466. return s.String()
  2467. }
  2468. // Validate inspects the fields of the type to determine if they are valid.
  2469. func (s *HadoopJarStepConfig) Validate() error {
  2470. invalidParams := request.ErrInvalidParams{Context: "HadoopJarStepConfig"}
  2471. if s.Jar == nil {
  2472. invalidParams.Add(request.NewErrParamRequired("Jar"))
  2473. }
  2474. if invalidParams.Len() > 0 {
  2475. return invalidParams
  2476. }
  2477. return nil
  2478. }
  2479. // A cluster step consisting of a JAR file whose main function will be executed.
  2480. // The main function submits a job for Hadoop to execute and waits for the job
  2481. // to finish or fail.
  2482. type HadoopStepConfig struct {
  2483. _ struct{} `type:"structure"`
  2484. // The list of command line arguments to pass to the JAR file's main function
  2485. // for execution.
  2486. Args []*string `type:"list"`
  2487. // The path to the JAR file that runs during the step.
  2488. Jar *string `type:"string"`
  2489. // The name of the main class in the specified Java file. If not specified,
  2490. // the JAR file should specify a main class in its manifest file.
  2491. MainClass *string `type:"string"`
  2492. // The list of Java properties that are set when the step runs. You can use
  2493. // these properties to pass key value pairs to your main function.
  2494. Properties map[string]*string `type:"map"`
  2495. }
  2496. // String returns the string representation
  2497. func (s HadoopStepConfig) String() string {
  2498. return awsutil.Prettify(s)
  2499. }
  2500. // GoString returns the string representation
  2501. func (s HadoopStepConfig) GoString() string {
  2502. return s.String()
  2503. }
  2504. // Represents an EC2 instance provisioned as part of cluster.
  2505. type Instance struct {
  2506. _ struct{} `type:"structure"`
  2507. // The list of EBS volumes that are attached to this instance.
  2508. EbsVolumes []*EbsVolume `type:"list"`
  2509. // The unique identifier of the instance in Amazon EC2.
  2510. Ec2InstanceId *string `type:"string"`
  2511. // The unique identifier for the instance in Amazon EMR.
  2512. Id *string `type:"string"`
  2513. // The identifier of the instance group to which this instance belongs.
  2514. InstanceGroupId *string `type:"string"`
  2515. // The private DNS name of the instance.
  2516. PrivateDnsName *string `type:"string"`
  2517. // The private IP address of the instance.
  2518. PrivateIpAddress *string `type:"string"`
  2519. // The public DNS name of the instance.
  2520. PublicDnsName *string `type:"string"`
  2521. // The public IP address of the instance.
  2522. PublicIpAddress *string `type:"string"`
  2523. // The current status of the instance.
  2524. Status *InstanceStatus `type:"structure"`
  2525. }
  2526. // String returns the string representation
  2527. func (s Instance) String() string {
  2528. return awsutil.Prettify(s)
  2529. }
  2530. // GoString returns the string representation
  2531. func (s Instance) GoString() string {
  2532. return s.String()
  2533. }
  2534. // This entity represents an instance group, which is a group of instances that
  2535. // have common purpose. For example, CORE instance group is used for HDFS.
  2536. type InstanceGroup struct {
  2537. _ struct{} `type:"structure"`
  2538. // The bid price for each EC2 instance in the instance group when launching
  2539. // nodes as Spot Instances, expressed in USD.
  2540. BidPrice *string `type:"string"`
  2541. // Amazon EMR releases 4.x or later.
  2542. //
  2543. // The list of configurations supplied for an EMR cluster instance group. You
  2544. // can specify a separate configuration for each instance group (master, core,
  2545. // and task).
  2546. Configurations []*Configuration `type:"list"`
  2547. // The EBS block devices that are mapped to this instance group.
  2548. EbsBlockDevices []*EbsBlockDevice `type:"list"`
  2549. // If the instance group is EBS-optimized. An Amazon EBS-optimized instance
  2550. // uses an optimized configuration stack and provides additional, dedicated
  2551. // capacity for Amazon EBS I/O.
  2552. EbsOptimized *bool `type:"boolean"`
  2553. // The identifier of the instance group.
  2554. Id *string `type:"string"`
  2555. // The type of the instance group. Valid values are MASTER, CORE or TASK.
  2556. InstanceGroupType *string `type:"string" enum:"InstanceGroupType"`
  2557. // The EC2 instance type for all instances in the instance group.
  2558. InstanceType *string `min:"1" type:"string"`
  2559. // The marketplace to provision instances for this group. Valid values are ON_DEMAND
  2560. // or SPOT.
  2561. Market *string `type:"string" enum:"MarketType"`
  2562. // The name of the instance group.
  2563. Name *string `type:"string"`
  2564. // The target number of instances for the instance group.
  2565. RequestedInstanceCount *int64 `type:"integer"`
  2566. // The number of instances currently running in this instance group.
  2567. RunningInstanceCount *int64 `type:"integer"`
  2568. // Policy for customizing shrink operations.
  2569. ShrinkPolicy *ShrinkPolicy `type:"structure"`
  2570. // The current status of the instance group.
  2571. Status *InstanceGroupStatus `type:"structure"`
  2572. }
  2573. // String returns the string representation
  2574. func (s InstanceGroup) String() string {
  2575. return awsutil.Prettify(s)
  2576. }
  2577. // GoString returns the string representation
  2578. func (s InstanceGroup) GoString() string {
  2579. return s.String()
  2580. }
  2581. // Configuration defining a new instance group.
  2582. type InstanceGroupConfig struct {
  2583. _ struct{} `type:"structure"`
  2584. // Bid price for each Amazon EC2 instance in the instance group when launching
  2585. // nodes as Spot Instances, expressed in USD.
  2586. BidPrice *string `type:"string"`
  2587. // Amazon EMR releases 4.x or later.
  2588. //
  2589. // The list of configurations supplied for an EMR cluster instance group. You
  2590. // can specify a separate configuration for each instance group (master, core,
  2591. // and task).
  2592. Configurations []*Configuration `type:"list"`
  2593. // EBS configurations that will be attached to each Amazon EC2 instance in the
  2594. // instance group.
  2595. EbsConfiguration *EbsConfiguration `type:"structure"`
  2596. // Target number of instances for the instance group.
  2597. //
  2598. // InstanceCount is a required field
  2599. InstanceCount *int64 `type:"integer" required:"true"`
  2600. // The role of the instance group in the cluster.
  2601. //
  2602. // InstanceRole is a required field
  2603. InstanceRole *string `type:"string" required:"true" enum:"InstanceRoleType"`
  2604. // The Amazon EC2 instance type for all instances in the instance group.
  2605. //
  2606. // InstanceType is a required field
  2607. InstanceType *string `min:"1" type:"string" required:"true"`
  2608. // Market type of the Amazon EC2 instances used to create a cluster node.
  2609. Market *string `type:"string" enum:"MarketType"`
  2610. // Friendly name given to the instance group.
  2611. Name *string `type:"string"`
  2612. }
  2613. // String returns the string representation
  2614. func (s InstanceGroupConfig) String() string {
  2615. return awsutil.Prettify(s)
  2616. }
  2617. // GoString returns the string representation
  2618. func (s InstanceGroupConfig) GoString() string {
  2619. return s.String()
  2620. }
  2621. // Validate inspects the fields of the type to determine if they are valid.
  2622. func (s *InstanceGroupConfig) Validate() error {
  2623. invalidParams := request.ErrInvalidParams{Context: "InstanceGroupConfig"}
  2624. if s.InstanceCount == nil {
  2625. invalidParams.Add(request.NewErrParamRequired("InstanceCount"))
  2626. }
  2627. if s.InstanceRole == nil {
  2628. invalidParams.Add(request.NewErrParamRequired("InstanceRole"))
  2629. }
  2630. if s.InstanceType == nil {
  2631. invalidParams.Add(request.NewErrParamRequired("InstanceType"))
  2632. }
  2633. if s.InstanceType != nil && len(*s.InstanceType) < 1 {
  2634. invalidParams.Add(request.NewErrParamMinLen("InstanceType", 1))
  2635. }
  2636. if s.EbsConfiguration != nil {
  2637. if err := s.EbsConfiguration.Validate(); err != nil {
  2638. invalidParams.AddNested("EbsConfiguration", err.(request.ErrInvalidParams))
  2639. }
  2640. }
  2641. if invalidParams.Len() > 0 {
  2642. return invalidParams
  2643. }
  2644. return nil
  2645. }
  2646. // Detailed information about an instance group.
  2647. type InstanceGroupDetail struct {
  2648. _ struct{} `type:"structure"`
  2649. // Bid price for EC2 Instances when launching nodes as Spot Instances, expressed
  2650. // in USD.
  2651. BidPrice *string `type:"string"`
  2652. // The date/time the instance group was created.
  2653. //
  2654. // CreationDateTime is a required field
  2655. CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
  2656. // The date/time the instance group was terminated.
  2657. EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2658. // Unique identifier for the instance group.
  2659. InstanceGroupId *string `type:"string"`
  2660. // Target number of instances to run in the instance group.
  2661. //
  2662. // InstanceRequestCount is a required field
  2663. InstanceRequestCount *int64 `type:"integer" required:"true"`
  2664. // Instance group role in the cluster
  2665. //
  2666. // InstanceRole is a required field
  2667. InstanceRole *string `type:"string" required:"true" enum:"InstanceRoleType"`
  2668. // Actual count of running instances.
  2669. //
  2670. // InstanceRunningCount is a required field
  2671. InstanceRunningCount *int64 `type:"integer" required:"true"`
  2672. // Amazon EC2 Instance type.
  2673. //
  2674. // InstanceType is a required field
  2675. InstanceType *string `min:"1" type:"string" required:"true"`
  2676. // Details regarding the state of the instance group.
  2677. LastStateChangeReason *string `type:"string"`
  2678. // Market type of the Amazon EC2 instances used to create a cluster node.
  2679. //
  2680. // Market is a required field
  2681. Market *string `type:"string" required:"true" enum:"MarketType"`
  2682. // Friendly name for the instance group.
  2683. Name *string `type:"string"`
  2684. // The date/time the instance group was available to the cluster.
  2685. ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2686. // The date/time the instance group was started.
  2687. StartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2688. // State of instance group. The following values are deprecated: STARTING, TERMINATED,
  2689. // and FAILED.
  2690. //
  2691. // State is a required field
  2692. State *string `type:"string" required:"true" enum:"InstanceGroupState"`
  2693. }
  2694. // String returns the string representation
  2695. func (s InstanceGroupDetail) String() string {
  2696. return awsutil.Prettify(s)
  2697. }
  2698. // GoString returns the string representation
  2699. func (s InstanceGroupDetail) GoString() string {
  2700. return s.String()
  2701. }
  2702. // Modify an instance group size.
  2703. type InstanceGroupModifyConfig struct {
  2704. _ struct{} `type:"structure"`
  2705. // The EC2 InstanceIds to terminate. Once you terminate the instances, the instance
  2706. // group will not return to its original requested size.
  2707. EC2InstanceIdsToTerminate []*string `type:"list"`
  2708. // Target size for the instance group.
  2709. InstanceCount *int64 `type:"integer"`
  2710. // Unique ID of the instance group to expand or shrink.
  2711. //
  2712. // InstanceGroupId is a required field
  2713. InstanceGroupId *string `type:"string" required:"true"`
  2714. // Policy for customizing shrink operations.
  2715. ShrinkPolicy *ShrinkPolicy `type:"structure"`
  2716. }
  2717. // String returns the string representation
  2718. func (s InstanceGroupModifyConfig) String() string {
  2719. return awsutil.Prettify(s)
  2720. }
  2721. // GoString returns the string representation
  2722. func (s InstanceGroupModifyConfig) GoString() string {
  2723. return s.String()
  2724. }
  2725. // Validate inspects the fields of the type to determine if they are valid.
  2726. func (s *InstanceGroupModifyConfig) Validate() error {
  2727. invalidParams := request.ErrInvalidParams{Context: "InstanceGroupModifyConfig"}
  2728. if s.InstanceGroupId == nil {
  2729. invalidParams.Add(request.NewErrParamRequired("InstanceGroupId"))
  2730. }
  2731. if invalidParams.Len() > 0 {
  2732. return invalidParams
  2733. }
  2734. return nil
  2735. }
  2736. // The status change reason details for the instance group.
  2737. type InstanceGroupStateChangeReason struct {
  2738. _ struct{} `type:"structure"`
  2739. // The programmable code for the state change reason.
  2740. Code *string `type:"string" enum:"InstanceGroupStateChangeReasonCode"`
  2741. // The status change reason description.
  2742. Message *string `type:"string"`
  2743. }
  2744. // String returns the string representation
  2745. func (s InstanceGroupStateChangeReason) String() string {
  2746. return awsutil.Prettify(s)
  2747. }
  2748. // GoString returns the string representation
  2749. func (s InstanceGroupStateChangeReason) GoString() string {
  2750. return s.String()
  2751. }
  2752. // The details of the instance group status.
  2753. type InstanceGroupStatus struct {
  2754. _ struct{} `type:"structure"`
  2755. // The current state of the instance group.
  2756. State *string `type:"string" enum:"InstanceGroupState"`
  2757. // The status change reason details for the instance group.
  2758. StateChangeReason *InstanceGroupStateChangeReason `type:"structure"`
  2759. // The timeline of the instance group status over time.
  2760. Timeline *InstanceGroupTimeline `type:"structure"`
  2761. }
  2762. // String returns the string representation
  2763. func (s InstanceGroupStatus) String() string {
  2764. return awsutil.Prettify(s)
  2765. }
  2766. // GoString returns the string representation
  2767. func (s InstanceGroupStatus) GoString() string {
  2768. return s.String()
  2769. }
  2770. // The timeline of the instance group lifecycle.
  2771. type InstanceGroupTimeline struct {
  2772. _ struct{} `type:"structure"`
  2773. // The creation date and time of the instance group.
  2774. CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2775. // The date and time when the instance group terminated.
  2776. EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2777. // The date and time when the instance group became ready to perform tasks.
  2778. ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2779. }
  2780. // String returns the string representation
  2781. func (s InstanceGroupTimeline) String() string {
  2782. return awsutil.Prettify(s)
  2783. }
  2784. // GoString returns the string representation
  2785. func (s InstanceGroupTimeline) GoString() string {
  2786. return s.String()
  2787. }
  2788. // Custom policy for requesting termination protection or termination of specific
  2789. // instances when shrinking an instance group.
  2790. type InstanceResizePolicy struct {
  2791. _ struct{} `type:"structure"`
  2792. // Decommissioning timeout override for the specific list of instances to be
  2793. // terminated.
  2794. InstanceTerminationTimeout *int64 `type:"integer"`
  2795. // Specific list of instances to be protected when shrinking an instance group.
  2796. InstancesToProtect []*string `type:"list"`
  2797. // Specific list of instances to be terminated when shrinking an instance group.
  2798. InstancesToTerminate []*string `type:"list"`
  2799. }
  2800. // String returns the string representation
  2801. func (s InstanceResizePolicy) String() string {
  2802. return awsutil.Prettify(s)
  2803. }
  2804. // GoString returns the string representation
  2805. func (s InstanceResizePolicy) GoString() string {
  2806. return s.String()
  2807. }
  2808. // The details of the status change reason for the instance.
  2809. type InstanceStateChangeReason struct {
  2810. _ struct{} `type:"structure"`
  2811. // The programmable code for the state change reason.
  2812. Code *string `type:"string" enum:"InstanceStateChangeReasonCode"`
  2813. // The status change reason description.
  2814. Message *string `type:"string"`
  2815. }
  2816. // String returns the string representation
  2817. func (s InstanceStateChangeReason) String() string {
  2818. return awsutil.Prettify(s)
  2819. }
  2820. // GoString returns the string representation
  2821. func (s InstanceStateChangeReason) GoString() string {
  2822. return s.String()
  2823. }
  2824. // The instance status details.
  2825. type InstanceStatus struct {
  2826. _ struct{} `type:"structure"`
  2827. // The current state of the instance.
  2828. State *string `type:"string" enum:"InstanceState"`
  2829. // The details of the status change reason for the instance.
  2830. StateChangeReason *InstanceStateChangeReason `type:"structure"`
  2831. // The timeline of the instance status over time.
  2832. Timeline *InstanceTimeline `type:"structure"`
  2833. }
  2834. // String returns the string representation
  2835. func (s InstanceStatus) String() string {
  2836. return awsutil.Prettify(s)
  2837. }
  2838. // GoString returns the string representation
  2839. func (s InstanceStatus) GoString() string {
  2840. return s.String()
  2841. }
  2842. // The timeline of the instance lifecycle.
  2843. type InstanceTimeline struct {
  2844. _ struct{} `type:"structure"`
  2845. // The creation date and time of the instance.
  2846. CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2847. // The date and time when the instance was terminated.
  2848. EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2849. // The date and time when the instance was ready to perform tasks.
  2850. ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2851. }
  2852. // String returns the string representation
  2853. func (s InstanceTimeline) String() string {
  2854. return awsutil.Prettify(s)
  2855. }
  2856. // GoString returns the string representation
  2857. func (s InstanceTimeline) GoString() string {
  2858. return s.String()
  2859. }
  2860. // A description of a job flow.
  2861. type JobFlowDetail struct {
  2862. _ struct{} `type:"structure"`
  2863. // The version of the AMI used to initialize Amazon EC2 instances in the job
  2864. // flow. For a list of AMI versions currently supported by Amazon ElasticMapReduce,
  2865. // go to AMI Versions Supported in Elastic MapReduce (http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/EnvironmentConfig_AMIVersion.html#ami-versions-supported)
  2866. // in the Amazon Elastic MapReduce Developer Guide.
  2867. AmiVersion *string `type:"string"`
  2868. // A list of the bootstrap actions run by the job flow.
  2869. BootstrapActions []*BootstrapActionDetail `type:"list"`
  2870. // Describes the execution status of the job flow.
  2871. //
  2872. // ExecutionStatusDetail is a required field
  2873. ExecutionStatusDetail *JobFlowExecutionStatusDetail `type:"structure" required:"true"`
  2874. // Describes the Amazon EC2 instances of the job flow.
  2875. //
  2876. // Instances is a required field
  2877. Instances *JobFlowInstancesDetail `type:"structure" required:"true"`
  2878. // The job flow identifier.
  2879. //
  2880. // JobFlowId is a required field
  2881. JobFlowId *string `type:"string" required:"true"`
  2882. // The IAM role that was specified when the job flow was launched. The EC2 instances
  2883. // of the job flow assume this role.
  2884. JobFlowRole *string `type:"string"`
  2885. // The location in Amazon S3 where log files for the job are stored.
  2886. LogUri *string `type:"string"`
  2887. // The name of the job flow.
  2888. //
  2889. // Name is a required field
  2890. Name *string `type:"string" required:"true"`
  2891. // The IAM role that will be assumed by the Amazon EMR service to access AWS
  2892. // resources on your behalf.
  2893. ServiceRole *string `type:"string"`
  2894. // A list of steps run by the job flow.
  2895. Steps []*StepDetail `type:"list"`
  2896. // A list of strings set by third party software when the job flow is launched.
  2897. // If you are not using third party software to manage the job flow this value
  2898. // is empty.
  2899. SupportedProducts []*string `type:"list"`
  2900. // Specifies whether the job flow is visible to all IAM users of the AWS account
  2901. // associated with the job flow. If this value is set to true, all IAM users
  2902. // of that AWS account can view and (if they have the proper policy permissions
  2903. // set) manage the job flow. If it is set to false, only the IAM user that created
  2904. // the job flow can view and manage it. This value can be changed using the
  2905. // SetVisibleToAllUsers action.
  2906. VisibleToAllUsers *bool `type:"boolean"`
  2907. }
  2908. // String returns the string representation
  2909. func (s JobFlowDetail) String() string {
  2910. return awsutil.Prettify(s)
  2911. }
  2912. // GoString returns the string representation
  2913. func (s JobFlowDetail) GoString() string {
  2914. return s.String()
  2915. }
  2916. // Describes the status of the job flow.
  2917. type JobFlowExecutionStatusDetail struct {
  2918. _ struct{} `type:"structure"`
  2919. // The creation date and time of the job flow.
  2920. //
  2921. // CreationDateTime is a required field
  2922. CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
  2923. // The completion date and time of the job flow.
  2924. EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2925. // Description of the job flow last changed state.
  2926. LastStateChangeReason *string `type:"string"`
  2927. // The date and time when the job flow was ready to start running bootstrap
  2928. // actions.
  2929. ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2930. // The start date and time of the job flow.
  2931. StartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2932. // The state of the job flow.
  2933. //
  2934. // State is a required field
  2935. State *string `type:"string" required:"true" enum:"JobFlowExecutionState"`
  2936. }
  2937. // String returns the string representation
  2938. func (s JobFlowExecutionStatusDetail) String() string {
  2939. return awsutil.Prettify(s)
  2940. }
  2941. // GoString returns the string representation
  2942. func (s JobFlowExecutionStatusDetail) GoString() string {
  2943. return s.String()
  2944. }
  2945. // A description of the Amazon EC2 instance running the job flow. A valid JobFlowInstancesConfig
  2946. // must contain at least InstanceGroups, which is the recommended configuration.
  2947. // However, a valid alternative is to have MasterInstanceType, SlaveInstanceType,
  2948. // and InstanceCount (all three must be present).
  2949. type JobFlowInstancesConfig struct {
  2950. _ struct{} `type:"structure"`
  2951. // A list of additional Amazon EC2 security group IDs for the master node.
  2952. AdditionalMasterSecurityGroups []*string `type:"list"`
  2953. // A list of additional Amazon EC2 security group IDs for the slave nodes.
  2954. AdditionalSlaveSecurityGroups []*string `type:"list"`
  2955. // The name of the Amazon EC2 key pair that can be used to ssh to the master
  2956. // node as the user called "hadoop."
  2957. Ec2KeyName *string `type:"string"`
  2958. // To launch the job flow in Amazon Virtual Private Cloud (Amazon VPC), set
  2959. // this parameter to the identifier of the Amazon VPC subnet where you want
  2960. // the job flow to launch. If you do not specify this value, the job flow is
  2961. // launched in the normal Amazon Web Services cloud, outside of an Amazon VPC.
  2962. //
  2963. // Amazon VPC currently does not support cluster compute quadruple extra large
  2964. // (cc1.4xlarge) instances. Thus you cannot specify the cc1.4xlarge instance
  2965. // type for nodes of a job flow launched in a Amazon VPC.
  2966. Ec2SubnetId *string `type:"string"`
  2967. // The identifier of the Amazon EC2 security group for the master node.
  2968. EmrManagedMasterSecurityGroup *string `type:"string"`
  2969. // The identifier of the Amazon EC2 security group for the slave nodes.
  2970. EmrManagedSlaveSecurityGroup *string `type:"string"`
  2971. // The Hadoop version for the job flow. Valid inputs are "0.18" (deprecated),
  2972. // "0.20" (deprecated), "0.20.205" (deprecated), "1.0.3", "2.2.0", or "2.4.0".
  2973. // If you do not set this value, the default of 0.18 is used, unless the AmiVersion
  2974. // parameter is set in the RunJobFlow call, in which case the default version
  2975. // of Hadoop for that AMI version is used.
  2976. HadoopVersion *string `type:"string"`
  2977. // The number of Amazon EC2 instances used to execute the job flow.
  2978. InstanceCount *int64 `type:"integer"`
  2979. // Configuration for the job flow's instance groups.
  2980. InstanceGroups []*InstanceGroupConfig `type:"list"`
  2981. // Specifies whether the job flow should be kept alive after completing all
  2982. // steps.
  2983. KeepJobFlowAliveWhenNoSteps *bool `type:"boolean"`
  2984. // The EC2 instance type of the master node.
  2985. MasterInstanceType *string `min:"1" type:"string"`
  2986. // The Availability Zone the job flow will run in.
  2987. Placement *PlacementType `type:"structure"`
  2988. // The identifier of the Amazon EC2 security group for the Amazon EMR service
  2989. // to access clusters in VPC private subnets.
  2990. ServiceAccessSecurityGroup *string `type:"string"`
  2991. // The EC2 instance type of the slave nodes.
  2992. SlaveInstanceType *string `min:"1" type:"string"`
  2993. // Specifies whether to lock the job flow to prevent the Amazon EC2 instances
  2994. // from being terminated by API call, user intervention, or in the event of
  2995. // a job flow error.
  2996. TerminationProtected *bool `type:"boolean"`
  2997. }
  2998. // String returns the string representation
  2999. func (s JobFlowInstancesConfig) String() string {
  3000. return awsutil.Prettify(s)
  3001. }
  3002. // GoString returns the string representation
  3003. func (s JobFlowInstancesConfig) GoString() string {
  3004. return s.String()
  3005. }
  3006. // Validate inspects the fields of the type to determine if they are valid.
  3007. func (s *JobFlowInstancesConfig) Validate() error {
  3008. invalidParams := request.ErrInvalidParams{Context: "JobFlowInstancesConfig"}
  3009. if s.MasterInstanceType != nil && len(*s.MasterInstanceType) < 1 {
  3010. invalidParams.Add(request.NewErrParamMinLen("MasterInstanceType", 1))
  3011. }
  3012. if s.SlaveInstanceType != nil && len(*s.SlaveInstanceType) < 1 {
  3013. invalidParams.Add(request.NewErrParamMinLen("SlaveInstanceType", 1))
  3014. }
  3015. if s.InstanceGroups != nil {
  3016. for i, v := range s.InstanceGroups {
  3017. if v == nil {
  3018. continue
  3019. }
  3020. if err := v.Validate(); err != nil {
  3021. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InstanceGroups", i), err.(request.ErrInvalidParams))
  3022. }
  3023. }
  3024. }
  3025. if s.Placement != nil {
  3026. if err := s.Placement.Validate(); err != nil {
  3027. invalidParams.AddNested("Placement", err.(request.ErrInvalidParams))
  3028. }
  3029. }
  3030. if invalidParams.Len() > 0 {
  3031. return invalidParams
  3032. }
  3033. return nil
  3034. }
  3035. // Specify the type of Amazon EC2 instances to run the job flow on.
  3036. type JobFlowInstancesDetail struct {
  3037. _ struct{} `type:"structure"`
  3038. // The name of an Amazon EC2 key pair that can be used to ssh to the master
  3039. // node of job flow.
  3040. Ec2KeyName *string `type:"string"`
  3041. // For job flows launched within Amazon Virtual Private Cloud, this value specifies
  3042. // the identifier of the subnet where the job flow was launched.
  3043. Ec2SubnetId *string `type:"string"`
  3044. // The Hadoop version for the job flow.
  3045. HadoopVersion *string `type:"string"`
  3046. // The number of Amazon EC2 instances in the cluster. If the value is 1, the
  3047. // same instance serves as both the master and slave node. If the value is greater
  3048. // than 1, one instance is the master node and all others are slave nodes.
  3049. //
  3050. // InstanceCount is a required field
  3051. InstanceCount *int64 `type:"integer" required:"true"`
  3052. // Details about the job flow's instance groups.
  3053. InstanceGroups []*InstanceGroupDetail `type:"list"`
  3054. // Specifies whether the job flow should terminate after completing all steps.
  3055. KeepJobFlowAliveWhenNoSteps *bool `type:"boolean"`
  3056. // The Amazon EC2 instance identifier of the master node.
  3057. MasterInstanceId *string `type:"string"`
  3058. // The Amazon EC2 master node instance type.
  3059. //
  3060. // MasterInstanceType is a required field
  3061. MasterInstanceType *string `min:"1" type:"string" required:"true"`
  3062. // The DNS name of the master node.
  3063. MasterPublicDnsName *string `type:"string"`
  3064. // An approximation of the cost of the job flow, represented in m1.small/hours.
  3065. // This value is incremented once for every hour an m1.small runs. Larger instances
  3066. // are weighted more, so an Amazon EC2 instance that is roughly four times more
  3067. // expensive would result in the normalized instance hours being incremented
  3068. // by four. This result is only an approximation and does not reflect the actual
  3069. // billing rate.
  3070. NormalizedInstanceHours *int64 `type:"integer"`
  3071. // The Amazon EC2 Availability Zone for the job flow.
  3072. Placement *PlacementType `type:"structure"`
  3073. // The Amazon EC2 slave node instance type.
  3074. //
  3075. // SlaveInstanceType is a required field
  3076. SlaveInstanceType *string `min:"1" type:"string" required:"true"`
  3077. // Specifies whether the Amazon EC2 instances in the cluster are protected from
  3078. // termination by API calls, user intervention, or in the event of a job flow
  3079. // error.
  3080. TerminationProtected *bool `type:"boolean"`
  3081. }
  3082. // String returns the string representation
  3083. func (s JobFlowInstancesDetail) String() string {
  3084. return awsutil.Prettify(s)
  3085. }
  3086. // GoString returns the string representation
  3087. func (s JobFlowInstancesDetail) GoString() string {
  3088. return s.String()
  3089. }
  3090. // A key value pair.
  3091. type KeyValue struct {
  3092. _ struct{} `type:"structure"`
  3093. // The unique identifier of a key value pair.
  3094. Key *string `type:"string"`
  3095. // The value part of the identified key.
  3096. Value *string `type:"string"`
  3097. }
  3098. // String returns the string representation
  3099. func (s KeyValue) String() string {
  3100. return awsutil.Prettify(s)
  3101. }
  3102. // GoString returns the string representation
  3103. func (s KeyValue) GoString() string {
  3104. return s.String()
  3105. }
  3106. // This input determines which bootstrap actions to retrieve.
  3107. type ListBootstrapActionsInput struct {
  3108. _ struct{} `type:"structure"`
  3109. // The cluster identifier for the bootstrap actions to list .
  3110. //
  3111. // ClusterId is a required field
  3112. ClusterId *string `type:"string" required:"true"`
  3113. // The pagination token that indicates the next set of results to retrieve.
  3114. Marker *string `type:"string"`
  3115. }
  3116. // String returns the string representation
  3117. func (s ListBootstrapActionsInput) String() string {
  3118. return awsutil.Prettify(s)
  3119. }
  3120. // GoString returns the string representation
  3121. func (s ListBootstrapActionsInput) GoString() string {
  3122. return s.String()
  3123. }
  3124. // Validate inspects the fields of the type to determine if they are valid.
  3125. func (s *ListBootstrapActionsInput) Validate() error {
  3126. invalidParams := request.ErrInvalidParams{Context: "ListBootstrapActionsInput"}
  3127. if s.ClusterId == nil {
  3128. invalidParams.Add(request.NewErrParamRequired("ClusterId"))
  3129. }
  3130. if invalidParams.Len() > 0 {
  3131. return invalidParams
  3132. }
  3133. return nil
  3134. }
  3135. // This output contains the boostrap actions detail .
  3136. type ListBootstrapActionsOutput struct {
  3137. _ struct{} `type:"structure"`
  3138. // The bootstrap actions associated with the cluster .
  3139. BootstrapActions []*Command `type:"list"`
  3140. // The pagination token that indicates the next set of results to retrieve.
  3141. Marker *string `type:"string"`
  3142. }
  3143. // String returns the string representation
  3144. func (s ListBootstrapActionsOutput) String() string {
  3145. return awsutil.Prettify(s)
  3146. }
  3147. // GoString returns the string representation
  3148. func (s ListBootstrapActionsOutput) GoString() string {
  3149. return s.String()
  3150. }
  3151. // This input determines how the ListClusters action filters the list of clusters
  3152. // that it returns.
  3153. type ListClustersInput struct {
  3154. _ struct{} `type:"structure"`
  3155. // The cluster state filters to apply when listing clusters.
  3156. ClusterStates []*string `type:"list"`
  3157. // The creation date and time beginning value filter for listing clusters .
  3158. CreatedAfter *time.Time `type:"timestamp" timestampFormat:"unix"`
  3159. // The creation date and time end value filter for listing clusters .
  3160. CreatedBefore *time.Time `type:"timestamp" timestampFormat:"unix"`
  3161. // The pagination token that indicates the next set of results to retrieve.
  3162. Marker *string `type:"string"`
  3163. }
  3164. // String returns the string representation
  3165. func (s ListClustersInput) String() string {
  3166. return awsutil.Prettify(s)
  3167. }
  3168. // GoString returns the string representation
  3169. func (s ListClustersInput) GoString() string {
  3170. return s.String()
  3171. }
  3172. // This contains a ClusterSummaryList with the cluster details; for example,
  3173. // the cluster IDs, names, and status.
  3174. type ListClustersOutput struct {
  3175. _ struct{} `type:"structure"`
  3176. // The list of clusters for the account based on the given filters.
  3177. Clusters []*ClusterSummary `type:"list"`
  3178. // The pagination token that indicates the next set of results to retrieve.
  3179. Marker *string `type:"string"`
  3180. }
  3181. // String returns the string representation
  3182. func (s ListClustersOutput) String() string {
  3183. return awsutil.Prettify(s)
  3184. }
  3185. // GoString returns the string representation
  3186. func (s ListClustersOutput) GoString() string {
  3187. return s.String()
  3188. }
  3189. // This input determines which instance groups to retrieve.
  3190. type ListInstanceGroupsInput struct {
  3191. _ struct{} `type:"structure"`
  3192. // The identifier of the cluster for which to list the instance groups.
  3193. //
  3194. // ClusterId is a required field
  3195. ClusterId *string `type:"string" required:"true"`
  3196. // The pagination token that indicates the next set of results to retrieve.
  3197. Marker *string `type:"string"`
  3198. }
  3199. // String returns the string representation
  3200. func (s ListInstanceGroupsInput) String() string {
  3201. return awsutil.Prettify(s)
  3202. }
  3203. // GoString returns the string representation
  3204. func (s ListInstanceGroupsInput) GoString() string {
  3205. return s.String()
  3206. }
  3207. // Validate inspects the fields of the type to determine if they are valid.
  3208. func (s *ListInstanceGroupsInput) Validate() error {
  3209. invalidParams := request.ErrInvalidParams{Context: "ListInstanceGroupsInput"}
  3210. if s.ClusterId == nil {
  3211. invalidParams.Add(request.NewErrParamRequired("ClusterId"))
  3212. }
  3213. if invalidParams.Len() > 0 {
  3214. return invalidParams
  3215. }
  3216. return nil
  3217. }
  3218. // This input determines which instance groups to retrieve.
  3219. type ListInstanceGroupsOutput struct {
  3220. _ struct{} `type:"structure"`
  3221. // The list of instance groups for the cluster and given filters.
  3222. InstanceGroups []*InstanceGroup `type:"list"`
  3223. // The pagination token that indicates the next set of results to retrieve.
  3224. Marker *string `type:"string"`
  3225. }
  3226. // String returns the string representation
  3227. func (s ListInstanceGroupsOutput) String() string {
  3228. return awsutil.Prettify(s)
  3229. }
  3230. // GoString returns the string representation
  3231. func (s ListInstanceGroupsOutput) GoString() string {
  3232. return s.String()
  3233. }
  3234. // This input determines which instances to list.
  3235. type ListInstancesInput struct {
  3236. _ struct{} `type:"structure"`
  3237. // The identifier of the cluster for which to list the instances.
  3238. //
  3239. // ClusterId is a required field
  3240. ClusterId *string `type:"string" required:"true"`
  3241. // The identifier of the instance group for which to list the instances.
  3242. InstanceGroupId *string `type:"string"`
  3243. // The type of instance group for which to list the instances.
  3244. InstanceGroupTypes []*string `type:"list"`
  3245. // A list of instance states that will filter the instances returned with this
  3246. // request.
  3247. InstanceStates []*string `type:"list"`
  3248. // The pagination token that indicates the next set of results to retrieve.
  3249. Marker *string `type:"string"`
  3250. }
  3251. // String returns the string representation
  3252. func (s ListInstancesInput) String() string {
  3253. return awsutil.Prettify(s)
  3254. }
  3255. // GoString returns the string representation
  3256. func (s ListInstancesInput) GoString() string {
  3257. return s.String()
  3258. }
  3259. // Validate inspects the fields of the type to determine if they are valid.
  3260. func (s *ListInstancesInput) Validate() error {
  3261. invalidParams := request.ErrInvalidParams{Context: "ListInstancesInput"}
  3262. if s.ClusterId == nil {
  3263. invalidParams.Add(request.NewErrParamRequired("ClusterId"))
  3264. }
  3265. if invalidParams.Len() > 0 {
  3266. return invalidParams
  3267. }
  3268. return nil
  3269. }
  3270. // This output contains the list of instances.
  3271. type ListInstancesOutput struct {
  3272. _ struct{} `type:"structure"`
  3273. // The list of instances for the cluster and given filters.
  3274. Instances []*Instance `type:"list"`
  3275. // The pagination token that indicates the next set of results to retrieve.
  3276. Marker *string `type:"string"`
  3277. }
  3278. // String returns the string representation
  3279. func (s ListInstancesOutput) String() string {
  3280. return awsutil.Prettify(s)
  3281. }
  3282. // GoString returns the string representation
  3283. func (s ListInstancesOutput) GoString() string {
  3284. return s.String()
  3285. }
  3286. type ListSecurityConfigurationsInput struct {
  3287. _ struct{} `type:"structure"`
  3288. // The pagination token that indicates the set of results to retrieve.
  3289. Marker *string `type:"string"`
  3290. }
  3291. // String returns the string representation
  3292. func (s ListSecurityConfigurationsInput) String() string {
  3293. return awsutil.Prettify(s)
  3294. }
  3295. // GoString returns the string representation
  3296. func (s ListSecurityConfigurationsInput) GoString() string {
  3297. return s.String()
  3298. }
  3299. type ListSecurityConfigurationsOutput struct {
  3300. _ struct{} `type:"structure"`
  3301. // A pagination token that indicates the next set of results to retrieve. Include
  3302. // the marker in the next ListSecurityConfiguration call to retrieve the next
  3303. // page of results, if required.
  3304. Marker *string `type:"string"`
  3305. // The creation date and time, and name, of each security configuration.
  3306. SecurityConfigurations []*SecurityConfigurationSummary `type:"list"`
  3307. }
  3308. // String returns the string representation
  3309. func (s ListSecurityConfigurationsOutput) String() string {
  3310. return awsutil.Prettify(s)
  3311. }
  3312. // GoString returns the string representation
  3313. func (s ListSecurityConfigurationsOutput) GoString() string {
  3314. return s.String()
  3315. }
  3316. // This input determines which steps to list.
  3317. type ListStepsInput struct {
  3318. _ struct{} `type:"structure"`
  3319. // The identifier of the cluster for which to list the steps.
  3320. //
  3321. // ClusterId is a required field
  3322. ClusterId *string `type:"string" required:"true"`
  3323. // The pagination token that indicates the next set of results to retrieve.
  3324. Marker *string `type:"string"`
  3325. // The filter to limit the step list based on the identifier of the steps.
  3326. StepIds []*string `type:"list"`
  3327. // The filter to limit the step list based on certain states.
  3328. StepStates []*string `type:"list"`
  3329. }
  3330. // String returns the string representation
  3331. func (s ListStepsInput) String() string {
  3332. return awsutil.Prettify(s)
  3333. }
  3334. // GoString returns the string representation
  3335. func (s ListStepsInput) GoString() string {
  3336. return s.String()
  3337. }
  3338. // Validate inspects the fields of the type to determine if they are valid.
  3339. func (s *ListStepsInput) Validate() error {
  3340. invalidParams := request.ErrInvalidParams{Context: "ListStepsInput"}
  3341. if s.ClusterId == nil {
  3342. invalidParams.Add(request.NewErrParamRequired("ClusterId"))
  3343. }
  3344. if invalidParams.Len() > 0 {
  3345. return invalidParams
  3346. }
  3347. return nil
  3348. }
  3349. // This output contains the list of steps returned in reverse order. This means
  3350. // that the last step is the first element in the list.
  3351. type ListStepsOutput struct {
  3352. _ struct{} `type:"structure"`
  3353. // The pagination token that indicates the next set of results to retrieve.
  3354. Marker *string `type:"string"`
  3355. // The filtered list of steps for the cluster.
  3356. Steps []*StepSummary `type:"list"`
  3357. }
  3358. // String returns the string representation
  3359. func (s ListStepsOutput) String() string {
  3360. return awsutil.Prettify(s)
  3361. }
  3362. // GoString returns the string representation
  3363. func (s ListStepsOutput) GoString() string {
  3364. return s.String()
  3365. }
  3366. // Change the size of some instance groups.
  3367. type ModifyInstanceGroupsInput struct {
  3368. _ struct{} `type:"structure"`
  3369. // Instance groups to change.
  3370. InstanceGroups []*InstanceGroupModifyConfig `type:"list"`
  3371. }
  3372. // String returns the string representation
  3373. func (s ModifyInstanceGroupsInput) String() string {
  3374. return awsutil.Prettify(s)
  3375. }
  3376. // GoString returns the string representation
  3377. func (s ModifyInstanceGroupsInput) GoString() string {
  3378. return s.String()
  3379. }
  3380. // Validate inspects the fields of the type to determine if they are valid.
  3381. func (s *ModifyInstanceGroupsInput) Validate() error {
  3382. invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceGroupsInput"}
  3383. if s.InstanceGroups != nil {
  3384. for i, v := range s.InstanceGroups {
  3385. if v == nil {
  3386. continue
  3387. }
  3388. if err := v.Validate(); err != nil {
  3389. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InstanceGroups", i), err.(request.ErrInvalidParams))
  3390. }
  3391. }
  3392. }
  3393. if invalidParams.Len() > 0 {
  3394. return invalidParams
  3395. }
  3396. return nil
  3397. }
  3398. type ModifyInstanceGroupsOutput struct {
  3399. _ struct{} `type:"structure"`
  3400. }
  3401. // String returns the string representation
  3402. func (s ModifyInstanceGroupsOutput) String() string {
  3403. return awsutil.Prettify(s)
  3404. }
  3405. // GoString returns the string representation
  3406. func (s ModifyInstanceGroupsOutput) GoString() string {
  3407. return s.String()
  3408. }
  3409. // The Amazon EC2 location for the job flow.
  3410. type PlacementType struct {
  3411. _ struct{} `type:"structure"`
  3412. // The Amazon EC2 Availability Zone for the job flow.
  3413. //
  3414. // AvailabilityZone is a required field
  3415. AvailabilityZone *string `type:"string" required:"true"`
  3416. }
  3417. // String returns the string representation
  3418. func (s PlacementType) String() string {
  3419. return awsutil.Prettify(s)
  3420. }
  3421. // GoString returns the string representation
  3422. func (s PlacementType) GoString() string {
  3423. return s.String()
  3424. }
  3425. // Validate inspects the fields of the type to determine if they are valid.
  3426. func (s *PlacementType) Validate() error {
  3427. invalidParams := request.ErrInvalidParams{Context: "PlacementType"}
  3428. if s.AvailabilityZone == nil {
  3429. invalidParams.Add(request.NewErrParamRequired("AvailabilityZone"))
  3430. }
  3431. if invalidParams.Len() > 0 {
  3432. return invalidParams
  3433. }
  3434. return nil
  3435. }
  3436. // This input identifies a cluster and a list of tags to remove.
  3437. type RemoveTagsInput struct {
  3438. _ struct{} `type:"structure"`
  3439. // The Amazon EMR resource identifier from which tags will be removed. This
  3440. // value must be a cluster identifier.
  3441. //
  3442. // ResourceId is a required field
  3443. ResourceId *string `type:"string" required:"true"`
  3444. // A list of tag keys to remove from a resource.
  3445. //
  3446. // TagKeys is a required field
  3447. TagKeys []*string `type:"list" required:"true"`
  3448. }
  3449. // String returns the string representation
  3450. func (s RemoveTagsInput) String() string {
  3451. return awsutil.Prettify(s)
  3452. }
  3453. // GoString returns the string representation
  3454. func (s RemoveTagsInput) GoString() string {
  3455. return s.String()
  3456. }
  3457. // Validate inspects the fields of the type to determine if they are valid.
  3458. func (s *RemoveTagsInput) Validate() error {
  3459. invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"}
  3460. if s.ResourceId == nil {
  3461. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  3462. }
  3463. if s.TagKeys == nil {
  3464. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  3465. }
  3466. if invalidParams.Len() > 0 {
  3467. return invalidParams
  3468. }
  3469. return nil
  3470. }
  3471. // This output indicates the result of removing tags from a resource.
  3472. type RemoveTagsOutput struct {
  3473. _ struct{} `type:"structure"`
  3474. }
  3475. // String returns the string representation
  3476. func (s RemoveTagsOutput) String() string {
  3477. return awsutil.Prettify(s)
  3478. }
  3479. // GoString returns the string representation
  3480. func (s RemoveTagsOutput) GoString() string {
  3481. return s.String()
  3482. }
  3483. // Input to the RunJobFlow operation.
  3484. type RunJobFlowInput struct {
  3485. _ struct{} `type:"structure"`
  3486. // A JSON string for selecting additional features.
  3487. AdditionalInfo *string `type:"string"`
  3488. // For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and greater,
  3489. // use ReleaseLabel.
  3490. //
  3491. // The version of the Amazon Machine Image (AMI) to use when launching Amazon
  3492. // EC2 instances in the job flow. The following values are valid:
  3493. //
  3494. // * The version number of the AMI to use, for example, "2.0."
  3495. //
  3496. // If the AMI supports multiple versions of Hadoop (for example, AMI 1.0 supports
  3497. // both Hadoop 0.18 and 0.20) you can use the JobFlowInstancesConfigHadoopVersion
  3498. // parameter to modify the version of Hadoop from the defaults shown above.
  3499. //
  3500. // For details about the AMI versions currently supported by Amazon Elastic
  3501. // MapReduce, go to AMI Versions Supported in Elastic MapReduce (http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/EnvironmentConfig_AMIVersion.html#ami-versions-supported)
  3502. // in the Amazon Elastic MapReduce Developer's Guide.
  3503. AmiVersion *string `type:"string"`
  3504. // Amazon EMR releases 4.x or later.
  3505. //
  3506. // A list of applications for the cluster. Valid values are: "Hadoop", "Hive",
  3507. // "Mahout", "Pig", and "Spark." They are case insensitive.
  3508. Applications []*Application `type:"list"`
  3509. // A list of bootstrap actions that will be run before Hadoop is started on
  3510. // the cluster nodes.
  3511. BootstrapActions []*BootstrapActionConfig `type:"list"`
  3512. // Amazon EMR releases 4.x or later.
  3513. //
  3514. // The list of configurations supplied for the EMR cluster you are creating.
  3515. Configurations []*Configuration `type:"list"`
  3516. // A specification of the number and type of Amazon EC2 instances on which to
  3517. // run the job flow.
  3518. //
  3519. // Instances is a required field
  3520. Instances *JobFlowInstancesConfig `type:"structure" required:"true"`
  3521. // Also called instance profile and EC2 role. An IAM role for an EMR cluster.
  3522. // The EC2 instances of the cluster assume this role. The default role is EMR_EC2_DefaultRole.
  3523. // In order to use the default role, you must have already created it using
  3524. // the CLI or console.
  3525. JobFlowRole *string `type:"string"`
  3526. // The location in Amazon S3 to write the log files of the job flow. If a value
  3527. // is not provided, logs are not created.
  3528. LogUri *string `type:"string"`
  3529. // The name of the job flow.
  3530. //
  3531. // Name is a required field
  3532. Name *string `type:"string" required:"true"`
  3533. // For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and greater,
  3534. // use Applications.
  3535. //
  3536. // A list of strings that indicates third-party software to use with the job
  3537. // flow that accepts a user argument list. EMR accepts and forwards the argument
  3538. // list to the corresponding installation script as bootstrap action arguments.
  3539. // For more information, see Launch a Job Flow on the MapR Distribution for
  3540. // Hadoop (http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-mapr.html).
  3541. // Currently supported values are:
  3542. //
  3543. // * "mapr-m3" - launch the cluster using MapR M3 Edition.
  3544. //
  3545. // * "mapr-m5" - launch the cluster using MapR M5 Edition.
  3546. //
  3547. // * "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5"
  3548. // - launch the job flow using MapR M3 or M5 Edition respectively.
  3549. //
  3550. // * "mapr-m7" - launch the cluster using MapR M7 Edition.
  3551. //
  3552. // * "hunk" - launch the cluster with the Hunk Big Data Analtics Platform.
  3553. //
  3554. // * "hue"- launch the cluster with Hue installed.
  3555. //
  3556. // * "spark" - launch the cluster with Apache Spark installed.
  3557. //
  3558. // * "ganglia" - launch the cluster with the Ganglia Monitoring System installed.
  3559. NewSupportedProducts []*SupportedProductConfig `type:"list"`
  3560. // Amazon EMR releases 4.x or later.
  3561. //
  3562. // The release label for the Amazon EMR release. For Amazon EMR 3.x and 2.x
  3563. // AMIs, use amiVersion instead instead of ReleaseLabel.
  3564. ReleaseLabel *string `type:"string"`
  3565. // The name of a security configuration to apply to the cluster.
  3566. SecurityConfiguration *string `type:"string"`
  3567. // The IAM role that will be assumed by the Amazon EMR service to access AWS
  3568. // resources on your behalf.
  3569. ServiceRole *string `type:"string"`
  3570. // A list of steps to be executed by the job flow.
  3571. Steps []*StepConfig `type:"list"`
  3572. // For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and greater,
  3573. // use Applications.
  3574. //
  3575. // A list of strings that indicates third-party software to use with the job
  3576. // flow. For more information, go to Use Third Party Applications with Amazon
  3577. // EMR (http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-supported-products.html).
  3578. // Currently supported values are:
  3579. //
  3580. // * "mapr-m3" - launch the job flow using MapR M3 Edition.
  3581. //
  3582. // * "mapr-m5" - launch the job flow using MapR M5 Edition.
  3583. SupportedProducts []*string `type:"list"`
  3584. // A list of tags to associate with a cluster and propagate to Amazon EC2 instances.
  3585. Tags []*Tag `type:"list"`
  3586. // Whether the job flow is visible to all IAM users of the AWS account associated
  3587. // with the job flow. If this value is set to true, all IAM users of that AWS
  3588. // account can view and (if they have the proper policy permissions set) manage
  3589. // the job flow. If it is set to false, only the IAM user that created the job
  3590. // flow can view and manage it.
  3591. VisibleToAllUsers *bool `type:"boolean"`
  3592. }
  3593. // String returns the string representation
  3594. func (s RunJobFlowInput) String() string {
  3595. return awsutil.Prettify(s)
  3596. }
  3597. // GoString returns the string representation
  3598. func (s RunJobFlowInput) GoString() string {
  3599. return s.String()
  3600. }
  3601. // Validate inspects the fields of the type to determine if they are valid.
  3602. func (s *RunJobFlowInput) Validate() error {
  3603. invalidParams := request.ErrInvalidParams{Context: "RunJobFlowInput"}
  3604. if s.Instances == nil {
  3605. invalidParams.Add(request.NewErrParamRequired("Instances"))
  3606. }
  3607. if s.Name == nil {
  3608. invalidParams.Add(request.NewErrParamRequired("Name"))
  3609. }
  3610. if s.BootstrapActions != nil {
  3611. for i, v := range s.BootstrapActions {
  3612. if v == nil {
  3613. continue
  3614. }
  3615. if err := v.Validate(); err != nil {
  3616. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "BootstrapActions", i), err.(request.ErrInvalidParams))
  3617. }
  3618. }
  3619. }
  3620. if s.Instances != nil {
  3621. if err := s.Instances.Validate(); err != nil {
  3622. invalidParams.AddNested("Instances", err.(request.ErrInvalidParams))
  3623. }
  3624. }
  3625. if s.Steps != nil {
  3626. for i, v := range s.Steps {
  3627. if v == nil {
  3628. continue
  3629. }
  3630. if err := v.Validate(); err != nil {
  3631. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Steps", i), err.(request.ErrInvalidParams))
  3632. }
  3633. }
  3634. }
  3635. if invalidParams.Len() > 0 {
  3636. return invalidParams
  3637. }
  3638. return nil
  3639. }
  3640. // The result of the RunJobFlow operation.
  3641. type RunJobFlowOutput struct {
  3642. _ struct{} `type:"structure"`
  3643. // An unique identifier for the job flow.
  3644. JobFlowId *string `type:"string"`
  3645. }
  3646. // String returns the string representation
  3647. func (s RunJobFlowOutput) String() string {
  3648. return awsutil.Prettify(s)
  3649. }
  3650. // GoString returns the string representation
  3651. func (s RunJobFlowOutput) GoString() string {
  3652. return s.String()
  3653. }
  3654. type ScriptBootstrapActionConfig struct {
  3655. _ struct{} `type:"structure"`
  3656. Args []*string `type:"list"`
  3657. // Path is a required field
  3658. Path *string `type:"string" required:"true"`
  3659. }
  3660. // String returns the string representation
  3661. func (s ScriptBootstrapActionConfig) String() string {
  3662. return awsutil.Prettify(s)
  3663. }
  3664. // GoString returns the string representation
  3665. func (s ScriptBootstrapActionConfig) GoString() string {
  3666. return s.String()
  3667. }
  3668. // Validate inspects the fields of the type to determine if they are valid.
  3669. func (s *ScriptBootstrapActionConfig) Validate() error {
  3670. invalidParams := request.ErrInvalidParams{Context: "ScriptBootstrapActionConfig"}
  3671. if s.Path == nil {
  3672. invalidParams.Add(request.NewErrParamRequired("Path"))
  3673. }
  3674. if invalidParams.Len() > 0 {
  3675. return invalidParams
  3676. }
  3677. return nil
  3678. }
  3679. // The creation date and time, and name, of a security configuration.
  3680. type SecurityConfigurationSummary struct {
  3681. _ struct{} `type:"structure"`
  3682. // The date and time the security configuration was created.
  3683. CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  3684. // The name of the security configuration.
  3685. Name *string `type:"string"`
  3686. }
  3687. // String returns the string representation
  3688. func (s SecurityConfigurationSummary) String() string {
  3689. return awsutil.Prettify(s)
  3690. }
  3691. // GoString returns the string representation
  3692. func (s SecurityConfigurationSummary) GoString() string {
  3693. return s.String()
  3694. }
  3695. // The input argument to the TerminationProtection operation.
  3696. type SetTerminationProtectionInput struct {
  3697. _ struct{} `type:"structure"`
  3698. // A list of strings that uniquely identify the job flows to protect. This identifier
  3699. // is returned by RunJobFlow and can also be obtained from DescribeJobFlows
  3700. // .
  3701. //
  3702. // JobFlowIds is a required field
  3703. JobFlowIds []*string `type:"list" required:"true"`
  3704. // A Boolean that indicates whether to protect the job flow and prevent the
  3705. // Amazon EC2 instances in the cluster from shutting down due to API calls,
  3706. // user intervention, or job-flow error.
  3707. //
  3708. // TerminationProtected is a required field
  3709. TerminationProtected *bool `type:"boolean" required:"true"`
  3710. }
  3711. // String returns the string representation
  3712. func (s SetTerminationProtectionInput) String() string {
  3713. return awsutil.Prettify(s)
  3714. }
  3715. // GoString returns the string representation
  3716. func (s SetTerminationProtectionInput) GoString() string {
  3717. return s.String()
  3718. }
  3719. // Validate inspects the fields of the type to determine if they are valid.
  3720. func (s *SetTerminationProtectionInput) Validate() error {
  3721. invalidParams := request.ErrInvalidParams{Context: "SetTerminationProtectionInput"}
  3722. if s.JobFlowIds == nil {
  3723. invalidParams.Add(request.NewErrParamRequired("JobFlowIds"))
  3724. }
  3725. if s.TerminationProtected == nil {
  3726. invalidParams.Add(request.NewErrParamRequired("TerminationProtected"))
  3727. }
  3728. if invalidParams.Len() > 0 {
  3729. return invalidParams
  3730. }
  3731. return nil
  3732. }
  3733. type SetTerminationProtectionOutput struct {
  3734. _ struct{} `type:"structure"`
  3735. }
  3736. // String returns the string representation
  3737. func (s SetTerminationProtectionOutput) String() string {
  3738. return awsutil.Prettify(s)
  3739. }
  3740. // GoString returns the string representation
  3741. func (s SetTerminationProtectionOutput) GoString() string {
  3742. return s.String()
  3743. }
  3744. // The input to the SetVisibleToAllUsers action.
  3745. type SetVisibleToAllUsersInput struct {
  3746. _ struct{} `type:"structure"`
  3747. // Identifiers of the job flows to receive the new visibility setting.
  3748. //
  3749. // JobFlowIds is a required field
  3750. JobFlowIds []*string `type:"list" required:"true"`
  3751. // Whether the specified job flows are visible to all IAM users of the AWS account
  3752. // associated with the job flow. If this value is set to True, all IAM users
  3753. // of that AWS account can view and, if they have the proper IAM policy permissions
  3754. // set, manage the job flows. If it is set to False, only the IAM user that
  3755. // created a job flow can view and manage it.
  3756. //
  3757. // VisibleToAllUsers is a required field
  3758. VisibleToAllUsers *bool `type:"boolean" required:"true"`
  3759. }
  3760. // String returns the string representation
  3761. func (s SetVisibleToAllUsersInput) String() string {
  3762. return awsutil.Prettify(s)
  3763. }
  3764. // GoString returns the string representation
  3765. func (s SetVisibleToAllUsersInput) GoString() string {
  3766. return s.String()
  3767. }
  3768. // Validate inspects the fields of the type to determine if they are valid.
  3769. func (s *SetVisibleToAllUsersInput) Validate() error {
  3770. invalidParams := request.ErrInvalidParams{Context: "SetVisibleToAllUsersInput"}
  3771. if s.JobFlowIds == nil {
  3772. invalidParams.Add(request.NewErrParamRequired("JobFlowIds"))
  3773. }
  3774. if s.VisibleToAllUsers == nil {
  3775. invalidParams.Add(request.NewErrParamRequired("VisibleToAllUsers"))
  3776. }
  3777. if invalidParams.Len() > 0 {
  3778. return invalidParams
  3779. }
  3780. return nil
  3781. }
  3782. type SetVisibleToAllUsersOutput struct {
  3783. _ struct{} `type:"structure"`
  3784. }
  3785. // String returns the string representation
  3786. func (s SetVisibleToAllUsersOutput) String() string {
  3787. return awsutil.Prettify(s)
  3788. }
  3789. // GoString returns the string representation
  3790. func (s SetVisibleToAllUsersOutput) GoString() string {
  3791. return s.String()
  3792. }
  3793. // Policy for customizing shrink operations. Allows configuration of decommissioning
  3794. // timeout and targeted instance shrinking.
  3795. type ShrinkPolicy struct {
  3796. _ struct{} `type:"structure"`
  3797. // The desired timeout for decommissioning an instance. Overrides the default
  3798. // YARN decommissioning timeout.
  3799. DecommissionTimeout *int64 `type:"integer"`
  3800. // Custom policy for requesting termination protection or termination of specific
  3801. // instances when shrinking an instance group.
  3802. InstanceResizePolicy *InstanceResizePolicy `type:"structure"`
  3803. }
  3804. // String returns the string representation
  3805. func (s ShrinkPolicy) String() string {
  3806. return awsutil.Prettify(s)
  3807. }
  3808. // GoString returns the string representation
  3809. func (s ShrinkPolicy) GoString() string {
  3810. return s.String()
  3811. }
  3812. // This represents a step in a cluster.
  3813. type Step struct {
  3814. _ struct{} `type:"structure"`
  3815. // This specifies what action to take when the cluster step fails. Possible
  3816. // values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE.
  3817. ActionOnFailure *string `type:"string" enum:"ActionOnFailure"`
  3818. // The Hadoop job configuration of the cluster step.
  3819. Config *HadoopStepConfig `type:"structure"`
  3820. // The identifier of the cluster step.
  3821. Id *string `type:"string"`
  3822. // The name of the cluster step.
  3823. Name *string `type:"string"`
  3824. // The current execution status details of the cluster step.
  3825. Status *StepStatus `type:"structure"`
  3826. }
  3827. // String returns the string representation
  3828. func (s Step) String() string {
  3829. return awsutil.Prettify(s)
  3830. }
  3831. // GoString returns the string representation
  3832. func (s Step) GoString() string {
  3833. return s.String()
  3834. }
  3835. // Specification of a job flow step.
  3836. type StepConfig struct {
  3837. _ struct{} `type:"structure"`
  3838. // The action to take if the job flow step fails.
  3839. ActionOnFailure *string `type:"string" enum:"ActionOnFailure"`
  3840. // The JAR file used for the job flow step.
  3841. //
  3842. // HadoopJarStep is a required field
  3843. HadoopJarStep *HadoopJarStepConfig `type:"structure" required:"true"`
  3844. // The name of the job flow step.
  3845. //
  3846. // Name is a required field
  3847. Name *string `type:"string" required:"true"`
  3848. }
  3849. // String returns the string representation
  3850. func (s StepConfig) String() string {
  3851. return awsutil.Prettify(s)
  3852. }
  3853. // GoString returns the string representation
  3854. func (s StepConfig) GoString() string {
  3855. return s.String()
  3856. }
  3857. // Validate inspects the fields of the type to determine if they are valid.
  3858. func (s *StepConfig) Validate() error {
  3859. invalidParams := request.ErrInvalidParams{Context: "StepConfig"}
  3860. if s.HadoopJarStep == nil {
  3861. invalidParams.Add(request.NewErrParamRequired("HadoopJarStep"))
  3862. }
  3863. if s.Name == nil {
  3864. invalidParams.Add(request.NewErrParamRequired("Name"))
  3865. }
  3866. if s.HadoopJarStep != nil {
  3867. if err := s.HadoopJarStep.Validate(); err != nil {
  3868. invalidParams.AddNested("HadoopJarStep", err.(request.ErrInvalidParams))
  3869. }
  3870. }
  3871. if invalidParams.Len() > 0 {
  3872. return invalidParams
  3873. }
  3874. return nil
  3875. }
  3876. // Combines the execution state and configuration of a step.
  3877. type StepDetail struct {
  3878. _ struct{} `type:"structure"`
  3879. // The description of the step status.
  3880. //
  3881. // ExecutionStatusDetail is a required field
  3882. ExecutionStatusDetail *StepExecutionStatusDetail `type:"structure" required:"true"`
  3883. // The step configuration.
  3884. //
  3885. // StepConfig is a required field
  3886. StepConfig *StepConfig `type:"structure" required:"true"`
  3887. }
  3888. // String returns the string representation
  3889. func (s StepDetail) String() string {
  3890. return awsutil.Prettify(s)
  3891. }
  3892. // GoString returns the string representation
  3893. func (s StepDetail) GoString() string {
  3894. return s.String()
  3895. }
  3896. // The execution state of a step.
  3897. type StepExecutionStatusDetail struct {
  3898. _ struct{} `type:"structure"`
  3899. // The creation date and time of the step.
  3900. //
  3901. // CreationDateTime is a required field
  3902. CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
  3903. // The completion date and time of the step.
  3904. EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  3905. // A description of the step's current state.
  3906. LastStateChangeReason *string `type:"string"`
  3907. // The start date and time of the step.
  3908. StartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  3909. // The state of the job flow step.
  3910. //
  3911. // State is a required field
  3912. State *string `type:"string" required:"true" enum:"StepExecutionState"`
  3913. }
  3914. // String returns the string representation
  3915. func (s StepExecutionStatusDetail) String() string {
  3916. return awsutil.Prettify(s)
  3917. }
  3918. // GoString returns the string representation
  3919. func (s StepExecutionStatusDetail) GoString() string {
  3920. return s.String()
  3921. }
  3922. // The details of the step state change reason.
  3923. type StepStateChangeReason struct {
  3924. _ struct{} `type:"structure"`
  3925. // The programmable code for the state change reason. Note: Currently, the service
  3926. // provides no code for the state change.
  3927. Code *string `type:"string" enum:"StepStateChangeReasonCode"`
  3928. // The descriptive message for the state change reason.
  3929. Message *string `type:"string"`
  3930. }
  3931. // String returns the string representation
  3932. func (s StepStateChangeReason) String() string {
  3933. return awsutil.Prettify(s)
  3934. }
  3935. // GoString returns the string representation
  3936. func (s StepStateChangeReason) GoString() string {
  3937. return s.String()
  3938. }
  3939. // The execution status details of the cluster step.
  3940. type StepStatus struct {
  3941. _ struct{} `type:"structure"`
  3942. // The details for the step failure including reason, message, and log file
  3943. // path where the root cause was identified.
  3944. FailureDetails *FailureDetails `type:"structure"`
  3945. // The execution state of the cluster step.
  3946. State *string `type:"string" enum:"StepState"`
  3947. // The reason for the step execution status change.
  3948. StateChangeReason *StepStateChangeReason `type:"structure"`
  3949. // The timeline of the cluster step status over time.
  3950. Timeline *StepTimeline `type:"structure"`
  3951. }
  3952. // String returns the string representation
  3953. func (s StepStatus) String() string {
  3954. return awsutil.Prettify(s)
  3955. }
  3956. // GoString returns the string representation
  3957. func (s StepStatus) GoString() string {
  3958. return s.String()
  3959. }
  3960. // The summary of the cluster step.
  3961. type StepSummary struct {
  3962. _ struct{} `type:"structure"`
  3963. // This specifies what action to take when the cluster step fails. Possible
  3964. // values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE.
  3965. ActionOnFailure *string `type:"string" enum:"ActionOnFailure"`
  3966. // The Hadoop job configuration of the cluster step.
  3967. Config *HadoopStepConfig `type:"structure"`
  3968. // The identifier of the cluster step.
  3969. Id *string `type:"string"`
  3970. // The name of the cluster step.
  3971. Name *string `type:"string"`
  3972. // The current execution status details of the cluster step.
  3973. Status *StepStatus `type:"structure"`
  3974. }
  3975. // String returns the string representation
  3976. func (s StepSummary) String() string {
  3977. return awsutil.Prettify(s)
  3978. }
  3979. // GoString returns the string representation
  3980. func (s StepSummary) GoString() string {
  3981. return s.String()
  3982. }
  3983. // The timeline of the cluster step lifecycle.
  3984. type StepTimeline struct {
  3985. _ struct{} `type:"structure"`
  3986. // The date and time when the cluster step was created.
  3987. CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  3988. // The date and time when the cluster step execution completed or failed.
  3989. EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  3990. // The date and time when the cluster step execution started.
  3991. StartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  3992. }
  3993. // String returns the string representation
  3994. func (s StepTimeline) String() string {
  3995. return awsutil.Prettify(s)
  3996. }
  3997. // GoString returns the string representation
  3998. func (s StepTimeline) GoString() string {
  3999. return s.String()
  4000. }
  4001. // The list of supported product configurations which allow user-supplied arguments.
  4002. // EMR accepts these arguments and forwards them to the corresponding installation
  4003. // script as bootstrap action arguments.
  4004. type SupportedProductConfig struct {
  4005. _ struct{} `type:"structure"`
  4006. // The list of user-supplied arguments.
  4007. Args []*string `type:"list"`
  4008. // The name of the product configuration.
  4009. Name *string `type:"string"`
  4010. }
  4011. // String returns the string representation
  4012. func (s SupportedProductConfig) String() string {
  4013. return awsutil.Prettify(s)
  4014. }
  4015. // GoString returns the string representation
  4016. func (s SupportedProductConfig) GoString() string {
  4017. return s.String()
  4018. }
  4019. // A key/value pair containing user-defined metadata that you can associate
  4020. // with an Amazon EMR resource. Tags make it easier to associate clusters in
  4021. // various ways, such as grouping clu\ sters to track your Amazon EMR resource
  4022. // allocation costs. For more information, see Tagging Amazon EMR Resources
  4023. // (http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-plan-tags.html).
  4024. type Tag struct {
  4025. _ struct{} `type:"structure"`
  4026. // A user-defined key, which is the minimum required information for a valid
  4027. // tag. For more information, see Tagging Amazon EMR Resources (http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-plan-tags.html).
  4028. Key *string `type:"string"`
  4029. // A user-defined value, which is optional in a tag. For more information, see
  4030. // Tagging Amazon EMR Resources (http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-plan-tags.html).
  4031. Value *string `type:"string"`
  4032. }
  4033. // String returns the string representation
  4034. func (s Tag) String() string {
  4035. return awsutil.Prettify(s)
  4036. }
  4037. // GoString returns the string representation
  4038. func (s Tag) GoString() string {
  4039. return s.String()
  4040. }
  4041. // Input to the TerminateJobFlows operation.
  4042. type TerminateJobFlowsInput struct {
  4043. _ struct{} `type:"structure"`
  4044. // A list of job flows to be shutdown.
  4045. //
  4046. // JobFlowIds is a required field
  4047. JobFlowIds []*string `type:"list" required:"true"`
  4048. }
  4049. // String returns the string representation
  4050. func (s TerminateJobFlowsInput) String() string {
  4051. return awsutil.Prettify(s)
  4052. }
  4053. // GoString returns the string representation
  4054. func (s TerminateJobFlowsInput) GoString() string {
  4055. return s.String()
  4056. }
  4057. // Validate inspects the fields of the type to determine if they are valid.
  4058. func (s *TerminateJobFlowsInput) Validate() error {
  4059. invalidParams := request.ErrInvalidParams{Context: "TerminateJobFlowsInput"}
  4060. if s.JobFlowIds == nil {
  4061. invalidParams.Add(request.NewErrParamRequired("JobFlowIds"))
  4062. }
  4063. if invalidParams.Len() > 0 {
  4064. return invalidParams
  4065. }
  4066. return nil
  4067. }
  4068. type TerminateJobFlowsOutput struct {
  4069. _ struct{} `type:"structure"`
  4070. }
  4071. // String returns the string representation
  4072. func (s TerminateJobFlowsOutput) String() string {
  4073. return awsutil.Prettify(s)
  4074. }
  4075. // GoString returns the string representation
  4076. func (s TerminateJobFlowsOutput) GoString() string {
  4077. return s.String()
  4078. }
  4079. // EBS volume specifications such as volume type, IOPS, and size(GiB) that will
  4080. // be requested for the EBS volume attached to an EC2 instance in the cluster.
  4081. type VolumeSpecification struct {
  4082. _ struct{} `type:"structure"`
  4083. // The number of I/O operations per second (IOPS) that the volume supports.
  4084. Iops *int64 `type:"integer"`
  4085. // The volume size, in gibibytes (GiB). This can be a number from 1 - 1024.
  4086. // If the volume type is EBS-optimized, the minimum value is 10.
  4087. //
  4088. // SizeInGB is a required field
  4089. SizeInGB *int64 `type:"integer" required:"true"`
  4090. // The volume type. Volume types supported are gp2, io1, standard.
  4091. //
  4092. // VolumeType is a required field
  4093. VolumeType *string `type:"string" required:"true"`
  4094. }
  4095. // String returns the string representation
  4096. func (s VolumeSpecification) String() string {
  4097. return awsutil.Prettify(s)
  4098. }
  4099. // GoString returns the string representation
  4100. func (s VolumeSpecification) GoString() string {
  4101. return s.String()
  4102. }
  4103. // Validate inspects the fields of the type to determine if they are valid.
  4104. func (s *VolumeSpecification) Validate() error {
  4105. invalidParams := request.ErrInvalidParams{Context: "VolumeSpecification"}
  4106. if s.SizeInGB == nil {
  4107. invalidParams.Add(request.NewErrParamRequired("SizeInGB"))
  4108. }
  4109. if s.VolumeType == nil {
  4110. invalidParams.Add(request.NewErrParamRequired("VolumeType"))
  4111. }
  4112. if invalidParams.Len() > 0 {
  4113. return invalidParams
  4114. }
  4115. return nil
  4116. }
  4117. const (
  4118. // ActionOnFailureTerminateJobFlow is a ActionOnFailure enum value
  4119. ActionOnFailureTerminateJobFlow = "TERMINATE_JOB_FLOW"
  4120. // ActionOnFailureTerminateCluster is a ActionOnFailure enum value
  4121. ActionOnFailureTerminateCluster = "TERMINATE_CLUSTER"
  4122. // ActionOnFailureCancelAndWait is a ActionOnFailure enum value
  4123. ActionOnFailureCancelAndWait = "CANCEL_AND_WAIT"
  4124. // ActionOnFailureContinue is a ActionOnFailure enum value
  4125. ActionOnFailureContinue = "CONTINUE"
  4126. )
  4127. const (
  4128. // ClusterStateStarting is a ClusterState enum value
  4129. ClusterStateStarting = "STARTING"
  4130. // ClusterStateBootstrapping is a ClusterState enum value
  4131. ClusterStateBootstrapping = "BOOTSTRAPPING"
  4132. // ClusterStateRunning is a ClusterState enum value
  4133. ClusterStateRunning = "RUNNING"
  4134. // ClusterStateWaiting is a ClusterState enum value
  4135. ClusterStateWaiting = "WAITING"
  4136. // ClusterStateTerminating is a ClusterState enum value
  4137. ClusterStateTerminating = "TERMINATING"
  4138. // ClusterStateTerminated is a ClusterState enum value
  4139. ClusterStateTerminated = "TERMINATED"
  4140. // ClusterStateTerminatedWithErrors is a ClusterState enum value
  4141. ClusterStateTerminatedWithErrors = "TERMINATED_WITH_ERRORS"
  4142. )
  4143. const (
  4144. // ClusterStateChangeReasonCodeInternalError is a ClusterStateChangeReasonCode enum value
  4145. ClusterStateChangeReasonCodeInternalError = "INTERNAL_ERROR"
  4146. // ClusterStateChangeReasonCodeValidationError is a ClusterStateChangeReasonCode enum value
  4147. ClusterStateChangeReasonCodeValidationError = "VALIDATION_ERROR"
  4148. // ClusterStateChangeReasonCodeInstanceFailure is a ClusterStateChangeReasonCode enum value
  4149. ClusterStateChangeReasonCodeInstanceFailure = "INSTANCE_FAILURE"
  4150. // ClusterStateChangeReasonCodeBootstrapFailure is a ClusterStateChangeReasonCode enum value
  4151. ClusterStateChangeReasonCodeBootstrapFailure = "BOOTSTRAP_FAILURE"
  4152. // ClusterStateChangeReasonCodeUserRequest is a ClusterStateChangeReasonCode enum value
  4153. ClusterStateChangeReasonCodeUserRequest = "USER_REQUEST"
  4154. // ClusterStateChangeReasonCodeStepFailure is a ClusterStateChangeReasonCode enum value
  4155. ClusterStateChangeReasonCodeStepFailure = "STEP_FAILURE"
  4156. // ClusterStateChangeReasonCodeAllStepsCompleted is a ClusterStateChangeReasonCode enum value
  4157. ClusterStateChangeReasonCodeAllStepsCompleted = "ALL_STEPS_COMPLETED"
  4158. )
  4159. const (
  4160. // InstanceGroupStateProvisioning is a InstanceGroupState enum value
  4161. InstanceGroupStateProvisioning = "PROVISIONING"
  4162. // InstanceGroupStateBootstrapping is a InstanceGroupState enum value
  4163. InstanceGroupStateBootstrapping = "BOOTSTRAPPING"
  4164. // InstanceGroupStateRunning is a InstanceGroupState enum value
  4165. InstanceGroupStateRunning = "RUNNING"
  4166. // InstanceGroupStateResizing is a InstanceGroupState enum value
  4167. InstanceGroupStateResizing = "RESIZING"
  4168. // InstanceGroupStateSuspended is a InstanceGroupState enum value
  4169. InstanceGroupStateSuspended = "SUSPENDED"
  4170. // InstanceGroupStateTerminating is a InstanceGroupState enum value
  4171. InstanceGroupStateTerminating = "TERMINATING"
  4172. // InstanceGroupStateTerminated is a InstanceGroupState enum value
  4173. InstanceGroupStateTerminated = "TERMINATED"
  4174. // InstanceGroupStateArrested is a InstanceGroupState enum value
  4175. InstanceGroupStateArrested = "ARRESTED"
  4176. // InstanceGroupStateShuttingDown is a InstanceGroupState enum value
  4177. InstanceGroupStateShuttingDown = "SHUTTING_DOWN"
  4178. // InstanceGroupStateEnded is a InstanceGroupState enum value
  4179. InstanceGroupStateEnded = "ENDED"
  4180. )
  4181. const (
  4182. // InstanceGroupStateChangeReasonCodeInternalError is a InstanceGroupStateChangeReasonCode enum value
  4183. InstanceGroupStateChangeReasonCodeInternalError = "INTERNAL_ERROR"
  4184. // InstanceGroupStateChangeReasonCodeValidationError is a InstanceGroupStateChangeReasonCode enum value
  4185. InstanceGroupStateChangeReasonCodeValidationError = "VALIDATION_ERROR"
  4186. // InstanceGroupStateChangeReasonCodeInstanceFailure is a InstanceGroupStateChangeReasonCode enum value
  4187. InstanceGroupStateChangeReasonCodeInstanceFailure = "INSTANCE_FAILURE"
  4188. // InstanceGroupStateChangeReasonCodeClusterTerminated is a InstanceGroupStateChangeReasonCode enum value
  4189. InstanceGroupStateChangeReasonCodeClusterTerminated = "CLUSTER_TERMINATED"
  4190. )
  4191. const (
  4192. // InstanceGroupTypeMaster is a InstanceGroupType enum value
  4193. InstanceGroupTypeMaster = "MASTER"
  4194. // InstanceGroupTypeCore is a InstanceGroupType enum value
  4195. InstanceGroupTypeCore = "CORE"
  4196. // InstanceGroupTypeTask is a InstanceGroupType enum value
  4197. InstanceGroupTypeTask = "TASK"
  4198. )
  4199. const (
  4200. // InstanceRoleTypeMaster is a InstanceRoleType enum value
  4201. InstanceRoleTypeMaster = "MASTER"
  4202. // InstanceRoleTypeCore is a InstanceRoleType enum value
  4203. InstanceRoleTypeCore = "CORE"
  4204. // InstanceRoleTypeTask is a InstanceRoleType enum value
  4205. InstanceRoleTypeTask = "TASK"
  4206. )
  4207. const (
  4208. // InstanceStateAwaitingFulfillment is a InstanceState enum value
  4209. InstanceStateAwaitingFulfillment = "AWAITING_FULFILLMENT"
  4210. // InstanceStateProvisioning is a InstanceState enum value
  4211. InstanceStateProvisioning = "PROVISIONING"
  4212. // InstanceStateBootstrapping is a InstanceState enum value
  4213. InstanceStateBootstrapping = "BOOTSTRAPPING"
  4214. // InstanceStateRunning is a InstanceState enum value
  4215. InstanceStateRunning = "RUNNING"
  4216. // InstanceStateTerminated is a InstanceState enum value
  4217. InstanceStateTerminated = "TERMINATED"
  4218. )
  4219. const (
  4220. // InstanceStateChangeReasonCodeInternalError is a InstanceStateChangeReasonCode enum value
  4221. InstanceStateChangeReasonCodeInternalError = "INTERNAL_ERROR"
  4222. // InstanceStateChangeReasonCodeValidationError is a InstanceStateChangeReasonCode enum value
  4223. InstanceStateChangeReasonCodeValidationError = "VALIDATION_ERROR"
  4224. // InstanceStateChangeReasonCodeInstanceFailure is a InstanceStateChangeReasonCode enum value
  4225. InstanceStateChangeReasonCodeInstanceFailure = "INSTANCE_FAILURE"
  4226. // InstanceStateChangeReasonCodeBootstrapFailure is a InstanceStateChangeReasonCode enum value
  4227. InstanceStateChangeReasonCodeBootstrapFailure = "BOOTSTRAP_FAILURE"
  4228. // InstanceStateChangeReasonCodeClusterTerminated is a InstanceStateChangeReasonCode enum value
  4229. InstanceStateChangeReasonCodeClusterTerminated = "CLUSTER_TERMINATED"
  4230. )
  4231. // The type of instance.
  4232. const (
  4233. // JobFlowExecutionStateStarting is a JobFlowExecutionState enum value
  4234. JobFlowExecutionStateStarting = "STARTING"
  4235. // JobFlowExecutionStateBootstrapping is a JobFlowExecutionState enum value
  4236. JobFlowExecutionStateBootstrapping = "BOOTSTRAPPING"
  4237. // JobFlowExecutionStateRunning is a JobFlowExecutionState enum value
  4238. JobFlowExecutionStateRunning = "RUNNING"
  4239. // JobFlowExecutionStateWaiting is a JobFlowExecutionState enum value
  4240. JobFlowExecutionStateWaiting = "WAITING"
  4241. // JobFlowExecutionStateShuttingDown is a JobFlowExecutionState enum value
  4242. JobFlowExecutionStateShuttingDown = "SHUTTING_DOWN"
  4243. // JobFlowExecutionStateTerminated is a JobFlowExecutionState enum value
  4244. JobFlowExecutionStateTerminated = "TERMINATED"
  4245. // JobFlowExecutionStateCompleted is a JobFlowExecutionState enum value
  4246. JobFlowExecutionStateCompleted = "COMPLETED"
  4247. // JobFlowExecutionStateFailed is a JobFlowExecutionState enum value
  4248. JobFlowExecutionStateFailed = "FAILED"
  4249. )
  4250. const (
  4251. // MarketTypeOnDemand is a MarketType enum value
  4252. MarketTypeOnDemand = "ON_DEMAND"
  4253. // MarketTypeSpot is a MarketType enum value
  4254. MarketTypeSpot = "SPOT"
  4255. )
  4256. const (
  4257. // StepExecutionStatePending is a StepExecutionState enum value
  4258. StepExecutionStatePending = "PENDING"
  4259. // StepExecutionStateRunning is a StepExecutionState enum value
  4260. StepExecutionStateRunning = "RUNNING"
  4261. // StepExecutionStateContinue is a StepExecutionState enum value
  4262. StepExecutionStateContinue = "CONTINUE"
  4263. // StepExecutionStateCompleted is a StepExecutionState enum value
  4264. StepExecutionStateCompleted = "COMPLETED"
  4265. // StepExecutionStateCancelled is a StepExecutionState enum value
  4266. StepExecutionStateCancelled = "CANCELLED"
  4267. // StepExecutionStateFailed is a StepExecutionState enum value
  4268. StepExecutionStateFailed = "FAILED"
  4269. // StepExecutionStateInterrupted is a StepExecutionState enum value
  4270. StepExecutionStateInterrupted = "INTERRUPTED"
  4271. )
  4272. const (
  4273. // StepStatePending is a StepState enum value
  4274. StepStatePending = "PENDING"
  4275. // StepStateRunning is a StepState enum value
  4276. StepStateRunning = "RUNNING"
  4277. // StepStateCompleted is a StepState enum value
  4278. StepStateCompleted = "COMPLETED"
  4279. // StepStateCancelled is a StepState enum value
  4280. StepStateCancelled = "CANCELLED"
  4281. // StepStateFailed is a StepState enum value
  4282. StepStateFailed = "FAILED"
  4283. // StepStateInterrupted is a StepState enum value
  4284. StepStateInterrupted = "INTERRUPTED"
  4285. )
  4286. const (
  4287. // StepStateChangeReasonCodeNone is a StepStateChangeReasonCode enum value
  4288. StepStateChangeReasonCodeNone = "NONE"
  4289. )