api.go 201 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package codebuild
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  11. )
  12. const opBatchDeleteBuilds = "BatchDeleteBuilds"
  13. // BatchDeleteBuildsRequest generates a "aws/request.Request" representing the
  14. // client's request for the BatchDeleteBuilds operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See BatchDeleteBuilds for more information on using the BatchDeleteBuilds
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. //
  28. // // Example sending a request using the BatchDeleteBuildsRequest method.
  29. // req, resp := client.BatchDeleteBuildsRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchDeleteBuilds
  37. func (c *CodeBuild) BatchDeleteBuildsRequest(input *BatchDeleteBuildsInput) (req *request.Request, output *BatchDeleteBuildsOutput) {
  38. op := &request.Operation{
  39. Name: opBatchDeleteBuilds,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &BatchDeleteBuildsInput{}
  45. }
  46. output = &BatchDeleteBuildsOutput{}
  47. req = c.newRequest(op, input, output)
  48. return
  49. }
  50. // BatchDeleteBuilds API operation for AWS CodeBuild.
  51. //
  52. // Deletes one or more builds.
  53. //
  54. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  55. // with awserr.Error's Code and Message methods to get detailed information about
  56. // the error.
  57. //
  58. // See the AWS API reference guide for AWS CodeBuild's
  59. // API operation BatchDeleteBuilds for usage and error information.
  60. //
  61. // Returned Error Codes:
  62. // * ErrCodeInvalidInputException "InvalidInputException"
  63. // The input value that was provided is not valid.
  64. //
  65. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchDeleteBuilds
  66. func (c *CodeBuild) BatchDeleteBuilds(input *BatchDeleteBuildsInput) (*BatchDeleteBuildsOutput, error) {
  67. req, out := c.BatchDeleteBuildsRequest(input)
  68. return out, req.Send()
  69. }
  70. // BatchDeleteBuildsWithContext is the same as BatchDeleteBuilds with the addition of
  71. // the ability to pass a context and additional request options.
  72. //
  73. // See BatchDeleteBuilds for details on how to use this API operation.
  74. //
  75. // The context must be non-nil and will be used for request cancellation. If
  76. // the context is nil a panic will occur. In the future the SDK may create
  77. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  78. // for more information on using Contexts.
  79. func (c *CodeBuild) BatchDeleteBuildsWithContext(ctx aws.Context, input *BatchDeleteBuildsInput, opts ...request.Option) (*BatchDeleteBuildsOutput, error) {
  80. req, out := c.BatchDeleteBuildsRequest(input)
  81. req.SetContext(ctx)
  82. req.ApplyOptions(opts...)
  83. return out, req.Send()
  84. }
  85. const opBatchGetBuilds = "BatchGetBuilds"
  86. // BatchGetBuildsRequest generates a "aws/request.Request" representing the
  87. // client's request for the BatchGetBuilds operation. The "output" return
  88. // value will be populated with the request's response once the request completes
  89. // successfully.
  90. //
  91. // Use "Send" method on the returned Request to send the API call to the service.
  92. // the "output" return value is not valid until after Send returns without error.
  93. //
  94. // See BatchGetBuilds for more information on using the BatchGetBuilds
  95. // API call, and error handling.
  96. //
  97. // This method is useful when you want to inject custom logic or configuration
  98. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  99. //
  100. //
  101. // // Example sending a request using the BatchGetBuildsRequest method.
  102. // req, resp := client.BatchGetBuildsRequest(params)
  103. //
  104. // err := req.Send()
  105. // if err == nil { // resp is now filled
  106. // fmt.Println(resp)
  107. // }
  108. //
  109. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchGetBuilds
  110. func (c *CodeBuild) BatchGetBuildsRequest(input *BatchGetBuildsInput) (req *request.Request, output *BatchGetBuildsOutput) {
  111. op := &request.Operation{
  112. Name: opBatchGetBuilds,
  113. HTTPMethod: "POST",
  114. HTTPPath: "/",
  115. }
  116. if input == nil {
  117. input = &BatchGetBuildsInput{}
  118. }
  119. output = &BatchGetBuildsOutput{}
  120. req = c.newRequest(op, input, output)
  121. return
  122. }
  123. // BatchGetBuilds API operation for AWS CodeBuild.
  124. //
  125. // Gets information about builds.
  126. //
  127. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  128. // with awserr.Error's Code and Message methods to get detailed information about
  129. // the error.
  130. //
  131. // See the AWS API reference guide for AWS CodeBuild's
  132. // API operation BatchGetBuilds for usage and error information.
  133. //
  134. // Returned Error Codes:
  135. // * ErrCodeInvalidInputException "InvalidInputException"
  136. // The input value that was provided is not valid.
  137. //
  138. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchGetBuilds
  139. func (c *CodeBuild) BatchGetBuilds(input *BatchGetBuildsInput) (*BatchGetBuildsOutput, error) {
  140. req, out := c.BatchGetBuildsRequest(input)
  141. return out, req.Send()
  142. }
  143. // BatchGetBuildsWithContext is the same as BatchGetBuilds with the addition of
  144. // the ability to pass a context and additional request options.
  145. //
  146. // See BatchGetBuilds for details on how to use this API operation.
  147. //
  148. // The context must be non-nil and will be used for request cancellation. If
  149. // the context is nil a panic will occur. In the future the SDK may create
  150. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  151. // for more information on using Contexts.
  152. func (c *CodeBuild) BatchGetBuildsWithContext(ctx aws.Context, input *BatchGetBuildsInput, opts ...request.Option) (*BatchGetBuildsOutput, error) {
  153. req, out := c.BatchGetBuildsRequest(input)
  154. req.SetContext(ctx)
  155. req.ApplyOptions(opts...)
  156. return out, req.Send()
  157. }
  158. const opBatchGetProjects = "BatchGetProjects"
  159. // BatchGetProjectsRequest generates a "aws/request.Request" representing the
  160. // client's request for the BatchGetProjects operation. The "output" return
  161. // value will be populated with the request's response once the request completes
  162. // successfully.
  163. //
  164. // Use "Send" method on the returned Request to send the API call to the service.
  165. // the "output" return value is not valid until after Send returns without error.
  166. //
  167. // See BatchGetProjects for more information on using the BatchGetProjects
  168. // API call, and error handling.
  169. //
  170. // This method is useful when you want to inject custom logic or configuration
  171. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  172. //
  173. //
  174. // // Example sending a request using the BatchGetProjectsRequest method.
  175. // req, resp := client.BatchGetProjectsRequest(params)
  176. //
  177. // err := req.Send()
  178. // if err == nil { // resp is now filled
  179. // fmt.Println(resp)
  180. // }
  181. //
  182. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchGetProjects
  183. func (c *CodeBuild) BatchGetProjectsRequest(input *BatchGetProjectsInput) (req *request.Request, output *BatchGetProjectsOutput) {
  184. op := &request.Operation{
  185. Name: opBatchGetProjects,
  186. HTTPMethod: "POST",
  187. HTTPPath: "/",
  188. }
  189. if input == nil {
  190. input = &BatchGetProjectsInput{}
  191. }
  192. output = &BatchGetProjectsOutput{}
  193. req = c.newRequest(op, input, output)
  194. return
  195. }
  196. // BatchGetProjects API operation for AWS CodeBuild.
  197. //
  198. // Gets information about build projects.
  199. //
  200. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  201. // with awserr.Error's Code and Message methods to get detailed information about
  202. // the error.
  203. //
  204. // See the AWS API reference guide for AWS CodeBuild's
  205. // API operation BatchGetProjects for usage and error information.
  206. //
  207. // Returned Error Codes:
  208. // * ErrCodeInvalidInputException "InvalidInputException"
  209. // The input value that was provided is not valid.
  210. //
  211. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/BatchGetProjects
  212. func (c *CodeBuild) BatchGetProjects(input *BatchGetProjectsInput) (*BatchGetProjectsOutput, error) {
  213. req, out := c.BatchGetProjectsRequest(input)
  214. return out, req.Send()
  215. }
  216. // BatchGetProjectsWithContext is the same as BatchGetProjects with the addition of
  217. // the ability to pass a context and additional request options.
  218. //
  219. // See BatchGetProjects for details on how to use this API operation.
  220. //
  221. // The context must be non-nil and will be used for request cancellation. If
  222. // the context is nil a panic will occur. In the future the SDK may create
  223. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  224. // for more information on using Contexts.
  225. func (c *CodeBuild) BatchGetProjectsWithContext(ctx aws.Context, input *BatchGetProjectsInput, opts ...request.Option) (*BatchGetProjectsOutput, error) {
  226. req, out := c.BatchGetProjectsRequest(input)
  227. req.SetContext(ctx)
  228. req.ApplyOptions(opts...)
  229. return out, req.Send()
  230. }
  231. const opCreateProject = "CreateProject"
  232. // CreateProjectRequest generates a "aws/request.Request" representing the
  233. // client's request for the CreateProject operation. The "output" return
  234. // value will be populated with the request's response once the request completes
  235. // successfully.
  236. //
  237. // Use "Send" method on the returned Request to send the API call to the service.
  238. // the "output" return value is not valid until after Send returns without error.
  239. //
  240. // See CreateProject for more information on using the CreateProject
  241. // API call, and error handling.
  242. //
  243. // This method is useful when you want to inject custom logic or configuration
  244. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  245. //
  246. //
  247. // // Example sending a request using the CreateProjectRequest method.
  248. // req, resp := client.CreateProjectRequest(params)
  249. //
  250. // err := req.Send()
  251. // if err == nil { // resp is now filled
  252. // fmt.Println(resp)
  253. // }
  254. //
  255. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/CreateProject
  256. func (c *CodeBuild) CreateProjectRequest(input *CreateProjectInput) (req *request.Request, output *CreateProjectOutput) {
  257. op := &request.Operation{
  258. Name: opCreateProject,
  259. HTTPMethod: "POST",
  260. HTTPPath: "/",
  261. }
  262. if input == nil {
  263. input = &CreateProjectInput{}
  264. }
  265. output = &CreateProjectOutput{}
  266. req = c.newRequest(op, input, output)
  267. return
  268. }
  269. // CreateProject API operation for AWS CodeBuild.
  270. //
  271. // Creates a build project.
  272. //
  273. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  274. // with awserr.Error's Code and Message methods to get detailed information about
  275. // the error.
  276. //
  277. // See the AWS API reference guide for AWS CodeBuild's
  278. // API operation CreateProject for usage and error information.
  279. //
  280. // Returned Error Codes:
  281. // * ErrCodeInvalidInputException "InvalidInputException"
  282. // The input value that was provided is not valid.
  283. //
  284. // * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
  285. // The specified AWS resource cannot be created, because an AWS resource with
  286. // the same settings already exists.
  287. //
  288. // * ErrCodeAccountLimitExceededException "AccountLimitExceededException"
  289. // An AWS service limit was exceeded for the calling AWS account.
  290. //
  291. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/CreateProject
  292. func (c *CodeBuild) CreateProject(input *CreateProjectInput) (*CreateProjectOutput, error) {
  293. req, out := c.CreateProjectRequest(input)
  294. return out, req.Send()
  295. }
  296. // CreateProjectWithContext is the same as CreateProject with the addition of
  297. // the ability to pass a context and additional request options.
  298. //
  299. // See CreateProject for details on how to use this API operation.
  300. //
  301. // The context must be non-nil and will be used for request cancellation. If
  302. // the context is nil a panic will occur. In the future the SDK may create
  303. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  304. // for more information on using Contexts.
  305. func (c *CodeBuild) CreateProjectWithContext(ctx aws.Context, input *CreateProjectInput, opts ...request.Option) (*CreateProjectOutput, error) {
  306. req, out := c.CreateProjectRequest(input)
  307. req.SetContext(ctx)
  308. req.ApplyOptions(opts...)
  309. return out, req.Send()
  310. }
  311. const opCreateWebhook = "CreateWebhook"
  312. // CreateWebhookRequest generates a "aws/request.Request" representing the
  313. // client's request for the CreateWebhook operation. The "output" return
  314. // value will be populated with the request's response once the request completes
  315. // successfully.
  316. //
  317. // Use "Send" method on the returned Request to send the API call to the service.
  318. // the "output" return value is not valid until after Send returns without error.
  319. //
  320. // See CreateWebhook for more information on using the CreateWebhook
  321. // API call, and error handling.
  322. //
  323. // This method is useful when you want to inject custom logic or configuration
  324. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  325. //
  326. //
  327. // // Example sending a request using the CreateWebhookRequest method.
  328. // req, resp := client.CreateWebhookRequest(params)
  329. //
  330. // err := req.Send()
  331. // if err == nil { // resp is now filled
  332. // fmt.Println(resp)
  333. // }
  334. //
  335. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/CreateWebhook
  336. func (c *CodeBuild) CreateWebhookRequest(input *CreateWebhookInput) (req *request.Request, output *CreateWebhookOutput) {
  337. op := &request.Operation{
  338. Name: opCreateWebhook,
  339. HTTPMethod: "POST",
  340. HTTPPath: "/",
  341. }
  342. if input == nil {
  343. input = &CreateWebhookInput{}
  344. }
  345. output = &CreateWebhookOutput{}
  346. req = c.newRequest(op, input, output)
  347. return
  348. }
  349. // CreateWebhook API operation for AWS CodeBuild.
  350. //
  351. // For an existing AWS CodeBuild build project that has its source code stored
  352. // in a GitHub or Bitbucket repository, enables AWS CodeBuild to start rebuilding
  353. // the source code every time a code change is pushed to the repository.
  354. //
  355. // If you enable webhooks for an AWS CodeBuild project, and the project is used
  356. // as a build step in AWS CodePipeline, then two identical builds are created
  357. // for each commit. One build is triggered through webhooks, and one through
  358. // AWS CodePipeline. Because billing is on a per-build basis, you are billed
  359. // for both builds. Therefore, if you are using AWS CodePipeline, we recommend
  360. // that you disable webhooks in AWS CodeBuild. In the AWS CodeBuild console,
  361. // clear the Webhook box. For more information, see step 5 in Change a Build
  362. // Project's Settings (http://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console).
  363. //
  364. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  365. // with awserr.Error's Code and Message methods to get detailed information about
  366. // the error.
  367. //
  368. // See the AWS API reference guide for AWS CodeBuild's
  369. // API operation CreateWebhook for usage and error information.
  370. //
  371. // Returned Error Codes:
  372. // * ErrCodeInvalidInputException "InvalidInputException"
  373. // The input value that was provided is not valid.
  374. //
  375. // * ErrCodeOAuthProviderException "OAuthProviderException"
  376. // There was a problem with the underlying OAuth provider.
  377. //
  378. // * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
  379. // The specified AWS resource cannot be created, because an AWS resource with
  380. // the same settings already exists.
  381. //
  382. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  383. // The specified AWS resource cannot be found.
  384. //
  385. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/CreateWebhook
  386. func (c *CodeBuild) CreateWebhook(input *CreateWebhookInput) (*CreateWebhookOutput, error) {
  387. req, out := c.CreateWebhookRequest(input)
  388. return out, req.Send()
  389. }
  390. // CreateWebhookWithContext is the same as CreateWebhook with the addition of
  391. // the ability to pass a context and additional request options.
  392. //
  393. // See CreateWebhook for details on how to use this API operation.
  394. //
  395. // The context must be non-nil and will be used for request cancellation. If
  396. // the context is nil a panic will occur. In the future the SDK may create
  397. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  398. // for more information on using Contexts.
  399. func (c *CodeBuild) CreateWebhookWithContext(ctx aws.Context, input *CreateWebhookInput, opts ...request.Option) (*CreateWebhookOutput, error) {
  400. req, out := c.CreateWebhookRequest(input)
  401. req.SetContext(ctx)
  402. req.ApplyOptions(opts...)
  403. return out, req.Send()
  404. }
  405. const opDeleteProject = "DeleteProject"
  406. // DeleteProjectRequest generates a "aws/request.Request" representing the
  407. // client's request for the DeleteProject operation. The "output" return
  408. // value will be populated with the request's response once the request completes
  409. // successfully.
  410. //
  411. // Use "Send" method on the returned Request to send the API call to the service.
  412. // the "output" return value is not valid until after Send returns without error.
  413. //
  414. // See DeleteProject for more information on using the DeleteProject
  415. // API call, and error handling.
  416. //
  417. // This method is useful when you want to inject custom logic or configuration
  418. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  419. //
  420. //
  421. // // Example sending a request using the DeleteProjectRequest method.
  422. // req, resp := client.DeleteProjectRequest(params)
  423. //
  424. // err := req.Send()
  425. // if err == nil { // resp is now filled
  426. // fmt.Println(resp)
  427. // }
  428. //
  429. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteProject
  430. func (c *CodeBuild) DeleteProjectRequest(input *DeleteProjectInput) (req *request.Request, output *DeleteProjectOutput) {
  431. op := &request.Operation{
  432. Name: opDeleteProject,
  433. HTTPMethod: "POST",
  434. HTTPPath: "/",
  435. }
  436. if input == nil {
  437. input = &DeleteProjectInput{}
  438. }
  439. output = &DeleteProjectOutput{}
  440. req = c.newRequest(op, input, output)
  441. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  442. return
  443. }
  444. // DeleteProject API operation for AWS CodeBuild.
  445. //
  446. // Deletes a build project.
  447. //
  448. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  449. // with awserr.Error's Code and Message methods to get detailed information about
  450. // the error.
  451. //
  452. // See the AWS API reference guide for AWS CodeBuild's
  453. // API operation DeleteProject for usage and error information.
  454. //
  455. // Returned Error Codes:
  456. // * ErrCodeInvalidInputException "InvalidInputException"
  457. // The input value that was provided is not valid.
  458. //
  459. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteProject
  460. func (c *CodeBuild) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) {
  461. req, out := c.DeleteProjectRequest(input)
  462. return out, req.Send()
  463. }
  464. // DeleteProjectWithContext is the same as DeleteProject with the addition of
  465. // the ability to pass a context and additional request options.
  466. //
  467. // See DeleteProject for details on how to use this API operation.
  468. //
  469. // The context must be non-nil and will be used for request cancellation. If
  470. // the context is nil a panic will occur. In the future the SDK may create
  471. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  472. // for more information on using Contexts.
  473. func (c *CodeBuild) DeleteProjectWithContext(ctx aws.Context, input *DeleteProjectInput, opts ...request.Option) (*DeleteProjectOutput, error) {
  474. req, out := c.DeleteProjectRequest(input)
  475. req.SetContext(ctx)
  476. req.ApplyOptions(opts...)
  477. return out, req.Send()
  478. }
  479. const opDeleteSourceCredentials = "DeleteSourceCredentials"
  480. // DeleteSourceCredentialsRequest generates a "aws/request.Request" representing the
  481. // client's request for the DeleteSourceCredentials operation. The "output" return
  482. // value will be populated with the request's response once the request completes
  483. // successfully.
  484. //
  485. // Use "Send" method on the returned Request to send the API call to the service.
  486. // the "output" return value is not valid until after Send returns without error.
  487. //
  488. // See DeleteSourceCredentials for more information on using the DeleteSourceCredentials
  489. // API call, and error handling.
  490. //
  491. // This method is useful when you want to inject custom logic or configuration
  492. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  493. //
  494. //
  495. // // Example sending a request using the DeleteSourceCredentialsRequest method.
  496. // req, resp := client.DeleteSourceCredentialsRequest(params)
  497. //
  498. // err := req.Send()
  499. // if err == nil { // resp is now filled
  500. // fmt.Println(resp)
  501. // }
  502. //
  503. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteSourceCredentials
  504. func (c *CodeBuild) DeleteSourceCredentialsRequest(input *DeleteSourceCredentialsInput) (req *request.Request, output *DeleteSourceCredentialsOutput) {
  505. op := &request.Operation{
  506. Name: opDeleteSourceCredentials,
  507. HTTPMethod: "POST",
  508. HTTPPath: "/",
  509. }
  510. if input == nil {
  511. input = &DeleteSourceCredentialsInput{}
  512. }
  513. output = &DeleteSourceCredentialsOutput{}
  514. req = c.newRequest(op, input, output)
  515. return
  516. }
  517. // DeleteSourceCredentials API operation for AWS CodeBuild.
  518. //
  519. // Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials.
  520. //
  521. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  522. // with awserr.Error's Code and Message methods to get detailed information about
  523. // the error.
  524. //
  525. // See the AWS API reference guide for AWS CodeBuild's
  526. // API operation DeleteSourceCredentials for usage and error information.
  527. //
  528. // Returned Error Codes:
  529. // * ErrCodeInvalidInputException "InvalidInputException"
  530. // The input value that was provided is not valid.
  531. //
  532. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  533. // The specified AWS resource cannot be found.
  534. //
  535. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteSourceCredentials
  536. func (c *CodeBuild) DeleteSourceCredentials(input *DeleteSourceCredentialsInput) (*DeleteSourceCredentialsOutput, error) {
  537. req, out := c.DeleteSourceCredentialsRequest(input)
  538. return out, req.Send()
  539. }
  540. // DeleteSourceCredentialsWithContext is the same as DeleteSourceCredentials with the addition of
  541. // the ability to pass a context and additional request options.
  542. //
  543. // See DeleteSourceCredentials for details on how to use this API operation.
  544. //
  545. // The context must be non-nil and will be used for request cancellation. If
  546. // the context is nil a panic will occur. In the future the SDK may create
  547. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  548. // for more information on using Contexts.
  549. func (c *CodeBuild) DeleteSourceCredentialsWithContext(ctx aws.Context, input *DeleteSourceCredentialsInput, opts ...request.Option) (*DeleteSourceCredentialsOutput, error) {
  550. req, out := c.DeleteSourceCredentialsRequest(input)
  551. req.SetContext(ctx)
  552. req.ApplyOptions(opts...)
  553. return out, req.Send()
  554. }
  555. const opDeleteWebhook = "DeleteWebhook"
  556. // DeleteWebhookRequest generates a "aws/request.Request" representing the
  557. // client's request for the DeleteWebhook operation. The "output" return
  558. // value will be populated with the request's response once the request completes
  559. // successfully.
  560. //
  561. // Use "Send" method on the returned Request to send the API call to the service.
  562. // the "output" return value is not valid until after Send returns without error.
  563. //
  564. // See DeleteWebhook for more information on using the DeleteWebhook
  565. // API call, and error handling.
  566. //
  567. // This method is useful when you want to inject custom logic or configuration
  568. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  569. //
  570. //
  571. // // Example sending a request using the DeleteWebhookRequest method.
  572. // req, resp := client.DeleteWebhookRequest(params)
  573. //
  574. // err := req.Send()
  575. // if err == nil { // resp is now filled
  576. // fmt.Println(resp)
  577. // }
  578. //
  579. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteWebhook
  580. func (c *CodeBuild) DeleteWebhookRequest(input *DeleteWebhookInput) (req *request.Request, output *DeleteWebhookOutput) {
  581. op := &request.Operation{
  582. Name: opDeleteWebhook,
  583. HTTPMethod: "POST",
  584. HTTPPath: "/",
  585. }
  586. if input == nil {
  587. input = &DeleteWebhookInput{}
  588. }
  589. output = &DeleteWebhookOutput{}
  590. req = c.newRequest(op, input, output)
  591. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  592. return
  593. }
  594. // DeleteWebhook API operation for AWS CodeBuild.
  595. //
  596. // For an existing AWS CodeBuild build project that has its source code stored
  597. // in a GitHub or Bitbucket repository, stops AWS CodeBuild from rebuilding
  598. // the source code every time a code change is pushed to the repository.
  599. //
  600. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  601. // with awserr.Error's Code and Message methods to get detailed information about
  602. // the error.
  603. //
  604. // See the AWS API reference guide for AWS CodeBuild's
  605. // API operation DeleteWebhook for usage and error information.
  606. //
  607. // Returned Error Codes:
  608. // * ErrCodeInvalidInputException "InvalidInputException"
  609. // The input value that was provided is not valid.
  610. //
  611. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  612. // The specified AWS resource cannot be found.
  613. //
  614. // * ErrCodeOAuthProviderException "OAuthProviderException"
  615. // There was a problem with the underlying OAuth provider.
  616. //
  617. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteWebhook
  618. func (c *CodeBuild) DeleteWebhook(input *DeleteWebhookInput) (*DeleteWebhookOutput, error) {
  619. req, out := c.DeleteWebhookRequest(input)
  620. return out, req.Send()
  621. }
  622. // DeleteWebhookWithContext is the same as DeleteWebhook with the addition of
  623. // the ability to pass a context and additional request options.
  624. //
  625. // See DeleteWebhook for details on how to use this API operation.
  626. //
  627. // The context must be non-nil and will be used for request cancellation. If
  628. // the context is nil a panic will occur. In the future the SDK may create
  629. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  630. // for more information on using Contexts.
  631. func (c *CodeBuild) DeleteWebhookWithContext(ctx aws.Context, input *DeleteWebhookInput, opts ...request.Option) (*DeleteWebhookOutput, error) {
  632. req, out := c.DeleteWebhookRequest(input)
  633. req.SetContext(ctx)
  634. req.ApplyOptions(opts...)
  635. return out, req.Send()
  636. }
  637. const opImportSourceCredentials = "ImportSourceCredentials"
  638. // ImportSourceCredentialsRequest generates a "aws/request.Request" representing the
  639. // client's request for the ImportSourceCredentials operation. The "output" return
  640. // value will be populated with the request's response once the request completes
  641. // successfully.
  642. //
  643. // Use "Send" method on the returned Request to send the API call to the service.
  644. // the "output" return value is not valid until after Send returns without error.
  645. //
  646. // See ImportSourceCredentials for more information on using the ImportSourceCredentials
  647. // API call, and error handling.
  648. //
  649. // This method is useful when you want to inject custom logic or configuration
  650. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  651. //
  652. //
  653. // // Example sending a request using the ImportSourceCredentialsRequest method.
  654. // req, resp := client.ImportSourceCredentialsRequest(params)
  655. //
  656. // err := req.Send()
  657. // if err == nil { // resp is now filled
  658. // fmt.Println(resp)
  659. // }
  660. //
  661. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ImportSourceCredentials
  662. func (c *CodeBuild) ImportSourceCredentialsRequest(input *ImportSourceCredentialsInput) (req *request.Request, output *ImportSourceCredentialsOutput) {
  663. op := &request.Operation{
  664. Name: opImportSourceCredentials,
  665. HTTPMethod: "POST",
  666. HTTPPath: "/",
  667. }
  668. if input == nil {
  669. input = &ImportSourceCredentialsInput{}
  670. }
  671. output = &ImportSourceCredentialsOutput{}
  672. req = c.newRequest(op, input, output)
  673. return
  674. }
  675. // ImportSourceCredentials API operation for AWS CodeBuild.
  676. //
  677. // Imports the source repository credentials for an AWS CodeBuild project that
  678. // has its source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository.
  679. //
  680. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  681. // with awserr.Error's Code and Message methods to get detailed information about
  682. // the error.
  683. //
  684. // See the AWS API reference guide for AWS CodeBuild's
  685. // API operation ImportSourceCredentials for usage and error information.
  686. //
  687. // Returned Error Codes:
  688. // * ErrCodeInvalidInputException "InvalidInputException"
  689. // The input value that was provided is not valid.
  690. //
  691. // * ErrCodeAccountLimitExceededException "AccountLimitExceededException"
  692. // An AWS service limit was exceeded for the calling AWS account.
  693. //
  694. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ImportSourceCredentials
  695. func (c *CodeBuild) ImportSourceCredentials(input *ImportSourceCredentialsInput) (*ImportSourceCredentialsOutput, error) {
  696. req, out := c.ImportSourceCredentialsRequest(input)
  697. return out, req.Send()
  698. }
  699. // ImportSourceCredentialsWithContext is the same as ImportSourceCredentials with the addition of
  700. // the ability to pass a context and additional request options.
  701. //
  702. // See ImportSourceCredentials for details on how to use this API operation.
  703. //
  704. // The context must be non-nil and will be used for request cancellation. If
  705. // the context is nil a panic will occur. In the future the SDK may create
  706. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  707. // for more information on using Contexts.
  708. func (c *CodeBuild) ImportSourceCredentialsWithContext(ctx aws.Context, input *ImportSourceCredentialsInput, opts ...request.Option) (*ImportSourceCredentialsOutput, error) {
  709. req, out := c.ImportSourceCredentialsRequest(input)
  710. req.SetContext(ctx)
  711. req.ApplyOptions(opts...)
  712. return out, req.Send()
  713. }
  714. const opInvalidateProjectCache = "InvalidateProjectCache"
  715. // InvalidateProjectCacheRequest generates a "aws/request.Request" representing the
  716. // client's request for the InvalidateProjectCache operation. The "output" return
  717. // value will be populated with the request's response once the request completes
  718. // successfully.
  719. //
  720. // Use "Send" method on the returned Request to send the API call to the service.
  721. // the "output" return value is not valid until after Send returns without error.
  722. //
  723. // See InvalidateProjectCache for more information on using the InvalidateProjectCache
  724. // API call, and error handling.
  725. //
  726. // This method is useful when you want to inject custom logic or configuration
  727. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  728. //
  729. //
  730. // // Example sending a request using the InvalidateProjectCacheRequest method.
  731. // req, resp := client.InvalidateProjectCacheRequest(params)
  732. //
  733. // err := req.Send()
  734. // if err == nil { // resp is now filled
  735. // fmt.Println(resp)
  736. // }
  737. //
  738. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/InvalidateProjectCache
  739. func (c *CodeBuild) InvalidateProjectCacheRequest(input *InvalidateProjectCacheInput) (req *request.Request, output *InvalidateProjectCacheOutput) {
  740. op := &request.Operation{
  741. Name: opInvalidateProjectCache,
  742. HTTPMethod: "POST",
  743. HTTPPath: "/",
  744. }
  745. if input == nil {
  746. input = &InvalidateProjectCacheInput{}
  747. }
  748. output = &InvalidateProjectCacheOutput{}
  749. req = c.newRequest(op, input, output)
  750. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  751. return
  752. }
  753. // InvalidateProjectCache API operation for AWS CodeBuild.
  754. //
  755. // Resets the cache for a project.
  756. //
  757. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  758. // with awserr.Error's Code and Message methods to get detailed information about
  759. // the error.
  760. //
  761. // See the AWS API reference guide for AWS CodeBuild's
  762. // API operation InvalidateProjectCache for usage and error information.
  763. //
  764. // Returned Error Codes:
  765. // * ErrCodeInvalidInputException "InvalidInputException"
  766. // The input value that was provided is not valid.
  767. //
  768. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  769. // The specified AWS resource cannot be found.
  770. //
  771. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/InvalidateProjectCache
  772. func (c *CodeBuild) InvalidateProjectCache(input *InvalidateProjectCacheInput) (*InvalidateProjectCacheOutput, error) {
  773. req, out := c.InvalidateProjectCacheRequest(input)
  774. return out, req.Send()
  775. }
  776. // InvalidateProjectCacheWithContext is the same as InvalidateProjectCache with the addition of
  777. // the ability to pass a context and additional request options.
  778. //
  779. // See InvalidateProjectCache for details on how to use this API operation.
  780. //
  781. // The context must be non-nil and will be used for request cancellation. If
  782. // the context is nil a panic will occur. In the future the SDK may create
  783. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  784. // for more information on using Contexts.
  785. func (c *CodeBuild) InvalidateProjectCacheWithContext(ctx aws.Context, input *InvalidateProjectCacheInput, opts ...request.Option) (*InvalidateProjectCacheOutput, error) {
  786. req, out := c.InvalidateProjectCacheRequest(input)
  787. req.SetContext(ctx)
  788. req.ApplyOptions(opts...)
  789. return out, req.Send()
  790. }
  791. const opListBuilds = "ListBuilds"
  792. // ListBuildsRequest generates a "aws/request.Request" representing the
  793. // client's request for the ListBuilds operation. The "output" return
  794. // value will be populated with the request's response once the request completes
  795. // successfully.
  796. //
  797. // Use "Send" method on the returned Request to send the API call to the service.
  798. // the "output" return value is not valid until after Send returns without error.
  799. //
  800. // See ListBuilds for more information on using the ListBuilds
  801. // API call, and error handling.
  802. //
  803. // This method is useful when you want to inject custom logic or configuration
  804. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  805. //
  806. //
  807. // // Example sending a request using the ListBuildsRequest method.
  808. // req, resp := client.ListBuildsRequest(params)
  809. //
  810. // err := req.Send()
  811. // if err == nil { // resp is now filled
  812. // fmt.Println(resp)
  813. // }
  814. //
  815. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListBuilds
  816. func (c *CodeBuild) ListBuildsRequest(input *ListBuildsInput) (req *request.Request, output *ListBuildsOutput) {
  817. op := &request.Operation{
  818. Name: opListBuilds,
  819. HTTPMethod: "POST",
  820. HTTPPath: "/",
  821. }
  822. if input == nil {
  823. input = &ListBuildsInput{}
  824. }
  825. output = &ListBuildsOutput{}
  826. req = c.newRequest(op, input, output)
  827. return
  828. }
  829. // ListBuilds API operation for AWS CodeBuild.
  830. //
  831. // Gets a list of build IDs, with each build ID representing a single build.
  832. //
  833. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  834. // with awserr.Error's Code and Message methods to get detailed information about
  835. // the error.
  836. //
  837. // See the AWS API reference guide for AWS CodeBuild's
  838. // API operation ListBuilds for usage and error information.
  839. //
  840. // Returned Error Codes:
  841. // * ErrCodeInvalidInputException "InvalidInputException"
  842. // The input value that was provided is not valid.
  843. //
  844. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListBuilds
  845. func (c *CodeBuild) ListBuilds(input *ListBuildsInput) (*ListBuildsOutput, error) {
  846. req, out := c.ListBuildsRequest(input)
  847. return out, req.Send()
  848. }
  849. // ListBuildsWithContext is the same as ListBuilds with the addition of
  850. // the ability to pass a context and additional request options.
  851. //
  852. // See ListBuilds for details on how to use this API operation.
  853. //
  854. // The context must be non-nil and will be used for request cancellation. If
  855. // the context is nil a panic will occur. In the future the SDK may create
  856. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  857. // for more information on using Contexts.
  858. func (c *CodeBuild) ListBuildsWithContext(ctx aws.Context, input *ListBuildsInput, opts ...request.Option) (*ListBuildsOutput, error) {
  859. req, out := c.ListBuildsRequest(input)
  860. req.SetContext(ctx)
  861. req.ApplyOptions(opts...)
  862. return out, req.Send()
  863. }
  864. const opListBuildsForProject = "ListBuildsForProject"
  865. // ListBuildsForProjectRequest generates a "aws/request.Request" representing the
  866. // client's request for the ListBuildsForProject operation. The "output" return
  867. // value will be populated with the request's response once the request completes
  868. // successfully.
  869. //
  870. // Use "Send" method on the returned Request to send the API call to the service.
  871. // the "output" return value is not valid until after Send returns without error.
  872. //
  873. // See ListBuildsForProject for more information on using the ListBuildsForProject
  874. // API call, and error handling.
  875. //
  876. // This method is useful when you want to inject custom logic or configuration
  877. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  878. //
  879. //
  880. // // Example sending a request using the ListBuildsForProjectRequest method.
  881. // req, resp := client.ListBuildsForProjectRequest(params)
  882. //
  883. // err := req.Send()
  884. // if err == nil { // resp is now filled
  885. // fmt.Println(resp)
  886. // }
  887. //
  888. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListBuildsForProject
  889. func (c *CodeBuild) ListBuildsForProjectRequest(input *ListBuildsForProjectInput) (req *request.Request, output *ListBuildsForProjectOutput) {
  890. op := &request.Operation{
  891. Name: opListBuildsForProject,
  892. HTTPMethod: "POST",
  893. HTTPPath: "/",
  894. }
  895. if input == nil {
  896. input = &ListBuildsForProjectInput{}
  897. }
  898. output = &ListBuildsForProjectOutput{}
  899. req = c.newRequest(op, input, output)
  900. return
  901. }
  902. // ListBuildsForProject API operation for AWS CodeBuild.
  903. //
  904. // Gets a list of build IDs for the specified build project, with each build
  905. // ID representing a single build.
  906. //
  907. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  908. // with awserr.Error's Code and Message methods to get detailed information about
  909. // the error.
  910. //
  911. // See the AWS API reference guide for AWS CodeBuild's
  912. // API operation ListBuildsForProject for usage and error information.
  913. //
  914. // Returned Error Codes:
  915. // * ErrCodeInvalidInputException "InvalidInputException"
  916. // The input value that was provided is not valid.
  917. //
  918. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  919. // The specified AWS resource cannot be found.
  920. //
  921. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListBuildsForProject
  922. func (c *CodeBuild) ListBuildsForProject(input *ListBuildsForProjectInput) (*ListBuildsForProjectOutput, error) {
  923. req, out := c.ListBuildsForProjectRequest(input)
  924. return out, req.Send()
  925. }
  926. // ListBuildsForProjectWithContext is the same as ListBuildsForProject with the addition of
  927. // the ability to pass a context and additional request options.
  928. //
  929. // See ListBuildsForProject for details on how to use this API operation.
  930. //
  931. // The context must be non-nil and will be used for request cancellation. If
  932. // the context is nil a panic will occur. In the future the SDK may create
  933. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  934. // for more information on using Contexts.
  935. func (c *CodeBuild) ListBuildsForProjectWithContext(ctx aws.Context, input *ListBuildsForProjectInput, opts ...request.Option) (*ListBuildsForProjectOutput, error) {
  936. req, out := c.ListBuildsForProjectRequest(input)
  937. req.SetContext(ctx)
  938. req.ApplyOptions(opts...)
  939. return out, req.Send()
  940. }
  941. const opListCuratedEnvironmentImages = "ListCuratedEnvironmentImages"
  942. // ListCuratedEnvironmentImagesRequest generates a "aws/request.Request" representing the
  943. // client's request for the ListCuratedEnvironmentImages operation. The "output" return
  944. // value will be populated with the request's response once the request completes
  945. // successfully.
  946. //
  947. // Use "Send" method on the returned Request to send the API call to the service.
  948. // the "output" return value is not valid until after Send returns without error.
  949. //
  950. // See ListCuratedEnvironmentImages for more information on using the ListCuratedEnvironmentImages
  951. // API call, and error handling.
  952. //
  953. // This method is useful when you want to inject custom logic or configuration
  954. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  955. //
  956. //
  957. // // Example sending a request using the ListCuratedEnvironmentImagesRequest method.
  958. // req, resp := client.ListCuratedEnvironmentImagesRequest(params)
  959. //
  960. // err := req.Send()
  961. // if err == nil { // resp is now filled
  962. // fmt.Println(resp)
  963. // }
  964. //
  965. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListCuratedEnvironmentImages
  966. func (c *CodeBuild) ListCuratedEnvironmentImagesRequest(input *ListCuratedEnvironmentImagesInput) (req *request.Request, output *ListCuratedEnvironmentImagesOutput) {
  967. op := &request.Operation{
  968. Name: opListCuratedEnvironmentImages,
  969. HTTPMethod: "POST",
  970. HTTPPath: "/",
  971. }
  972. if input == nil {
  973. input = &ListCuratedEnvironmentImagesInput{}
  974. }
  975. output = &ListCuratedEnvironmentImagesOutput{}
  976. req = c.newRequest(op, input, output)
  977. return
  978. }
  979. // ListCuratedEnvironmentImages API operation for AWS CodeBuild.
  980. //
  981. // Gets information about Docker images that are managed by AWS CodeBuild.
  982. //
  983. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  984. // with awserr.Error's Code and Message methods to get detailed information about
  985. // the error.
  986. //
  987. // See the AWS API reference guide for AWS CodeBuild's
  988. // API operation ListCuratedEnvironmentImages for usage and error information.
  989. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListCuratedEnvironmentImages
  990. func (c *CodeBuild) ListCuratedEnvironmentImages(input *ListCuratedEnvironmentImagesInput) (*ListCuratedEnvironmentImagesOutput, error) {
  991. req, out := c.ListCuratedEnvironmentImagesRequest(input)
  992. return out, req.Send()
  993. }
  994. // ListCuratedEnvironmentImagesWithContext is the same as ListCuratedEnvironmentImages with the addition of
  995. // the ability to pass a context and additional request options.
  996. //
  997. // See ListCuratedEnvironmentImages for details on how to use this API operation.
  998. //
  999. // The context must be non-nil and will be used for request cancellation. If
  1000. // the context is nil a panic will occur. In the future the SDK may create
  1001. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1002. // for more information on using Contexts.
  1003. func (c *CodeBuild) ListCuratedEnvironmentImagesWithContext(ctx aws.Context, input *ListCuratedEnvironmentImagesInput, opts ...request.Option) (*ListCuratedEnvironmentImagesOutput, error) {
  1004. req, out := c.ListCuratedEnvironmentImagesRequest(input)
  1005. req.SetContext(ctx)
  1006. req.ApplyOptions(opts...)
  1007. return out, req.Send()
  1008. }
  1009. const opListProjects = "ListProjects"
  1010. // ListProjectsRequest generates a "aws/request.Request" representing the
  1011. // client's request for the ListProjects operation. The "output" return
  1012. // value will be populated with the request's response once the request completes
  1013. // successfully.
  1014. //
  1015. // Use "Send" method on the returned Request to send the API call to the service.
  1016. // the "output" return value is not valid until after Send returns without error.
  1017. //
  1018. // See ListProjects for more information on using the ListProjects
  1019. // API call, and error handling.
  1020. //
  1021. // This method is useful when you want to inject custom logic or configuration
  1022. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1023. //
  1024. //
  1025. // // Example sending a request using the ListProjectsRequest method.
  1026. // req, resp := client.ListProjectsRequest(params)
  1027. //
  1028. // err := req.Send()
  1029. // if err == nil { // resp is now filled
  1030. // fmt.Println(resp)
  1031. // }
  1032. //
  1033. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListProjects
  1034. func (c *CodeBuild) ListProjectsRequest(input *ListProjectsInput) (req *request.Request, output *ListProjectsOutput) {
  1035. op := &request.Operation{
  1036. Name: opListProjects,
  1037. HTTPMethod: "POST",
  1038. HTTPPath: "/",
  1039. }
  1040. if input == nil {
  1041. input = &ListProjectsInput{}
  1042. }
  1043. output = &ListProjectsOutput{}
  1044. req = c.newRequest(op, input, output)
  1045. return
  1046. }
  1047. // ListProjects API operation for AWS CodeBuild.
  1048. //
  1049. // Gets a list of build project names, with each build project name representing
  1050. // a single build project.
  1051. //
  1052. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1053. // with awserr.Error's Code and Message methods to get detailed information about
  1054. // the error.
  1055. //
  1056. // See the AWS API reference guide for AWS CodeBuild's
  1057. // API operation ListProjects for usage and error information.
  1058. //
  1059. // Returned Error Codes:
  1060. // * ErrCodeInvalidInputException "InvalidInputException"
  1061. // The input value that was provided is not valid.
  1062. //
  1063. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListProjects
  1064. func (c *CodeBuild) ListProjects(input *ListProjectsInput) (*ListProjectsOutput, error) {
  1065. req, out := c.ListProjectsRequest(input)
  1066. return out, req.Send()
  1067. }
  1068. // ListProjectsWithContext is the same as ListProjects with the addition of
  1069. // the ability to pass a context and additional request options.
  1070. //
  1071. // See ListProjects for details on how to use this API operation.
  1072. //
  1073. // The context must be non-nil and will be used for request cancellation. If
  1074. // the context is nil a panic will occur. In the future the SDK may create
  1075. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1076. // for more information on using Contexts.
  1077. func (c *CodeBuild) ListProjectsWithContext(ctx aws.Context, input *ListProjectsInput, opts ...request.Option) (*ListProjectsOutput, error) {
  1078. req, out := c.ListProjectsRequest(input)
  1079. req.SetContext(ctx)
  1080. req.ApplyOptions(opts...)
  1081. return out, req.Send()
  1082. }
  1083. const opListSourceCredentials = "ListSourceCredentials"
  1084. // ListSourceCredentialsRequest generates a "aws/request.Request" representing the
  1085. // client's request for the ListSourceCredentials operation. The "output" return
  1086. // value will be populated with the request's response once the request completes
  1087. // successfully.
  1088. //
  1089. // Use "Send" method on the returned Request to send the API call to the service.
  1090. // the "output" return value is not valid until after Send returns without error.
  1091. //
  1092. // See ListSourceCredentials for more information on using the ListSourceCredentials
  1093. // API call, and error handling.
  1094. //
  1095. // This method is useful when you want to inject custom logic or configuration
  1096. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1097. //
  1098. //
  1099. // // Example sending a request using the ListSourceCredentialsRequest method.
  1100. // req, resp := client.ListSourceCredentialsRequest(params)
  1101. //
  1102. // err := req.Send()
  1103. // if err == nil { // resp is now filled
  1104. // fmt.Println(resp)
  1105. // }
  1106. //
  1107. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListSourceCredentials
  1108. func (c *CodeBuild) ListSourceCredentialsRequest(input *ListSourceCredentialsInput) (req *request.Request, output *ListSourceCredentialsOutput) {
  1109. op := &request.Operation{
  1110. Name: opListSourceCredentials,
  1111. HTTPMethod: "POST",
  1112. HTTPPath: "/",
  1113. }
  1114. if input == nil {
  1115. input = &ListSourceCredentialsInput{}
  1116. }
  1117. output = &ListSourceCredentialsOutput{}
  1118. req = c.newRequest(op, input, output)
  1119. return
  1120. }
  1121. // ListSourceCredentials API operation for AWS CodeBuild.
  1122. //
  1123. // Returns a list of SourceCredentialsInfo objects.
  1124. //
  1125. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1126. // with awserr.Error's Code and Message methods to get detailed information about
  1127. // the error.
  1128. //
  1129. // See the AWS API reference guide for AWS CodeBuild's
  1130. // API operation ListSourceCredentials for usage and error information.
  1131. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListSourceCredentials
  1132. func (c *CodeBuild) ListSourceCredentials(input *ListSourceCredentialsInput) (*ListSourceCredentialsOutput, error) {
  1133. req, out := c.ListSourceCredentialsRequest(input)
  1134. return out, req.Send()
  1135. }
  1136. // ListSourceCredentialsWithContext is the same as ListSourceCredentials with the addition of
  1137. // the ability to pass a context and additional request options.
  1138. //
  1139. // See ListSourceCredentials for details on how to use this API operation.
  1140. //
  1141. // The context must be non-nil and will be used for request cancellation. If
  1142. // the context is nil a panic will occur. In the future the SDK may create
  1143. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1144. // for more information on using Contexts.
  1145. func (c *CodeBuild) ListSourceCredentialsWithContext(ctx aws.Context, input *ListSourceCredentialsInput, opts ...request.Option) (*ListSourceCredentialsOutput, error) {
  1146. req, out := c.ListSourceCredentialsRequest(input)
  1147. req.SetContext(ctx)
  1148. req.ApplyOptions(opts...)
  1149. return out, req.Send()
  1150. }
  1151. const opStartBuild = "StartBuild"
  1152. // StartBuildRequest generates a "aws/request.Request" representing the
  1153. // client's request for the StartBuild operation. The "output" return
  1154. // value will be populated with the request's response once the request completes
  1155. // successfully.
  1156. //
  1157. // Use "Send" method on the returned Request to send the API call to the service.
  1158. // the "output" return value is not valid until after Send returns without error.
  1159. //
  1160. // See StartBuild for more information on using the StartBuild
  1161. // API call, and error handling.
  1162. //
  1163. // This method is useful when you want to inject custom logic or configuration
  1164. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1165. //
  1166. //
  1167. // // Example sending a request using the StartBuildRequest method.
  1168. // req, resp := client.StartBuildRequest(params)
  1169. //
  1170. // err := req.Send()
  1171. // if err == nil { // resp is now filled
  1172. // fmt.Println(resp)
  1173. // }
  1174. //
  1175. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/StartBuild
  1176. func (c *CodeBuild) StartBuildRequest(input *StartBuildInput) (req *request.Request, output *StartBuildOutput) {
  1177. op := &request.Operation{
  1178. Name: opStartBuild,
  1179. HTTPMethod: "POST",
  1180. HTTPPath: "/",
  1181. }
  1182. if input == nil {
  1183. input = &StartBuildInput{}
  1184. }
  1185. output = &StartBuildOutput{}
  1186. req = c.newRequest(op, input, output)
  1187. return
  1188. }
  1189. // StartBuild API operation for AWS CodeBuild.
  1190. //
  1191. // Starts running a build.
  1192. //
  1193. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1194. // with awserr.Error's Code and Message methods to get detailed information about
  1195. // the error.
  1196. //
  1197. // See the AWS API reference guide for AWS CodeBuild's
  1198. // API operation StartBuild for usage and error information.
  1199. //
  1200. // Returned Error Codes:
  1201. // * ErrCodeInvalidInputException "InvalidInputException"
  1202. // The input value that was provided is not valid.
  1203. //
  1204. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1205. // The specified AWS resource cannot be found.
  1206. //
  1207. // * ErrCodeAccountLimitExceededException "AccountLimitExceededException"
  1208. // An AWS service limit was exceeded for the calling AWS account.
  1209. //
  1210. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/StartBuild
  1211. func (c *CodeBuild) StartBuild(input *StartBuildInput) (*StartBuildOutput, error) {
  1212. req, out := c.StartBuildRequest(input)
  1213. return out, req.Send()
  1214. }
  1215. // StartBuildWithContext is the same as StartBuild with the addition of
  1216. // the ability to pass a context and additional request options.
  1217. //
  1218. // See StartBuild for details on how to use this API operation.
  1219. //
  1220. // The context must be non-nil and will be used for request cancellation. If
  1221. // the context is nil a panic will occur. In the future the SDK may create
  1222. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1223. // for more information on using Contexts.
  1224. func (c *CodeBuild) StartBuildWithContext(ctx aws.Context, input *StartBuildInput, opts ...request.Option) (*StartBuildOutput, error) {
  1225. req, out := c.StartBuildRequest(input)
  1226. req.SetContext(ctx)
  1227. req.ApplyOptions(opts...)
  1228. return out, req.Send()
  1229. }
  1230. const opStopBuild = "StopBuild"
  1231. // StopBuildRequest generates a "aws/request.Request" representing the
  1232. // client's request for the StopBuild operation. The "output" return
  1233. // value will be populated with the request's response once the request completes
  1234. // successfully.
  1235. //
  1236. // Use "Send" method on the returned Request to send the API call to the service.
  1237. // the "output" return value is not valid until after Send returns without error.
  1238. //
  1239. // See StopBuild for more information on using the StopBuild
  1240. // API call, and error handling.
  1241. //
  1242. // This method is useful when you want to inject custom logic or configuration
  1243. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1244. //
  1245. //
  1246. // // Example sending a request using the StopBuildRequest method.
  1247. // req, resp := client.StopBuildRequest(params)
  1248. //
  1249. // err := req.Send()
  1250. // if err == nil { // resp is now filled
  1251. // fmt.Println(resp)
  1252. // }
  1253. //
  1254. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/StopBuild
  1255. func (c *CodeBuild) StopBuildRequest(input *StopBuildInput) (req *request.Request, output *StopBuildOutput) {
  1256. op := &request.Operation{
  1257. Name: opStopBuild,
  1258. HTTPMethod: "POST",
  1259. HTTPPath: "/",
  1260. }
  1261. if input == nil {
  1262. input = &StopBuildInput{}
  1263. }
  1264. output = &StopBuildOutput{}
  1265. req = c.newRequest(op, input, output)
  1266. return
  1267. }
  1268. // StopBuild API operation for AWS CodeBuild.
  1269. //
  1270. // Attempts to stop running a build.
  1271. //
  1272. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1273. // with awserr.Error's Code and Message methods to get detailed information about
  1274. // the error.
  1275. //
  1276. // See the AWS API reference guide for AWS CodeBuild's
  1277. // API operation StopBuild for usage and error information.
  1278. //
  1279. // Returned Error Codes:
  1280. // * ErrCodeInvalidInputException "InvalidInputException"
  1281. // The input value that was provided is not valid.
  1282. //
  1283. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1284. // The specified AWS resource cannot be found.
  1285. //
  1286. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/StopBuild
  1287. func (c *CodeBuild) StopBuild(input *StopBuildInput) (*StopBuildOutput, error) {
  1288. req, out := c.StopBuildRequest(input)
  1289. return out, req.Send()
  1290. }
  1291. // StopBuildWithContext is the same as StopBuild with the addition of
  1292. // the ability to pass a context and additional request options.
  1293. //
  1294. // See StopBuild for details on how to use this API operation.
  1295. //
  1296. // The context must be non-nil and will be used for request cancellation. If
  1297. // the context is nil a panic will occur. In the future the SDK may create
  1298. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1299. // for more information on using Contexts.
  1300. func (c *CodeBuild) StopBuildWithContext(ctx aws.Context, input *StopBuildInput, opts ...request.Option) (*StopBuildOutput, error) {
  1301. req, out := c.StopBuildRequest(input)
  1302. req.SetContext(ctx)
  1303. req.ApplyOptions(opts...)
  1304. return out, req.Send()
  1305. }
  1306. const opUpdateProject = "UpdateProject"
  1307. // UpdateProjectRequest generates a "aws/request.Request" representing the
  1308. // client's request for the UpdateProject operation. The "output" return
  1309. // value will be populated with the request's response once the request completes
  1310. // successfully.
  1311. //
  1312. // Use "Send" method on the returned Request to send the API call to the service.
  1313. // the "output" return value is not valid until after Send returns without error.
  1314. //
  1315. // See UpdateProject for more information on using the UpdateProject
  1316. // API call, and error handling.
  1317. //
  1318. // This method is useful when you want to inject custom logic or configuration
  1319. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1320. //
  1321. //
  1322. // // Example sending a request using the UpdateProjectRequest method.
  1323. // req, resp := client.UpdateProjectRequest(params)
  1324. //
  1325. // err := req.Send()
  1326. // if err == nil { // resp is now filled
  1327. // fmt.Println(resp)
  1328. // }
  1329. //
  1330. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/UpdateProject
  1331. func (c *CodeBuild) UpdateProjectRequest(input *UpdateProjectInput) (req *request.Request, output *UpdateProjectOutput) {
  1332. op := &request.Operation{
  1333. Name: opUpdateProject,
  1334. HTTPMethod: "POST",
  1335. HTTPPath: "/",
  1336. }
  1337. if input == nil {
  1338. input = &UpdateProjectInput{}
  1339. }
  1340. output = &UpdateProjectOutput{}
  1341. req = c.newRequest(op, input, output)
  1342. return
  1343. }
  1344. // UpdateProject API operation for AWS CodeBuild.
  1345. //
  1346. // Changes the settings of a build project.
  1347. //
  1348. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1349. // with awserr.Error's Code and Message methods to get detailed information about
  1350. // the error.
  1351. //
  1352. // See the AWS API reference guide for AWS CodeBuild's
  1353. // API operation UpdateProject for usage and error information.
  1354. //
  1355. // Returned Error Codes:
  1356. // * ErrCodeInvalidInputException "InvalidInputException"
  1357. // The input value that was provided is not valid.
  1358. //
  1359. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1360. // The specified AWS resource cannot be found.
  1361. //
  1362. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/UpdateProject
  1363. func (c *CodeBuild) UpdateProject(input *UpdateProjectInput) (*UpdateProjectOutput, error) {
  1364. req, out := c.UpdateProjectRequest(input)
  1365. return out, req.Send()
  1366. }
  1367. // UpdateProjectWithContext is the same as UpdateProject with the addition of
  1368. // the ability to pass a context and additional request options.
  1369. //
  1370. // See UpdateProject for details on how to use this API operation.
  1371. //
  1372. // The context must be non-nil and will be used for request cancellation. If
  1373. // the context is nil a panic will occur. In the future the SDK may create
  1374. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1375. // for more information on using Contexts.
  1376. func (c *CodeBuild) UpdateProjectWithContext(ctx aws.Context, input *UpdateProjectInput, opts ...request.Option) (*UpdateProjectOutput, error) {
  1377. req, out := c.UpdateProjectRequest(input)
  1378. req.SetContext(ctx)
  1379. req.ApplyOptions(opts...)
  1380. return out, req.Send()
  1381. }
  1382. const opUpdateWebhook = "UpdateWebhook"
  1383. // UpdateWebhookRequest generates a "aws/request.Request" representing the
  1384. // client's request for the UpdateWebhook operation. The "output" return
  1385. // value will be populated with the request's response once the request completes
  1386. // successfully.
  1387. //
  1388. // Use "Send" method on the returned Request to send the API call to the service.
  1389. // the "output" return value is not valid until after Send returns without error.
  1390. //
  1391. // See UpdateWebhook for more information on using the UpdateWebhook
  1392. // API call, and error handling.
  1393. //
  1394. // This method is useful when you want to inject custom logic or configuration
  1395. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1396. //
  1397. //
  1398. // // Example sending a request using the UpdateWebhookRequest method.
  1399. // req, resp := client.UpdateWebhookRequest(params)
  1400. //
  1401. // err := req.Send()
  1402. // if err == nil { // resp is now filled
  1403. // fmt.Println(resp)
  1404. // }
  1405. //
  1406. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/UpdateWebhook
  1407. func (c *CodeBuild) UpdateWebhookRequest(input *UpdateWebhookInput) (req *request.Request, output *UpdateWebhookOutput) {
  1408. op := &request.Operation{
  1409. Name: opUpdateWebhook,
  1410. HTTPMethod: "POST",
  1411. HTTPPath: "/",
  1412. }
  1413. if input == nil {
  1414. input = &UpdateWebhookInput{}
  1415. }
  1416. output = &UpdateWebhookOutput{}
  1417. req = c.newRequest(op, input, output)
  1418. return
  1419. }
  1420. // UpdateWebhook API operation for AWS CodeBuild.
  1421. //
  1422. // Updates the webhook associated with an AWS CodeBuild build project.
  1423. //
  1424. // If you use Bitbucket for your repository, rotateSecret is ignored.
  1425. //
  1426. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1427. // with awserr.Error's Code and Message methods to get detailed information about
  1428. // the error.
  1429. //
  1430. // See the AWS API reference guide for AWS CodeBuild's
  1431. // API operation UpdateWebhook for usage and error information.
  1432. //
  1433. // Returned Error Codes:
  1434. // * ErrCodeInvalidInputException "InvalidInputException"
  1435. // The input value that was provided is not valid.
  1436. //
  1437. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1438. // The specified AWS resource cannot be found.
  1439. //
  1440. // * ErrCodeOAuthProviderException "OAuthProviderException"
  1441. // There was a problem with the underlying OAuth provider.
  1442. //
  1443. // See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/UpdateWebhook
  1444. func (c *CodeBuild) UpdateWebhook(input *UpdateWebhookInput) (*UpdateWebhookOutput, error) {
  1445. req, out := c.UpdateWebhookRequest(input)
  1446. return out, req.Send()
  1447. }
  1448. // UpdateWebhookWithContext is the same as UpdateWebhook with the addition of
  1449. // the ability to pass a context and additional request options.
  1450. //
  1451. // See UpdateWebhook for details on how to use this API operation.
  1452. //
  1453. // The context must be non-nil and will be used for request cancellation. If
  1454. // the context is nil a panic will occur. In the future the SDK may create
  1455. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1456. // for more information on using Contexts.
  1457. func (c *CodeBuild) UpdateWebhookWithContext(ctx aws.Context, input *UpdateWebhookInput, opts ...request.Option) (*UpdateWebhookOutput, error) {
  1458. req, out := c.UpdateWebhookRequest(input)
  1459. req.SetContext(ctx)
  1460. req.ApplyOptions(opts...)
  1461. return out, req.Send()
  1462. }
  1463. type BatchDeleteBuildsInput struct {
  1464. _ struct{} `type:"structure"`
  1465. // The IDs of the builds to delete.
  1466. //
  1467. // Ids is a required field
  1468. Ids []*string `locationName:"ids" min:"1" type:"list" required:"true"`
  1469. }
  1470. // String returns the string representation
  1471. func (s BatchDeleteBuildsInput) String() string {
  1472. return awsutil.Prettify(s)
  1473. }
  1474. // GoString returns the string representation
  1475. func (s BatchDeleteBuildsInput) GoString() string {
  1476. return s.String()
  1477. }
  1478. // Validate inspects the fields of the type to determine if they are valid.
  1479. func (s *BatchDeleteBuildsInput) Validate() error {
  1480. invalidParams := request.ErrInvalidParams{Context: "BatchDeleteBuildsInput"}
  1481. if s.Ids == nil {
  1482. invalidParams.Add(request.NewErrParamRequired("Ids"))
  1483. }
  1484. if s.Ids != nil && len(s.Ids) < 1 {
  1485. invalidParams.Add(request.NewErrParamMinLen("Ids", 1))
  1486. }
  1487. if invalidParams.Len() > 0 {
  1488. return invalidParams
  1489. }
  1490. return nil
  1491. }
  1492. // SetIds sets the Ids field's value.
  1493. func (s *BatchDeleteBuildsInput) SetIds(v []*string) *BatchDeleteBuildsInput {
  1494. s.Ids = v
  1495. return s
  1496. }
  1497. type BatchDeleteBuildsOutput struct {
  1498. _ struct{} `type:"structure"`
  1499. // The IDs of the builds that were successfully deleted.
  1500. BuildsDeleted []*string `locationName:"buildsDeleted" min:"1" type:"list"`
  1501. // Information about any builds that could not be successfully deleted.
  1502. BuildsNotDeleted []*BuildNotDeleted `locationName:"buildsNotDeleted" type:"list"`
  1503. }
  1504. // String returns the string representation
  1505. func (s BatchDeleteBuildsOutput) String() string {
  1506. return awsutil.Prettify(s)
  1507. }
  1508. // GoString returns the string representation
  1509. func (s BatchDeleteBuildsOutput) GoString() string {
  1510. return s.String()
  1511. }
  1512. // SetBuildsDeleted sets the BuildsDeleted field's value.
  1513. func (s *BatchDeleteBuildsOutput) SetBuildsDeleted(v []*string) *BatchDeleteBuildsOutput {
  1514. s.BuildsDeleted = v
  1515. return s
  1516. }
  1517. // SetBuildsNotDeleted sets the BuildsNotDeleted field's value.
  1518. func (s *BatchDeleteBuildsOutput) SetBuildsNotDeleted(v []*BuildNotDeleted) *BatchDeleteBuildsOutput {
  1519. s.BuildsNotDeleted = v
  1520. return s
  1521. }
  1522. type BatchGetBuildsInput struct {
  1523. _ struct{} `type:"structure"`
  1524. // The IDs of the builds.
  1525. //
  1526. // Ids is a required field
  1527. Ids []*string `locationName:"ids" min:"1" type:"list" required:"true"`
  1528. }
  1529. // String returns the string representation
  1530. func (s BatchGetBuildsInput) String() string {
  1531. return awsutil.Prettify(s)
  1532. }
  1533. // GoString returns the string representation
  1534. func (s BatchGetBuildsInput) GoString() string {
  1535. return s.String()
  1536. }
  1537. // Validate inspects the fields of the type to determine if they are valid.
  1538. func (s *BatchGetBuildsInput) Validate() error {
  1539. invalidParams := request.ErrInvalidParams{Context: "BatchGetBuildsInput"}
  1540. if s.Ids == nil {
  1541. invalidParams.Add(request.NewErrParamRequired("Ids"))
  1542. }
  1543. if s.Ids != nil && len(s.Ids) < 1 {
  1544. invalidParams.Add(request.NewErrParamMinLen("Ids", 1))
  1545. }
  1546. if invalidParams.Len() > 0 {
  1547. return invalidParams
  1548. }
  1549. return nil
  1550. }
  1551. // SetIds sets the Ids field's value.
  1552. func (s *BatchGetBuildsInput) SetIds(v []*string) *BatchGetBuildsInput {
  1553. s.Ids = v
  1554. return s
  1555. }
  1556. type BatchGetBuildsOutput struct {
  1557. _ struct{} `type:"structure"`
  1558. // Information about the requested builds.
  1559. Builds []*Build `locationName:"builds" type:"list"`
  1560. // The IDs of builds for which information could not be found.
  1561. BuildsNotFound []*string `locationName:"buildsNotFound" min:"1" type:"list"`
  1562. }
  1563. // String returns the string representation
  1564. func (s BatchGetBuildsOutput) String() string {
  1565. return awsutil.Prettify(s)
  1566. }
  1567. // GoString returns the string representation
  1568. func (s BatchGetBuildsOutput) GoString() string {
  1569. return s.String()
  1570. }
  1571. // SetBuilds sets the Builds field's value.
  1572. func (s *BatchGetBuildsOutput) SetBuilds(v []*Build) *BatchGetBuildsOutput {
  1573. s.Builds = v
  1574. return s
  1575. }
  1576. // SetBuildsNotFound sets the BuildsNotFound field's value.
  1577. func (s *BatchGetBuildsOutput) SetBuildsNotFound(v []*string) *BatchGetBuildsOutput {
  1578. s.BuildsNotFound = v
  1579. return s
  1580. }
  1581. type BatchGetProjectsInput struct {
  1582. _ struct{} `type:"structure"`
  1583. // The names of the build projects.
  1584. //
  1585. // Names is a required field
  1586. Names []*string `locationName:"names" min:"1" type:"list" required:"true"`
  1587. }
  1588. // String returns the string representation
  1589. func (s BatchGetProjectsInput) String() string {
  1590. return awsutil.Prettify(s)
  1591. }
  1592. // GoString returns the string representation
  1593. func (s BatchGetProjectsInput) GoString() string {
  1594. return s.String()
  1595. }
  1596. // Validate inspects the fields of the type to determine if they are valid.
  1597. func (s *BatchGetProjectsInput) Validate() error {
  1598. invalidParams := request.ErrInvalidParams{Context: "BatchGetProjectsInput"}
  1599. if s.Names == nil {
  1600. invalidParams.Add(request.NewErrParamRequired("Names"))
  1601. }
  1602. if s.Names != nil && len(s.Names) < 1 {
  1603. invalidParams.Add(request.NewErrParamMinLen("Names", 1))
  1604. }
  1605. if invalidParams.Len() > 0 {
  1606. return invalidParams
  1607. }
  1608. return nil
  1609. }
  1610. // SetNames sets the Names field's value.
  1611. func (s *BatchGetProjectsInput) SetNames(v []*string) *BatchGetProjectsInput {
  1612. s.Names = v
  1613. return s
  1614. }
  1615. type BatchGetProjectsOutput struct {
  1616. _ struct{} `type:"structure"`
  1617. // Information about the requested build projects.
  1618. Projects []*Project `locationName:"projects" type:"list"`
  1619. // The names of build projects for which information could not be found.
  1620. ProjectsNotFound []*string `locationName:"projectsNotFound" min:"1" type:"list"`
  1621. }
  1622. // String returns the string representation
  1623. func (s BatchGetProjectsOutput) String() string {
  1624. return awsutil.Prettify(s)
  1625. }
  1626. // GoString returns the string representation
  1627. func (s BatchGetProjectsOutput) GoString() string {
  1628. return s.String()
  1629. }
  1630. // SetProjects sets the Projects field's value.
  1631. func (s *BatchGetProjectsOutput) SetProjects(v []*Project) *BatchGetProjectsOutput {
  1632. s.Projects = v
  1633. return s
  1634. }
  1635. // SetProjectsNotFound sets the ProjectsNotFound field's value.
  1636. func (s *BatchGetProjectsOutput) SetProjectsNotFound(v []*string) *BatchGetProjectsOutput {
  1637. s.ProjectsNotFound = v
  1638. return s
  1639. }
  1640. // Information about a build.
  1641. type Build struct {
  1642. _ struct{} `type:"structure"`
  1643. // The Amazon Resource Name (ARN) of the build.
  1644. Arn *string `locationName:"arn" min:"1" type:"string"`
  1645. // Information about the output artifacts for the build.
  1646. Artifacts *BuildArtifacts `locationName:"artifacts" type:"structure"`
  1647. // Whether the build is complete. True if complete; otherwise, false.
  1648. BuildComplete *bool `locationName:"buildComplete" type:"boolean"`
  1649. // The current status of the build. Valid values include:
  1650. //
  1651. // * FAILED: The build failed.
  1652. //
  1653. // * FAULT: The build faulted.
  1654. //
  1655. // * IN_PROGRESS: The build is still in progress.
  1656. //
  1657. // * STOPPED: The build stopped.
  1658. //
  1659. // * SUCCEEDED: The build succeeded.
  1660. //
  1661. // * TIMED_OUT: The build timed out.
  1662. BuildStatus *string `locationName:"buildStatus" type:"string" enum:"StatusType"`
  1663. // Information about the cache for the build.
  1664. Cache *ProjectCache `locationName:"cache" type:"structure"`
  1665. // The current build phase.
  1666. CurrentPhase *string `locationName:"currentPhase" type:"string"`
  1667. // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be
  1668. // used for encrypting the build output artifacts.
  1669. //
  1670. // This is expressed either as the Amazon Resource Name (ARN) of the CMK or,
  1671. // if specified, the CMK's alias (using the format alias/alias-name).
  1672. EncryptionKey *string `locationName:"encryptionKey" min:"1" type:"string"`
  1673. // When the build process ended, expressed in Unix time format.
  1674. EndTime *time.Time `locationName:"endTime" type:"timestamp"`
  1675. // Information about the build environment for this build.
  1676. Environment *ProjectEnvironment `locationName:"environment" type:"structure"`
  1677. // The unique ID for the build.
  1678. Id *string `locationName:"id" min:"1" type:"string"`
  1679. // The entity that started the build. Valid values include:
  1680. //
  1681. // * If AWS CodePipeline started the build, the pipeline's name (for example,
  1682. // codepipeline/my-demo-pipeline).
  1683. //
  1684. // * If an AWS Identity and Access Management (IAM) user started the build,
  1685. // the user's name (for example, MyUserName).
  1686. //
  1687. // * If the Jenkins plugin for AWS CodeBuild started the build, the string
  1688. // CodeBuild-Jenkins-Plugin.
  1689. Initiator *string `locationName:"initiator" type:"string"`
  1690. // Information about the build's logs in Amazon CloudWatch Logs.
  1691. Logs *LogsLocation `locationName:"logs" type:"structure"`
  1692. // Describes a network interface.
  1693. NetworkInterface *NetworkInterface `locationName:"networkInterface" type:"structure"`
  1694. // Information about all previous build phases that are complete and information
  1695. // about any current build phase that is not yet complete.
  1696. Phases []*BuildPhase `locationName:"phases" type:"list"`
  1697. // The name of the AWS CodeBuild project.
  1698. ProjectName *string `locationName:"projectName" min:"1" type:"string"`
  1699. // The number of minutes a build is allowed to be queued before it times out.
  1700. QueuedTimeoutInMinutes *int64 `locationName:"queuedTimeoutInMinutes" type:"integer"`
  1701. // An identifier for the version of this build's source code.
  1702. //
  1703. // * For AWS CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit
  1704. // ID.
  1705. //
  1706. // * For AWS CodePipeline, the source revision provided by AWS CodePipeline.
  1707. //
  1708. //
  1709. // * For Amazon Simple Storage Service (Amazon S3), this does not apply.
  1710. ResolvedSourceVersion *string `locationName:"resolvedSourceVersion" min:"1" type:"string"`
  1711. // An array of ProjectArtifacts objects.
  1712. SecondaryArtifacts []*BuildArtifacts `locationName:"secondaryArtifacts" type:"list"`
  1713. // An array of ProjectSourceVersion objects. Each ProjectSourceVersion must
  1714. // be one of:
  1715. //
  1716. // * For AWS CodeCommit: the commit ID to use.
  1717. //
  1718. // * For GitHub: the commit ID, pull request ID, branch name, or tag name
  1719. // that corresponds to the version of the source code you want to build.
  1720. // If a pull request ID is specified, it must use the format pr/pull-request-ID
  1721. // (for example, pr/25). If a branch name is specified, the branch's HEAD
  1722. // commit ID is used. If not specified, the default branch's HEAD commit
  1723. // ID is used.
  1724. //
  1725. // * For Bitbucket: the commit ID, branch name, or tag name that corresponds
  1726. // to the version of the source code you want to build. If a branch name
  1727. // is specified, the branch's HEAD commit ID is used. If not specified, the
  1728. // default branch's HEAD commit ID is used.
  1729. //
  1730. // * For Amazon Simple Storage Service (Amazon S3): the version ID of the
  1731. // object that represents the build input ZIP file to use.
  1732. SecondarySourceVersions []*ProjectSourceVersion `locationName:"secondarySourceVersions" type:"list"`
  1733. // An array of ProjectSource objects.
  1734. SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"`
  1735. // The name of a service role used for this build.
  1736. ServiceRole *string `locationName:"serviceRole" min:"1" type:"string"`
  1737. // Information about the source code to be built.
  1738. Source *ProjectSource `locationName:"source" type:"structure"`
  1739. // Any version identifier for the version of the source code to be built.
  1740. SourceVersion *string `locationName:"sourceVersion" min:"1" type:"string"`
  1741. // When the build process started, expressed in Unix time format.
  1742. StartTime *time.Time `locationName:"startTime" type:"timestamp"`
  1743. // How long, in minutes, for AWS CodeBuild to wait before timing out this build
  1744. // if it does not get marked as completed.
  1745. TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" type:"integer"`
  1746. // If your AWS CodeBuild project accesses resources in an Amazon VPC, you provide
  1747. // this parameter that identifies the VPC ID and the list of security group
  1748. // IDs and subnet IDs. The security groups and subnets must belong to the same
  1749. // VPC. You must provide at least one security group and one subnet ID.
  1750. VpcConfig *VpcConfig `locationName:"vpcConfig" type:"structure"`
  1751. }
  1752. // String returns the string representation
  1753. func (s Build) String() string {
  1754. return awsutil.Prettify(s)
  1755. }
  1756. // GoString returns the string representation
  1757. func (s Build) GoString() string {
  1758. return s.String()
  1759. }
  1760. // SetArn sets the Arn field's value.
  1761. func (s *Build) SetArn(v string) *Build {
  1762. s.Arn = &v
  1763. return s
  1764. }
  1765. // SetArtifacts sets the Artifacts field's value.
  1766. func (s *Build) SetArtifacts(v *BuildArtifacts) *Build {
  1767. s.Artifacts = v
  1768. return s
  1769. }
  1770. // SetBuildComplete sets the BuildComplete field's value.
  1771. func (s *Build) SetBuildComplete(v bool) *Build {
  1772. s.BuildComplete = &v
  1773. return s
  1774. }
  1775. // SetBuildStatus sets the BuildStatus field's value.
  1776. func (s *Build) SetBuildStatus(v string) *Build {
  1777. s.BuildStatus = &v
  1778. return s
  1779. }
  1780. // SetCache sets the Cache field's value.
  1781. func (s *Build) SetCache(v *ProjectCache) *Build {
  1782. s.Cache = v
  1783. return s
  1784. }
  1785. // SetCurrentPhase sets the CurrentPhase field's value.
  1786. func (s *Build) SetCurrentPhase(v string) *Build {
  1787. s.CurrentPhase = &v
  1788. return s
  1789. }
  1790. // SetEncryptionKey sets the EncryptionKey field's value.
  1791. func (s *Build) SetEncryptionKey(v string) *Build {
  1792. s.EncryptionKey = &v
  1793. return s
  1794. }
  1795. // SetEndTime sets the EndTime field's value.
  1796. func (s *Build) SetEndTime(v time.Time) *Build {
  1797. s.EndTime = &v
  1798. return s
  1799. }
  1800. // SetEnvironment sets the Environment field's value.
  1801. func (s *Build) SetEnvironment(v *ProjectEnvironment) *Build {
  1802. s.Environment = v
  1803. return s
  1804. }
  1805. // SetId sets the Id field's value.
  1806. func (s *Build) SetId(v string) *Build {
  1807. s.Id = &v
  1808. return s
  1809. }
  1810. // SetInitiator sets the Initiator field's value.
  1811. func (s *Build) SetInitiator(v string) *Build {
  1812. s.Initiator = &v
  1813. return s
  1814. }
  1815. // SetLogs sets the Logs field's value.
  1816. func (s *Build) SetLogs(v *LogsLocation) *Build {
  1817. s.Logs = v
  1818. return s
  1819. }
  1820. // SetNetworkInterface sets the NetworkInterface field's value.
  1821. func (s *Build) SetNetworkInterface(v *NetworkInterface) *Build {
  1822. s.NetworkInterface = v
  1823. return s
  1824. }
  1825. // SetPhases sets the Phases field's value.
  1826. func (s *Build) SetPhases(v []*BuildPhase) *Build {
  1827. s.Phases = v
  1828. return s
  1829. }
  1830. // SetProjectName sets the ProjectName field's value.
  1831. func (s *Build) SetProjectName(v string) *Build {
  1832. s.ProjectName = &v
  1833. return s
  1834. }
  1835. // SetQueuedTimeoutInMinutes sets the QueuedTimeoutInMinutes field's value.
  1836. func (s *Build) SetQueuedTimeoutInMinutes(v int64) *Build {
  1837. s.QueuedTimeoutInMinutes = &v
  1838. return s
  1839. }
  1840. // SetResolvedSourceVersion sets the ResolvedSourceVersion field's value.
  1841. func (s *Build) SetResolvedSourceVersion(v string) *Build {
  1842. s.ResolvedSourceVersion = &v
  1843. return s
  1844. }
  1845. // SetSecondaryArtifacts sets the SecondaryArtifacts field's value.
  1846. func (s *Build) SetSecondaryArtifacts(v []*BuildArtifacts) *Build {
  1847. s.SecondaryArtifacts = v
  1848. return s
  1849. }
  1850. // SetSecondarySourceVersions sets the SecondarySourceVersions field's value.
  1851. func (s *Build) SetSecondarySourceVersions(v []*ProjectSourceVersion) *Build {
  1852. s.SecondarySourceVersions = v
  1853. return s
  1854. }
  1855. // SetSecondarySources sets the SecondarySources field's value.
  1856. func (s *Build) SetSecondarySources(v []*ProjectSource) *Build {
  1857. s.SecondarySources = v
  1858. return s
  1859. }
  1860. // SetServiceRole sets the ServiceRole field's value.
  1861. func (s *Build) SetServiceRole(v string) *Build {
  1862. s.ServiceRole = &v
  1863. return s
  1864. }
  1865. // SetSource sets the Source field's value.
  1866. func (s *Build) SetSource(v *ProjectSource) *Build {
  1867. s.Source = v
  1868. return s
  1869. }
  1870. // SetSourceVersion sets the SourceVersion field's value.
  1871. func (s *Build) SetSourceVersion(v string) *Build {
  1872. s.SourceVersion = &v
  1873. return s
  1874. }
  1875. // SetStartTime sets the StartTime field's value.
  1876. func (s *Build) SetStartTime(v time.Time) *Build {
  1877. s.StartTime = &v
  1878. return s
  1879. }
  1880. // SetTimeoutInMinutes sets the TimeoutInMinutes field's value.
  1881. func (s *Build) SetTimeoutInMinutes(v int64) *Build {
  1882. s.TimeoutInMinutes = &v
  1883. return s
  1884. }
  1885. // SetVpcConfig sets the VpcConfig field's value.
  1886. func (s *Build) SetVpcConfig(v *VpcConfig) *Build {
  1887. s.VpcConfig = v
  1888. return s
  1889. }
  1890. // Information about build output artifacts.
  1891. type BuildArtifacts struct {
  1892. _ struct{} `type:"structure"`
  1893. // An identifier for this artifact definition.
  1894. ArtifactIdentifier *string `locationName:"artifactIdentifier" type:"string"`
  1895. // Information that tells you if encryption for build artifacts is disabled.
  1896. EncryptionDisabled *bool `locationName:"encryptionDisabled" type:"boolean"`
  1897. // Information about the location of the build artifacts.
  1898. Location *string `locationName:"location" type:"string"`
  1899. // The MD5 hash of the build artifact.
  1900. //
  1901. // You can use this hash along with a checksum tool to confirm file integrity
  1902. // and authenticity.
  1903. //
  1904. // This value is available only if the build project's packaging value is set
  1905. // to ZIP.
  1906. Md5sum *string `locationName:"md5sum" type:"string"`
  1907. // If this flag is set, a name specified in the build spec file overrides the
  1908. // artifact name. The name specified in a build spec file is calculated at build
  1909. // time and uses the Shell Command Language. For example, you can append a date
  1910. // and time to your artifact name so that it is always unique.
  1911. OverrideArtifactName *bool `locationName:"overrideArtifactName" type:"boolean"`
  1912. // The SHA-256 hash of the build artifact.
  1913. //
  1914. // You can use this hash along with a checksum tool to confirm file integrity
  1915. // and authenticity.
  1916. //
  1917. // This value is available only if the build project's packaging value is set
  1918. // to ZIP.
  1919. Sha256sum *string `locationName:"sha256sum" type:"string"`
  1920. }
  1921. // String returns the string representation
  1922. func (s BuildArtifacts) String() string {
  1923. return awsutil.Prettify(s)
  1924. }
  1925. // GoString returns the string representation
  1926. func (s BuildArtifacts) GoString() string {
  1927. return s.String()
  1928. }
  1929. // SetArtifactIdentifier sets the ArtifactIdentifier field's value.
  1930. func (s *BuildArtifacts) SetArtifactIdentifier(v string) *BuildArtifacts {
  1931. s.ArtifactIdentifier = &v
  1932. return s
  1933. }
  1934. // SetEncryptionDisabled sets the EncryptionDisabled field's value.
  1935. func (s *BuildArtifacts) SetEncryptionDisabled(v bool) *BuildArtifacts {
  1936. s.EncryptionDisabled = &v
  1937. return s
  1938. }
  1939. // SetLocation sets the Location field's value.
  1940. func (s *BuildArtifacts) SetLocation(v string) *BuildArtifacts {
  1941. s.Location = &v
  1942. return s
  1943. }
  1944. // SetMd5sum sets the Md5sum field's value.
  1945. func (s *BuildArtifacts) SetMd5sum(v string) *BuildArtifacts {
  1946. s.Md5sum = &v
  1947. return s
  1948. }
  1949. // SetOverrideArtifactName sets the OverrideArtifactName field's value.
  1950. func (s *BuildArtifacts) SetOverrideArtifactName(v bool) *BuildArtifacts {
  1951. s.OverrideArtifactName = &v
  1952. return s
  1953. }
  1954. // SetSha256sum sets the Sha256sum field's value.
  1955. func (s *BuildArtifacts) SetSha256sum(v string) *BuildArtifacts {
  1956. s.Sha256sum = &v
  1957. return s
  1958. }
  1959. // Information about a build that could not be successfully deleted.
  1960. type BuildNotDeleted struct {
  1961. _ struct{} `type:"structure"`
  1962. // The ID of the build that could not be successfully deleted.
  1963. Id *string `locationName:"id" min:"1" type:"string"`
  1964. // Additional information about the build that could not be successfully deleted.
  1965. StatusCode *string `locationName:"statusCode" type:"string"`
  1966. }
  1967. // String returns the string representation
  1968. func (s BuildNotDeleted) String() string {
  1969. return awsutil.Prettify(s)
  1970. }
  1971. // GoString returns the string representation
  1972. func (s BuildNotDeleted) GoString() string {
  1973. return s.String()
  1974. }
  1975. // SetId sets the Id field's value.
  1976. func (s *BuildNotDeleted) SetId(v string) *BuildNotDeleted {
  1977. s.Id = &v
  1978. return s
  1979. }
  1980. // SetStatusCode sets the StatusCode field's value.
  1981. func (s *BuildNotDeleted) SetStatusCode(v string) *BuildNotDeleted {
  1982. s.StatusCode = &v
  1983. return s
  1984. }
  1985. // Information about a stage for a build.
  1986. type BuildPhase struct {
  1987. _ struct{} `type:"structure"`
  1988. // Additional information about a build phase, especially to help troubleshoot
  1989. // a failed build.
  1990. Contexts []*PhaseContext `locationName:"contexts" type:"list"`
  1991. // How long, in seconds, between the starting and ending times of the build's
  1992. // phase.
  1993. DurationInSeconds *int64 `locationName:"durationInSeconds" type:"long"`
  1994. // When the build phase ended, expressed in Unix time format.
  1995. EndTime *time.Time `locationName:"endTime" type:"timestamp"`
  1996. // The current status of the build phase. Valid values include:
  1997. //
  1998. // * FAILED: The build phase failed.
  1999. //
  2000. // * FAULT: The build phase faulted.
  2001. //
  2002. // * IN_PROGRESS: The build phase is still in progress.
  2003. //
  2004. // * QUEUED: The build has been submitted and is queued behind other submitted
  2005. // builds.
  2006. //
  2007. // * STOPPED: The build phase stopped.
  2008. //
  2009. // * SUCCEEDED: The build phase succeeded.
  2010. //
  2011. // * TIMED_OUT: The build phase timed out.
  2012. PhaseStatus *string `locationName:"phaseStatus" type:"string" enum:"StatusType"`
  2013. // The name of the build phase. Valid values include:
  2014. //
  2015. // * BUILD: Core build activities typically occur in this build phase.
  2016. //
  2017. // * COMPLETED: The build has been completed.
  2018. //
  2019. // * DOWNLOAD_SOURCE: Source code is being downloaded in this build phase.
  2020. //
  2021. // * FINALIZING: The build process is completing in this build phase.
  2022. //
  2023. // * INSTALL: Installation activities typically occur in this build phase.
  2024. //
  2025. // * POST_BUILD: Post-build activities typically occur in this build phase.
  2026. //
  2027. // * PRE_BUILD: Pre-build activities typically occur in this build phase.
  2028. //
  2029. // * PROVISIONING: The build environment is being set up.
  2030. //
  2031. // * QUEUED: The build has been submitted and is queued behind other submitted
  2032. // builds.
  2033. //
  2034. // * SUBMITTED: The build has been submitted.
  2035. //
  2036. // * UPLOAD_ARTIFACTS: Build output artifacts are being uploaded to the output
  2037. // location.
  2038. PhaseType *string `locationName:"phaseType" type:"string" enum:"BuildPhaseType"`
  2039. // When the build phase started, expressed in Unix time format.
  2040. StartTime *time.Time `locationName:"startTime" type:"timestamp"`
  2041. }
  2042. // String returns the string representation
  2043. func (s BuildPhase) String() string {
  2044. return awsutil.Prettify(s)
  2045. }
  2046. // GoString returns the string representation
  2047. func (s BuildPhase) GoString() string {
  2048. return s.String()
  2049. }
  2050. // SetContexts sets the Contexts field's value.
  2051. func (s *BuildPhase) SetContexts(v []*PhaseContext) *BuildPhase {
  2052. s.Contexts = v
  2053. return s
  2054. }
  2055. // SetDurationInSeconds sets the DurationInSeconds field's value.
  2056. func (s *BuildPhase) SetDurationInSeconds(v int64) *BuildPhase {
  2057. s.DurationInSeconds = &v
  2058. return s
  2059. }
  2060. // SetEndTime sets the EndTime field's value.
  2061. func (s *BuildPhase) SetEndTime(v time.Time) *BuildPhase {
  2062. s.EndTime = &v
  2063. return s
  2064. }
  2065. // SetPhaseStatus sets the PhaseStatus field's value.
  2066. func (s *BuildPhase) SetPhaseStatus(v string) *BuildPhase {
  2067. s.PhaseStatus = &v
  2068. return s
  2069. }
  2070. // SetPhaseType sets the PhaseType field's value.
  2071. func (s *BuildPhase) SetPhaseType(v string) *BuildPhase {
  2072. s.PhaseType = &v
  2073. return s
  2074. }
  2075. // SetStartTime sets the StartTime field's value.
  2076. func (s *BuildPhase) SetStartTime(v time.Time) *BuildPhase {
  2077. s.StartTime = &v
  2078. return s
  2079. }
  2080. // Information about Amazon CloudWatch Logs for a build project.
  2081. type CloudWatchLogsConfig struct {
  2082. _ struct{} `type:"structure"`
  2083. // The group name of the logs in Amazon CloudWatch Logs. For more information,
  2084. // see Working with Log Groups and Log Streams (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html).
  2085. GroupName *string `locationName:"groupName" type:"string"`
  2086. // The current status of the logs in Amazon CloudWatch Logs for a build project.
  2087. // Valid values are:
  2088. //
  2089. // * ENABLED: Amazon CloudWatch Logs are enabled for this build project.
  2090. //
  2091. // * DISABLED: Amazon CloudWatch Logs are not enabled for this build project.
  2092. //
  2093. // Status is a required field
  2094. Status *string `locationName:"status" type:"string" required:"true" enum:"LogsConfigStatusType"`
  2095. // The prefix of the stream name of the Amazon CloudWatch Logs. For more information,
  2096. // see Working with Log Groups and Log Streams (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html).
  2097. StreamName *string `locationName:"streamName" type:"string"`
  2098. }
  2099. // String returns the string representation
  2100. func (s CloudWatchLogsConfig) String() string {
  2101. return awsutil.Prettify(s)
  2102. }
  2103. // GoString returns the string representation
  2104. func (s CloudWatchLogsConfig) GoString() string {
  2105. return s.String()
  2106. }
  2107. // Validate inspects the fields of the type to determine if they are valid.
  2108. func (s *CloudWatchLogsConfig) Validate() error {
  2109. invalidParams := request.ErrInvalidParams{Context: "CloudWatchLogsConfig"}
  2110. if s.Status == nil {
  2111. invalidParams.Add(request.NewErrParamRequired("Status"))
  2112. }
  2113. if invalidParams.Len() > 0 {
  2114. return invalidParams
  2115. }
  2116. return nil
  2117. }
  2118. // SetGroupName sets the GroupName field's value.
  2119. func (s *CloudWatchLogsConfig) SetGroupName(v string) *CloudWatchLogsConfig {
  2120. s.GroupName = &v
  2121. return s
  2122. }
  2123. // SetStatus sets the Status field's value.
  2124. func (s *CloudWatchLogsConfig) SetStatus(v string) *CloudWatchLogsConfig {
  2125. s.Status = &v
  2126. return s
  2127. }
  2128. // SetStreamName sets the StreamName field's value.
  2129. func (s *CloudWatchLogsConfig) SetStreamName(v string) *CloudWatchLogsConfig {
  2130. s.StreamName = &v
  2131. return s
  2132. }
  2133. type CreateProjectInput struct {
  2134. _ struct{} `type:"structure"`
  2135. // Information about the build output artifacts for the build project.
  2136. //
  2137. // Artifacts is a required field
  2138. Artifacts *ProjectArtifacts `locationName:"artifacts" type:"structure" required:"true"`
  2139. // Set this to true to generate a publicly accessible URL for your project's
  2140. // build badge.
  2141. BadgeEnabled *bool `locationName:"badgeEnabled" type:"boolean"`
  2142. // Stores recently used information so that it can be quickly accessed at a
  2143. // later time.
  2144. Cache *ProjectCache `locationName:"cache" type:"structure"`
  2145. // A description that makes the build project easy to identify.
  2146. Description *string `locationName:"description" type:"string"`
  2147. // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be
  2148. // used for encrypting the build output artifacts.
  2149. //
  2150. // You can specify either the Amazon Resource Name (ARN) of the CMK or, if available,
  2151. // the CMK's alias (using the format alias/alias-name).
  2152. EncryptionKey *string `locationName:"encryptionKey" min:"1" type:"string"`
  2153. // Information about the build environment for the build project.
  2154. //
  2155. // Environment is a required field
  2156. Environment *ProjectEnvironment `locationName:"environment" type:"structure" required:"true"`
  2157. // Information about logs for the build project. These can be logs in Amazon
  2158. // CloudWatch Logs, logs uploaded to a specified S3 bucket, or both.
  2159. LogsConfig *LogsConfig `locationName:"logsConfig" type:"structure"`
  2160. // The name of the build project.
  2161. //
  2162. // Name is a required field
  2163. Name *string `locationName:"name" min:"2" type:"string" required:"true"`
  2164. // The number of minutes a build is allowed to be queued before it times out.
  2165. QueuedTimeoutInMinutes *int64 `locationName:"queuedTimeoutInMinutes" min:"5" type:"integer"`
  2166. // An array of ProjectArtifacts objects.
  2167. SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"`
  2168. // An array of ProjectSource objects.
  2169. SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"`
  2170. // The ARN of the AWS Identity and Access Management (IAM) role that enables
  2171. // AWS CodeBuild to interact with dependent AWS services on behalf of the AWS
  2172. // account.
  2173. //
  2174. // ServiceRole is a required field
  2175. ServiceRole *string `locationName:"serviceRole" min:"1" type:"string" required:"true"`
  2176. // Information about the build input source code for the build project.
  2177. //
  2178. // Source is a required field
  2179. Source *ProjectSource `locationName:"source" type:"structure" required:"true"`
  2180. // A set of tags for this build project.
  2181. //
  2182. // These tags are available for use by AWS services that support AWS CodeBuild
  2183. // build project tags.
  2184. Tags []*Tag `locationName:"tags" type:"list"`
  2185. // How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait
  2186. // before it times out any build that has not been marked as completed. The
  2187. // default is 60 minutes.
  2188. TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"5" type:"integer"`
  2189. // VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC.
  2190. VpcConfig *VpcConfig `locationName:"vpcConfig" type:"structure"`
  2191. }
  2192. // String returns the string representation
  2193. func (s CreateProjectInput) String() string {
  2194. return awsutil.Prettify(s)
  2195. }
  2196. // GoString returns the string representation
  2197. func (s CreateProjectInput) GoString() string {
  2198. return s.String()
  2199. }
  2200. // Validate inspects the fields of the type to determine if they are valid.
  2201. func (s *CreateProjectInput) Validate() error {
  2202. invalidParams := request.ErrInvalidParams{Context: "CreateProjectInput"}
  2203. if s.Artifacts == nil {
  2204. invalidParams.Add(request.NewErrParamRequired("Artifacts"))
  2205. }
  2206. if s.EncryptionKey != nil && len(*s.EncryptionKey) < 1 {
  2207. invalidParams.Add(request.NewErrParamMinLen("EncryptionKey", 1))
  2208. }
  2209. if s.Environment == nil {
  2210. invalidParams.Add(request.NewErrParamRequired("Environment"))
  2211. }
  2212. if s.Name == nil {
  2213. invalidParams.Add(request.NewErrParamRequired("Name"))
  2214. }
  2215. if s.Name != nil && len(*s.Name) < 2 {
  2216. invalidParams.Add(request.NewErrParamMinLen("Name", 2))
  2217. }
  2218. if s.QueuedTimeoutInMinutes != nil && *s.QueuedTimeoutInMinutes < 5 {
  2219. invalidParams.Add(request.NewErrParamMinValue("QueuedTimeoutInMinutes", 5))
  2220. }
  2221. if s.ServiceRole == nil {
  2222. invalidParams.Add(request.NewErrParamRequired("ServiceRole"))
  2223. }
  2224. if s.ServiceRole != nil && len(*s.ServiceRole) < 1 {
  2225. invalidParams.Add(request.NewErrParamMinLen("ServiceRole", 1))
  2226. }
  2227. if s.Source == nil {
  2228. invalidParams.Add(request.NewErrParamRequired("Source"))
  2229. }
  2230. if s.TimeoutInMinutes != nil && *s.TimeoutInMinutes < 5 {
  2231. invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutes", 5))
  2232. }
  2233. if s.Artifacts != nil {
  2234. if err := s.Artifacts.Validate(); err != nil {
  2235. invalidParams.AddNested("Artifacts", err.(request.ErrInvalidParams))
  2236. }
  2237. }
  2238. if s.Cache != nil {
  2239. if err := s.Cache.Validate(); err != nil {
  2240. invalidParams.AddNested("Cache", err.(request.ErrInvalidParams))
  2241. }
  2242. }
  2243. if s.Environment != nil {
  2244. if err := s.Environment.Validate(); err != nil {
  2245. invalidParams.AddNested("Environment", err.(request.ErrInvalidParams))
  2246. }
  2247. }
  2248. if s.LogsConfig != nil {
  2249. if err := s.LogsConfig.Validate(); err != nil {
  2250. invalidParams.AddNested("LogsConfig", err.(request.ErrInvalidParams))
  2251. }
  2252. }
  2253. if s.SecondaryArtifacts != nil {
  2254. for i, v := range s.SecondaryArtifacts {
  2255. if v == nil {
  2256. continue
  2257. }
  2258. if err := v.Validate(); err != nil {
  2259. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondaryArtifacts", i), err.(request.ErrInvalidParams))
  2260. }
  2261. }
  2262. }
  2263. if s.SecondarySources != nil {
  2264. for i, v := range s.SecondarySources {
  2265. if v == nil {
  2266. continue
  2267. }
  2268. if err := v.Validate(); err != nil {
  2269. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySources", i), err.(request.ErrInvalidParams))
  2270. }
  2271. }
  2272. }
  2273. if s.Source != nil {
  2274. if err := s.Source.Validate(); err != nil {
  2275. invalidParams.AddNested("Source", err.(request.ErrInvalidParams))
  2276. }
  2277. }
  2278. if s.Tags != nil {
  2279. for i, v := range s.Tags {
  2280. if v == nil {
  2281. continue
  2282. }
  2283. if err := v.Validate(); err != nil {
  2284. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  2285. }
  2286. }
  2287. }
  2288. if s.VpcConfig != nil {
  2289. if err := s.VpcConfig.Validate(); err != nil {
  2290. invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams))
  2291. }
  2292. }
  2293. if invalidParams.Len() > 0 {
  2294. return invalidParams
  2295. }
  2296. return nil
  2297. }
  2298. // SetArtifacts sets the Artifacts field's value.
  2299. func (s *CreateProjectInput) SetArtifacts(v *ProjectArtifacts) *CreateProjectInput {
  2300. s.Artifacts = v
  2301. return s
  2302. }
  2303. // SetBadgeEnabled sets the BadgeEnabled field's value.
  2304. func (s *CreateProjectInput) SetBadgeEnabled(v bool) *CreateProjectInput {
  2305. s.BadgeEnabled = &v
  2306. return s
  2307. }
  2308. // SetCache sets the Cache field's value.
  2309. func (s *CreateProjectInput) SetCache(v *ProjectCache) *CreateProjectInput {
  2310. s.Cache = v
  2311. return s
  2312. }
  2313. // SetDescription sets the Description field's value.
  2314. func (s *CreateProjectInput) SetDescription(v string) *CreateProjectInput {
  2315. s.Description = &v
  2316. return s
  2317. }
  2318. // SetEncryptionKey sets the EncryptionKey field's value.
  2319. func (s *CreateProjectInput) SetEncryptionKey(v string) *CreateProjectInput {
  2320. s.EncryptionKey = &v
  2321. return s
  2322. }
  2323. // SetEnvironment sets the Environment field's value.
  2324. func (s *CreateProjectInput) SetEnvironment(v *ProjectEnvironment) *CreateProjectInput {
  2325. s.Environment = v
  2326. return s
  2327. }
  2328. // SetLogsConfig sets the LogsConfig field's value.
  2329. func (s *CreateProjectInput) SetLogsConfig(v *LogsConfig) *CreateProjectInput {
  2330. s.LogsConfig = v
  2331. return s
  2332. }
  2333. // SetName sets the Name field's value.
  2334. func (s *CreateProjectInput) SetName(v string) *CreateProjectInput {
  2335. s.Name = &v
  2336. return s
  2337. }
  2338. // SetQueuedTimeoutInMinutes sets the QueuedTimeoutInMinutes field's value.
  2339. func (s *CreateProjectInput) SetQueuedTimeoutInMinutes(v int64) *CreateProjectInput {
  2340. s.QueuedTimeoutInMinutes = &v
  2341. return s
  2342. }
  2343. // SetSecondaryArtifacts sets the SecondaryArtifacts field's value.
  2344. func (s *CreateProjectInput) SetSecondaryArtifacts(v []*ProjectArtifacts) *CreateProjectInput {
  2345. s.SecondaryArtifacts = v
  2346. return s
  2347. }
  2348. // SetSecondarySources sets the SecondarySources field's value.
  2349. func (s *CreateProjectInput) SetSecondarySources(v []*ProjectSource) *CreateProjectInput {
  2350. s.SecondarySources = v
  2351. return s
  2352. }
  2353. // SetServiceRole sets the ServiceRole field's value.
  2354. func (s *CreateProjectInput) SetServiceRole(v string) *CreateProjectInput {
  2355. s.ServiceRole = &v
  2356. return s
  2357. }
  2358. // SetSource sets the Source field's value.
  2359. func (s *CreateProjectInput) SetSource(v *ProjectSource) *CreateProjectInput {
  2360. s.Source = v
  2361. return s
  2362. }
  2363. // SetTags sets the Tags field's value.
  2364. func (s *CreateProjectInput) SetTags(v []*Tag) *CreateProjectInput {
  2365. s.Tags = v
  2366. return s
  2367. }
  2368. // SetTimeoutInMinutes sets the TimeoutInMinutes field's value.
  2369. func (s *CreateProjectInput) SetTimeoutInMinutes(v int64) *CreateProjectInput {
  2370. s.TimeoutInMinutes = &v
  2371. return s
  2372. }
  2373. // SetVpcConfig sets the VpcConfig field's value.
  2374. func (s *CreateProjectInput) SetVpcConfig(v *VpcConfig) *CreateProjectInput {
  2375. s.VpcConfig = v
  2376. return s
  2377. }
  2378. type CreateProjectOutput struct {
  2379. _ struct{} `type:"structure"`
  2380. // Information about the build project that was created.
  2381. Project *Project `locationName:"project" type:"structure"`
  2382. }
  2383. // String returns the string representation
  2384. func (s CreateProjectOutput) String() string {
  2385. return awsutil.Prettify(s)
  2386. }
  2387. // GoString returns the string representation
  2388. func (s CreateProjectOutput) GoString() string {
  2389. return s.String()
  2390. }
  2391. // SetProject sets the Project field's value.
  2392. func (s *CreateProjectOutput) SetProject(v *Project) *CreateProjectOutput {
  2393. s.Project = v
  2394. return s
  2395. }
  2396. type CreateWebhookInput struct {
  2397. _ struct{} `type:"structure"`
  2398. // A regular expression used to determine which repository branches are built
  2399. // when a webhook is triggered. If the name of a branch matches the regular
  2400. // expression, then it is built. If branchFilter is empty, then all branches
  2401. // are built.
  2402. BranchFilter *string `locationName:"branchFilter" type:"string"`
  2403. // The name of the AWS CodeBuild project.
  2404. //
  2405. // ProjectName is a required field
  2406. ProjectName *string `locationName:"projectName" min:"2" type:"string" required:"true"`
  2407. }
  2408. // String returns the string representation
  2409. func (s CreateWebhookInput) String() string {
  2410. return awsutil.Prettify(s)
  2411. }
  2412. // GoString returns the string representation
  2413. func (s CreateWebhookInput) GoString() string {
  2414. return s.String()
  2415. }
  2416. // Validate inspects the fields of the type to determine if they are valid.
  2417. func (s *CreateWebhookInput) Validate() error {
  2418. invalidParams := request.ErrInvalidParams{Context: "CreateWebhookInput"}
  2419. if s.ProjectName == nil {
  2420. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  2421. }
  2422. if s.ProjectName != nil && len(*s.ProjectName) < 2 {
  2423. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 2))
  2424. }
  2425. if invalidParams.Len() > 0 {
  2426. return invalidParams
  2427. }
  2428. return nil
  2429. }
  2430. // SetBranchFilter sets the BranchFilter field's value.
  2431. func (s *CreateWebhookInput) SetBranchFilter(v string) *CreateWebhookInput {
  2432. s.BranchFilter = &v
  2433. return s
  2434. }
  2435. // SetProjectName sets the ProjectName field's value.
  2436. func (s *CreateWebhookInput) SetProjectName(v string) *CreateWebhookInput {
  2437. s.ProjectName = &v
  2438. return s
  2439. }
  2440. type CreateWebhookOutput struct {
  2441. _ struct{} `type:"structure"`
  2442. // Information about a webhook that connects repository events to a build project
  2443. // in AWS CodeBuild.
  2444. Webhook *Webhook `locationName:"webhook" type:"structure"`
  2445. }
  2446. // String returns the string representation
  2447. func (s CreateWebhookOutput) String() string {
  2448. return awsutil.Prettify(s)
  2449. }
  2450. // GoString returns the string representation
  2451. func (s CreateWebhookOutput) GoString() string {
  2452. return s.String()
  2453. }
  2454. // SetWebhook sets the Webhook field's value.
  2455. func (s *CreateWebhookOutput) SetWebhook(v *Webhook) *CreateWebhookOutput {
  2456. s.Webhook = v
  2457. return s
  2458. }
  2459. type DeleteProjectInput struct {
  2460. _ struct{} `type:"structure"`
  2461. // The name of the build project.
  2462. //
  2463. // Name is a required field
  2464. Name *string `locationName:"name" min:"1" type:"string" required:"true"`
  2465. }
  2466. // String returns the string representation
  2467. func (s DeleteProjectInput) String() string {
  2468. return awsutil.Prettify(s)
  2469. }
  2470. // GoString returns the string representation
  2471. func (s DeleteProjectInput) GoString() string {
  2472. return s.String()
  2473. }
  2474. // Validate inspects the fields of the type to determine if they are valid.
  2475. func (s *DeleteProjectInput) Validate() error {
  2476. invalidParams := request.ErrInvalidParams{Context: "DeleteProjectInput"}
  2477. if s.Name == nil {
  2478. invalidParams.Add(request.NewErrParamRequired("Name"))
  2479. }
  2480. if s.Name != nil && len(*s.Name) < 1 {
  2481. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  2482. }
  2483. if invalidParams.Len() > 0 {
  2484. return invalidParams
  2485. }
  2486. return nil
  2487. }
  2488. // SetName sets the Name field's value.
  2489. func (s *DeleteProjectInput) SetName(v string) *DeleteProjectInput {
  2490. s.Name = &v
  2491. return s
  2492. }
  2493. type DeleteProjectOutput struct {
  2494. _ struct{} `type:"structure"`
  2495. }
  2496. // String returns the string representation
  2497. func (s DeleteProjectOutput) String() string {
  2498. return awsutil.Prettify(s)
  2499. }
  2500. // GoString returns the string representation
  2501. func (s DeleteProjectOutput) GoString() string {
  2502. return s.String()
  2503. }
  2504. type DeleteSourceCredentialsInput struct {
  2505. _ struct{} `type:"structure"`
  2506. // The Amazon Resource Name (ARN) of the token.
  2507. //
  2508. // Arn is a required field
  2509. Arn *string `locationName:"arn" min:"1" type:"string" required:"true"`
  2510. }
  2511. // String returns the string representation
  2512. func (s DeleteSourceCredentialsInput) String() string {
  2513. return awsutil.Prettify(s)
  2514. }
  2515. // GoString returns the string representation
  2516. func (s DeleteSourceCredentialsInput) GoString() string {
  2517. return s.String()
  2518. }
  2519. // Validate inspects the fields of the type to determine if they are valid.
  2520. func (s *DeleteSourceCredentialsInput) Validate() error {
  2521. invalidParams := request.ErrInvalidParams{Context: "DeleteSourceCredentialsInput"}
  2522. if s.Arn == nil {
  2523. invalidParams.Add(request.NewErrParamRequired("Arn"))
  2524. }
  2525. if s.Arn != nil && len(*s.Arn) < 1 {
  2526. invalidParams.Add(request.NewErrParamMinLen("Arn", 1))
  2527. }
  2528. if invalidParams.Len() > 0 {
  2529. return invalidParams
  2530. }
  2531. return nil
  2532. }
  2533. // SetArn sets the Arn field's value.
  2534. func (s *DeleteSourceCredentialsInput) SetArn(v string) *DeleteSourceCredentialsInput {
  2535. s.Arn = &v
  2536. return s
  2537. }
  2538. type DeleteSourceCredentialsOutput struct {
  2539. _ struct{} `type:"structure"`
  2540. // The Amazon Resource Name (ARN) of the token.
  2541. Arn *string `locationName:"arn" min:"1" type:"string"`
  2542. }
  2543. // String returns the string representation
  2544. func (s DeleteSourceCredentialsOutput) String() string {
  2545. return awsutil.Prettify(s)
  2546. }
  2547. // GoString returns the string representation
  2548. func (s DeleteSourceCredentialsOutput) GoString() string {
  2549. return s.String()
  2550. }
  2551. // SetArn sets the Arn field's value.
  2552. func (s *DeleteSourceCredentialsOutput) SetArn(v string) *DeleteSourceCredentialsOutput {
  2553. s.Arn = &v
  2554. return s
  2555. }
  2556. type DeleteWebhookInput struct {
  2557. _ struct{} `type:"structure"`
  2558. // The name of the AWS CodeBuild project.
  2559. //
  2560. // ProjectName is a required field
  2561. ProjectName *string `locationName:"projectName" min:"2" type:"string" required:"true"`
  2562. }
  2563. // String returns the string representation
  2564. func (s DeleteWebhookInput) String() string {
  2565. return awsutil.Prettify(s)
  2566. }
  2567. // GoString returns the string representation
  2568. func (s DeleteWebhookInput) GoString() string {
  2569. return s.String()
  2570. }
  2571. // Validate inspects the fields of the type to determine if they are valid.
  2572. func (s *DeleteWebhookInput) Validate() error {
  2573. invalidParams := request.ErrInvalidParams{Context: "DeleteWebhookInput"}
  2574. if s.ProjectName == nil {
  2575. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  2576. }
  2577. if s.ProjectName != nil && len(*s.ProjectName) < 2 {
  2578. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 2))
  2579. }
  2580. if invalidParams.Len() > 0 {
  2581. return invalidParams
  2582. }
  2583. return nil
  2584. }
  2585. // SetProjectName sets the ProjectName field's value.
  2586. func (s *DeleteWebhookInput) SetProjectName(v string) *DeleteWebhookInput {
  2587. s.ProjectName = &v
  2588. return s
  2589. }
  2590. type DeleteWebhookOutput struct {
  2591. _ struct{} `type:"structure"`
  2592. }
  2593. // String returns the string representation
  2594. func (s DeleteWebhookOutput) String() string {
  2595. return awsutil.Prettify(s)
  2596. }
  2597. // GoString returns the string representation
  2598. func (s DeleteWebhookOutput) GoString() string {
  2599. return s.String()
  2600. }
  2601. // Information about a Docker image that is managed by AWS CodeBuild.
  2602. type EnvironmentImage struct {
  2603. _ struct{} `type:"structure"`
  2604. // The description of the Docker image.
  2605. Description *string `locationName:"description" type:"string"`
  2606. // The name of the Docker image.
  2607. Name *string `locationName:"name" type:"string"`
  2608. // A list of environment image versions.
  2609. Versions []*string `locationName:"versions" type:"list"`
  2610. }
  2611. // String returns the string representation
  2612. func (s EnvironmentImage) String() string {
  2613. return awsutil.Prettify(s)
  2614. }
  2615. // GoString returns the string representation
  2616. func (s EnvironmentImage) GoString() string {
  2617. return s.String()
  2618. }
  2619. // SetDescription sets the Description field's value.
  2620. func (s *EnvironmentImage) SetDescription(v string) *EnvironmentImage {
  2621. s.Description = &v
  2622. return s
  2623. }
  2624. // SetName sets the Name field's value.
  2625. func (s *EnvironmentImage) SetName(v string) *EnvironmentImage {
  2626. s.Name = &v
  2627. return s
  2628. }
  2629. // SetVersions sets the Versions field's value.
  2630. func (s *EnvironmentImage) SetVersions(v []*string) *EnvironmentImage {
  2631. s.Versions = v
  2632. return s
  2633. }
  2634. // A set of Docker images that are related by programming language and are managed
  2635. // by AWS CodeBuild.
  2636. type EnvironmentLanguage struct {
  2637. _ struct{} `type:"structure"`
  2638. // The list of Docker images that are related by the specified programming language.
  2639. Images []*EnvironmentImage `locationName:"images" type:"list"`
  2640. // The programming language for the Docker images.
  2641. Language *string `locationName:"language" type:"string" enum:"LanguageType"`
  2642. }
  2643. // String returns the string representation
  2644. func (s EnvironmentLanguage) String() string {
  2645. return awsutil.Prettify(s)
  2646. }
  2647. // GoString returns the string representation
  2648. func (s EnvironmentLanguage) GoString() string {
  2649. return s.String()
  2650. }
  2651. // SetImages sets the Images field's value.
  2652. func (s *EnvironmentLanguage) SetImages(v []*EnvironmentImage) *EnvironmentLanguage {
  2653. s.Images = v
  2654. return s
  2655. }
  2656. // SetLanguage sets the Language field's value.
  2657. func (s *EnvironmentLanguage) SetLanguage(v string) *EnvironmentLanguage {
  2658. s.Language = &v
  2659. return s
  2660. }
  2661. // A set of Docker images that are related by platform and are managed by AWS
  2662. // CodeBuild.
  2663. type EnvironmentPlatform struct {
  2664. _ struct{} `type:"structure"`
  2665. // The list of programming languages that are available for the specified platform.
  2666. Languages []*EnvironmentLanguage `locationName:"languages" type:"list"`
  2667. // The platform's name.
  2668. Platform *string `locationName:"platform" type:"string" enum:"PlatformType"`
  2669. }
  2670. // String returns the string representation
  2671. func (s EnvironmentPlatform) String() string {
  2672. return awsutil.Prettify(s)
  2673. }
  2674. // GoString returns the string representation
  2675. func (s EnvironmentPlatform) GoString() string {
  2676. return s.String()
  2677. }
  2678. // SetLanguages sets the Languages field's value.
  2679. func (s *EnvironmentPlatform) SetLanguages(v []*EnvironmentLanguage) *EnvironmentPlatform {
  2680. s.Languages = v
  2681. return s
  2682. }
  2683. // SetPlatform sets the Platform field's value.
  2684. func (s *EnvironmentPlatform) SetPlatform(v string) *EnvironmentPlatform {
  2685. s.Platform = &v
  2686. return s
  2687. }
  2688. // Information about an environment variable for a build project or a build.
  2689. type EnvironmentVariable struct {
  2690. _ struct{} `type:"structure"`
  2691. // The name or key of the environment variable.
  2692. //
  2693. // Name is a required field
  2694. Name *string `locationName:"name" min:"1" type:"string" required:"true"`
  2695. // The type of environment variable. Valid values include:
  2696. //
  2697. // * PARAMETER_STORE: An environment variable stored in Amazon EC2 Systems
  2698. // Manager Parameter Store.
  2699. //
  2700. // * PLAINTEXT: An environment variable in plaintext format.
  2701. Type *string `locationName:"type" type:"string" enum:"EnvironmentVariableType"`
  2702. // The value of the environment variable.
  2703. //
  2704. // We strongly discourage the use of environment variables to store sensitive
  2705. // values, especially AWS secret key IDs and secret access keys. Environment
  2706. // variables can be displayed in plain text using the AWS CodeBuild console
  2707. // and the AWS Command Line Interface (AWS CLI).
  2708. //
  2709. // Value is a required field
  2710. Value *string `locationName:"value" type:"string" required:"true"`
  2711. }
  2712. // String returns the string representation
  2713. func (s EnvironmentVariable) String() string {
  2714. return awsutil.Prettify(s)
  2715. }
  2716. // GoString returns the string representation
  2717. func (s EnvironmentVariable) GoString() string {
  2718. return s.String()
  2719. }
  2720. // Validate inspects the fields of the type to determine if they are valid.
  2721. func (s *EnvironmentVariable) Validate() error {
  2722. invalidParams := request.ErrInvalidParams{Context: "EnvironmentVariable"}
  2723. if s.Name == nil {
  2724. invalidParams.Add(request.NewErrParamRequired("Name"))
  2725. }
  2726. if s.Name != nil && len(*s.Name) < 1 {
  2727. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  2728. }
  2729. if s.Value == nil {
  2730. invalidParams.Add(request.NewErrParamRequired("Value"))
  2731. }
  2732. if invalidParams.Len() > 0 {
  2733. return invalidParams
  2734. }
  2735. return nil
  2736. }
  2737. // SetName sets the Name field's value.
  2738. func (s *EnvironmentVariable) SetName(v string) *EnvironmentVariable {
  2739. s.Name = &v
  2740. return s
  2741. }
  2742. // SetType sets the Type field's value.
  2743. func (s *EnvironmentVariable) SetType(v string) *EnvironmentVariable {
  2744. s.Type = &v
  2745. return s
  2746. }
  2747. // SetValue sets the Value field's value.
  2748. func (s *EnvironmentVariable) SetValue(v string) *EnvironmentVariable {
  2749. s.Value = &v
  2750. return s
  2751. }
  2752. type ImportSourceCredentialsInput struct {
  2753. _ struct{} `type:"structure"`
  2754. // The type of authentication used to connect to a GitHub, GitHub Enterprise,
  2755. // or Bitbucket repository. An OAUTH connection is not supported by the API
  2756. // and must be created using the AWS CodeBuild console.
  2757. //
  2758. // AuthType is a required field
  2759. AuthType *string `locationName:"authType" type:"string" required:"true" enum:"AuthType"`
  2760. // The source provider used for this project.
  2761. //
  2762. // ServerType is a required field
  2763. ServerType *string `locationName:"serverType" type:"string" required:"true" enum:"ServerType"`
  2764. // For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket,
  2765. // this is the app password.
  2766. //
  2767. // Token is a required field
  2768. Token *string `locationName:"token" min:"1" type:"string" required:"true" sensitive:"true"`
  2769. // The Bitbucket username when the authType is BASIC_AUTH. This parameter is
  2770. // not valid for other types of source providers or connections.
  2771. Username *string `locationName:"username" min:"1" type:"string"`
  2772. }
  2773. // String returns the string representation
  2774. func (s ImportSourceCredentialsInput) String() string {
  2775. return awsutil.Prettify(s)
  2776. }
  2777. // GoString returns the string representation
  2778. func (s ImportSourceCredentialsInput) GoString() string {
  2779. return s.String()
  2780. }
  2781. // Validate inspects the fields of the type to determine if they are valid.
  2782. func (s *ImportSourceCredentialsInput) Validate() error {
  2783. invalidParams := request.ErrInvalidParams{Context: "ImportSourceCredentialsInput"}
  2784. if s.AuthType == nil {
  2785. invalidParams.Add(request.NewErrParamRequired("AuthType"))
  2786. }
  2787. if s.ServerType == nil {
  2788. invalidParams.Add(request.NewErrParamRequired("ServerType"))
  2789. }
  2790. if s.Token == nil {
  2791. invalidParams.Add(request.NewErrParamRequired("Token"))
  2792. }
  2793. if s.Token != nil && len(*s.Token) < 1 {
  2794. invalidParams.Add(request.NewErrParamMinLen("Token", 1))
  2795. }
  2796. if s.Username != nil && len(*s.Username) < 1 {
  2797. invalidParams.Add(request.NewErrParamMinLen("Username", 1))
  2798. }
  2799. if invalidParams.Len() > 0 {
  2800. return invalidParams
  2801. }
  2802. return nil
  2803. }
  2804. // SetAuthType sets the AuthType field's value.
  2805. func (s *ImportSourceCredentialsInput) SetAuthType(v string) *ImportSourceCredentialsInput {
  2806. s.AuthType = &v
  2807. return s
  2808. }
  2809. // SetServerType sets the ServerType field's value.
  2810. func (s *ImportSourceCredentialsInput) SetServerType(v string) *ImportSourceCredentialsInput {
  2811. s.ServerType = &v
  2812. return s
  2813. }
  2814. // SetToken sets the Token field's value.
  2815. func (s *ImportSourceCredentialsInput) SetToken(v string) *ImportSourceCredentialsInput {
  2816. s.Token = &v
  2817. return s
  2818. }
  2819. // SetUsername sets the Username field's value.
  2820. func (s *ImportSourceCredentialsInput) SetUsername(v string) *ImportSourceCredentialsInput {
  2821. s.Username = &v
  2822. return s
  2823. }
  2824. type ImportSourceCredentialsOutput struct {
  2825. _ struct{} `type:"structure"`
  2826. // The Amazon Resource Name (ARN) of the token.
  2827. Arn *string `locationName:"arn" min:"1" type:"string"`
  2828. }
  2829. // String returns the string representation
  2830. func (s ImportSourceCredentialsOutput) String() string {
  2831. return awsutil.Prettify(s)
  2832. }
  2833. // GoString returns the string representation
  2834. func (s ImportSourceCredentialsOutput) GoString() string {
  2835. return s.String()
  2836. }
  2837. // SetArn sets the Arn field's value.
  2838. func (s *ImportSourceCredentialsOutput) SetArn(v string) *ImportSourceCredentialsOutput {
  2839. s.Arn = &v
  2840. return s
  2841. }
  2842. type InvalidateProjectCacheInput struct {
  2843. _ struct{} `type:"structure"`
  2844. // The name of the AWS CodeBuild build project that the cache is reset for.
  2845. //
  2846. // ProjectName is a required field
  2847. ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"`
  2848. }
  2849. // String returns the string representation
  2850. func (s InvalidateProjectCacheInput) String() string {
  2851. return awsutil.Prettify(s)
  2852. }
  2853. // GoString returns the string representation
  2854. func (s InvalidateProjectCacheInput) GoString() string {
  2855. return s.String()
  2856. }
  2857. // Validate inspects the fields of the type to determine if they are valid.
  2858. func (s *InvalidateProjectCacheInput) Validate() error {
  2859. invalidParams := request.ErrInvalidParams{Context: "InvalidateProjectCacheInput"}
  2860. if s.ProjectName == nil {
  2861. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  2862. }
  2863. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  2864. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  2865. }
  2866. if invalidParams.Len() > 0 {
  2867. return invalidParams
  2868. }
  2869. return nil
  2870. }
  2871. // SetProjectName sets the ProjectName field's value.
  2872. func (s *InvalidateProjectCacheInput) SetProjectName(v string) *InvalidateProjectCacheInput {
  2873. s.ProjectName = &v
  2874. return s
  2875. }
  2876. type InvalidateProjectCacheOutput struct {
  2877. _ struct{} `type:"structure"`
  2878. }
  2879. // String returns the string representation
  2880. func (s InvalidateProjectCacheOutput) String() string {
  2881. return awsutil.Prettify(s)
  2882. }
  2883. // GoString returns the string representation
  2884. func (s InvalidateProjectCacheOutput) GoString() string {
  2885. return s.String()
  2886. }
  2887. type ListBuildsForProjectInput struct {
  2888. _ struct{} `type:"structure"`
  2889. // During a previous call, if there are more than 100 items in the list, only
  2890. // the first 100 items are returned, along with a unique string called a next
  2891. // token. To get the next batch of items in the list, call this operation again,
  2892. // adding the next token to the call. To get all of the items in the list, keep
  2893. // calling this operation with each subsequent next token that is returned,
  2894. // until no more next tokens are returned.
  2895. NextToken *string `locationName:"nextToken" type:"string"`
  2896. // The name of the AWS CodeBuild project.
  2897. //
  2898. // ProjectName is a required field
  2899. ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"`
  2900. // The order to list build IDs. Valid values include:
  2901. //
  2902. // * ASCENDING: List the build IDs in ascending order by build ID.
  2903. //
  2904. // * DESCENDING: List the build IDs in descending order by build ID.
  2905. SortOrder *string `locationName:"sortOrder" type:"string" enum:"SortOrderType"`
  2906. }
  2907. // String returns the string representation
  2908. func (s ListBuildsForProjectInput) String() string {
  2909. return awsutil.Prettify(s)
  2910. }
  2911. // GoString returns the string representation
  2912. func (s ListBuildsForProjectInput) GoString() string {
  2913. return s.String()
  2914. }
  2915. // Validate inspects the fields of the type to determine if they are valid.
  2916. func (s *ListBuildsForProjectInput) Validate() error {
  2917. invalidParams := request.ErrInvalidParams{Context: "ListBuildsForProjectInput"}
  2918. if s.ProjectName == nil {
  2919. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  2920. }
  2921. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  2922. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  2923. }
  2924. if invalidParams.Len() > 0 {
  2925. return invalidParams
  2926. }
  2927. return nil
  2928. }
  2929. // SetNextToken sets the NextToken field's value.
  2930. func (s *ListBuildsForProjectInput) SetNextToken(v string) *ListBuildsForProjectInput {
  2931. s.NextToken = &v
  2932. return s
  2933. }
  2934. // SetProjectName sets the ProjectName field's value.
  2935. func (s *ListBuildsForProjectInput) SetProjectName(v string) *ListBuildsForProjectInput {
  2936. s.ProjectName = &v
  2937. return s
  2938. }
  2939. // SetSortOrder sets the SortOrder field's value.
  2940. func (s *ListBuildsForProjectInput) SetSortOrder(v string) *ListBuildsForProjectInput {
  2941. s.SortOrder = &v
  2942. return s
  2943. }
  2944. type ListBuildsForProjectOutput struct {
  2945. _ struct{} `type:"structure"`
  2946. // A list of build IDs for the specified build project, with each build ID representing
  2947. // a single build.
  2948. Ids []*string `locationName:"ids" min:"1" type:"list"`
  2949. // If there are more than 100 items in the list, only the first 100 items are
  2950. // returned, along with a unique string called a next token. To get the next
  2951. // batch of items in the list, call this operation again, adding the next token
  2952. // to the call.
  2953. NextToken *string `locationName:"nextToken" type:"string"`
  2954. }
  2955. // String returns the string representation
  2956. func (s ListBuildsForProjectOutput) String() string {
  2957. return awsutil.Prettify(s)
  2958. }
  2959. // GoString returns the string representation
  2960. func (s ListBuildsForProjectOutput) GoString() string {
  2961. return s.String()
  2962. }
  2963. // SetIds sets the Ids field's value.
  2964. func (s *ListBuildsForProjectOutput) SetIds(v []*string) *ListBuildsForProjectOutput {
  2965. s.Ids = v
  2966. return s
  2967. }
  2968. // SetNextToken sets the NextToken field's value.
  2969. func (s *ListBuildsForProjectOutput) SetNextToken(v string) *ListBuildsForProjectOutput {
  2970. s.NextToken = &v
  2971. return s
  2972. }
  2973. type ListBuildsInput struct {
  2974. _ struct{} `type:"structure"`
  2975. // During a previous call, if there are more than 100 items in the list, only
  2976. // the first 100 items are returned, along with a unique string called a next
  2977. // token. To get the next batch of items in the list, call this operation again,
  2978. // adding the next token to the call. To get all of the items in the list, keep
  2979. // calling this operation with each subsequent next token that is returned,
  2980. // until no more next tokens are returned.
  2981. NextToken *string `locationName:"nextToken" type:"string"`
  2982. // The order to list build IDs. Valid values include:
  2983. //
  2984. // * ASCENDING: List the build IDs in ascending order by build ID.
  2985. //
  2986. // * DESCENDING: List the build IDs in descending order by build ID.
  2987. SortOrder *string `locationName:"sortOrder" type:"string" enum:"SortOrderType"`
  2988. }
  2989. // String returns the string representation
  2990. func (s ListBuildsInput) String() string {
  2991. return awsutil.Prettify(s)
  2992. }
  2993. // GoString returns the string representation
  2994. func (s ListBuildsInput) GoString() string {
  2995. return s.String()
  2996. }
  2997. // SetNextToken sets the NextToken field's value.
  2998. func (s *ListBuildsInput) SetNextToken(v string) *ListBuildsInput {
  2999. s.NextToken = &v
  3000. return s
  3001. }
  3002. // SetSortOrder sets the SortOrder field's value.
  3003. func (s *ListBuildsInput) SetSortOrder(v string) *ListBuildsInput {
  3004. s.SortOrder = &v
  3005. return s
  3006. }
  3007. type ListBuildsOutput struct {
  3008. _ struct{} `type:"structure"`
  3009. // A list of build IDs, with each build ID representing a single build.
  3010. Ids []*string `locationName:"ids" min:"1" type:"list"`
  3011. // If there are more than 100 items in the list, only the first 100 items are
  3012. // returned, along with a unique string called a next token. To get the next
  3013. // batch of items in the list, call this operation again, adding the next token
  3014. // to the call.
  3015. NextToken *string `locationName:"nextToken" type:"string"`
  3016. }
  3017. // String returns the string representation
  3018. func (s ListBuildsOutput) String() string {
  3019. return awsutil.Prettify(s)
  3020. }
  3021. // GoString returns the string representation
  3022. func (s ListBuildsOutput) GoString() string {
  3023. return s.String()
  3024. }
  3025. // SetIds sets the Ids field's value.
  3026. func (s *ListBuildsOutput) SetIds(v []*string) *ListBuildsOutput {
  3027. s.Ids = v
  3028. return s
  3029. }
  3030. // SetNextToken sets the NextToken field's value.
  3031. func (s *ListBuildsOutput) SetNextToken(v string) *ListBuildsOutput {
  3032. s.NextToken = &v
  3033. return s
  3034. }
  3035. type ListCuratedEnvironmentImagesInput struct {
  3036. _ struct{} `type:"structure"`
  3037. }
  3038. // String returns the string representation
  3039. func (s ListCuratedEnvironmentImagesInput) String() string {
  3040. return awsutil.Prettify(s)
  3041. }
  3042. // GoString returns the string representation
  3043. func (s ListCuratedEnvironmentImagesInput) GoString() string {
  3044. return s.String()
  3045. }
  3046. type ListCuratedEnvironmentImagesOutput struct {
  3047. _ struct{} `type:"structure"`
  3048. // Information about supported platforms for Docker images that are managed
  3049. // by AWS CodeBuild.
  3050. Platforms []*EnvironmentPlatform `locationName:"platforms" type:"list"`
  3051. }
  3052. // String returns the string representation
  3053. func (s ListCuratedEnvironmentImagesOutput) String() string {
  3054. return awsutil.Prettify(s)
  3055. }
  3056. // GoString returns the string representation
  3057. func (s ListCuratedEnvironmentImagesOutput) GoString() string {
  3058. return s.String()
  3059. }
  3060. // SetPlatforms sets the Platforms field's value.
  3061. func (s *ListCuratedEnvironmentImagesOutput) SetPlatforms(v []*EnvironmentPlatform) *ListCuratedEnvironmentImagesOutput {
  3062. s.Platforms = v
  3063. return s
  3064. }
  3065. type ListProjectsInput struct {
  3066. _ struct{} `type:"structure"`
  3067. // During a previous call, if there are more than 100 items in the list, only
  3068. // the first 100 items are returned, along with a unique string called a next
  3069. // token. To get the next batch of items in the list, call this operation again,
  3070. // adding the next token to the call. To get all of the items in the list, keep
  3071. // calling this operation with each subsequent next token that is returned,
  3072. // until no more next tokens are returned.
  3073. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  3074. // The criterion to be used to list build project names. Valid values include:
  3075. //
  3076. // * CREATED_TIME: List based on when each build project was created.
  3077. //
  3078. // * LAST_MODIFIED_TIME: List based on when information about each build
  3079. // project was last changed.
  3080. //
  3081. // * NAME: List based on each build project's name.
  3082. //
  3083. // Use sortOrder to specify in what order to list the build project names based
  3084. // on the preceding criteria.
  3085. SortBy *string `locationName:"sortBy" type:"string" enum:"ProjectSortByType"`
  3086. // The order in which to list build projects. Valid values include:
  3087. //
  3088. // * ASCENDING: List in ascending order.
  3089. //
  3090. // * DESCENDING: List in descending order.
  3091. //
  3092. // Use sortBy to specify the criterion to be used to list build project names.
  3093. SortOrder *string `locationName:"sortOrder" type:"string" enum:"SortOrderType"`
  3094. }
  3095. // String returns the string representation
  3096. func (s ListProjectsInput) String() string {
  3097. return awsutil.Prettify(s)
  3098. }
  3099. // GoString returns the string representation
  3100. func (s ListProjectsInput) GoString() string {
  3101. return s.String()
  3102. }
  3103. // Validate inspects the fields of the type to determine if they are valid.
  3104. func (s *ListProjectsInput) Validate() error {
  3105. invalidParams := request.ErrInvalidParams{Context: "ListProjectsInput"}
  3106. if s.NextToken != nil && len(*s.NextToken) < 1 {
  3107. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  3108. }
  3109. if invalidParams.Len() > 0 {
  3110. return invalidParams
  3111. }
  3112. return nil
  3113. }
  3114. // SetNextToken sets the NextToken field's value.
  3115. func (s *ListProjectsInput) SetNextToken(v string) *ListProjectsInput {
  3116. s.NextToken = &v
  3117. return s
  3118. }
  3119. // SetSortBy sets the SortBy field's value.
  3120. func (s *ListProjectsInput) SetSortBy(v string) *ListProjectsInput {
  3121. s.SortBy = &v
  3122. return s
  3123. }
  3124. // SetSortOrder sets the SortOrder field's value.
  3125. func (s *ListProjectsInput) SetSortOrder(v string) *ListProjectsInput {
  3126. s.SortOrder = &v
  3127. return s
  3128. }
  3129. type ListProjectsOutput struct {
  3130. _ struct{} `type:"structure"`
  3131. // If there are more than 100 items in the list, only the first 100 items are
  3132. // returned, along with a unique string called a next token. To get the next
  3133. // batch of items in the list, call this operation again, adding the next token
  3134. // to the call.
  3135. NextToken *string `locationName:"nextToken" type:"string"`
  3136. // The list of build project names, with each build project name representing
  3137. // a single build project.
  3138. Projects []*string `locationName:"projects" min:"1" type:"list"`
  3139. }
  3140. // String returns the string representation
  3141. func (s ListProjectsOutput) String() string {
  3142. return awsutil.Prettify(s)
  3143. }
  3144. // GoString returns the string representation
  3145. func (s ListProjectsOutput) GoString() string {
  3146. return s.String()
  3147. }
  3148. // SetNextToken sets the NextToken field's value.
  3149. func (s *ListProjectsOutput) SetNextToken(v string) *ListProjectsOutput {
  3150. s.NextToken = &v
  3151. return s
  3152. }
  3153. // SetProjects sets the Projects field's value.
  3154. func (s *ListProjectsOutput) SetProjects(v []*string) *ListProjectsOutput {
  3155. s.Projects = v
  3156. return s
  3157. }
  3158. type ListSourceCredentialsInput struct {
  3159. _ struct{} `type:"structure"`
  3160. }
  3161. // String returns the string representation
  3162. func (s ListSourceCredentialsInput) String() string {
  3163. return awsutil.Prettify(s)
  3164. }
  3165. // GoString returns the string representation
  3166. func (s ListSourceCredentialsInput) GoString() string {
  3167. return s.String()
  3168. }
  3169. type ListSourceCredentialsOutput struct {
  3170. _ struct{} `type:"structure"`
  3171. // A list of SourceCredentialsInfo objects. Each SourceCredentialsInfo object
  3172. // includes the authentication type, token ARN, and type of source provider
  3173. // for one set of credentials.
  3174. SourceCredentialsInfos []*SourceCredentialsInfo `locationName:"sourceCredentialsInfos" type:"list"`
  3175. }
  3176. // String returns the string representation
  3177. func (s ListSourceCredentialsOutput) String() string {
  3178. return awsutil.Prettify(s)
  3179. }
  3180. // GoString returns the string representation
  3181. func (s ListSourceCredentialsOutput) GoString() string {
  3182. return s.String()
  3183. }
  3184. // SetSourceCredentialsInfos sets the SourceCredentialsInfos field's value.
  3185. func (s *ListSourceCredentialsOutput) SetSourceCredentialsInfos(v []*SourceCredentialsInfo) *ListSourceCredentialsOutput {
  3186. s.SourceCredentialsInfos = v
  3187. return s
  3188. }
  3189. // Information about logs for a build project. These can be logs in Amazon CloudWatch
  3190. // Logs, built in a specified S3 bucket, or both.
  3191. type LogsConfig struct {
  3192. _ struct{} `type:"structure"`
  3193. // Information about Amazon CloudWatch Logs for a build project. Amazon CloudWatch
  3194. // Logs are enabled by default.
  3195. CloudWatchLogs *CloudWatchLogsConfig `locationName:"cloudWatchLogs" type:"structure"`
  3196. // Information about logs built to an S3 bucket for a build project. S3 logs
  3197. // are not enabled by default.
  3198. S3Logs *S3LogsConfig `locationName:"s3Logs" type:"structure"`
  3199. }
  3200. // String returns the string representation
  3201. func (s LogsConfig) String() string {
  3202. return awsutil.Prettify(s)
  3203. }
  3204. // GoString returns the string representation
  3205. func (s LogsConfig) GoString() string {
  3206. return s.String()
  3207. }
  3208. // Validate inspects the fields of the type to determine if they are valid.
  3209. func (s *LogsConfig) Validate() error {
  3210. invalidParams := request.ErrInvalidParams{Context: "LogsConfig"}
  3211. if s.CloudWatchLogs != nil {
  3212. if err := s.CloudWatchLogs.Validate(); err != nil {
  3213. invalidParams.AddNested("CloudWatchLogs", err.(request.ErrInvalidParams))
  3214. }
  3215. }
  3216. if s.S3Logs != nil {
  3217. if err := s.S3Logs.Validate(); err != nil {
  3218. invalidParams.AddNested("S3Logs", err.(request.ErrInvalidParams))
  3219. }
  3220. }
  3221. if invalidParams.Len() > 0 {
  3222. return invalidParams
  3223. }
  3224. return nil
  3225. }
  3226. // SetCloudWatchLogs sets the CloudWatchLogs field's value.
  3227. func (s *LogsConfig) SetCloudWatchLogs(v *CloudWatchLogsConfig) *LogsConfig {
  3228. s.CloudWatchLogs = v
  3229. return s
  3230. }
  3231. // SetS3Logs sets the S3Logs field's value.
  3232. func (s *LogsConfig) SetS3Logs(v *S3LogsConfig) *LogsConfig {
  3233. s.S3Logs = v
  3234. return s
  3235. }
  3236. // Information about build logs in Amazon CloudWatch Logs.
  3237. type LogsLocation struct {
  3238. _ struct{} `type:"structure"`
  3239. // Information about Amazon CloudWatch Logs for a build project.
  3240. CloudWatchLogs *CloudWatchLogsConfig `locationName:"cloudWatchLogs" type:"structure"`
  3241. // The URL to an individual build log in Amazon CloudWatch Logs.
  3242. DeepLink *string `locationName:"deepLink" type:"string"`
  3243. // The name of the Amazon CloudWatch Logs group for the build logs.
  3244. GroupName *string `locationName:"groupName" type:"string"`
  3245. // The URL to a build log in an S3 bucket.
  3246. S3DeepLink *string `locationName:"s3DeepLink" type:"string"`
  3247. // Information about S3 logs for a build project.
  3248. S3Logs *S3LogsConfig `locationName:"s3Logs" type:"structure"`
  3249. // The name of the Amazon CloudWatch Logs stream for the build logs.
  3250. StreamName *string `locationName:"streamName" type:"string"`
  3251. }
  3252. // String returns the string representation
  3253. func (s LogsLocation) String() string {
  3254. return awsutil.Prettify(s)
  3255. }
  3256. // GoString returns the string representation
  3257. func (s LogsLocation) GoString() string {
  3258. return s.String()
  3259. }
  3260. // SetCloudWatchLogs sets the CloudWatchLogs field's value.
  3261. func (s *LogsLocation) SetCloudWatchLogs(v *CloudWatchLogsConfig) *LogsLocation {
  3262. s.CloudWatchLogs = v
  3263. return s
  3264. }
  3265. // SetDeepLink sets the DeepLink field's value.
  3266. func (s *LogsLocation) SetDeepLink(v string) *LogsLocation {
  3267. s.DeepLink = &v
  3268. return s
  3269. }
  3270. // SetGroupName sets the GroupName field's value.
  3271. func (s *LogsLocation) SetGroupName(v string) *LogsLocation {
  3272. s.GroupName = &v
  3273. return s
  3274. }
  3275. // SetS3DeepLink sets the S3DeepLink field's value.
  3276. func (s *LogsLocation) SetS3DeepLink(v string) *LogsLocation {
  3277. s.S3DeepLink = &v
  3278. return s
  3279. }
  3280. // SetS3Logs sets the S3Logs field's value.
  3281. func (s *LogsLocation) SetS3Logs(v *S3LogsConfig) *LogsLocation {
  3282. s.S3Logs = v
  3283. return s
  3284. }
  3285. // SetStreamName sets the StreamName field's value.
  3286. func (s *LogsLocation) SetStreamName(v string) *LogsLocation {
  3287. s.StreamName = &v
  3288. return s
  3289. }
  3290. // Describes a network interface.
  3291. type NetworkInterface struct {
  3292. _ struct{} `type:"structure"`
  3293. // The ID of the network interface.
  3294. NetworkInterfaceId *string `locationName:"networkInterfaceId" min:"1" type:"string"`
  3295. // The ID of the subnet.
  3296. SubnetId *string `locationName:"subnetId" min:"1" type:"string"`
  3297. }
  3298. // String returns the string representation
  3299. func (s NetworkInterface) String() string {
  3300. return awsutil.Prettify(s)
  3301. }
  3302. // GoString returns the string representation
  3303. func (s NetworkInterface) GoString() string {
  3304. return s.String()
  3305. }
  3306. // SetNetworkInterfaceId sets the NetworkInterfaceId field's value.
  3307. func (s *NetworkInterface) SetNetworkInterfaceId(v string) *NetworkInterface {
  3308. s.NetworkInterfaceId = &v
  3309. return s
  3310. }
  3311. // SetSubnetId sets the SubnetId field's value.
  3312. func (s *NetworkInterface) SetSubnetId(v string) *NetworkInterface {
  3313. s.SubnetId = &v
  3314. return s
  3315. }
  3316. // Additional information about a build phase that has an error. You can use
  3317. // this information for troubleshooting.
  3318. type PhaseContext struct {
  3319. _ struct{} `type:"structure"`
  3320. // An explanation of the build phase's context. This might include a command
  3321. // ID and an exit code.
  3322. Message *string `locationName:"message" type:"string"`
  3323. // The status code for the context of the build phase.
  3324. StatusCode *string `locationName:"statusCode" type:"string"`
  3325. }
  3326. // String returns the string representation
  3327. func (s PhaseContext) String() string {
  3328. return awsutil.Prettify(s)
  3329. }
  3330. // GoString returns the string representation
  3331. func (s PhaseContext) GoString() string {
  3332. return s.String()
  3333. }
  3334. // SetMessage sets the Message field's value.
  3335. func (s *PhaseContext) SetMessage(v string) *PhaseContext {
  3336. s.Message = &v
  3337. return s
  3338. }
  3339. // SetStatusCode sets the StatusCode field's value.
  3340. func (s *PhaseContext) SetStatusCode(v string) *PhaseContext {
  3341. s.StatusCode = &v
  3342. return s
  3343. }
  3344. // Information about a build project.
  3345. type Project struct {
  3346. _ struct{} `type:"structure"`
  3347. // The Amazon Resource Name (ARN) of the build project.
  3348. Arn *string `locationName:"arn" type:"string"`
  3349. // Information about the build output artifacts for the build project.
  3350. Artifacts *ProjectArtifacts `locationName:"artifacts" type:"structure"`
  3351. // Information about the build badge for the build project.
  3352. Badge *ProjectBadge `locationName:"badge" type:"structure"`
  3353. // Information about the cache for the build project.
  3354. Cache *ProjectCache `locationName:"cache" type:"structure"`
  3355. // When the build project was created, expressed in Unix time format.
  3356. Created *time.Time `locationName:"created" type:"timestamp"`
  3357. // A description that makes the build project easy to identify.
  3358. Description *string `locationName:"description" type:"string"`
  3359. // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be
  3360. // used for encrypting the build output artifacts.
  3361. //
  3362. // This is expressed either as the Amazon Resource Name (ARN) of the CMK or,
  3363. // if specified, the CMK's alias (using the format alias/alias-name).
  3364. EncryptionKey *string `locationName:"encryptionKey" min:"1" type:"string"`
  3365. // Information about the build environment for this build project.
  3366. Environment *ProjectEnvironment `locationName:"environment" type:"structure"`
  3367. // When the build project's settings were last modified, expressed in Unix time
  3368. // format.
  3369. LastModified *time.Time `locationName:"lastModified" type:"timestamp"`
  3370. // Information about logs for the build project. A project can create logs in
  3371. // Amazon CloudWatch Logs, an S3 bucket, or both.
  3372. LogsConfig *LogsConfig `locationName:"logsConfig" type:"structure"`
  3373. // The name of the build project.
  3374. Name *string `locationName:"name" min:"2" type:"string"`
  3375. // The number of minutes a build is allowed to be queued before it times out.
  3376. QueuedTimeoutInMinutes *int64 `locationName:"queuedTimeoutInMinutes" min:"5" type:"integer"`
  3377. // An array of ProjectArtifacts objects.
  3378. SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"`
  3379. // An array of ProjectSource objects.
  3380. SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"`
  3381. // The ARN of the AWS Identity and Access Management (IAM) role that enables
  3382. // AWS CodeBuild to interact with dependent AWS services on behalf of the AWS
  3383. // account.
  3384. ServiceRole *string `locationName:"serviceRole" min:"1" type:"string"`
  3385. // Information about the build input source code for this build project.
  3386. Source *ProjectSource `locationName:"source" type:"structure"`
  3387. // The tags for this build project.
  3388. //
  3389. // These tags are available for use by AWS services that support AWS CodeBuild
  3390. // build project tags.
  3391. Tags []*Tag `locationName:"tags" type:"list"`
  3392. // How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait
  3393. // before timing out any related build that did not get marked as completed.
  3394. // The default is 60 minutes.
  3395. TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"5" type:"integer"`
  3396. // Information about the VPC configuration that AWS CodeBuild accesses.
  3397. VpcConfig *VpcConfig `locationName:"vpcConfig" type:"structure"`
  3398. // Information about a webhook that connects repository events to a build project
  3399. // in AWS CodeBuild.
  3400. Webhook *Webhook `locationName:"webhook" type:"structure"`
  3401. }
  3402. // String returns the string representation
  3403. func (s Project) String() string {
  3404. return awsutil.Prettify(s)
  3405. }
  3406. // GoString returns the string representation
  3407. func (s Project) GoString() string {
  3408. return s.String()
  3409. }
  3410. // SetArn sets the Arn field's value.
  3411. func (s *Project) SetArn(v string) *Project {
  3412. s.Arn = &v
  3413. return s
  3414. }
  3415. // SetArtifacts sets the Artifacts field's value.
  3416. func (s *Project) SetArtifacts(v *ProjectArtifacts) *Project {
  3417. s.Artifacts = v
  3418. return s
  3419. }
  3420. // SetBadge sets the Badge field's value.
  3421. func (s *Project) SetBadge(v *ProjectBadge) *Project {
  3422. s.Badge = v
  3423. return s
  3424. }
  3425. // SetCache sets the Cache field's value.
  3426. func (s *Project) SetCache(v *ProjectCache) *Project {
  3427. s.Cache = v
  3428. return s
  3429. }
  3430. // SetCreated sets the Created field's value.
  3431. func (s *Project) SetCreated(v time.Time) *Project {
  3432. s.Created = &v
  3433. return s
  3434. }
  3435. // SetDescription sets the Description field's value.
  3436. func (s *Project) SetDescription(v string) *Project {
  3437. s.Description = &v
  3438. return s
  3439. }
  3440. // SetEncryptionKey sets the EncryptionKey field's value.
  3441. func (s *Project) SetEncryptionKey(v string) *Project {
  3442. s.EncryptionKey = &v
  3443. return s
  3444. }
  3445. // SetEnvironment sets the Environment field's value.
  3446. func (s *Project) SetEnvironment(v *ProjectEnvironment) *Project {
  3447. s.Environment = v
  3448. return s
  3449. }
  3450. // SetLastModified sets the LastModified field's value.
  3451. func (s *Project) SetLastModified(v time.Time) *Project {
  3452. s.LastModified = &v
  3453. return s
  3454. }
  3455. // SetLogsConfig sets the LogsConfig field's value.
  3456. func (s *Project) SetLogsConfig(v *LogsConfig) *Project {
  3457. s.LogsConfig = v
  3458. return s
  3459. }
  3460. // SetName sets the Name field's value.
  3461. func (s *Project) SetName(v string) *Project {
  3462. s.Name = &v
  3463. return s
  3464. }
  3465. // SetQueuedTimeoutInMinutes sets the QueuedTimeoutInMinutes field's value.
  3466. func (s *Project) SetQueuedTimeoutInMinutes(v int64) *Project {
  3467. s.QueuedTimeoutInMinutes = &v
  3468. return s
  3469. }
  3470. // SetSecondaryArtifacts sets the SecondaryArtifacts field's value.
  3471. func (s *Project) SetSecondaryArtifacts(v []*ProjectArtifacts) *Project {
  3472. s.SecondaryArtifacts = v
  3473. return s
  3474. }
  3475. // SetSecondarySources sets the SecondarySources field's value.
  3476. func (s *Project) SetSecondarySources(v []*ProjectSource) *Project {
  3477. s.SecondarySources = v
  3478. return s
  3479. }
  3480. // SetServiceRole sets the ServiceRole field's value.
  3481. func (s *Project) SetServiceRole(v string) *Project {
  3482. s.ServiceRole = &v
  3483. return s
  3484. }
  3485. // SetSource sets the Source field's value.
  3486. func (s *Project) SetSource(v *ProjectSource) *Project {
  3487. s.Source = v
  3488. return s
  3489. }
  3490. // SetTags sets the Tags field's value.
  3491. func (s *Project) SetTags(v []*Tag) *Project {
  3492. s.Tags = v
  3493. return s
  3494. }
  3495. // SetTimeoutInMinutes sets the TimeoutInMinutes field's value.
  3496. func (s *Project) SetTimeoutInMinutes(v int64) *Project {
  3497. s.TimeoutInMinutes = &v
  3498. return s
  3499. }
  3500. // SetVpcConfig sets the VpcConfig field's value.
  3501. func (s *Project) SetVpcConfig(v *VpcConfig) *Project {
  3502. s.VpcConfig = v
  3503. return s
  3504. }
  3505. // SetWebhook sets the Webhook field's value.
  3506. func (s *Project) SetWebhook(v *Webhook) *Project {
  3507. s.Webhook = v
  3508. return s
  3509. }
  3510. // Information about the build output artifacts for the build project.
  3511. type ProjectArtifacts struct {
  3512. _ struct{} `type:"structure"`
  3513. // An identifier for this artifact definition.
  3514. ArtifactIdentifier *string `locationName:"artifactIdentifier" type:"string"`
  3515. // Set to true if you do not want your output artifacts encrypted. This option
  3516. // is valid only if your artifacts type is Amazon Simple Storage Service (Amazon
  3517. // S3). If this is set with another artifacts type, an invalidInputException
  3518. // is thrown.
  3519. EncryptionDisabled *bool `locationName:"encryptionDisabled" type:"boolean"`
  3520. // Information about the build output artifact location:
  3521. //
  3522. // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value
  3523. // if specified. This is because AWS CodePipeline manages its build output
  3524. // locations instead of AWS CodeBuild.
  3525. //
  3526. // * If type is set to NO_ARTIFACTS, this value is ignored if specified,
  3527. // because no build output is produced.
  3528. //
  3529. // * If type is set to S3, this is the name of the output bucket.
  3530. Location *string `locationName:"location" type:"string"`
  3531. // Along with path and namespaceType, the pattern that AWS CodeBuild uses to
  3532. // name and store the output artifact:
  3533. //
  3534. // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value
  3535. // if specified. This is because AWS CodePipeline manages its build output
  3536. // names instead of AWS CodeBuild.
  3537. //
  3538. // * If type is set to NO_ARTIFACTS, this value is ignored if specified,
  3539. // because no build output is produced.
  3540. //
  3541. // * If type is set to S3, this is the name of the output artifact object.
  3542. // If you set the name to be a forward slash ("/"), the artifact is stored
  3543. // in the root of the output bucket.
  3544. //
  3545. // For example:
  3546. //
  3547. // * If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and
  3548. // name is set to MyArtifact.zip, then the output artifact is stored in MyArtifacts/build-ID/MyArtifact.zip.
  3549. //
  3550. //
  3551. // * If path is empty, namespaceType is set to NONE, and name is set to
  3552. // "/", the output artifact is stored in the root of the output bucket.
  3553. //
  3554. // * If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and
  3555. // name is set to "/", the output artifact is stored in MyArtifacts/build-ID.
  3556. Name *string `locationName:"name" type:"string"`
  3557. // Along with path and name, the pattern that AWS CodeBuild uses to determine
  3558. // the name and location to store the output artifact:
  3559. //
  3560. // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value
  3561. // if specified. This is because AWS CodePipeline manages its build output
  3562. // names instead of AWS CodeBuild.
  3563. //
  3564. // * If type is set to NO_ARTIFACTS, this value is ignored if specified,
  3565. // because no build output is produced.
  3566. //
  3567. // * If type is set to S3, valid values include:
  3568. //
  3569. // BUILD_ID: Include the build ID in the location of the build output artifact.
  3570. //
  3571. // NONE: Do not include the build ID. This is the default if namespaceType is
  3572. // not specified.
  3573. //
  3574. // For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID,
  3575. // and name is set to MyArtifact.zip, the output artifact is stored in MyArtifacts/build-ID/MyArtifact.zip.
  3576. NamespaceType *string `locationName:"namespaceType" type:"string" enum:"ArtifactNamespace"`
  3577. // If this flag is set, a name specified in the build spec file overrides the
  3578. // artifact name. The name specified in a build spec file is calculated at build
  3579. // time and uses the Shell Command Language. For example, you can append a date
  3580. // and time to your artifact name so that it is always unique.
  3581. OverrideArtifactName *bool `locationName:"overrideArtifactName" type:"boolean"`
  3582. // The type of build output artifact to create:
  3583. //
  3584. // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value
  3585. // if specified. This is because AWS CodePipeline manages its build output
  3586. // artifacts instead of AWS CodeBuild.
  3587. //
  3588. // * If type is set to NO_ARTIFACTS, this value is ignored if specified,
  3589. // because no build output is produced.
  3590. //
  3591. // * If type is set to S3, valid values include:
  3592. //
  3593. // NONE: AWS CodeBuild creates in the output bucket a folder that contains the
  3594. // build output. This is the default if packaging is not specified.
  3595. //
  3596. // ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains
  3597. // the build output.
  3598. Packaging *string `locationName:"packaging" type:"string" enum:"ArtifactPackaging"`
  3599. // Along with namespaceType and name, the pattern that AWS CodeBuild uses to
  3600. // name and store the output artifact:
  3601. //
  3602. // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value
  3603. // if specified. This is because AWS CodePipeline manages its build output
  3604. // names instead of AWS CodeBuild.
  3605. //
  3606. // * If type is set to NO_ARTIFACTS, this value is ignored if specified,
  3607. // because no build output is produced.
  3608. //
  3609. // * If type is set to S3, this is the path to the output artifact. If path
  3610. // is not specified, path is not used.
  3611. //
  3612. // For example, if path is set to MyArtifacts, namespaceType is set to NONE,
  3613. // and name is set to MyArtifact.zip, the output artifact is stored in the output
  3614. // bucket at MyArtifacts/MyArtifact.zip.
  3615. Path *string `locationName:"path" type:"string"`
  3616. // The type of build output artifact. Valid values include:
  3617. //
  3618. // * CODEPIPELINE: The build project has build output generated through AWS
  3619. // CodePipeline.
  3620. //
  3621. // * NO_ARTIFACTS: The build project does not produce any build output.
  3622. //
  3623. // * S3: The build project stores build output in Amazon Simple Storage Service
  3624. // (Amazon S3).
  3625. //
  3626. // Type is a required field
  3627. Type *string `locationName:"type" type:"string" required:"true" enum:"ArtifactsType"`
  3628. }
  3629. // String returns the string representation
  3630. func (s ProjectArtifacts) String() string {
  3631. return awsutil.Prettify(s)
  3632. }
  3633. // GoString returns the string representation
  3634. func (s ProjectArtifacts) GoString() string {
  3635. return s.String()
  3636. }
  3637. // Validate inspects the fields of the type to determine if they are valid.
  3638. func (s *ProjectArtifacts) Validate() error {
  3639. invalidParams := request.ErrInvalidParams{Context: "ProjectArtifacts"}
  3640. if s.Type == nil {
  3641. invalidParams.Add(request.NewErrParamRequired("Type"))
  3642. }
  3643. if invalidParams.Len() > 0 {
  3644. return invalidParams
  3645. }
  3646. return nil
  3647. }
  3648. // SetArtifactIdentifier sets the ArtifactIdentifier field's value.
  3649. func (s *ProjectArtifacts) SetArtifactIdentifier(v string) *ProjectArtifacts {
  3650. s.ArtifactIdentifier = &v
  3651. return s
  3652. }
  3653. // SetEncryptionDisabled sets the EncryptionDisabled field's value.
  3654. func (s *ProjectArtifacts) SetEncryptionDisabled(v bool) *ProjectArtifacts {
  3655. s.EncryptionDisabled = &v
  3656. return s
  3657. }
  3658. // SetLocation sets the Location field's value.
  3659. func (s *ProjectArtifacts) SetLocation(v string) *ProjectArtifacts {
  3660. s.Location = &v
  3661. return s
  3662. }
  3663. // SetName sets the Name field's value.
  3664. func (s *ProjectArtifacts) SetName(v string) *ProjectArtifacts {
  3665. s.Name = &v
  3666. return s
  3667. }
  3668. // SetNamespaceType sets the NamespaceType field's value.
  3669. func (s *ProjectArtifacts) SetNamespaceType(v string) *ProjectArtifacts {
  3670. s.NamespaceType = &v
  3671. return s
  3672. }
  3673. // SetOverrideArtifactName sets the OverrideArtifactName field's value.
  3674. func (s *ProjectArtifacts) SetOverrideArtifactName(v bool) *ProjectArtifacts {
  3675. s.OverrideArtifactName = &v
  3676. return s
  3677. }
  3678. // SetPackaging sets the Packaging field's value.
  3679. func (s *ProjectArtifacts) SetPackaging(v string) *ProjectArtifacts {
  3680. s.Packaging = &v
  3681. return s
  3682. }
  3683. // SetPath sets the Path field's value.
  3684. func (s *ProjectArtifacts) SetPath(v string) *ProjectArtifacts {
  3685. s.Path = &v
  3686. return s
  3687. }
  3688. // SetType sets the Type field's value.
  3689. func (s *ProjectArtifacts) SetType(v string) *ProjectArtifacts {
  3690. s.Type = &v
  3691. return s
  3692. }
  3693. // Information about the build badge for the build project.
  3694. type ProjectBadge struct {
  3695. _ struct{} `type:"structure"`
  3696. // Set this to true to generate a publicly accessible URL for your project's
  3697. // build badge.
  3698. BadgeEnabled *bool `locationName:"badgeEnabled" type:"boolean"`
  3699. // The publicly-accessible URL through which you can access the build badge
  3700. // for your project.
  3701. //
  3702. // The publicly accessible URL through which you can access the build badge
  3703. // for your project.
  3704. BadgeRequestUrl *string `locationName:"badgeRequestUrl" type:"string"`
  3705. }
  3706. // String returns the string representation
  3707. func (s ProjectBadge) String() string {
  3708. return awsutil.Prettify(s)
  3709. }
  3710. // GoString returns the string representation
  3711. func (s ProjectBadge) GoString() string {
  3712. return s.String()
  3713. }
  3714. // SetBadgeEnabled sets the BadgeEnabled field's value.
  3715. func (s *ProjectBadge) SetBadgeEnabled(v bool) *ProjectBadge {
  3716. s.BadgeEnabled = &v
  3717. return s
  3718. }
  3719. // SetBadgeRequestUrl sets the BadgeRequestUrl field's value.
  3720. func (s *ProjectBadge) SetBadgeRequestUrl(v string) *ProjectBadge {
  3721. s.BadgeRequestUrl = &v
  3722. return s
  3723. }
  3724. // Information about the cache for the build project.
  3725. type ProjectCache struct {
  3726. _ struct{} `type:"structure"`
  3727. // Information about the cache location:
  3728. //
  3729. // * NO_CACHE: This value is ignored.
  3730. //
  3731. // * S3: This is the S3 bucket name/prefix.
  3732. Location *string `locationName:"location" type:"string"`
  3733. // The type of cache used by the build project. Valid values include:
  3734. //
  3735. // * NO_CACHE: The build project does not use any cache.
  3736. //
  3737. // * S3: The build project reads and writes from and to S3.
  3738. //
  3739. // Type is a required field
  3740. Type *string `locationName:"type" type:"string" required:"true" enum:"CacheType"`
  3741. }
  3742. // String returns the string representation
  3743. func (s ProjectCache) String() string {
  3744. return awsutil.Prettify(s)
  3745. }
  3746. // GoString returns the string representation
  3747. func (s ProjectCache) GoString() string {
  3748. return s.String()
  3749. }
  3750. // Validate inspects the fields of the type to determine if they are valid.
  3751. func (s *ProjectCache) Validate() error {
  3752. invalidParams := request.ErrInvalidParams{Context: "ProjectCache"}
  3753. if s.Type == nil {
  3754. invalidParams.Add(request.NewErrParamRequired("Type"))
  3755. }
  3756. if invalidParams.Len() > 0 {
  3757. return invalidParams
  3758. }
  3759. return nil
  3760. }
  3761. // SetLocation sets the Location field's value.
  3762. func (s *ProjectCache) SetLocation(v string) *ProjectCache {
  3763. s.Location = &v
  3764. return s
  3765. }
  3766. // SetType sets the Type field's value.
  3767. func (s *ProjectCache) SetType(v string) *ProjectCache {
  3768. s.Type = &v
  3769. return s
  3770. }
  3771. // Information about the build environment of the build project.
  3772. type ProjectEnvironment struct {
  3773. _ struct{} `type:"structure"`
  3774. // The certificate to use with this build project.
  3775. Certificate *string `locationName:"certificate" type:"string"`
  3776. // Information about the compute resources the build project uses. Available
  3777. // values include:
  3778. //
  3779. // * BUILD_GENERAL1_SMALL: Use up to 3 GB memory and 2 vCPUs for builds.
  3780. //
  3781. // * BUILD_GENERAL1_MEDIUM: Use up to 7 GB memory and 4 vCPUs for builds.
  3782. //
  3783. // * BUILD_GENERAL1_LARGE: Use up to 15 GB memory and 8 vCPUs for builds.
  3784. //
  3785. // ComputeType is a required field
  3786. ComputeType *string `locationName:"computeType" type:"string" required:"true" enum:"ComputeType"`
  3787. // A set of environment variables to make available to builds for this build
  3788. // project.
  3789. EnvironmentVariables []*EnvironmentVariable `locationName:"environmentVariables" type:"list"`
  3790. // The ID of the Docker image to use for this build project.
  3791. //
  3792. // Image is a required field
  3793. Image *string `locationName:"image" min:"1" type:"string" required:"true"`
  3794. // Enables running the Docker daemon inside a Docker container. Set to true
  3795. // only if the build project is be used to build Docker images, and the specified
  3796. // build environment image is not provided by AWS CodeBuild with Docker support.
  3797. // Otherwise, all associated builds that attempt to interact with the Docker
  3798. // daemon fail. You must also start the Docker daemon so that builds can interact
  3799. // with it. One way to do this is to initialize the Docker daemon during the
  3800. // install phase of your build spec by running the following build commands.
  3801. // (Do not run these commands if the specified build environment image is provided
  3802. // by AWS CodeBuild with Docker support.)
  3803. //
  3804. // If the operating system's base image is Ubuntu Linux:
  3805. //
  3806. // - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375
  3807. // --storage-driver=overlay& - timeout 15 sh -c "until docker info; do echo
  3808. // .; sleep 1; done"
  3809. //
  3810. // If the operating system's base image is Alpine Linux, add the -t argument
  3811. // to timeout:
  3812. //
  3813. // - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375
  3814. // --storage-driver=overlay& - timeout 15 -t sh -c "until docker info; do echo
  3815. // .; sleep 1; done"
  3816. PrivilegedMode *bool `locationName:"privilegedMode" type:"boolean"`
  3817. // The type of build environment to use for related builds.
  3818. //
  3819. // Type is a required field
  3820. Type *string `locationName:"type" type:"string" required:"true" enum:"EnvironmentType"`
  3821. }
  3822. // String returns the string representation
  3823. func (s ProjectEnvironment) String() string {
  3824. return awsutil.Prettify(s)
  3825. }
  3826. // GoString returns the string representation
  3827. func (s ProjectEnvironment) GoString() string {
  3828. return s.String()
  3829. }
  3830. // Validate inspects the fields of the type to determine if they are valid.
  3831. func (s *ProjectEnvironment) Validate() error {
  3832. invalidParams := request.ErrInvalidParams{Context: "ProjectEnvironment"}
  3833. if s.ComputeType == nil {
  3834. invalidParams.Add(request.NewErrParamRequired("ComputeType"))
  3835. }
  3836. if s.Image == nil {
  3837. invalidParams.Add(request.NewErrParamRequired("Image"))
  3838. }
  3839. if s.Image != nil && len(*s.Image) < 1 {
  3840. invalidParams.Add(request.NewErrParamMinLen("Image", 1))
  3841. }
  3842. if s.Type == nil {
  3843. invalidParams.Add(request.NewErrParamRequired("Type"))
  3844. }
  3845. if s.EnvironmentVariables != nil {
  3846. for i, v := range s.EnvironmentVariables {
  3847. if v == nil {
  3848. continue
  3849. }
  3850. if err := v.Validate(); err != nil {
  3851. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EnvironmentVariables", i), err.(request.ErrInvalidParams))
  3852. }
  3853. }
  3854. }
  3855. if invalidParams.Len() > 0 {
  3856. return invalidParams
  3857. }
  3858. return nil
  3859. }
  3860. // SetCertificate sets the Certificate field's value.
  3861. func (s *ProjectEnvironment) SetCertificate(v string) *ProjectEnvironment {
  3862. s.Certificate = &v
  3863. return s
  3864. }
  3865. // SetComputeType sets the ComputeType field's value.
  3866. func (s *ProjectEnvironment) SetComputeType(v string) *ProjectEnvironment {
  3867. s.ComputeType = &v
  3868. return s
  3869. }
  3870. // SetEnvironmentVariables sets the EnvironmentVariables field's value.
  3871. func (s *ProjectEnvironment) SetEnvironmentVariables(v []*EnvironmentVariable) *ProjectEnvironment {
  3872. s.EnvironmentVariables = v
  3873. return s
  3874. }
  3875. // SetImage sets the Image field's value.
  3876. func (s *ProjectEnvironment) SetImage(v string) *ProjectEnvironment {
  3877. s.Image = &v
  3878. return s
  3879. }
  3880. // SetPrivilegedMode sets the PrivilegedMode field's value.
  3881. func (s *ProjectEnvironment) SetPrivilegedMode(v bool) *ProjectEnvironment {
  3882. s.PrivilegedMode = &v
  3883. return s
  3884. }
  3885. // SetType sets the Type field's value.
  3886. func (s *ProjectEnvironment) SetType(v string) *ProjectEnvironment {
  3887. s.Type = &v
  3888. return s
  3889. }
  3890. // Information about the build input source code for the build project.
  3891. type ProjectSource struct {
  3892. _ struct{} `type:"structure"`
  3893. // Information about the authorization settings for AWS CodeBuild to access
  3894. // the source code to be built.
  3895. //
  3896. // This information is for the AWS CodeBuild console's use only. Your code should
  3897. // not get or set this information directly.
  3898. Auth *SourceAuth `locationName:"auth" type:"structure"`
  3899. // The build spec declaration to use for the builds in this build project.
  3900. //
  3901. // If this value is not specified, a build spec must be included along with
  3902. // the source code to be built.
  3903. Buildspec *string `locationName:"buildspec" type:"string"`
  3904. // Information about the git clone depth for the build project.
  3905. GitCloneDepth *int64 `locationName:"gitCloneDepth" type:"integer"`
  3906. // Enable this flag to ignore SSL warnings while connecting to the project source
  3907. // code.
  3908. InsecureSsl *bool `locationName:"insecureSsl" type:"boolean"`
  3909. // Information about the location of the source code to be built. Valid values
  3910. // include:
  3911. //
  3912. // * For source code settings that are specified in the source action of
  3913. // a pipeline in AWS CodePipeline, location should not be specified. If it
  3914. // is specified, AWS CodePipeline ignores it. This is because AWS CodePipeline
  3915. // uses the settings in a pipeline's source action instead of this value.
  3916. //
  3917. // * For source code in an AWS CodeCommit repository, the HTTPS clone URL
  3918. // to the repository that contains the source code and the build spec (for
  3919. // example, https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name).
  3920. //
  3921. // * For source code in an Amazon Simple Storage Service (Amazon S3) input
  3922. // bucket, one of the following.
  3923. //
  3924. // The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip).
  3925. //
  3926. //
  3927. // The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/).
  3928. //
  3929. //
  3930. // * For source code in a GitHub repository, the HTTPS clone URL to the repository
  3931. // that contains the source and the build spec. You must connect your AWS
  3932. // account to your GitHub account. Use the AWS CodeBuild console to start
  3933. // creating a build project. When you use the console to connect (or reconnect)
  3934. // with GitHub, on the GitHub Authorize application page, for Organization
  3935. // access, choose Request access next to each repository you want to allow
  3936. // AWS CodeBuild to have access to, and then choose Authorize application.
  3937. // (After you have connected to your GitHub account, you do not need to finish
  3938. // creating the build project. You can leave the AWS CodeBuild console.)
  3939. // To instruct AWS CodeBuild to use this connection, in the source object,
  3940. // set the auth object's type value to OAUTH.
  3941. //
  3942. // * For source code in a Bitbucket repository, the HTTPS clone URL to the
  3943. // repository that contains the source and the build spec. You must connect
  3944. // your AWS account to your Bitbucket account. Use the AWS CodeBuild console
  3945. // to start creating a build project. When you use the console to connect
  3946. // (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your
  3947. // account page, choose Grant access. (After you have connected to your Bitbucket
  3948. // account, you do not need to finish creating the build project. You can
  3949. // leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this
  3950. // connection, in the source object, set the auth object's type value to
  3951. // OAUTH.
  3952. Location *string `locationName:"location" type:"string"`
  3953. // Set to true to report the status of a build's start and finish to your source
  3954. // provider. This option is valid only when your source provider is GitHub,
  3955. // GitHub Enterprise, or Bitbucket. If this is set and you use a different source
  3956. // provider, an invalidInputException is thrown.
  3957. ReportBuildStatus *bool `locationName:"reportBuildStatus" type:"boolean"`
  3958. // An identifier for this project source.
  3959. SourceIdentifier *string `locationName:"sourceIdentifier" type:"string"`
  3960. // The type of repository that contains the source code to be built. Valid values
  3961. // include:
  3962. //
  3963. // * BITBUCKET: The source code is in a Bitbucket repository.
  3964. //
  3965. // * CODECOMMIT: The source code is in an AWS CodeCommit repository.
  3966. //
  3967. // * CODEPIPELINE: The source code settings are specified in the source action
  3968. // of a pipeline in AWS CodePipeline.
  3969. //
  3970. // * GITHUB: The source code is in a GitHub repository.
  3971. //
  3972. // * NO_SOURCE: The project does not have input source code.
  3973. //
  3974. // * S3: The source code is in an Amazon Simple Storage Service (Amazon S3)
  3975. // input bucket.
  3976. //
  3977. // Type is a required field
  3978. Type *string `locationName:"type" type:"string" required:"true" enum:"SourceType"`
  3979. }
  3980. // String returns the string representation
  3981. func (s ProjectSource) String() string {
  3982. return awsutil.Prettify(s)
  3983. }
  3984. // GoString returns the string representation
  3985. func (s ProjectSource) GoString() string {
  3986. return s.String()
  3987. }
  3988. // Validate inspects the fields of the type to determine if they are valid.
  3989. func (s *ProjectSource) Validate() error {
  3990. invalidParams := request.ErrInvalidParams{Context: "ProjectSource"}
  3991. if s.Type == nil {
  3992. invalidParams.Add(request.NewErrParamRequired("Type"))
  3993. }
  3994. if s.Auth != nil {
  3995. if err := s.Auth.Validate(); err != nil {
  3996. invalidParams.AddNested("Auth", err.(request.ErrInvalidParams))
  3997. }
  3998. }
  3999. if invalidParams.Len() > 0 {
  4000. return invalidParams
  4001. }
  4002. return nil
  4003. }
  4004. // SetAuth sets the Auth field's value.
  4005. func (s *ProjectSource) SetAuth(v *SourceAuth) *ProjectSource {
  4006. s.Auth = v
  4007. return s
  4008. }
  4009. // SetBuildspec sets the Buildspec field's value.
  4010. func (s *ProjectSource) SetBuildspec(v string) *ProjectSource {
  4011. s.Buildspec = &v
  4012. return s
  4013. }
  4014. // SetGitCloneDepth sets the GitCloneDepth field's value.
  4015. func (s *ProjectSource) SetGitCloneDepth(v int64) *ProjectSource {
  4016. s.GitCloneDepth = &v
  4017. return s
  4018. }
  4019. // SetInsecureSsl sets the InsecureSsl field's value.
  4020. func (s *ProjectSource) SetInsecureSsl(v bool) *ProjectSource {
  4021. s.InsecureSsl = &v
  4022. return s
  4023. }
  4024. // SetLocation sets the Location field's value.
  4025. func (s *ProjectSource) SetLocation(v string) *ProjectSource {
  4026. s.Location = &v
  4027. return s
  4028. }
  4029. // SetReportBuildStatus sets the ReportBuildStatus field's value.
  4030. func (s *ProjectSource) SetReportBuildStatus(v bool) *ProjectSource {
  4031. s.ReportBuildStatus = &v
  4032. return s
  4033. }
  4034. // SetSourceIdentifier sets the SourceIdentifier field's value.
  4035. func (s *ProjectSource) SetSourceIdentifier(v string) *ProjectSource {
  4036. s.SourceIdentifier = &v
  4037. return s
  4038. }
  4039. // SetType sets the Type field's value.
  4040. func (s *ProjectSource) SetType(v string) *ProjectSource {
  4041. s.Type = &v
  4042. return s
  4043. }
  4044. // A source identifier and its corresponding version.
  4045. type ProjectSourceVersion struct {
  4046. _ struct{} `type:"structure"`
  4047. // An identifier for a source in the build project.
  4048. //
  4049. // SourceIdentifier is a required field
  4050. SourceIdentifier *string `locationName:"sourceIdentifier" type:"string" required:"true"`
  4051. // The source version for the corresponding source identifier. If specified,
  4052. // must be one of:
  4053. //
  4054. // * For AWS CodeCommit: the commit ID to use.
  4055. //
  4056. // * For GitHub: the commit ID, pull request ID, branch name, or tag name
  4057. // that corresponds to the version of the source code you want to build.
  4058. // If a pull request ID is specified, it must use the format pr/pull-request-ID
  4059. // (for example, pr/25). If a branch name is specified, the branch's HEAD
  4060. // commit ID is used. If not specified, the default branch's HEAD commit
  4061. // ID is used.
  4062. //
  4063. // * For Bitbucket: the commit ID, branch name, or tag name that corresponds
  4064. // to the version of the source code you want to build. If a branch name
  4065. // is specified, the branch's HEAD commit ID is used. If not specified, the
  4066. // default branch's HEAD commit ID is used.
  4067. //
  4068. // * For Amazon Simple Storage Service (Amazon S3): the version ID of the
  4069. // object that represents the build input ZIP file to use.
  4070. //
  4071. // SourceVersion is a required field
  4072. SourceVersion *string `locationName:"sourceVersion" type:"string" required:"true"`
  4073. }
  4074. // String returns the string representation
  4075. func (s ProjectSourceVersion) String() string {
  4076. return awsutil.Prettify(s)
  4077. }
  4078. // GoString returns the string representation
  4079. func (s ProjectSourceVersion) GoString() string {
  4080. return s.String()
  4081. }
  4082. // Validate inspects the fields of the type to determine if they are valid.
  4083. func (s *ProjectSourceVersion) Validate() error {
  4084. invalidParams := request.ErrInvalidParams{Context: "ProjectSourceVersion"}
  4085. if s.SourceIdentifier == nil {
  4086. invalidParams.Add(request.NewErrParamRequired("SourceIdentifier"))
  4087. }
  4088. if s.SourceVersion == nil {
  4089. invalidParams.Add(request.NewErrParamRequired("SourceVersion"))
  4090. }
  4091. if invalidParams.Len() > 0 {
  4092. return invalidParams
  4093. }
  4094. return nil
  4095. }
  4096. // SetSourceIdentifier sets the SourceIdentifier field's value.
  4097. func (s *ProjectSourceVersion) SetSourceIdentifier(v string) *ProjectSourceVersion {
  4098. s.SourceIdentifier = &v
  4099. return s
  4100. }
  4101. // SetSourceVersion sets the SourceVersion field's value.
  4102. func (s *ProjectSourceVersion) SetSourceVersion(v string) *ProjectSourceVersion {
  4103. s.SourceVersion = &v
  4104. return s
  4105. }
  4106. // Information about S3 logs for a build project.
  4107. type S3LogsConfig struct {
  4108. _ struct{} `type:"structure"`
  4109. // The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3
  4110. // bucket name is my-bucket, and your path prefix is build-log, then acceptable
  4111. // formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log.
  4112. Location *string `locationName:"location" type:"string"`
  4113. // The current status of the S3 build logs. Valid values are:
  4114. //
  4115. // * ENABLED: S3 build logs are enabled for this build project.
  4116. //
  4117. // * DISABLED: S3 build logs are not enabled for this build project.
  4118. //
  4119. // Status is a required field
  4120. Status *string `locationName:"status" type:"string" required:"true" enum:"LogsConfigStatusType"`
  4121. }
  4122. // String returns the string representation
  4123. func (s S3LogsConfig) String() string {
  4124. return awsutil.Prettify(s)
  4125. }
  4126. // GoString returns the string representation
  4127. func (s S3LogsConfig) GoString() string {
  4128. return s.String()
  4129. }
  4130. // Validate inspects the fields of the type to determine if they are valid.
  4131. func (s *S3LogsConfig) Validate() error {
  4132. invalidParams := request.ErrInvalidParams{Context: "S3LogsConfig"}
  4133. if s.Status == nil {
  4134. invalidParams.Add(request.NewErrParamRequired("Status"))
  4135. }
  4136. if invalidParams.Len() > 0 {
  4137. return invalidParams
  4138. }
  4139. return nil
  4140. }
  4141. // SetLocation sets the Location field's value.
  4142. func (s *S3LogsConfig) SetLocation(v string) *S3LogsConfig {
  4143. s.Location = &v
  4144. return s
  4145. }
  4146. // SetStatus sets the Status field's value.
  4147. func (s *S3LogsConfig) SetStatus(v string) *S3LogsConfig {
  4148. s.Status = &v
  4149. return s
  4150. }
  4151. // Information about the authorization settings for AWS CodeBuild to access
  4152. // the source code to be built.
  4153. //
  4154. // This information is for the AWS CodeBuild console's use only. Your code should
  4155. // not get or set this information directly.
  4156. type SourceAuth struct {
  4157. _ struct{} `type:"structure"`
  4158. // The resource value that applies to the specified authorization type.
  4159. Resource *string `locationName:"resource" type:"string"`
  4160. // This data type is deprecated and is no longer accurate or used.
  4161. //
  4162. // The authorization type to use. The only valid value is OAUTH, which represents
  4163. // the OAuth authorization type.
  4164. //
  4165. // Type is a required field
  4166. Type *string `locationName:"type" type:"string" required:"true" enum:"SourceAuthType"`
  4167. }
  4168. // String returns the string representation
  4169. func (s SourceAuth) String() string {
  4170. return awsutil.Prettify(s)
  4171. }
  4172. // GoString returns the string representation
  4173. func (s SourceAuth) GoString() string {
  4174. return s.String()
  4175. }
  4176. // Validate inspects the fields of the type to determine if they are valid.
  4177. func (s *SourceAuth) Validate() error {
  4178. invalidParams := request.ErrInvalidParams{Context: "SourceAuth"}
  4179. if s.Type == nil {
  4180. invalidParams.Add(request.NewErrParamRequired("Type"))
  4181. }
  4182. if invalidParams.Len() > 0 {
  4183. return invalidParams
  4184. }
  4185. return nil
  4186. }
  4187. // SetResource sets the Resource field's value.
  4188. func (s *SourceAuth) SetResource(v string) *SourceAuth {
  4189. s.Resource = &v
  4190. return s
  4191. }
  4192. // SetType sets the Type field's value.
  4193. func (s *SourceAuth) SetType(v string) *SourceAuth {
  4194. s.Type = &v
  4195. return s
  4196. }
  4197. // Information about the credentials for a GitHub, GitHub Enterprise, or Bitbucket
  4198. // repository.
  4199. type SourceCredentialsInfo struct {
  4200. _ struct{} `type:"structure"`
  4201. // The Amazon Resource Name (ARN) of the token.
  4202. Arn *string `locationName:"arn" min:"1" type:"string"`
  4203. // The type of authentication used by the credentials. Valid options are OAUTH,
  4204. // BASIC_AUTH, or PERSONAL_ACCESS_TOKEN.
  4205. AuthType *string `locationName:"authType" type:"string" enum:"AuthType"`
  4206. // The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE,
  4207. // or BITBUCKET.
  4208. ServerType *string `locationName:"serverType" type:"string" enum:"ServerType"`
  4209. }
  4210. // String returns the string representation
  4211. func (s SourceCredentialsInfo) String() string {
  4212. return awsutil.Prettify(s)
  4213. }
  4214. // GoString returns the string representation
  4215. func (s SourceCredentialsInfo) GoString() string {
  4216. return s.String()
  4217. }
  4218. // SetArn sets the Arn field's value.
  4219. func (s *SourceCredentialsInfo) SetArn(v string) *SourceCredentialsInfo {
  4220. s.Arn = &v
  4221. return s
  4222. }
  4223. // SetAuthType sets the AuthType field's value.
  4224. func (s *SourceCredentialsInfo) SetAuthType(v string) *SourceCredentialsInfo {
  4225. s.AuthType = &v
  4226. return s
  4227. }
  4228. // SetServerType sets the ServerType field's value.
  4229. func (s *SourceCredentialsInfo) SetServerType(v string) *SourceCredentialsInfo {
  4230. s.ServerType = &v
  4231. return s
  4232. }
  4233. type StartBuildInput struct {
  4234. _ struct{} `type:"structure"`
  4235. // Build output artifact settings that override, for this build only, the latest
  4236. // ones already defined in the build project.
  4237. ArtifactsOverride *ProjectArtifacts `locationName:"artifactsOverride" type:"structure"`
  4238. // A build spec declaration that overrides, for this build only, the latest
  4239. // one already defined in the build project.
  4240. BuildspecOverride *string `locationName:"buildspecOverride" type:"string"`
  4241. // A ProjectCache object specified for this build that overrides the one defined
  4242. // in the build project.
  4243. CacheOverride *ProjectCache `locationName:"cacheOverride" type:"structure"`
  4244. // The name of a certificate for this build that overrides the one specified
  4245. // in the build project.
  4246. CertificateOverride *string `locationName:"certificateOverride" type:"string"`
  4247. // The name of a compute type for this build that overrides the one specified
  4248. // in the build project.
  4249. ComputeTypeOverride *string `locationName:"computeTypeOverride" type:"string" enum:"ComputeType"`
  4250. // A container type for this build that overrides the one specified in the build
  4251. // project.
  4252. EnvironmentTypeOverride *string `locationName:"environmentTypeOverride" type:"string" enum:"EnvironmentType"`
  4253. // A set of environment variables that overrides, for this build only, the latest
  4254. // ones already defined in the build project.
  4255. EnvironmentVariablesOverride []*EnvironmentVariable `locationName:"environmentVariablesOverride" type:"list"`
  4256. // The user-defined depth of history, with a minimum value of 0, that overrides,
  4257. // for this build only, any previous depth of history defined in the build project.
  4258. GitCloneDepthOverride *int64 `locationName:"gitCloneDepthOverride" type:"integer"`
  4259. // A unique, case sensitive identifier you provide to ensure the idempotency
  4260. // of the StartBuild request. The token is included in the StartBuild request
  4261. // and is valid for 12 hours. If you repeat the StartBuild request with the
  4262. // same token, but change a parameter, AWS CodeBuild returns a parameter mismatch
  4263. // error.
  4264. IdempotencyToken *string `locationName:"idempotencyToken" type:"string"`
  4265. // The name of an image for this build that overrides the one specified in the
  4266. // build project.
  4267. ImageOverride *string `locationName:"imageOverride" min:"1" type:"string"`
  4268. // Enable this flag to override the insecure SSL setting that is specified in
  4269. // the build project. The insecure SSL setting determines whether to ignore
  4270. // SSL warnings while connecting to the project source code. This override applies
  4271. // only if the build's source is GitHub Enterprise.
  4272. InsecureSslOverride *bool `locationName:"insecureSslOverride" type:"boolean"`
  4273. // Log settings for this build that override the log settings defined in the
  4274. // build project.
  4275. LogsConfigOverride *LogsConfig `locationName:"logsConfigOverride" type:"structure"`
  4276. // Enable this flag to override privileged mode in the build project.
  4277. PrivilegedModeOverride *bool `locationName:"privilegedModeOverride" type:"boolean"`
  4278. // The name of the AWS CodeBuild build project to start running a build.
  4279. //
  4280. // ProjectName is a required field
  4281. ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"`
  4282. // The number of minutes a build is allowed to be queued before it times out.
  4283. QueuedTimeoutInMinutesOverride *int64 `locationName:"queuedTimeoutInMinutesOverride" min:"5" type:"integer"`
  4284. // Set to true to report to your source provider the status of a build's start
  4285. // and completion. If you use this option with a source provider other than
  4286. // GitHub, GitHub Enterprise, or Bitbucket, an invalidInputException is thrown.
  4287. ReportBuildStatusOverride *bool `locationName:"reportBuildStatusOverride" type:"boolean"`
  4288. // An array of ProjectArtifacts objects.
  4289. SecondaryArtifactsOverride []*ProjectArtifacts `locationName:"secondaryArtifactsOverride" type:"list"`
  4290. // An array of ProjectSource objects.
  4291. SecondarySourcesOverride []*ProjectSource `locationName:"secondarySourcesOverride" type:"list"`
  4292. // An array of ProjectSourceVersion objects that specify one or more versions
  4293. // of the project's secondary sources to be used for this build only.
  4294. SecondarySourcesVersionOverride []*ProjectSourceVersion `locationName:"secondarySourcesVersionOverride" type:"list"`
  4295. // The name of a service role for this build that overrides the one specified
  4296. // in the build project.
  4297. ServiceRoleOverride *string `locationName:"serviceRoleOverride" min:"1" type:"string"`
  4298. // An authorization type for this build that overrides the one defined in the
  4299. // build project. This override applies only if the build project's source is
  4300. // BitBucket or GitHub.
  4301. SourceAuthOverride *SourceAuth `locationName:"sourceAuthOverride" type:"structure"`
  4302. // A location that overrides, for this build, the source location for the one
  4303. // defined in the build project.
  4304. SourceLocationOverride *string `locationName:"sourceLocationOverride" type:"string"`
  4305. // A source input type, for this build, that overrides the source input defined
  4306. // in the build project.
  4307. SourceTypeOverride *string `locationName:"sourceTypeOverride" type:"string" enum:"SourceType"`
  4308. // A version of the build input to be built, for this build only. If not specified,
  4309. // the latest version is used. If specified, must be one of:
  4310. //
  4311. // * For AWS CodeCommit: the commit ID to use.
  4312. //
  4313. // * For GitHub: the commit ID, pull request ID, branch name, or tag name
  4314. // that corresponds to the version of the source code you want to build.
  4315. // If a pull request ID is specified, it must use the format pr/pull-request-ID
  4316. // (for example pr/25). If a branch name is specified, the branch's HEAD
  4317. // commit ID is used. If not specified, the default branch's HEAD commit
  4318. // ID is used.
  4319. //
  4320. // * For Bitbucket: the commit ID, branch name, or tag name that corresponds
  4321. // to the version of the source code you want to build. If a branch name
  4322. // is specified, the branch's HEAD commit ID is used. If not specified, the
  4323. // default branch's HEAD commit ID is used.
  4324. //
  4325. // * For Amazon Simple Storage Service (Amazon S3): the version ID of the
  4326. // object that represents the build input ZIP file to use.
  4327. SourceVersion *string `locationName:"sourceVersion" type:"string"`
  4328. // The number of build timeout minutes, from 5 to 480 (8 hours), that overrides,
  4329. // for this build only, the latest setting already defined in the build project.
  4330. TimeoutInMinutesOverride *int64 `locationName:"timeoutInMinutesOverride" min:"5" type:"integer"`
  4331. }
  4332. // String returns the string representation
  4333. func (s StartBuildInput) String() string {
  4334. return awsutil.Prettify(s)
  4335. }
  4336. // GoString returns the string representation
  4337. func (s StartBuildInput) GoString() string {
  4338. return s.String()
  4339. }
  4340. // Validate inspects the fields of the type to determine if they are valid.
  4341. func (s *StartBuildInput) Validate() error {
  4342. invalidParams := request.ErrInvalidParams{Context: "StartBuildInput"}
  4343. if s.ImageOverride != nil && len(*s.ImageOverride) < 1 {
  4344. invalidParams.Add(request.NewErrParamMinLen("ImageOverride", 1))
  4345. }
  4346. if s.ProjectName == nil {
  4347. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  4348. }
  4349. if s.ProjectName != nil && len(*s.ProjectName) < 1 {
  4350. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1))
  4351. }
  4352. if s.QueuedTimeoutInMinutesOverride != nil && *s.QueuedTimeoutInMinutesOverride < 5 {
  4353. invalidParams.Add(request.NewErrParamMinValue("QueuedTimeoutInMinutesOverride", 5))
  4354. }
  4355. if s.ServiceRoleOverride != nil && len(*s.ServiceRoleOverride) < 1 {
  4356. invalidParams.Add(request.NewErrParamMinLen("ServiceRoleOverride", 1))
  4357. }
  4358. if s.TimeoutInMinutesOverride != nil && *s.TimeoutInMinutesOverride < 5 {
  4359. invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutesOverride", 5))
  4360. }
  4361. if s.ArtifactsOverride != nil {
  4362. if err := s.ArtifactsOverride.Validate(); err != nil {
  4363. invalidParams.AddNested("ArtifactsOverride", err.(request.ErrInvalidParams))
  4364. }
  4365. }
  4366. if s.CacheOverride != nil {
  4367. if err := s.CacheOverride.Validate(); err != nil {
  4368. invalidParams.AddNested("CacheOverride", err.(request.ErrInvalidParams))
  4369. }
  4370. }
  4371. if s.EnvironmentVariablesOverride != nil {
  4372. for i, v := range s.EnvironmentVariablesOverride {
  4373. if v == nil {
  4374. continue
  4375. }
  4376. if err := v.Validate(); err != nil {
  4377. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EnvironmentVariablesOverride", i), err.(request.ErrInvalidParams))
  4378. }
  4379. }
  4380. }
  4381. if s.LogsConfigOverride != nil {
  4382. if err := s.LogsConfigOverride.Validate(); err != nil {
  4383. invalidParams.AddNested("LogsConfigOverride", err.(request.ErrInvalidParams))
  4384. }
  4385. }
  4386. if s.SecondaryArtifactsOverride != nil {
  4387. for i, v := range s.SecondaryArtifactsOverride {
  4388. if v == nil {
  4389. continue
  4390. }
  4391. if err := v.Validate(); err != nil {
  4392. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondaryArtifactsOverride", i), err.(request.ErrInvalidParams))
  4393. }
  4394. }
  4395. }
  4396. if s.SecondarySourcesOverride != nil {
  4397. for i, v := range s.SecondarySourcesOverride {
  4398. if v == nil {
  4399. continue
  4400. }
  4401. if err := v.Validate(); err != nil {
  4402. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySourcesOverride", i), err.(request.ErrInvalidParams))
  4403. }
  4404. }
  4405. }
  4406. if s.SecondarySourcesVersionOverride != nil {
  4407. for i, v := range s.SecondarySourcesVersionOverride {
  4408. if v == nil {
  4409. continue
  4410. }
  4411. if err := v.Validate(); err != nil {
  4412. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySourcesVersionOverride", i), err.(request.ErrInvalidParams))
  4413. }
  4414. }
  4415. }
  4416. if s.SourceAuthOverride != nil {
  4417. if err := s.SourceAuthOverride.Validate(); err != nil {
  4418. invalidParams.AddNested("SourceAuthOverride", err.(request.ErrInvalidParams))
  4419. }
  4420. }
  4421. if invalidParams.Len() > 0 {
  4422. return invalidParams
  4423. }
  4424. return nil
  4425. }
  4426. // SetArtifactsOverride sets the ArtifactsOverride field's value.
  4427. func (s *StartBuildInput) SetArtifactsOverride(v *ProjectArtifacts) *StartBuildInput {
  4428. s.ArtifactsOverride = v
  4429. return s
  4430. }
  4431. // SetBuildspecOverride sets the BuildspecOverride field's value.
  4432. func (s *StartBuildInput) SetBuildspecOverride(v string) *StartBuildInput {
  4433. s.BuildspecOverride = &v
  4434. return s
  4435. }
  4436. // SetCacheOverride sets the CacheOverride field's value.
  4437. func (s *StartBuildInput) SetCacheOverride(v *ProjectCache) *StartBuildInput {
  4438. s.CacheOverride = v
  4439. return s
  4440. }
  4441. // SetCertificateOverride sets the CertificateOverride field's value.
  4442. func (s *StartBuildInput) SetCertificateOverride(v string) *StartBuildInput {
  4443. s.CertificateOverride = &v
  4444. return s
  4445. }
  4446. // SetComputeTypeOverride sets the ComputeTypeOverride field's value.
  4447. func (s *StartBuildInput) SetComputeTypeOverride(v string) *StartBuildInput {
  4448. s.ComputeTypeOverride = &v
  4449. return s
  4450. }
  4451. // SetEnvironmentTypeOverride sets the EnvironmentTypeOverride field's value.
  4452. func (s *StartBuildInput) SetEnvironmentTypeOverride(v string) *StartBuildInput {
  4453. s.EnvironmentTypeOverride = &v
  4454. return s
  4455. }
  4456. // SetEnvironmentVariablesOverride sets the EnvironmentVariablesOverride field's value.
  4457. func (s *StartBuildInput) SetEnvironmentVariablesOverride(v []*EnvironmentVariable) *StartBuildInput {
  4458. s.EnvironmentVariablesOverride = v
  4459. return s
  4460. }
  4461. // SetGitCloneDepthOverride sets the GitCloneDepthOverride field's value.
  4462. func (s *StartBuildInput) SetGitCloneDepthOverride(v int64) *StartBuildInput {
  4463. s.GitCloneDepthOverride = &v
  4464. return s
  4465. }
  4466. // SetIdempotencyToken sets the IdempotencyToken field's value.
  4467. func (s *StartBuildInput) SetIdempotencyToken(v string) *StartBuildInput {
  4468. s.IdempotencyToken = &v
  4469. return s
  4470. }
  4471. // SetImageOverride sets the ImageOverride field's value.
  4472. func (s *StartBuildInput) SetImageOverride(v string) *StartBuildInput {
  4473. s.ImageOverride = &v
  4474. return s
  4475. }
  4476. // SetInsecureSslOverride sets the InsecureSslOverride field's value.
  4477. func (s *StartBuildInput) SetInsecureSslOverride(v bool) *StartBuildInput {
  4478. s.InsecureSslOverride = &v
  4479. return s
  4480. }
  4481. // SetLogsConfigOverride sets the LogsConfigOverride field's value.
  4482. func (s *StartBuildInput) SetLogsConfigOverride(v *LogsConfig) *StartBuildInput {
  4483. s.LogsConfigOverride = v
  4484. return s
  4485. }
  4486. // SetPrivilegedModeOverride sets the PrivilegedModeOverride field's value.
  4487. func (s *StartBuildInput) SetPrivilegedModeOverride(v bool) *StartBuildInput {
  4488. s.PrivilegedModeOverride = &v
  4489. return s
  4490. }
  4491. // SetProjectName sets the ProjectName field's value.
  4492. func (s *StartBuildInput) SetProjectName(v string) *StartBuildInput {
  4493. s.ProjectName = &v
  4494. return s
  4495. }
  4496. // SetQueuedTimeoutInMinutesOverride sets the QueuedTimeoutInMinutesOverride field's value.
  4497. func (s *StartBuildInput) SetQueuedTimeoutInMinutesOverride(v int64) *StartBuildInput {
  4498. s.QueuedTimeoutInMinutesOverride = &v
  4499. return s
  4500. }
  4501. // SetReportBuildStatusOverride sets the ReportBuildStatusOverride field's value.
  4502. func (s *StartBuildInput) SetReportBuildStatusOverride(v bool) *StartBuildInput {
  4503. s.ReportBuildStatusOverride = &v
  4504. return s
  4505. }
  4506. // SetSecondaryArtifactsOverride sets the SecondaryArtifactsOverride field's value.
  4507. func (s *StartBuildInput) SetSecondaryArtifactsOverride(v []*ProjectArtifacts) *StartBuildInput {
  4508. s.SecondaryArtifactsOverride = v
  4509. return s
  4510. }
  4511. // SetSecondarySourcesOverride sets the SecondarySourcesOverride field's value.
  4512. func (s *StartBuildInput) SetSecondarySourcesOverride(v []*ProjectSource) *StartBuildInput {
  4513. s.SecondarySourcesOverride = v
  4514. return s
  4515. }
  4516. // SetSecondarySourcesVersionOverride sets the SecondarySourcesVersionOverride field's value.
  4517. func (s *StartBuildInput) SetSecondarySourcesVersionOverride(v []*ProjectSourceVersion) *StartBuildInput {
  4518. s.SecondarySourcesVersionOverride = v
  4519. return s
  4520. }
  4521. // SetServiceRoleOverride sets the ServiceRoleOverride field's value.
  4522. func (s *StartBuildInput) SetServiceRoleOverride(v string) *StartBuildInput {
  4523. s.ServiceRoleOverride = &v
  4524. return s
  4525. }
  4526. // SetSourceAuthOverride sets the SourceAuthOverride field's value.
  4527. func (s *StartBuildInput) SetSourceAuthOverride(v *SourceAuth) *StartBuildInput {
  4528. s.SourceAuthOverride = v
  4529. return s
  4530. }
  4531. // SetSourceLocationOverride sets the SourceLocationOverride field's value.
  4532. func (s *StartBuildInput) SetSourceLocationOverride(v string) *StartBuildInput {
  4533. s.SourceLocationOverride = &v
  4534. return s
  4535. }
  4536. // SetSourceTypeOverride sets the SourceTypeOverride field's value.
  4537. func (s *StartBuildInput) SetSourceTypeOverride(v string) *StartBuildInput {
  4538. s.SourceTypeOverride = &v
  4539. return s
  4540. }
  4541. // SetSourceVersion sets the SourceVersion field's value.
  4542. func (s *StartBuildInput) SetSourceVersion(v string) *StartBuildInput {
  4543. s.SourceVersion = &v
  4544. return s
  4545. }
  4546. // SetTimeoutInMinutesOverride sets the TimeoutInMinutesOverride field's value.
  4547. func (s *StartBuildInput) SetTimeoutInMinutesOverride(v int64) *StartBuildInput {
  4548. s.TimeoutInMinutesOverride = &v
  4549. return s
  4550. }
  4551. type StartBuildOutput struct {
  4552. _ struct{} `type:"structure"`
  4553. // Information about the build to be run.
  4554. Build *Build `locationName:"build" type:"structure"`
  4555. }
  4556. // String returns the string representation
  4557. func (s StartBuildOutput) String() string {
  4558. return awsutil.Prettify(s)
  4559. }
  4560. // GoString returns the string representation
  4561. func (s StartBuildOutput) GoString() string {
  4562. return s.String()
  4563. }
  4564. // SetBuild sets the Build field's value.
  4565. func (s *StartBuildOutput) SetBuild(v *Build) *StartBuildOutput {
  4566. s.Build = v
  4567. return s
  4568. }
  4569. type StopBuildInput struct {
  4570. _ struct{} `type:"structure"`
  4571. // The ID of the build.
  4572. //
  4573. // Id is a required field
  4574. Id *string `locationName:"id" min:"1" type:"string" required:"true"`
  4575. }
  4576. // String returns the string representation
  4577. func (s StopBuildInput) String() string {
  4578. return awsutil.Prettify(s)
  4579. }
  4580. // GoString returns the string representation
  4581. func (s StopBuildInput) GoString() string {
  4582. return s.String()
  4583. }
  4584. // Validate inspects the fields of the type to determine if they are valid.
  4585. func (s *StopBuildInput) Validate() error {
  4586. invalidParams := request.ErrInvalidParams{Context: "StopBuildInput"}
  4587. if s.Id == nil {
  4588. invalidParams.Add(request.NewErrParamRequired("Id"))
  4589. }
  4590. if s.Id != nil && len(*s.Id) < 1 {
  4591. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  4592. }
  4593. if invalidParams.Len() > 0 {
  4594. return invalidParams
  4595. }
  4596. return nil
  4597. }
  4598. // SetId sets the Id field's value.
  4599. func (s *StopBuildInput) SetId(v string) *StopBuildInput {
  4600. s.Id = &v
  4601. return s
  4602. }
  4603. type StopBuildOutput struct {
  4604. _ struct{} `type:"structure"`
  4605. // Information about the build.
  4606. Build *Build `locationName:"build" type:"structure"`
  4607. }
  4608. // String returns the string representation
  4609. func (s StopBuildOutput) String() string {
  4610. return awsutil.Prettify(s)
  4611. }
  4612. // GoString returns the string representation
  4613. func (s StopBuildOutput) GoString() string {
  4614. return s.String()
  4615. }
  4616. // SetBuild sets the Build field's value.
  4617. func (s *StopBuildOutput) SetBuild(v *Build) *StopBuildOutput {
  4618. s.Build = v
  4619. return s
  4620. }
  4621. // A tag, consisting of a key and a value.
  4622. //
  4623. // This tag is available for use by AWS services that support tags in AWS CodeBuild.
  4624. type Tag struct {
  4625. _ struct{} `type:"structure"`
  4626. // The tag's key.
  4627. Key *string `locationName:"key" min:"1" type:"string"`
  4628. // The tag's value.
  4629. Value *string `locationName:"value" min:"1" type:"string"`
  4630. }
  4631. // String returns the string representation
  4632. func (s Tag) String() string {
  4633. return awsutil.Prettify(s)
  4634. }
  4635. // GoString returns the string representation
  4636. func (s Tag) GoString() string {
  4637. return s.String()
  4638. }
  4639. // Validate inspects the fields of the type to determine if they are valid.
  4640. func (s *Tag) Validate() error {
  4641. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  4642. if s.Key != nil && len(*s.Key) < 1 {
  4643. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  4644. }
  4645. if s.Value != nil && len(*s.Value) < 1 {
  4646. invalidParams.Add(request.NewErrParamMinLen("Value", 1))
  4647. }
  4648. if invalidParams.Len() > 0 {
  4649. return invalidParams
  4650. }
  4651. return nil
  4652. }
  4653. // SetKey sets the Key field's value.
  4654. func (s *Tag) SetKey(v string) *Tag {
  4655. s.Key = &v
  4656. return s
  4657. }
  4658. // SetValue sets the Value field's value.
  4659. func (s *Tag) SetValue(v string) *Tag {
  4660. s.Value = &v
  4661. return s
  4662. }
  4663. type UpdateProjectInput struct {
  4664. _ struct{} `type:"structure"`
  4665. // Information to be changed about the build output artifacts for the build
  4666. // project.
  4667. Artifacts *ProjectArtifacts `locationName:"artifacts" type:"structure"`
  4668. // Set this to true to generate a publicly accessible URL for your project's
  4669. // build badge.
  4670. BadgeEnabled *bool `locationName:"badgeEnabled" type:"boolean"`
  4671. // Stores recently used information so that it can be quickly accessed at a
  4672. // later time.
  4673. Cache *ProjectCache `locationName:"cache" type:"structure"`
  4674. // A new or replacement description of the build project.
  4675. Description *string `locationName:"description" type:"string"`
  4676. // The replacement AWS Key Management Service (AWS KMS) customer master key
  4677. // (CMK) to be used for encrypting the build output artifacts.
  4678. //
  4679. // You can specify either the Amazon Resource Name (ARN)of the CMK or, if available,
  4680. // the CMK's alias (using the format alias/alias-name).
  4681. EncryptionKey *string `locationName:"encryptionKey" min:"1" type:"string"`
  4682. // Information to be changed about the build environment for the build project.
  4683. Environment *ProjectEnvironment `locationName:"environment" type:"structure"`
  4684. // Information about logs for the build project. A project can create logs in
  4685. // Amazon CloudWatch Logs, logs in an S3 bucket, or both.
  4686. LogsConfig *LogsConfig `locationName:"logsConfig" type:"structure"`
  4687. // The name of the build project.
  4688. //
  4689. // You cannot change a build project's name.
  4690. //
  4691. // Name is a required field
  4692. Name *string `locationName:"name" min:"1" type:"string" required:"true"`
  4693. // The number of minutes a build is allowed to be queued before it times out.
  4694. QueuedTimeoutInMinutes *int64 `locationName:"queuedTimeoutInMinutes" min:"5" type:"integer"`
  4695. // An array of ProjectSource objects.
  4696. SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"`
  4697. // An array of ProjectSource objects.
  4698. SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"`
  4699. // The replacement ARN of the AWS Identity and Access Management (IAM) role
  4700. // that enables AWS CodeBuild to interact with dependent AWS services on behalf
  4701. // of the AWS account.
  4702. ServiceRole *string `locationName:"serviceRole" min:"1" type:"string"`
  4703. // Information to be changed about the build input source code for the build
  4704. // project.
  4705. Source *ProjectSource `locationName:"source" type:"structure"`
  4706. // The replacement set of tags for this build project.
  4707. //
  4708. // These tags are available for use by AWS services that support AWS CodeBuild
  4709. // build project tags.
  4710. Tags []*Tag `locationName:"tags" type:"list"`
  4711. // The replacement value in minutes, from 5 to 480 (8 hours), for AWS CodeBuild
  4712. // to wait before timing out any related build that did not get marked as completed.
  4713. TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"5" type:"integer"`
  4714. // VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC.
  4715. VpcConfig *VpcConfig `locationName:"vpcConfig" type:"structure"`
  4716. }
  4717. // String returns the string representation
  4718. func (s UpdateProjectInput) String() string {
  4719. return awsutil.Prettify(s)
  4720. }
  4721. // GoString returns the string representation
  4722. func (s UpdateProjectInput) GoString() string {
  4723. return s.String()
  4724. }
  4725. // Validate inspects the fields of the type to determine if they are valid.
  4726. func (s *UpdateProjectInput) Validate() error {
  4727. invalidParams := request.ErrInvalidParams{Context: "UpdateProjectInput"}
  4728. if s.EncryptionKey != nil && len(*s.EncryptionKey) < 1 {
  4729. invalidParams.Add(request.NewErrParamMinLen("EncryptionKey", 1))
  4730. }
  4731. if s.Name == nil {
  4732. invalidParams.Add(request.NewErrParamRequired("Name"))
  4733. }
  4734. if s.Name != nil && len(*s.Name) < 1 {
  4735. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4736. }
  4737. if s.QueuedTimeoutInMinutes != nil && *s.QueuedTimeoutInMinutes < 5 {
  4738. invalidParams.Add(request.NewErrParamMinValue("QueuedTimeoutInMinutes", 5))
  4739. }
  4740. if s.ServiceRole != nil && len(*s.ServiceRole) < 1 {
  4741. invalidParams.Add(request.NewErrParamMinLen("ServiceRole", 1))
  4742. }
  4743. if s.TimeoutInMinutes != nil && *s.TimeoutInMinutes < 5 {
  4744. invalidParams.Add(request.NewErrParamMinValue("TimeoutInMinutes", 5))
  4745. }
  4746. if s.Artifacts != nil {
  4747. if err := s.Artifacts.Validate(); err != nil {
  4748. invalidParams.AddNested("Artifacts", err.(request.ErrInvalidParams))
  4749. }
  4750. }
  4751. if s.Cache != nil {
  4752. if err := s.Cache.Validate(); err != nil {
  4753. invalidParams.AddNested("Cache", err.(request.ErrInvalidParams))
  4754. }
  4755. }
  4756. if s.Environment != nil {
  4757. if err := s.Environment.Validate(); err != nil {
  4758. invalidParams.AddNested("Environment", err.(request.ErrInvalidParams))
  4759. }
  4760. }
  4761. if s.LogsConfig != nil {
  4762. if err := s.LogsConfig.Validate(); err != nil {
  4763. invalidParams.AddNested("LogsConfig", err.(request.ErrInvalidParams))
  4764. }
  4765. }
  4766. if s.SecondaryArtifacts != nil {
  4767. for i, v := range s.SecondaryArtifacts {
  4768. if v == nil {
  4769. continue
  4770. }
  4771. if err := v.Validate(); err != nil {
  4772. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondaryArtifacts", i), err.(request.ErrInvalidParams))
  4773. }
  4774. }
  4775. }
  4776. if s.SecondarySources != nil {
  4777. for i, v := range s.SecondarySources {
  4778. if v == nil {
  4779. continue
  4780. }
  4781. if err := v.Validate(); err != nil {
  4782. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySources", i), err.(request.ErrInvalidParams))
  4783. }
  4784. }
  4785. }
  4786. if s.Source != nil {
  4787. if err := s.Source.Validate(); err != nil {
  4788. invalidParams.AddNested("Source", err.(request.ErrInvalidParams))
  4789. }
  4790. }
  4791. if s.Tags != nil {
  4792. for i, v := range s.Tags {
  4793. if v == nil {
  4794. continue
  4795. }
  4796. if err := v.Validate(); err != nil {
  4797. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  4798. }
  4799. }
  4800. }
  4801. if s.VpcConfig != nil {
  4802. if err := s.VpcConfig.Validate(); err != nil {
  4803. invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams))
  4804. }
  4805. }
  4806. if invalidParams.Len() > 0 {
  4807. return invalidParams
  4808. }
  4809. return nil
  4810. }
  4811. // SetArtifacts sets the Artifacts field's value.
  4812. func (s *UpdateProjectInput) SetArtifacts(v *ProjectArtifacts) *UpdateProjectInput {
  4813. s.Artifacts = v
  4814. return s
  4815. }
  4816. // SetBadgeEnabled sets the BadgeEnabled field's value.
  4817. func (s *UpdateProjectInput) SetBadgeEnabled(v bool) *UpdateProjectInput {
  4818. s.BadgeEnabled = &v
  4819. return s
  4820. }
  4821. // SetCache sets the Cache field's value.
  4822. func (s *UpdateProjectInput) SetCache(v *ProjectCache) *UpdateProjectInput {
  4823. s.Cache = v
  4824. return s
  4825. }
  4826. // SetDescription sets the Description field's value.
  4827. func (s *UpdateProjectInput) SetDescription(v string) *UpdateProjectInput {
  4828. s.Description = &v
  4829. return s
  4830. }
  4831. // SetEncryptionKey sets the EncryptionKey field's value.
  4832. func (s *UpdateProjectInput) SetEncryptionKey(v string) *UpdateProjectInput {
  4833. s.EncryptionKey = &v
  4834. return s
  4835. }
  4836. // SetEnvironment sets the Environment field's value.
  4837. func (s *UpdateProjectInput) SetEnvironment(v *ProjectEnvironment) *UpdateProjectInput {
  4838. s.Environment = v
  4839. return s
  4840. }
  4841. // SetLogsConfig sets the LogsConfig field's value.
  4842. func (s *UpdateProjectInput) SetLogsConfig(v *LogsConfig) *UpdateProjectInput {
  4843. s.LogsConfig = v
  4844. return s
  4845. }
  4846. // SetName sets the Name field's value.
  4847. func (s *UpdateProjectInput) SetName(v string) *UpdateProjectInput {
  4848. s.Name = &v
  4849. return s
  4850. }
  4851. // SetQueuedTimeoutInMinutes sets the QueuedTimeoutInMinutes field's value.
  4852. func (s *UpdateProjectInput) SetQueuedTimeoutInMinutes(v int64) *UpdateProjectInput {
  4853. s.QueuedTimeoutInMinutes = &v
  4854. return s
  4855. }
  4856. // SetSecondaryArtifacts sets the SecondaryArtifacts field's value.
  4857. func (s *UpdateProjectInput) SetSecondaryArtifacts(v []*ProjectArtifacts) *UpdateProjectInput {
  4858. s.SecondaryArtifacts = v
  4859. return s
  4860. }
  4861. // SetSecondarySources sets the SecondarySources field's value.
  4862. func (s *UpdateProjectInput) SetSecondarySources(v []*ProjectSource) *UpdateProjectInput {
  4863. s.SecondarySources = v
  4864. return s
  4865. }
  4866. // SetServiceRole sets the ServiceRole field's value.
  4867. func (s *UpdateProjectInput) SetServiceRole(v string) *UpdateProjectInput {
  4868. s.ServiceRole = &v
  4869. return s
  4870. }
  4871. // SetSource sets the Source field's value.
  4872. func (s *UpdateProjectInput) SetSource(v *ProjectSource) *UpdateProjectInput {
  4873. s.Source = v
  4874. return s
  4875. }
  4876. // SetTags sets the Tags field's value.
  4877. func (s *UpdateProjectInput) SetTags(v []*Tag) *UpdateProjectInput {
  4878. s.Tags = v
  4879. return s
  4880. }
  4881. // SetTimeoutInMinutes sets the TimeoutInMinutes field's value.
  4882. func (s *UpdateProjectInput) SetTimeoutInMinutes(v int64) *UpdateProjectInput {
  4883. s.TimeoutInMinutes = &v
  4884. return s
  4885. }
  4886. // SetVpcConfig sets the VpcConfig field's value.
  4887. func (s *UpdateProjectInput) SetVpcConfig(v *VpcConfig) *UpdateProjectInput {
  4888. s.VpcConfig = v
  4889. return s
  4890. }
  4891. type UpdateProjectOutput struct {
  4892. _ struct{} `type:"structure"`
  4893. // Information about the build project that was changed.
  4894. Project *Project `locationName:"project" type:"structure"`
  4895. }
  4896. // String returns the string representation
  4897. func (s UpdateProjectOutput) String() string {
  4898. return awsutil.Prettify(s)
  4899. }
  4900. // GoString returns the string representation
  4901. func (s UpdateProjectOutput) GoString() string {
  4902. return s.String()
  4903. }
  4904. // SetProject sets the Project field's value.
  4905. func (s *UpdateProjectOutput) SetProject(v *Project) *UpdateProjectOutput {
  4906. s.Project = v
  4907. return s
  4908. }
  4909. type UpdateWebhookInput struct {
  4910. _ struct{} `type:"structure"`
  4911. // A regular expression used to determine which repository branches are built
  4912. // when a webhook is triggered. If the name of a branch matches the regular
  4913. // expression, then it is built. If branchFilter is empty, then all branches
  4914. // are built.
  4915. BranchFilter *string `locationName:"branchFilter" type:"string"`
  4916. // The name of the AWS CodeBuild project.
  4917. //
  4918. // ProjectName is a required field
  4919. ProjectName *string `locationName:"projectName" min:"2" type:"string" required:"true"`
  4920. // A boolean value that specifies whether the associated GitHub repository's
  4921. // secret token should be updated. If you use Bitbucket for your repository,
  4922. // rotateSecret is ignored.
  4923. RotateSecret *bool `locationName:"rotateSecret" type:"boolean"`
  4924. }
  4925. // String returns the string representation
  4926. func (s UpdateWebhookInput) String() string {
  4927. return awsutil.Prettify(s)
  4928. }
  4929. // GoString returns the string representation
  4930. func (s UpdateWebhookInput) GoString() string {
  4931. return s.String()
  4932. }
  4933. // Validate inspects the fields of the type to determine if they are valid.
  4934. func (s *UpdateWebhookInput) Validate() error {
  4935. invalidParams := request.ErrInvalidParams{Context: "UpdateWebhookInput"}
  4936. if s.ProjectName == nil {
  4937. invalidParams.Add(request.NewErrParamRequired("ProjectName"))
  4938. }
  4939. if s.ProjectName != nil && len(*s.ProjectName) < 2 {
  4940. invalidParams.Add(request.NewErrParamMinLen("ProjectName", 2))
  4941. }
  4942. if invalidParams.Len() > 0 {
  4943. return invalidParams
  4944. }
  4945. return nil
  4946. }
  4947. // SetBranchFilter sets the BranchFilter field's value.
  4948. func (s *UpdateWebhookInput) SetBranchFilter(v string) *UpdateWebhookInput {
  4949. s.BranchFilter = &v
  4950. return s
  4951. }
  4952. // SetProjectName sets the ProjectName field's value.
  4953. func (s *UpdateWebhookInput) SetProjectName(v string) *UpdateWebhookInput {
  4954. s.ProjectName = &v
  4955. return s
  4956. }
  4957. // SetRotateSecret sets the RotateSecret field's value.
  4958. func (s *UpdateWebhookInput) SetRotateSecret(v bool) *UpdateWebhookInput {
  4959. s.RotateSecret = &v
  4960. return s
  4961. }
  4962. type UpdateWebhookOutput struct {
  4963. _ struct{} `type:"structure"`
  4964. // Information about a repository's webhook that is associated with a project
  4965. // in AWS CodeBuild.
  4966. Webhook *Webhook `locationName:"webhook" type:"structure"`
  4967. }
  4968. // String returns the string representation
  4969. func (s UpdateWebhookOutput) String() string {
  4970. return awsutil.Prettify(s)
  4971. }
  4972. // GoString returns the string representation
  4973. func (s UpdateWebhookOutput) GoString() string {
  4974. return s.String()
  4975. }
  4976. // SetWebhook sets the Webhook field's value.
  4977. func (s *UpdateWebhookOutput) SetWebhook(v *Webhook) *UpdateWebhookOutput {
  4978. s.Webhook = v
  4979. return s
  4980. }
  4981. // Information about the VPC configuration that AWS CodeBuild accesses.
  4982. type VpcConfig struct {
  4983. _ struct{} `type:"structure"`
  4984. // A list of one or more security groups IDs in your Amazon VPC.
  4985. SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list"`
  4986. // A list of one or more subnet IDs in your Amazon VPC.
  4987. Subnets []*string `locationName:"subnets" type:"list"`
  4988. // The ID of the Amazon VPC.
  4989. VpcId *string `locationName:"vpcId" min:"1" type:"string"`
  4990. }
  4991. // String returns the string representation
  4992. func (s VpcConfig) String() string {
  4993. return awsutil.Prettify(s)
  4994. }
  4995. // GoString returns the string representation
  4996. func (s VpcConfig) GoString() string {
  4997. return s.String()
  4998. }
  4999. // Validate inspects the fields of the type to determine if they are valid.
  5000. func (s *VpcConfig) Validate() error {
  5001. invalidParams := request.ErrInvalidParams{Context: "VpcConfig"}
  5002. if s.VpcId != nil && len(*s.VpcId) < 1 {
  5003. invalidParams.Add(request.NewErrParamMinLen("VpcId", 1))
  5004. }
  5005. if invalidParams.Len() > 0 {
  5006. return invalidParams
  5007. }
  5008. return nil
  5009. }
  5010. // SetSecurityGroupIds sets the SecurityGroupIds field's value.
  5011. func (s *VpcConfig) SetSecurityGroupIds(v []*string) *VpcConfig {
  5012. s.SecurityGroupIds = v
  5013. return s
  5014. }
  5015. // SetSubnets sets the Subnets field's value.
  5016. func (s *VpcConfig) SetSubnets(v []*string) *VpcConfig {
  5017. s.Subnets = v
  5018. return s
  5019. }
  5020. // SetVpcId sets the VpcId field's value.
  5021. func (s *VpcConfig) SetVpcId(v string) *VpcConfig {
  5022. s.VpcId = &v
  5023. return s
  5024. }
  5025. // Information about a webhook that connects repository events to a build project
  5026. // in AWS CodeBuild.
  5027. type Webhook struct {
  5028. _ struct{} `type:"structure"`
  5029. // A regular expression used to determine which repository branches are built
  5030. // when a webhook is triggered. If the name of a branch matches the regular
  5031. // expression, then it is built. If branchFilter is empty, then all branches
  5032. // are built.
  5033. BranchFilter *string `locationName:"branchFilter" type:"string"`
  5034. // A timestamp that indicates the last time a repository's secret token was
  5035. // modified.
  5036. LastModifiedSecret *time.Time `locationName:"lastModifiedSecret" type:"timestamp"`
  5037. // The AWS CodeBuild endpoint where webhook events are sent.
  5038. PayloadUrl *string `locationName:"payloadUrl" min:"1" type:"string"`
  5039. // The secret token of the associated repository.
  5040. //
  5041. // A Bitbucket webhook does not support secret.
  5042. Secret *string `locationName:"secret" min:"1" type:"string"`
  5043. // The URL to the webhook.
  5044. Url *string `locationName:"url" min:"1" type:"string"`
  5045. }
  5046. // String returns the string representation
  5047. func (s Webhook) String() string {
  5048. return awsutil.Prettify(s)
  5049. }
  5050. // GoString returns the string representation
  5051. func (s Webhook) GoString() string {
  5052. return s.String()
  5053. }
  5054. // SetBranchFilter sets the BranchFilter field's value.
  5055. func (s *Webhook) SetBranchFilter(v string) *Webhook {
  5056. s.BranchFilter = &v
  5057. return s
  5058. }
  5059. // SetLastModifiedSecret sets the LastModifiedSecret field's value.
  5060. func (s *Webhook) SetLastModifiedSecret(v time.Time) *Webhook {
  5061. s.LastModifiedSecret = &v
  5062. return s
  5063. }
  5064. // SetPayloadUrl sets the PayloadUrl field's value.
  5065. func (s *Webhook) SetPayloadUrl(v string) *Webhook {
  5066. s.PayloadUrl = &v
  5067. return s
  5068. }
  5069. // SetSecret sets the Secret field's value.
  5070. func (s *Webhook) SetSecret(v string) *Webhook {
  5071. s.Secret = &v
  5072. return s
  5073. }
  5074. // SetUrl sets the Url field's value.
  5075. func (s *Webhook) SetUrl(v string) *Webhook {
  5076. s.Url = &v
  5077. return s
  5078. }
  5079. const (
  5080. // ArtifactNamespaceNone is a ArtifactNamespace enum value
  5081. ArtifactNamespaceNone = "NONE"
  5082. // ArtifactNamespaceBuildId is a ArtifactNamespace enum value
  5083. ArtifactNamespaceBuildId = "BUILD_ID"
  5084. )
  5085. const (
  5086. // ArtifactPackagingNone is a ArtifactPackaging enum value
  5087. ArtifactPackagingNone = "NONE"
  5088. // ArtifactPackagingZip is a ArtifactPackaging enum value
  5089. ArtifactPackagingZip = "ZIP"
  5090. )
  5091. const (
  5092. // ArtifactsTypeCodepipeline is a ArtifactsType enum value
  5093. ArtifactsTypeCodepipeline = "CODEPIPELINE"
  5094. // ArtifactsTypeS3 is a ArtifactsType enum value
  5095. ArtifactsTypeS3 = "S3"
  5096. // ArtifactsTypeNoArtifacts is a ArtifactsType enum value
  5097. ArtifactsTypeNoArtifacts = "NO_ARTIFACTS"
  5098. )
  5099. const (
  5100. // AuthTypeOauth is a AuthType enum value
  5101. AuthTypeOauth = "OAUTH"
  5102. // AuthTypeBasicAuth is a AuthType enum value
  5103. AuthTypeBasicAuth = "BASIC_AUTH"
  5104. // AuthTypePersonalAccessToken is a AuthType enum value
  5105. AuthTypePersonalAccessToken = "PERSONAL_ACCESS_TOKEN"
  5106. )
  5107. const (
  5108. // BuildPhaseTypeSubmitted is a BuildPhaseType enum value
  5109. BuildPhaseTypeSubmitted = "SUBMITTED"
  5110. // BuildPhaseTypeQueued is a BuildPhaseType enum value
  5111. BuildPhaseTypeQueued = "QUEUED"
  5112. // BuildPhaseTypeProvisioning is a BuildPhaseType enum value
  5113. BuildPhaseTypeProvisioning = "PROVISIONING"
  5114. // BuildPhaseTypeDownloadSource is a BuildPhaseType enum value
  5115. BuildPhaseTypeDownloadSource = "DOWNLOAD_SOURCE"
  5116. // BuildPhaseTypeInstall is a BuildPhaseType enum value
  5117. BuildPhaseTypeInstall = "INSTALL"
  5118. // BuildPhaseTypePreBuild is a BuildPhaseType enum value
  5119. BuildPhaseTypePreBuild = "PRE_BUILD"
  5120. // BuildPhaseTypeBuild is a BuildPhaseType enum value
  5121. BuildPhaseTypeBuild = "BUILD"
  5122. // BuildPhaseTypePostBuild is a BuildPhaseType enum value
  5123. BuildPhaseTypePostBuild = "POST_BUILD"
  5124. // BuildPhaseTypeUploadArtifacts is a BuildPhaseType enum value
  5125. BuildPhaseTypeUploadArtifacts = "UPLOAD_ARTIFACTS"
  5126. // BuildPhaseTypeFinalizing is a BuildPhaseType enum value
  5127. BuildPhaseTypeFinalizing = "FINALIZING"
  5128. // BuildPhaseTypeCompleted is a BuildPhaseType enum value
  5129. BuildPhaseTypeCompleted = "COMPLETED"
  5130. )
  5131. const (
  5132. // CacheTypeNoCache is a CacheType enum value
  5133. CacheTypeNoCache = "NO_CACHE"
  5134. // CacheTypeS3 is a CacheType enum value
  5135. CacheTypeS3 = "S3"
  5136. )
  5137. const (
  5138. // ComputeTypeBuildGeneral1Small is a ComputeType enum value
  5139. ComputeTypeBuildGeneral1Small = "BUILD_GENERAL1_SMALL"
  5140. // ComputeTypeBuildGeneral1Medium is a ComputeType enum value
  5141. ComputeTypeBuildGeneral1Medium = "BUILD_GENERAL1_MEDIUM"
  5142. // ComputeTypeBuildGeneral1Large is a ComputeType enum value
  5143. ComputeTypeBuildGeneral1Large = "BUILD_GENERAL1_LARGE"
  5144. )
  5145. const (
  5146. // EnvironmentTypeWindowsContainer is a EnvironmentType enum value
  5147. EnvironmentTypeWindowsContainer = "WINDOWS_CONTAINER"
  5148. // EnvironmentTypeLinuxContainer is a EnvironmentType enum value
  5149. EnvironmentTypeLinuxContainer = "LINUX_CONTAINER"
  5150. )
  5151. const (
  5152. // EnvironmentVariableTypePlaintext is a EnvironmentVariableType enum value
  5153. EnvironmentVariableTypePlaintext = "PLAINTEXT"
  5154. // EnvironmentVariableTypeParameterStore is a EnvironmentVariableType enum value
  5155. EnvironmentVariableTypeParameterStore = "PARAMETER_STORE"
  5156. )
  5157. const (
  5158. // LanguageTypeJava is a LanguageType enum value
  5159. LanguageTypeJava = "JAVA"
  5160. // LanguageTypePython is a LanguageType enum value
  5161. LanguageTypePython = "PYTHON"
  5162. // LanguageTypeNodeJs is a LanguageType enum value
  5163. LanguageTypeNodeJs = "NODE_JS"
  5164. // LanguageTypeRuby is a LanguageType enum value
  5165. LanguageTypeRuby = "RUBY"
  5166. // LanguageTypeGolang is a LanguageType enum value
  5167. LanguageTypeGolang = "GOLANG"
  5168. // LanguageTypeDocker is a LanguageType enum value
  5169. LanguageTypeDocker = "DOCKER"
  5170. // LanguageTypeAndroid is a LanguageType enum value
  5171. LanguageTypeAndroid = "ANDROID"
  5172. // LanguageTypeDotnet is a LanguageType enum value
  5173. LanguageTypeDotnet = "DOTNET"
  5174. // LanguageTypeBase is a LanguageType enum value
  5175. LanguageTypeBase = "BASE"
  5176. // LanguageTypePhp is a LanguageType enum value
  5177. LanguageTypePhp = "PHP"
  5178. )
  5179. const (
  5180. // LogsConfigStatusTypeEnabled is a LogsConfigStatusType enum value
  5181. LogsConfigStatusTypeEnabled = "ENABLED"
  5182. // LogsConfigStatusTypeDisabled is a LogsConfigStatusType enum value
  5183. LogsConfigStatusTypeDisabled = "DISABLED"
  5184. )
  5185. const (
  5186. // PlatformTypeDebian is a PlatformType enum value
  5187. PlatformTypeDebian = "DEBIAN"
  5188. // PlatformTypeAmazonLinux is a PlatformType enum value
  5189. PlatformTypeAmazonLinux = "AMAZON_LINUX"
  5190. // PlatformTypeUbuntu is a PlatformType enum value
  5191. PlatformTypeUbuntu = "UBUNTU"
  5192. // PlatformTypeWindowsServer is a PlatformType enum value
  5193. PlatformTypeWindowsServer = "WINDOWS_SERVER"
  5194. )
  5195. const (
  5196. // ProjectSortByTypeName is a ProjectSortByType enum value
  5197. ProjectSortByTypeName = "NAME"
  5198. // ProjectSortByTypeCreatedTime is a ProjectSortByType enum value
  5199. ProjectSortByTypeCreatedTime = "CREATED_TIME"
  5200. // ProjectSortByTypeLastModifiedTime is a ProjectSortByType enum value
  5201. ProjectSortByTypeLastModifiedTime = "LAST_MODIFIED_TIME"
  5202. )
  5203. const (
  5204. // ServerTypeGithub is a ServerType enum value
  5205. ServerTypeGithub = "GITHUB"
  5206. // ServerTypeBitbucket is a ServerType enum value
  5207. ServerTypeBitbucket = "BITBUCKET"
  5208. // ServerTypeGithubEnterprise is a ServerType enum value
  5209. ServerTypeGithubEnterprise = "GITHUB_ENTERPRISE"
  5210. )
  5211. const (
  5212. // SortOrderTypeAscending is a SortOrderType enum value
  5213. SortOrderTypeAscending = "ASCENDING"
  5214. // SortOrderTypeDescending is a SortOrderType enum value
  5215. SortOrderTypeDescending = "DESCENDING"
  5216. )
  5217. const (
  5218. // SourceAuthTypeOauth is a SourceAuthType enum value
  5219. SourceAuthTypeOauth = "OAUTH"
  5220. )
  5221. const (
  5222. // SourceTypeCodecommit is a SourceType enum value
  5223. SourceTypeCodecommit = "CODECOMMIT"
  5224. // SourceTypeCodepipeline is a SourceType enum value
  5225. SourceTypeCodepipeline = "CODEPIPELINE"
  5226. // SourceTypeGithub is a SourceType enum value
  5227. SourceTypeGithub = "GITHUB"
  5228. // SourceTypeS3 is a SourceType enum value
  5229. SourceTypeS3 = "S3"
  5230. // SourceTypeBitbucket is a SourceType enum value
  5231. SourceTypeBitbucket = "BITBUCKET"
  5232. // SourceTypeGithubEnterprise is a SourceType enum value
  5233. SourceTypeGithubEnterprise = "GITHUB_ENTERPRISE"
  5234. // SourceTypeNoSource is a SourceType enum value
  5235. SourceTypeNoSource = "NO_SOURCE"
  5236. )
  5237. const (
  5238. // StatusTypeSucceeded is a StatusType enum value
  5239. StatusTypeSucceeded = "SUCCEEDED"
  5240. // StatusTypeFailed is a StatusType enum value
  5241. StatusTypeFailed = "FAILED"
  5242. // StatusTypeFault is a StatusType enum value
  5243. StatusTypeFault = "FAULT"
  5244. // StatusTypeTimedOut is a StatusType enum value
  5245. StatusTypeTimedOut = "TIMED_OUT"
  5246. // StatusTypeInProgress is a StatusType enum value
  5247. StatusTypeInProgress = "IN_PROGRESS"
  5248. // StatusTypeStopped is a StatusType enum value
  5249. StatusTypeStopped = "STOPPED"
  5250. )