api.go 134 KB

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