api.go 204 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package ecr
  3. import (
  4. "time"
  5. "github.com/aws/aws-sdk-go/aws"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/private/protocol"
  9. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  10. )
  11. const opBatchCheckLayerAvailability = "BatchCheckLayerAvailability"
  12. // BatchCheckLayerAvailabilityRequest generates a "aws/request.Request" representing the
  13. // client's request for the BatchCheckLayerAvailability operation. The "output" return
  14. // value will be populated with the request's response once the request completes
  15. // successfully.
  16. //
  17. // Use "Send" method on the returned Request to send the API call to the service.
  18. // the "output" return value is not valid until after Send returns without error.
  19. //
  20. // See BatchCheckLayerAvailability for more information on using the BatchCheckLayerAvailability
  21. // API call, and error handling.
  22. //
  23. // This method is useful when you want to inject custom logic or configuration
  24. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  25. //
  26. //
  27. // // Example sending a request using the BatchCheckLayerAvailabilityRequest method.
  28. // req, resp := client.BatchCheckLayerAvailabilityRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailability
  36. func (c *ECR) BatchCheckLayerAvailabilityRequest(input *BatchCheckLayerAvailabilityInput) (req *request.Request, output *BatchCheckLayerAvailabilityOutput) {
  37. op := &request.Operation{
  38. Name: opBatchCheckLayerAvailability,
  39. HTTPMethod: "POST",
  40. HTTPPath: "/",
  41. }
  42. if input == nil {
  43. input = &BatchCheckLayerAvailabilityInput{}
  44. }
  45. output = &BatchCheckLayerAvailabilityOutput{}
  46. req = c.newRequest(op, input, output)
  47. return
  48. }
  49. // BatchCheckLayerAvailability API operation for Amazon EC2 Container Registry.
  50. //
  51. // Check the availability of multiple image layers in a specified registry and
  52. // repository.
  53. //
  54. // This operation is used by the Amazon ECR proxy, and it is not intended for
  55. // general use by customers for pulling and pushing images. In most cases, you
  56. // should use the docker CLI to pull, tag, and push images.
  57. //
  58. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  59. // with awserr.Error's Code and Message methods to get detailed information about
  60. // the error.
  61. //
  62. // See the AWS API reference guide for Amazon EC2 Container Registry's
  63. // API operation BatchCheckLayerAvailability for usage and error information.
  64. //
  65. // Returned Error Codes:
  66. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  67. // The specified repository could not be found. Check the spelling of the specified
  68. // repository and ensure that you are performing operations on the correct registry.
  69. //
  70. // * ErrCodeInvalidParameterException "InvalidParameterException"
  71. // The specified parameter is invalid. Review the available parameters for the
  72. // API request.
  73. //
  74. // * ErrCodeServerException "ServerException"
  75. // These errors are usually caused by a server-side issue.
  76. //
  77. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailability
  78. func (c *ECR) BatchCheckLayerAvailability(input *BatchCheckLayerAvailabilityInput) (*BatchCheckLayerAvailabilityOutput, error) {
  79. req, out := c.BatchCheckLayerAvailabilityRequest(input)
  80. return out, req.Send()
  81. }
  82. // BatchCheckLayerAvailabilityWithContext is the same as BatchCheckLayerAvailability with the addition of
  83. // the ability to pass a context and additional request options.
  84. //
  85. // See BatchCheckLayerAvailability for details on how to use this API operation.
  86. //
  87. // The context must be non-nil and will be used for request cancellation. If
  88. // the context is nil a panic will occur. In the future the SDK may create
  89. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  90. // for more information on using Contexts.
  91. func (c *ECR) BatchCheckLayerAvailabilityWithContext(ctx aws.Context, input *BatchCheckLayerAvailabilityInput, opts ...request.Option) (*BatchCheckLayerAvailabilityOutput, error) {
  92. req, out := c.BatchCheckLayerAvailabilityRequest(input)
  93. req.SetContext(ctx)
  94. req.ApplyOptions(opts...)
  95. return out, req.Send()
  96. }
  97. const opBatchDeleteImage = "BatchDeleteImage"
  98. // BatchDeleteImageRequest generates a "aws/request.Request" representing the
  99. // client's request for the BatchDeleteImage operation. The "output" return
  100. // value will be populated with the request's response once the request completes
  101. // successfully.
  102. //
  103. // Use "Send" method on the returned Request to send the API call to the service.
  104. // the "output" return value is not valid until after Send returns without error.
  105. //
  106. // See BatchDeleteImage for more information on using the BatchDeleteImage
  107. // API call, and error handling.
  108. //
  109. // This method is useful when you want to inject custom logic or configuration
  110. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  111. //
  112. //
  113. // // Example sending a request using the BatchDeleteImageRequest method.
  114. // req, resp := client.BatchDeleteImageRequest(params)
  115. //
  116. // err := req.Send()
  117. // if err == nil { // resp is now filled
  118. // fmt.Println(resp)
  119. // }
  120. //
  121. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImage
  122. func (c *ECR) BatchDeleteImageRequest(input *BatchDeleteImageInput) (req *request.Request, output *BatchDeleteImageOutput) {
  123. op := &request.Operation{
  124. Name: opBatchDeleteImage,
  125. HTTPMethod: "POST",
  126. HTTPPath: "/",
  127. }
  128. if input == nil {
  129. input = &BatchDeleteImageInput{}
  130. }
  131. output = &BatchDeleteImageOutput{}
  132. req = c.newRequest(op, input, output)
  133. return
  134. }
  135. // BatchDeleteImage API operation for Amazon EC2 Container Registry.
  136. //
  137. // Deletes a list of specified images within a specified repository. Images
  138. // are specified with either imageTag or imageDigest.
  139. //
  140. // You can remove a tag from an image by specifying the image's tag in your
  141. // request. When you remove the last tag from an image, the image is deleted
  142. // from your repository.
  143. //
  144. // You can completely delete an image (and all of its tags) by specifying the
  145. // image's digest in your request.
  146. //
  147. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  148. // with awserr.Error's Code and Message methods to get detailed information about
  149. // the error.
  150. //
  151. // See the AWS API reference guide for Amazon EC2 Container Registry's
  152. // API operation BatchDeleteImage for usage and error information.
  153. //
  154. // Returned Error Codes:
  155. // * ErrCodeServerException "ServerException"
  156. // These errors are usually caused by a server-side issue.
  157. //
  158. // * ErrCodeInvalidParameterException "InvalidParameterException"
  159. // The specified parameter is invalid. Review the available parameters for the
  160. // API request.
  161. //
  162. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  163. // The specified repository could not be found. Check the spelling of the specified
  164. // repository and ensure that you are performing operations on the correct registry.
  165. //
  166. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImage
  167. func (c *ECR) BatchDeleteImage(input *BatchDeleteImageInput) (*BatchDeleteImageOutput, error) {
  168. req, out := c.BatchDeleteImageRequest(input)
  169. return out, req.Send()
  170. }
  171. // BatchDeleteImageWithContext is the same as BatchDeleteImage with the addition of
  172. // the ability to pass a context and additional request options.
  173. //
  174. // See BatchDeleteImage for details on how to use this API operation.
  175. //
  176. // The context must be non-nil and will be used for request cancellation. If
  177. // the context is nil a panic will occur. In the future the SDK may create
  178. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  179. // for more information on using Contexts.
  180. func (c *ECR) BatchDeleteImageWithContext(ctx aws.Context, input *BatchDeleteImageInput, opts ...request.Option) (*BatchDeleteImageOutput, error) {
  181. req, out := c.BatchDeleteImageRequest(input)
  182. req.SetContext(ctx)
  183. req.ApplyOptions(opts...)
  184. return out, req.Send()
  185. }
  186. const opBatchGetImage = "BatchGetImage"
  187. // BatchGetImageRequest generates a "aws/request.Request" representing the
  188. // client's request for the BatchGetImage operation. The "output" return
  189. // value will be populated with the request's response once the request completes
  190. // successfully.
  191. //
  192. // Use "Send" method on the returned Request to send the API call to the service.
  193. // the "output" return value is not valid until after Send returns without error.
  194. //
  195. // See BatchGetImage for more information on using the BatchGetImage
  196. // API call, and error handling.
  197. //
  198. // This method is useful when you want to inject custom logic or configuration
  199. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  200. //
  201. //
  202. // // Example sending a request using the BatchGetImageRequest method.
  203. // req, resp := client.BatchGetImageRequest(params)
  204. //
  205. // err := req.Send()
  206. // if err == nil { // resp is now filled
  207. // fmt.Println(resp)
  208. // }
  209. //
  210. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImage
  211. func (c *ECR) BatchGetImageRequest(input *BatchGetImageInput) (req *request.Request, output *BatchGetImageOutput) {
  212. op := &request.Operation{
  213. Name: opBatchGetImage,
  214. HTTPMethod: "POST",
  215. HTTPPath: "/",
  216. }
  217. if input == nil {
  218. input = &BatchGetImageInput{}
  219. }
  220. output = &BatchGetImageOutput{}
  221. req = c.newRequest(op, input, output)
  222. return
  223. }
  224. // BatchGetImage API operation for Amazon EC2 Container Registry.
  225. //
  226. // Gets detailed information for specified images within a specified repository.
  227. // Images are specified with either imageTag or imageDigest.
  228. //
  229. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  230. // with awserr.Error's Code and Message methods to get detailed information about
  231. // the error.
  232. //
  233. // See the AWS API reference guide for Amazon EC2 Container Registry's
  234. // API operation BatchGetImage for usage and error information.
  235. //
  236. // Returned Error Codes:
  237. // * ErrCodeServerException "ServerException"
  238. // These errors are usually caused by a server-side issue.
  239. //
  240. // * ErrCodeInvalidParameterException "InvalidParameterException"
  241. // The specified parameter is invalid. Review the available parameters for the
  242. // API request.
  243. //
  244. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  245. // The specified repository could not be found. Check the spelling of the specified
  246. // repository and ensure that you are performing operations on the correct registry.
  247. //
  248. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImage
  249. func (c *ECR) BatchGetImage(input *BatchGetImageInput) (*BatchGetImageOutput, error) {
  250. req, out := c.BatchGetImageRequest(input)
  251. return out, req.Send()
  252. }
  253. // BatchGetImageWithContext is the same as BatchGetImage with the addition of
  254. // the ability to pass a context and additional request options.
  255. //
  256. // See BatchGetImage for details on how to use this API operation.
  257. //
  258. // The context must be non-nil and will be used for request cancellation. If
  259. // the context is nil a panic will occur. In the future the SDK may create
  260. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  261. // for more information on using Contexts.
  262. func (c *ECR) BatchGetImageWithContext(ctx aws.Context, input *BatchGetImageInput, opts ...request.Option) (*BatchGetImageOutput, error) {
  263. req, out := c.BatchGetImageRequest(input)
  264. req.SetContext(ctx)
  265. req.ApplyOptions(opts...)
  266. return out, req.Send()
  267. }
  268. const opCompleteLayerUpload = "CompleteLayerUpload"
  269. // CompleteLayerUploadRequest generates a "aws/request.Request" representing the
  270. // client's request for the CompleteLayerUpload operation. The "output" return
  271. // value will be populated with the request's response once the request completes
  272. // successfully.
  273. //
  274. // Use "Send" method on the returned Request to send the API call to the service.
  275. // the "output" return value is not valid until after Send returns without error.
  276. //
  277. // See CompleteLayerUpload for more information on using the CompleteLayerUpload
  278. // API call, and error handling.
  279. //
  280. // This method is useful when you want to inject custom logic or configuration
  281. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  282. //
  283. //
  284. // // Example sending a request using the CompleteLayerUploadRequest method.
  285. // req, resp := client.CompleteLayerUploadRequest(params)
  286. //
  287. // err := req.Send()
  288. // if err == nil { // resp is now filled
  289. // fmt.Println(resp)
  290. // }
  291. //
  292. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUpload
  293. func (c *ECR) CompleteLayerUploadRequest(input *CompleteLayerUploadInput) (req *request.Request, output *CompleteLayerUploadOutput) {
  294. op := &request.Operation{
  295. Name: opCompleteLayerUpload,
  296. HTTPMethod: "POST",
  297. HTTPPath: "/",
  298. }
  299. if input == nil {
  300. input = &CompleteLayerUploadInput{}
  301. }
  302. output = &CompleteLayerUploadOutput{}
  303. req = c.newRequest(op, input, output)
  304. return
  305. }
  306. // CompleteLayerUpload API operation for Amazon EC2 Container Registry.
  307. //
  308. // Informs Amazon ECR that the image layer upload has completed for a specified
  309. // registry, repository name, and upload ID. You can optionally provide a sha256
  310. // digest of the image layer for data validation purposes.
  311. //
  312. // This operation is used by the Amazon ECR proxy, and it is not intended for
  313. // general use by customers for pulling and pushing images. In most cases, you
  314. // should use the docker CLI to pull, tag, and push images.
  315. //
  316. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  317. // with awserr.Error's Code and Message methods to get detailed information about
  318. // the error.
  319. //
  320. // See the AWS API reference guide for Amazon EC2 Container Registry's
  321. // API operation CompleteLayerUpload for usage and error information.
  322. //
  323. // Returned Error Codes:
  324. // * ErrCodeServerException "ServerException"
  325. // These errors are usually caused by a server-side issue.
  326. //
  327. // * ErrCodeInvalidParameterException "InvalidParameterException"
  328. // The specified parameter is invalid. Review the available parameters for the
  329. // API request.
  330. //
  331. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  332. // The specified repository could not be found. Check the spelling of the specified
  333. // repository and ensure that you are performing operations on the correct registry.
  334. //
  335. // * ErrCodeUploadNotFoundException "UploadNotFoundException"
  336. // The upload could not be found, or the specified upload id is not valid for
  337. // this repository.
  338. //
  339. // * ErrCodeInvalidLayerException "InvalidLayerException"
  340. // The layer digest calculation performed by Amazon ECR upon receipt of the
  341. // image layer does not match the digest specified.
  342. //
  343. // * ErrCodeLayerPartTooSmallException "LayerPartTooSmallException"
  344. // Layer parts must be at least 5 MiB in size.
  345. //
  346. // * ErrCodeLayerAlreadyExistsException "LayerAlreadyExistsException"
  347. // The image layer already exists in the associated repository.
  348. //
  349. // * ErrCodeEmptyUploadException "EmptyUploadException"
  350. // The specified layer upload does not contain any layer parts.
  351. //
  352. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUpload
  353. func (c *ECR) CompleteLayerUpload(input *CompleteLayerUploadInput) (*CompleteLayerUploadOutput, error) {
  354. req, out := c.CompleteLayerUploadRequest(input)
  355. return out, req.Send()
  356. }
  357. // CompleteLayerUploadWithContext is the same as CompleteLayerUpload with the addition of
  358. // the ability to pass a context and additional request options.
  359. //
  360. // See CompleteLayerUpload for details on how to use this API operation.
  361. //
  362. // The context must be non-nil and will be used for request cancellation. If
  363. // the context is nil a panic will occur. In the future the SDK may create
  364. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  365. // for more information on using Contexts.
  366. func (c *ECR) CompleteLayerUploadWithContext(ctx aws.Context, input *CompleteLayerUploadInput, opts ...request.Option) (*CompleteLayerUploadOutput, error) {
  367. req, out := c.CompleteLayerUploadRequest(input)
  368. req.SetContext(ctx)
  369. req.ApplyOptions(opts...)
  370. return out, req.Send()
  371. }
  372. const opCreateRepository = "CreateRepository"
  373. // CreateRepositoryRequest generates a "aws/request.Request" representing the
  374. // client's request for the CreateRepository operation. The "output" return
  375. // value will be populated with the request's response once the request completes
  376. // successfully.
  377. //
  378. // Use "Send" method on the returned Request to send the API call to the service.
  379. // the "output" return value is not valid until after Send returns without error.
  380. //
  381. // See CreateRepository for more information on using the CreateRepository
  382. // API call, and error handling.
  383. //
  384. // This method is useful when you want to inject custom logic or configuration
  385. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  386. //
  387. //
  388. // // Example sending a request using the CreateRepositoryRequest method.
  389. // req, resp := client.CreateRepositoryRequest(params)
  390. //
  391. // err := req.Send()
  392. // if err == nil { // resp is now filled
  393. // fmt.Println(resp)
  394. // }
  395. //
  396. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepository
  397. func (c *ECR) CreateRepositoryRequest(input *CreateRepositoryInput) (req *request.Request, output *CreateRepositoryOutput) {
  398. op := &request.Operation{
  399. Name: opCreateRepository,
  400. HTTPMethod: "POST",
  401. HTTPPath: "/",
  402. }
  403. if input == nil {
  404. input = &CreateRepositoryInput{}
  405. }
  406. output = &CreateRepositoryOutput{}
  407. req = c.newRequest(op, input, output)
  408. return
  409. }
  410. // CreateRepository API operation for Amazon EC2 Container Registry.
  411. //
  412. // Creates an image repository.
  413. //
  414. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  415. // with awserr.Error's Code and Message methods to get detailed information about
  416. // the error.
  417. //
  418. // See the AWS API reference guide for Amazon EC2 Container Registry's
  419. // API operation CreateRepository for usage and error information.
  420. //
  421. // Returned Error Codes:
  422. // * ErrCodeServerException "ServerException"
  423. // These errors are usually caused by a server-side issue.
  424. //
  425. // * ErrCodeInvalidParameterException "InvalidParameterException"
  426. // The specified parameter is invalid. Review the available parameters for the
  427. // API request.
  428. //
  429. // * ErrCodeInvalidTagParameterException "InvalidTagParameterException"
  430. // An invalid parameter has been specified. Tag keys can have a maximum character
  431. // length of 128 characters, and tag values can have a maximum length of 256
  432. // characters.
  433. //
  434. // * ErrCodeTooManyTagsException "TooManyTagsException"
  435. // The list of tags on the repository is over the limit. The maximum number
  436. // of tags that can be applied to a repository is 50.
  437. //
  438. // * ErrCodeRepositoryAlreadyExistsException "RepositoryAlreadyExistsException"
  439. // The specified repository already exists in the specified registry.
  440. //
  441. // * ErrCodeLimitExceededException "LimitExceededException"
  442. // The operation did not succeed because it would have exceeded a service limit
  443. // for your account. For more information, see Amazon ECR Default Service Limits
  444. // (http://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)
  445. // in the Amazon Elastic Container Registry User Guide.
  446. //
  447. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepository
  448. func (c *ECR) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) {
  449. req, out := c.CreateRepositoryRequest(input)
  450. return out, req.Send()
  451. }
  452. // CreateRepositoryWithContext is the same as CreateRepository with the addition of
  453. // the ability to pass a context and additional request options.
  454. //
  455. // See CreateRepository for details on how to use this API operation.
  456. //
  457. // The context must be non-nil and will be used for request cancellation. If
  458. // the context is nil a panic will occur. In the future the SDK may create
  459. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  460. // for more information on using Contexts.
  461. func (c *ECR) CreateRepositoryWithContext(ctx aws.Context, input *CreateRepositoryInput, opts ...request.Option) (*CreateRepositoryOutput, error) {
  462. req, out := c.CreateRepositoryRequest(input)
  463. req.SetContext(ctx)
  464. req.ApplyOptions(opts...)
  465. return out, req.Send()
  466. }
  467. const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy"
  468. // DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the
  469. // client's request for the DeleteLifecyclePolicy operation. The "output" return
  470. // value will be populated with the request's response once the request completes
  471. // successfully.
  472. //
  473. // Use "Send" method on the returned Request to send the API call to the service.
  474. // the "output" return value is not valid until after Send returns without error.
  475. //
  476. // See DeleteLifecyclePolicy for more information on using the DeleteLifecyclePolicy
  477. // API call, and error handling.
  478. //
  479. // This method is useful when you want to inject custom logic or configuration
  480. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  481. //
  482. //
  483. // // Example sending a request using the DeleteLifecyclePolicyRequest method.
  484. // req, resp := client.DeleteLifecyclePolicyRequest(params)
  485. //
  486. // err := req.Send()
  487. // if err == nil { // resp is now filled
  488. // fmt.Println(resp)
  489. // }
  490. //
  491. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicy
  492. func (c *ECR) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput) {
  493. op := &request.Operation{
  494. Name: opDeleteLifecyclePolicy,
  495. HTTPMethod: "POST",
  496. HTTPPath: "/",
  497. }
  498. if input == nil {
  499. input = &DeleteLifecyclePolicyInput{}
  500. }
  501. output = &DeleteLifecyclePolicyOutput{}
  502. req = c.newRequest(op, input, output)
  503. return
  504. }
  505. // DeleteLifecyclePolicy API operation for Amazon EC2 Container Registry.
  506. //
  507. // Deletes the specified lifecycle policy.
  508. //
  509. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  510. // with awserr.Error's Code and Message methods to get detailed information about
  511. // the error.
  512. //
  513. // See the AWS API reference guide for Amazon EC2 Container Registry's
  514. // API operation DeleteLifecyclePolicy for usage and error information.
  515. //
  516. // Returned Error Codes:
  517. // * ErrCodeServerException "ServerException"
  518. // These errors are usually caused by a server-side issue.
  519. //
  520. // * ErrCodeInvalidParameterException "InvalidParameterException"
  521. // The specified parameter is invalid. Review the available parameters for the
  522. // API request.
  523. //
  524. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  525. // The specified repository could not be found. Check the spelling of the specified
  526. // repository and ensure that you are performing operations on the correct registry.
  527. //
  528. // * ErrCodeLifecyclePolicyNotFoundException "LifecyclePolicyNotFoundException"
  529. // The lifecycle policy could not be found, and no policy is set to the repository.
  530. //
  531. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicy
  532. func (c *ECR) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error) {
  533. req, out := c.DeleteLifecyclePolicyRequest(input)
  534. return out, req.Send()
  535. }
  536. // DeleteLifecyclePolicyWithContext is the same as DeleteLifecyclePolicy with the addition of
  537. // the ability to pass a context and additional request options.
  538. //
  539. // See DeleteLifecyclePolicy for details on how to use this API operation.
  540. //
  541. // The context must be non-nil and will be used for request cancellation. If
  542. // the context is nil a panic will occur. In the future the SDK may create
  543. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  544. // for more information on using Contexts.
  545. func (c *ECR) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error) {
  546. req, out := c.DeleteLifecyclePolicyRequest(input)
  547. req.SetContext(ctx)
  548. req.ApplyOptions(opts...)
  549. return out, req.Send()
  550. }
  551. const opDeleteRepository = "DeleteRepository"
  552. // DeleteRepositoryRequest generates a "aws/request.Request" representing the
  553. // client's request for the DeleteRepository operation. The "output" return
  554. // value will be populated with the request's response once the request completes
  555. // successfully.
  556. //
  557. // Use "Send" method on the returned Request to send the API call to the service.
  558. // the "output" return value is not valid until after Send returns without error.
  559. //
  560. // See DeleteRepository for more information on using the DeleteRepository
  561. // API call, and error handling.
  562. //
  563. // This method is useful when you want to inject custom logic or configuration
  564. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  565. //
  566. //
  567. // // Example sending a request using the DeleteRepositoryRequest method.
  568. // req, resp := client.DeleteRepositoryRequest(params)
  569. //
  570. // err := req.Send()
  571. // if err == nil { // resp is now filled
  572. // fmt.Println(resp)
  573. // }
  574. //
  575. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepository
  576. func (c *ECR) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *request.Request, output *DeleteRepositoryOutput) {
  577. op := &request.Operation{
  578. Name: opDeleteRepository,
  579. HTTPMethod: "POST",
  580. HTTPPath: "/",
  581. }
  582. if input == nil {
  583. input = &DeleteRepositoryInput{}
  584. }
  585. output = &DeleteRepositoryOutput{}
  586. req = c.newRequest(op, input, output)
  587. return
  588. }
  589. // DeleteRepository API operation for Amazon EC2 Container Registry.
  590. //
  591. // Deletes an existing image repository. If a repository contains images, you
  592. // must use the force option to delete it.
  593. //
  594. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  595. // with awserr.Error's Code and Message methods to get detailed information about
  596. // the error.
  597. //
  598. // See the AWS API reference guide for Amazon EC2 Container Registry's
  599. // API operation DeleteRepository for usage and error information.
  600. //
  601. // Returned Error Codes:
  602. // * ErrCodeServerException "ServerException"
  603. // These errors are usually caused by a server-side issue.
  604. //
  605. // * ErrCodeInvalidParameterException "InvalidParameterException"
  606. // The specified parameter is invalid. Review the available parameters for the
  607. // API request.
  608. //
  609. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  610. // The specified repository could not be found. Check the spelling of the specified
  611. // repository and ensure that you are performing operations on the correct registry.
  612. //
  613. // * ErrCodeRepositoryNotEmptyException "RepositoryNotEmptyException"
  614. // The specified repository contains images. To delete a repository that contains
  615. // images, you must force the deletion with the force parameter.
  616. //
  617. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepository
  618. func (c *ECR) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) {
  619. req, out := c.DeleteRepositoryRequest(input)
  620. return out, req.Send()
  621. }
  622. // DeleteRepositoryWithContext is the same as DeleteRepository with the addition of
  623. // the ability to pass a context and additional request options.
  624. //
  625. // See DeleteRepository 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 *ECR) DeleteRepositoryWithContext(ctx aws.Context, input *DeleteRepositoryInput, opts ...request.Option) (*DeleteRepositoryOutput, error) {
  632. req, out := c.DeleteRepositoryRequest(input)
  633. req.SetContext(ctx)
  634. req.ApplyOptions(opts...)
  635. return out, req.Send()
  636. }
  637. const opDeleteRepositoryPolicy = "DeleteRepositoryPolicy"
  638. // DeleteRepositoryPolicyRequest generates a "aws/request.Request" representing the
  639. // client's request for the DeleteRepositoryPolicy 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 DeleteRepositoryPolicy for more information on using the DeleteRepositoryPolicy
  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 DeleteRepositoryPolicyRequest method.
  654. // req, resp := client.DeleteRepositoryPolicyRequest(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/ecr-2015-09-21/DeleteRepositoryPolicy
  662. func (c *ECR) DeleteRepositoryPolicyRequest(input *DeleteRepositoryPolicyInput) (req *request.Request, output *DeleteRepositoryPolicyOutput) {
  663. op := &request.Operation{
  664. Name: opDeleteRepositoryPolicy,
  665. HTTPMethod: "POST",
  666. HTTPPath: "/",
  667. }
  668. if input == nil {
  669. input = &DeleteRepositoryPolicyInput{}
  670. }
  671. output = &DeleteRepositoryPolicyOutput{}
  672. req = c.newRequest(op, input, output)
  673. return
  674. }
  675. // DeleteRepositoryPolicy API operation for Amazon EC2 Container Registry.
  676. //
  677. // Deletes the repository policy from a specified repository.
  678. //
  679. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  680. // with awserr.Error's Code and Message methods to get detailed information about
  681. // the error.
  682. //
  683. // See the AWS API reference guide for Amazon EC2 Container Registry's
  684. // API operation DeleteRepositoryPolicy for usage and error information.
  685. //
  686. // Returned Error Codes:
  687. // * ErrCodeServerException "ServerException"
  688. // These errors are usually caused by a server-side issue.
  689. //
  690. // * ErrCodeInvalidParameterException "InvalidParameterException"
  691. // The specified parameter is invalid. Review the available parameters for the
  692. // API request.
  693. //
  694. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  695. // The specified repository could not be found. Check the spelling of the specified
  696. // repository and ensure that you are performing operations on the correct registry.
  697. //
  698. // * ErrCodeRepositoryPolicyNotFoundException "RepositoryPolicyNotFoundException"
  699. // The specified repository and registry combination does not have an associated
  700. // repository policy.
  701. //
  702. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicy
  703. func (c *ECR) DeleteRepositoryPolicy(input *DeleteRepositoryPolicyInput) (*DeleteRepositoryPolicyOutput, error) {
  704. req, out := c.DeleteRepositoryPolicyRequest(input)
  705. return out, req.Send()
  706. }
  707. // DeleteRepositoryPolicyWithContext is the same as DeleteRepositoryPolicy with the addition of
  708. // the ability to pass a context and additional request options.
  709. //
  710. // See DeleteRepositoryPolicy for details on how to use this API operation.
  711. //
  712. // The context must be non-nil and will be used for request cancellation. If
  713. // the context is nil a panic will occur. In the future the SDK may create
  714. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  715. // for more information on using Contexts.
  716. func (c *ECR) DeleteRepositoryPolicyWithContext(ctx aws.Context, input *DeleteRepositoryPolicyInput, opts ...request.Option) (*DeleteRepositoryPolicyOutput, error) {
  717. req, out := c.DeleteRepositoryPolicyRequest(input)
  718. req.SetContext(ctx)
  719. req.ApplyOptions(opts...)
  720. return out, req.Send()
  721. }
  722. const opDescribeImages = "DescribeImages"
  723. // DescribeImagesRequest generates a "aws/request.Request" representing the
  724. // client's request for the DescribeImages operation. The "output" return
  725. // value will be populated with the request's response once the request completes
  726. // successfully.
  727. //
  728. // Use "Send" method on the returned Request to send the API call to the service.
  729. // the "output" return value is not valid until after Send returns without error.
  730. //
  731. // See DescribeImages for more information on using the DescribeImages
  732. // API call, and error handling.
  733. //
  734. // This method is useful when you want to inject custom logic or configuration
  735. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  736. //
  737. //
  738. // // Example sending a request using the DescribeImagesRequest method.
  739. // req, resp := client.DescribeImagesRequest(params)
  740. //
  741. // err := req.Send()
  742. // if err == nil { // resp is now filled
  743. // fmt.Println(resp)
  744. // }
  745. //
  746. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImages
  747. func (c *ECR) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Request, output *DescribeImagesOutput) {
  748. op := &request.Operation{
  749. Name: opDescribeImages,
  750. HTTPMethod: "POST",
  751. HTTPPath: "/",
  752. Paginator: &request.Paginator{
  753. InputTokens: []string{"nextToken"},
  754. OutputTokens: []string{"nextToken"},
  755. LimitToken: "maxResults",
  756. TruncationToken: "",
  757. },
  758. }
  759. if input == nil {
  760. input = &DescribeImagesInput{}
  761. }
  762. output = &DescribeImagesOutput{}
  763. req = c.newRequest(op, input, output)
  764. return
  765. }
  766. // DescribeImages API operation for Amazon EC2 Container Registry.
  767. //
  768. // Returns metadata about the images in a repository, including image size,
  769. // image tags, and creation date.
  770. //
  771. // Beginning with Docker version 1.9, the Docker client compresses image layers
  772. // before pushing them to a V2 Docker registry. The output of the docker images
  773. // command shows the uncompressed image size, so it may return a larger image
  774. // size than the image sizes returned by DescribeImages.
  775. //
  776. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  777. // with awserr.Error's Code and Message methods to get detailed information about
  778. // the error.
  779. //
  780. // See the AWS API reference guide for Amazon EC2 Container Registry's
  781. // API operation DescribeImages for usage and error information.
  782. //
  783. // Returned Error Codes:
  784. // * ErrCodeServerException "ServerException"
  785. // These errors are usually caused by a server-side issue.
  786. //
  787. // * ErrCodeInvalidParameterException "InvalidParameterException"
  788. // The specified parameter is invalid. Review the available parameters for the
  789. // API request.
  790. //
  791. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  792. // The specified repository could not be found. Check the spelling of the specified
  793. // repository and ensure that you are performing operations on the correct registry.
  794. //
  795. // * ErrCodeImageNotFoundException "ImageNotFoundException"
  796. // The image requested does not exist in the specified repository.
  797. //
  798. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImages
  799. func (c *ECR) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) {
  800. req, out := c.DescribeImagesRequest(input)
  801. return out, req.Send()
  802. }
  803. // DescribeImagesWithContext is the same as DescribeImages with the addition of
  804. // the ability to pass a context and additional request options.
  805. //
  806. // See DescribeImages for details on how to use this API operation.
  807. //
  808. // The context must be non-nil and will be used for request cancellation. If
  809. // the context is nil a panic will occur. In the future the SDK may create
  810. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  811. // for more information on using Contexts.
  812. func (c *ECR) DescribeImagesWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.Option) (*DescribeImagesOutput, error) {
  813. req, out := c.DescribeImagesRequest(input)
  814. req.SetContext(ctx)
  815. req.ApplyOptions(opts...)
  816. return out, req.Send()
  817. }
  818. // DescribeImagesPages iterates over the pages of a DescribeImages operation,
  819. // calling the "fn" function with the response data for each page. To stop
  820. // iterating, return false from the fn function.
  821. //
  822. // See DescribeImages method for more information on how to use this operation.
  823. //
  824. // Note: This operation can generate multiple requests to a service.
  825. //
  826. // // Example iterating over at most 3 pages of a DescribeImages operation.
  827. // pageNum := 0
  828. // err := client.DescribeImagesPages(params,
  829. // func(page *DescribeImagesOutput, lastPage bool) bool {
  830. // pageNum++
  831. // fmt.Println(page)
  832. // return pageNum <= 3
  833. // })
  834. //
  835. func (c *ECR) DescribeImagesPages(input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool) error {
  836. return c.DescribeImagesPagesWithContext(aws.BackgroundContext(), input, fn)
  837. }
  838. // DescribeImagesPagesWithContext same as DescribeImagesPages except
  839. // it takes a Context and allows setting request options on the pages.
  840. //
  841. // The context must be non-nil and will be used for request cancellation. If
  842. // the context is nil a panic will occur. In the future the SDK may create
  843. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  844. // for more information on using Contexts.
  845. func (c *ECR) DescribeImagesPagesWithContext(ctx aws.Context, input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool, opts ...request.Option) error {
  846. p := request.Pagination{
  847. NewRequest: func() (*request.Request, error) {
  848. var inCpy *DescribeImagesInput
  849. if input != nil {
  850. tmp := *input
  851. inCpy = &tmp
  852. }
  853. req, _ := c.DescribeImagesRequest(inCpy)
  854. req.SetContext(ctx)
  855. req.ApplyOptions(opts...)
  856. return req, nil
  857. },
  858. }
  859. cont := true
  860. for p.Next() && cont {
  861. cont = fn(p.Page().(*DescribeImagesOutput), !p.HasNextPage())
  862. }
  863. return p.Err()
  864. }
  865. const opDescribeRepositories = "DescribeRepositories"
  866. // DescribeRepositoriesRequest generates a "aws/request.Request" representing the
  867. // client's request for the DescribeRepositories operation. The "output" return
  868. // value will be populated with the request's response once the request completes
  869. // successfully.
  870. //
  871. // Use "Send" method on the returned Request to send the API call to the service.
  872. // the "output" return value is not valid until after Send returns without error.
  873. //
  874. // See DescribeRepositories for more information on using the DescribeRepositories
  875. // API call, and error handling.
  876. //
  877. // This method is useful when you want to inject custom logic or configuration
  878. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  879. //
  880. //
  881. // // Example sending a request using the DescribeRepositoriesRequest method.
  882. // req, resp := client.DescribeRepositoriesRequest(params)
  883. //
  884. // err := req.Send()
  885. // if err == nil { // resp is now filled
  886. // fmt.Println(resp)
  887. // }
  888. //
  889. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositories
  890. func (c *ECR) DescribeRepositoriesRequest(input *DescribeRepositoriesInput) (req *request.Request, output *DescribeRepositoriesOutput) {
  891. op := &request.Operation{
  892. Name: opDescribeRepositories,
  893. HTTPMethod: "POST",
  894. HTTPPath: "/",
  895. Paginator: &request.Paginator{
  896. InputTokens: []string{"nextToken"},
  897. OutputTokens: []string{"nextToken"},
  898. LimitToken: "maxResults",
  899. TruncationToken: "",
  900. },
  901. }
  902. if input == nil {
  903. input = &DescribeRepositoriesInput{}
  904. }
  905. output = &DescribeRepositoriesOutput{}
  906. req = c.newRequest(op, input, output)
  907. return
  908. }
  909. // DescribeRepositories API operation for Amazon EC2 Container Registry.
  910. //
  911. // Describes image repositories in a registry.
  912. //
  913. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  914. // with awserr.Error's Code and Message methods to get detailed information about
  915. // the error.
  916. //
  917. // See the AWS API reference guide for Amazon EC2 Container Registry's
  918. // API operation DescribeRepositories for usage and error information.
  919. //
  920. // Returned Error Codes:
  921. // * ErrCodeServerException "ServerException"
  922. // These errors are usually caused by a server-side issue.
  923. //
  924. // * ErrCodeInvalidParameterException "InvalidParameterException"
  925. // The specified parameter is invalid. Review the available parameters for the
  926. // API request.
  927. //
  928. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  929. // The specified repository could not be found. Check the spelling of the specified
  930. // repository and ensure that you are performing operations on the correct registry.
  931. //
  932. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositories
  933. func (c *ECR) DescribeRepositories(input *DescribeRepositoriesInput) (*DescribeRepositoriesOutput, error) {
  934. req, out := c.DescribeRepositoriesRequest(input)
  935. return out, req.Send()
  936. }
  937. // DescribeRepositoriesWithContext is the same as DescribeRepositories with the addition of
  938. // the ability to pass a context and additional request options.
  939. //
  940. // See DescribeRepositories for details on how to use this API operation.
  941. //
  942. // The context must be non-nil and will be used for request cancellation. If
  943. // the context is nil a panic will occur. In the future the SDK may create
  944. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  945. // for more information on using Contexts.
  946. func (c *ECR) DescribeRepositoriesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, opts ...request.Option) (*DescribeRepositoriesOutput, error) {
  947. req, out := c.DescribeRepositoriesRequest(input)
  948. req.SetContext(ctx)
  949. req.ApplyOptions(opts...)
  950. return out, req.Send()
  951. }
  952. // DescribeRepositoriesPages iterates over the pages of a DescribeRepositories operation,
  953. // calling the "fn" function with the response data for each page. To stop
  954. // iterating, return false from the fn function.
  955. //
  956. // See DescribeRepositories method for more information on how to use this operation.
  957. //
  958. // Note: This operation can generate multiple requests to a service.
  959. //
  960. // // Example iterating over at most 3 pages of a DescribeRepositories operation.
  961. // pageNum := 0
  962. // err := client.DescribeRepositoriesPages(params,
  963. // func(page *DescribeRepositoriesOutput, lastPage bool) bool {
  964. // pageNum++
  965. // fmt.Println(page)
  966. // return pageNum <= 3
  967. // })
  968. //
  969. func (c *ECR) DescribeRepositoriesPages(input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool) error {
  970. return c.DescribeRepositoriesPagesWithContext(aws.BackgroundContext(), input, fn)
  971. }
  972. // DescribeRepositoriesPagesWithContext same as DescribeRepositoriesPages except
  973. // it takes a Context and allows setting request options on the pages.
  974. //
  975. // The context must be non-nil and will be used for request cancellation. If
  976. // the context is nil a panic will occur. In the future the SDK may create
  977. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  978. // for more information on using Contexts.
  979. func (c *ECR) DescribeRepositoriesPagesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool, opts ...request.Option) error {
  980. p := request.Pagination{
  981. NewRequest: func() (*request.Request, error) {
  982. var inCpy *DescribeRepositoriesInput
  983. if input != nil {
  984. tmp := *input
  985. inCpy = &tmp
  986. }
  987. req, _ := c.DescribeRepositoriesRequest(inCpy)
  988. req.SetContext(ctx)
  989. req.ApplyOptions(opts...)
  990. return req, nil
  991. },
  992. }
  993. cont := true
  994. for p.Next() && cont {
  995. cont = fn(p.Page().(*DescribeRepositoriesOutput), !p.HasNextPage())
  996. }
  997. return p.Err()
  998. }
  999. const opGetAuthorizationToken = "GetAuthorizationToken"
  1000. // GetAuthorizationTokenRequest generates a "aws/request.Request" representing the
  1001. // client's request for the GetAuthorizationToken operation. The "output" return
  1002. // value will be populated with the request's response once the request completes
  1003. // successfully.
  1004. //
  1005. // Use "Send" method on the returned Request to send the API call to the service.
  1006. // the "output" return value is not valid until after Send returns without error.
  1007. //
  1008. // See GetAuthorizationToken for more information on using the GetAuthorizationToken
  1009. // API call, and error handling.
  1010. //
  1011. // This method is useful when you want to inject custom logic or configuration
  1012. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1013. //
  1014. //
  1015. // // Example sending a request using the GetAuthorizationTokenRequest method.
  1016. // req, resp := client.GetAuthorizationTokenRequest(params)
  1017. //
  1018. // err := req.Send()
  1019. // if err == nil { // resp is now filled
  1020. // fmt.Println(resp)
  1021. // }
  1022. //
  1023. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationToken
  1024. func (c *ECR) GetAuthorizationTokenRequest(input *GetAuthorizationTokenInput) (req *request.Request, output *GetAuthorizationTokenOutput) {
  1025. op := &request.Operation{
  1026. Name: opGetAuthorizationToken,
  1027. HTTPMethod: "POST",
  1028. HTTPPath: "/",
  1029. }
  1030. if input == nil {
  1031. input = &GetAuthorizationTokenInput{}
  1032. }
  1033. output = &GetAuthorizationTokenOutput{}
  1034. req = c.newRequest(op, input, output)
  1035. return
  1036. }
  1037. // GetAuthorizationToken API operation for Amazon EC2 Container Registry.
  1038. //
  1039. // Retrieves a token that is valid for a specified registry for 12 hours. This
  1040. // command allows you to use the docker CLI to push and pull images with Amazon
  1041. // ECR. If you do not specify a registry, the default registry is assumed.
  1042. //
  1043. // The authorizationToken returned for each registry specified is a base64 encoded
  1044. // string that can be decoded and used in a docker login command to authenticate
  1045. // to a registry. The AWS CLI offers an aws ecr get-login command that simplifies
  1046. // the login process.
  1047. //
  1048. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1049. // with awserr.Error's Code and Message methods to get detailed information about
  1050. // the error.
  1051. //
  1052. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1053. // API operation GetAuthorizationToken for usage and error information.
  1054. //
  1055. // Returned Error Codes:
  1056. // * ErrCodeServerException "ServerException"
  1057. // These errors are usually caused by a server-side issue.
  1058. //
  1059. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1060. // The specified parameter is invalid. Review the available parameters for the
  1061. // API request.
  1062. //
  1063. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationToken
  1064. func (c *ECR) GetAuthorizationToken(input *GetAuthorizationTokenInput) (*GetAuthorizationTokenOutput, error) {
  1065. req, out := c.GetAuthorizationTokenRequest(input)
  1066. return out, req.Send()
  1067. }
  1068. // GetAuthorizationTokenWithContext is the same as GetAuthorizationToken with the addition of
  1069. // the ability to pass a context and additional request options.
  1070. //
  1071. // See GetAuthorizationToken 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 *ECR) GetAuthorizationTokenWithContext(ctx aws.Context, input *GetAuthorizationTokenInput, opts ...request.Option) (*GetAuthorizationTokenOutput, error) {
  1078. req, out := c.GetAuthorizationTokenRequest(input)
  1079. req.SetContext(ctx)
  1080. req.ApplyOptions(opts...)
  1081. return out, req.Send()
  1082. }
  1083. const opGetDownloadUrlForLayer = "GetDownloadUrlForLayer"
  1084. // GetDownloadUrlForLayerRequest generates a "aws/request.Request" representing the
  1085. // client's request for the GetDownloadUrlForLayer 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 GetDownloadUrlForLayer for more information on using the GetDownloadUrlForLayer
  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 GetDownloadUrlForLayerRequest method.
  1100. // req, resp := client.GetDownloadUrlForLayerRequest(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/ecr-2015-09-21/GetDownloadUrlForLayer
  1108. func (c *ECR) GetDownloadUrlForLayerRequest(input *GetDownloadUrlForLayerInput) (req *request.Request, output *GetDownloadUrlForLayerOutput) {
  1109. op := &request.Operation{
  1110. Name: opGetDownloadUrlForLayer,
  1111. HTTPMethod: "POST",
  1112. HTTPPath: "/",
  1113. }
  1114. if input == nil {
  1115. input = &GetDownloadUrlForLayerInput{}
  1116. }
  1117. output = &GetDownloadUrlForLayerOutput{}
  1118. req = c.newRequest(op, input, output)
  1119. return
  1120. }
  1121. // GetDownloadUrlForLayer API operation for Amazon EC2 Container Registry.
  1122. //
  1123. // Retrieves the pre-signed Amazon S3 download URL corresponding to an image
  1124. // layer. You can only get URLs for image layers that are referenced in an image.
  1125. //
  1126. // This operation is used by the Amazon ECR proxy, and it is not intended for
  1127. // general use by customers for pulling and pushing images. In most cases, you
  1128. // should use the docker CLI to pull, tag, and push images.
  1129. //
  1130. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1131. // with awserr.Error's Code and Message methods to get detailed information about
  1132. // the error.
  1133. //
  1134. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1135. // API operation GetDownloadUrlForLayer for usage and error information.
  1136. //
  1137. // Returned Error Codes:
  1138. // * ErrCodeServerException "ServerException"
  1139. // These errors are usually caused by a server-side issue.
  1140. //
  1141. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1142. // The specified parameter is invalid. Review the available parameters for the
  1143. // API request.
  1144. //
  1145. // * ErrCodeLayersNotFoundException "LayersNotFoundException"
  1146. // The specified layers could not be found, or the specified layer is not valid
  1147. // for this repository.
  1148. //
  1149. // * ErrCodeLayerInaccessibleException "LayerInaccessibleException"
  1150. // The specified layer is not available because it is not associated with an
  1151. // image. Unassociated image layers may be cleaned up at any time.
  1152. //
  1153. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  1154. // The specified repository could not be found. Check the spelling of the specified
  1155. // repository and ensure that you are performing operations on the correct registry.
  1156. //
  1157. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayer
  1158. func (c *ECR) GetDownloadUrlForLayer(input *GetDownloadUrlForLayerInput) (*GetDownloadUrlForLayerOutput, error) {
  1159. req, out := c.GetDownloadUrlForLayerRequest(input)
  1160. return out, req.Send()
  1161. }
  1162. // GetDownloadUrlForLayerWithContext is the same as GetDownloadUrlForLayer with the addition of
  1163. // the ability to pass a context and additional request options.
  1164. //
  1165. // See GetDownloadUrlForLayer for details on how to use this API operation.
  1166. //
  1167. // The context must be non-nil and will be used for request cancellation. If
  1168. // the context is nil a panic will occur. In the future the SDK may create
  1169. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1170. // for more information on using Contexts.
  1171. func (c *ECR) GetDownloadUrlForLayerWithContext(ctx aws.Context, input *GetDownloadUrlForLayerInput, opts ...request.Option) (*GetDownloadUrlForLayerOutput, error) {
  1172. req, out := c.GetDownloadUrlForLayerRequest(input)
  1173. req.SetContext(ctx)
  1174. req.ApplyOptions(opts...)
  1175. return out, req.Send()
  1176. }
  1177. const opGetLifecyclePolicy = "GetLifecyclePolicy"
  1178. // GetLifecyclePolicyRequest generates a "aws/request.Request" representing the
  1179. // client's request for the GetLifecyclePolicy operation. The "output" return
  1180. // value will be populated with the request's response once the request completes
  1181. // successfully.
  1182. //
  1183. // Use "Send" method on the returned Request to send the API call to the service.
  1184. // the "output" return value is not valid until after Send returns without error.
  1185. //
  1186. // See GetLifecyclePolicy for more information on using the GetLifecyclePolicy
  1187. // API call, and error handling.
  1188. //
  1189. // This method is useful when you want to inject custom logic or configuration
  1190. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1191. //
  1192. //
  1193. // // Example sending a request using the GetLifecyclePolicyRequest method.
  1194. // req, resp := client.GetLifecyclePolicyRequest(params)
  1195. //
  1196. // err := req.Send()
  1197. // if err == nil { // resp is now filled
  1198. // fmt.Println(resp)
  1199. // }
  1200. //
  1201. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicy
  1202. func (c *ECR) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput) {
  1203. op := &request.Operation{
  1204. Name: opGetLifecyclePolicy,
  1205. HTTPMethod: "POST",
  1206. HTTPPath: "/",
  1207. }
  1208. if input == nil {
  1209. input = &GetLifecyclePolicyInput{}
  1210. }
  1211. output = &GetLifecyclePolicyOutput{}
  1212. req = c.newRequest(op, input, output)
  1213. return
  1214. }
  1215. // GetLifecyclePolicy API operation for Amazon EC2 Container Registry.
  1216. //
  1217. // Retrieves the specified lifecycle policy.
  1218. //
  1219. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1220. // with awserr.Error's Code and Message methods to get detailed information about
  1221. // the error.
  1222. //
  1223. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1224. // API operation GetLifecyclePolicy for usage and error information.
  1225. //
  1226. // Returned Error Codes:
  1227. // * ErrCodeServerException "ServerException"
  1228. // These errors are usually caused by a server-side issue.
  1229. //
  1230. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1231. // The specified parameter is invalid. Review the available parameters for the
  1232. // API request.
  1233. //
  1234. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  1235. // The specified repository could not be found. Check the spelling of the specified
  1236. // repository and ensure that you are performing operations on the correct registry.
  1237. //
  1238. // * ErrCodeLifecyclePolicyNotFoundException "LifecyclePolicyNotFoundException"
  1239. // The lifecycle policy could not be found, and no policy is set to the repository.
  1240. //
  1241. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicy
  1242. func (c *ECR) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error) {
  1243. req, out := c.GetLifecyclePolicyRequest(input)
  1244. return out, req.Send()
  1245. }
  1246. // GetLifecyclePolicyWithContext is the same as GetLifecyclePolicy with the addition of
  1247. // the ability to pass a context and additional request options.
  1248. //
  1249. // See GetLifecyclePolicy for details on how to use this API operation.
  1250. //
  1251. // The context must be non-nil and will be used for request cancellation. If
  1252. // the context is nil a panic will occur. In the future the SDK may create
  1253. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1254. // for more information on using Contexts.
  1255. func (c *ECR) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error) {
  1256. req, out := c.GetLifecyclePolicyRequest(input)
  1257. req.SetContext(ctx)
  1258. req.ApplyOptions(opts...)
  1259. return out, req.Send()
  1260. }
  1261. const opGetLifecyclePolicyPreview = "GetLifecyclePolicyPreview"
  1262. // GetLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the
  1263. // client's request for the GetLifecyclePolicyPreview operation. The "output" return
  1264. // value will be populated with the request's response once the request completes
  1265. // successfully.
  1266. //
  1267. // Use "Send" method on the returned Request to send the API call to the service.
  1268. // the "output" return value is not valid until after Send returns without error.
  1269. //
  1270. // See GetLifecyclePolicyPreview for more information on using the GetLifecyclePolicyPreview
  1271. // API call, and error handling.
  1272. //
  1273. // This method is useful when you want to inject custom logic or configuration
  1274. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1275. //
  1276. //
  1277. // // Example sending a request using the GetLifecyclePolicyPreviewRequest method.
  1278. // req, resp := client.GetLifecyclePolicyPreviewRequest(params)
  1279. //
  1280. // err := req.Send()
  1281. // if err == nil { // resp is now filled
  1282. // fmt.Println(resp)
  1283. // }
  1284. //
  1285. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreview
  1286. func (c *ECR) GetLifecyclePolicyPreviewRequest(input *GetLifecyclePolicyPreviewInput) (req *request.Request, output *GetLifecyclePolicyPreviewOutput) {
  1287. op := &request.Operation{
  1288. Name: opGetLifecyclePolicyPreview,
  1289. HTTPMethod: "POST",
  1290. HTTPPath: "/",
  1291. }
  1292. if input == nil {
  1293. input = &GetLifecyclePolicyPreviewInput{}
  1294. }
  1295. output = &GetLifecyclePolicyPreviewOutput{}
  1296. req = c.newRequest(op, input, output)
  1297. return
  1298. }
  1299. // GetLifecyclePolicyPreview API operation for Amazon EC2 Container Registry.
  1300. //
  1301. // Retrieves the results of the specified lifecycle policy preview request.
  1302. //
  1303. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1304. // with awserr.Error's Code and Message methods to get detailed information about
  1305. // the error.
  1306. //
  1307. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1308. // API operation GetLifecyclePolicyPreview for usage and error information.
  1309. //
  1310. // Returned Error Codes:
  1311. // * ErrCodeServerException "ServerException"
  1312. // These errors are usually caused by a server-side issue.
  1313. //
  1314. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1315. // The specified parameter is invalid. Review the available parameters for the
  1316. // API request.
  1317. //
  1318. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  1319. // The specified repository could not be found. Check the spelling of the specified
  1320. // repository and ensure that you are performing operations on the correct registry.
  1321. //
  1322. // * ErrCodeLifecyclePolicyPreviewNotFoundException "LifecyclePolicyPreviewNotFoundException"
  1323. // There is no dry run for this repository.
  1324. //
  1325. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreview
  1326. func (c *ECR) GetLifecyclePolicyPreview(input *GetLifecyclePolicyPreviewInput) (*GetLifecyclePolicyPreviewOutput, error) {
  1327. req, out := c.GetLifecyclePolicyPreviewRequest(input)
  1328. return out, req.Send()
  1329. }
  1330. // GetLifecyclePolicyPreviewWithContext is the same as GetLifecyclePolicyPreview with the addition of
  1331. // the ability to pass a context and additional request options.
  1332. //
  1333. // See GetLifecyclePolicyPreview for details on how to use this API operation.
  1334. //
  1335. // The context must be non-nil and will be used for request cancellation. If
  1336. // the context is nil a panic will occur. In the future the SDK may create
  1337. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1338. // for more information on using Contexts.
  1339. func (c *ECR) GetLifecyclePolicyPreviewWithContext(ctx aws.Context, input *GetLifecyclePolicyPreviewInput, opts ...request.Option) (*GetLifecyclePolicyPreviewOutput, error) {
  1340. req, out := c.GetLifecyclePolicyPreviewRequest(input)
  1341. req.SetContext(ctx)
  1342. req.ApplyOptions(opts...)
  1343. return out, req.Send()
  1344. }
  1345. const opGetRepositoryPolicy = "GetRepositoryPolicy"
  1346. // GetRepositoryPolicyRequest generates a "aws/request.Request" representing the
  1347. // client's request for the GetRepositoryPolicy operation. The "output" return
  1348. // value will be populated with the request's response once the request completes
  1349. // successfully.
  1350. //
  1351. // Use "Send" method on the returned Request to send the API call to the service.
  1352. // the "output" return value is not valid until after Send returns without error.
  1353. //
  1354. // See GetRepositoryPolicy for more information on using the GetRepositoryPolicy
  1355. // API call, and error handling.
  1356. //
  1357. // This method is useful when you want to inject custom logic or configuration
  1358. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1359. //
  1360. //
  1361. // // Example sending a request using the GetRepositoryPolicyRequest method.
  1362. // req, resp := client.GetRepositoryPolicyRequest(params)
  1363. //
  1364. // err := req.Send()
  1365. // if err == nil { // resp is now filled
  1366. // fmt.Println(resp)
  1367. // }
  1368. //
  1369. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicy
  1370. func (c *ECR) GetRepositoryPolicyRequest(input *GetRepositoryPolicyInput) (req *request.Request, output *GetRepositoryPolicyOutput) {
  1371. op := &request.Operation{
  1372. Name: opGetRepositoryPolicy,
  1373. HTTPMethod: "POST",
  1374. HTTPPath: "/",
  1375. }
  1376. if input == nil {
  1377. input = &GetRepositoryPolicyInput{}
  1378. }
  1379. output = &GetRepositoryPolicyOutput{}
  1380. req = c.newRequest(op, input, output)
  1381. return
  1382. }
  1383. // GetRepositoryPolicy API operation for Amazon EC2 Container Registry.
  1384. //
  1385. // Retrieves the repository policy for a specified repository.
  1386. //
  1387. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1388. // with awserr.Error's Code and Message methods to get detailed information about
  1389. // the error.
  1390. //
  1391. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1392. // API operation GetRepositoryPolicy for usage and error information.
  1393. //
  1394. // Returned Error Codes:
  1395. // * ErrCodeServerException "ServerException"
  1396. // These errors are usually caused by a server-side issue.
  1397. //
  1398. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1399. // The specified parameter is invalid. Review the available parameters for the
  1400. // API request.
  1401. //
  1402. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  1403. // The specified repository could not be found. Check the spelling of the specified
  1404. // repository and ensure that you are performing operations on the correct registry.
  1405. //
  1406. // * ErrCodeRepositoryPolicyNotFoundException "RepositoryPolicyNotFoundException"
  1407. // The specified repository and registry combination does not have an associated
  1408. // repository policy.
  1409. //
  1410. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicy
  1411. func (c *ECR) GetRepositoryPolicy(input *GetRepositoryPolicyInput) (*GetRepositoryPolicyOutput, error) {
  1412. req, out := c.GetRepositoryPolicyRequest(input)
  1413. return out, req.Send()
  1414. }
  1415. // GetRepositoryPolicyWithContext is the same as GetRepositoryPolicy with the addition of
  1416. // the ability to pass a context and additional request options.
  1417. //
  1418. // See GetRepositoryPolicy for details on how to use this API operation.
  1419. //
  1420. // The context must be non-nil and will be used for request cancellation. If
  1421. // the context is nil a panic will occur. In the future the SDK may create
  1422. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1423. // for more information on using Contexts.
  1424. func (c *ECR) GetRepositoryPolicyWithContext(ctx aws.Context, input *GetRepositoryPolicyInput, opts ...request.Option) (*GetRepositoryPolicyOutput, error) {
  1425. req, out := c.GetRepositoryPolicyRequest(input)
  1426. req.SetContext(ctx)
  1427. req.ApplyOptions(opts...)
  1428. return out, req.Send()
  1429. }
  1430. const opInitiateLayerUpload = "InitiateLayerUpload"
  1431. // InitiateLayerUploadRequest generates a "aws/request.Request" representing the
  1432. // client's request for the InitiateLayerUpload operation. The "output" return
  1433. // value will be populated with the request's response once the request completes
  1434. // successfully.
  1435. //
  1436. // Use "Send" method on the returned Request to send the API call to the service.
  1437. // the "output" return value is not valid until after Send returns without error.
  1438. //
  1439. // See InitiateLayerUpload for more information on using the InitiateLayerUpload
  1440. // API call, and error handling.
  1441. //
  1442. // This method is useful when you want to inject custom logic or configuration
  1443. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1444. //
  1445. //
  1446. // // Example sending a request using the InitiateLayerUploadRequest method.
  1447. // req, resp := client.InitiateLayerUploadRequest(params)
  1448. //
  1449. // err := req.Send()
  1450. // if err == nil { // resp is now filled
  1451. // fmt.Println(resp)
  1452. // }
  1453. //
  1454. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUpload
  1455. func (c *ECR) InitiateLayerUploadRequest(input *InitiateLayerUploadInput) (req *request.Request, output *InitiateLayerUploadOutput) {
  1456. op := &request.Operation{
  1457. Name: opInitiateLayerUpload,
  1458. HTTPMethod: "POST",
  1459. HTTPPath: "/",
  1460. }
  1461. if input == nil {
  1462. input = &InitiateLayerUploadInput{}
  1463. }
  1464. output = &InitiateLayerUploadOutput{}
  1465. req = c.newRequest(op, input, output)
  1466. return
  1467. }
  1468. // InitiateLayerUpload API operation for Amazon EC2 Container Registry.
  1469. //
  1470. // Notify Amazon ECR that you intend to upload an image layer.
  1471. //
  1472. // This operation is used by the Amazon ECR proxy, and it is not intended for
  1473. // general use by customers for pulling and pushing images. In most cases, you
  1474. // should use the docker CLI to pull, tag, and push images.
  1475. //
  1476. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1477. // with awserr.Error's Code and Message methods to get detailed information about
  1478. // the error.
  1479. //
  1480. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1481. // API operation InitiateLayerUpload for usage and error information.
  1482. //
  1483. // Returned Error Codes:
  1484. // * ErrCodeServerException "ServerException"
  1485. // These errors are usually caused by a server-side issue.
  1486. //
  1487. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1488. // The specified parameter is invalid. Review the available parameters for the
  1489. // API request.
  1490. //
  1491. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  1492. // The specified repository could not be found. Check the spelling of the specified
  1493. // repository and ensure that you are performing operations on the correct registry.
  1494. //
  1495. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUpload
  1496. func (c *ECR) InitiateLayerUpload(input *InitiateLayerUploadInput) (*InitiateLayerUploadOutput, error) {
  1497. req, out := c.InitiateLayerUploadRequest(input)
  1498. return out, req.Send()
  1499. }
  1500. // InitiateLayerUploadWithContext is the same as InitiateLayerUpload with the addition of
  1501. // the ability to pass a context and additional request options.
  1502. //
  1503. // See InitiateLayerUpload for details on how to use this API operation.
  1504. //
  1505. // The context must be non-nil and will be used for request cancellation. If
  1506. // the context is nil a panic will occur. In the future the SDK may create
  1507. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1508. // for more information on using Contexts.
  1509. func (c *ECR) InitiateLayerUploadWithContext(ctx aws.Context, input *InitiateLayerUploadInput, opts ...request.Option) (*InitiateLayerUploadOutput, error) {
  1510. req, out := c.InitiateLayerUploadRequest(input)
  1511. req.SetContext(ctx)
  1512. req.ApplyOptions(opts...)
  1513. return out, req.Send()
  1514. }
  1515. const opListImages = "ListImages"
  1516. // ListImagesRequest generates a "aws/request.Request" representing the
  1517. // client's request for the ListImages operation. The "output" return
  1518. // value will be populated with the request's response once the request completes
  1519. // successfully.
  1520. //
  1521. // Use "Send" method on the returned Request to send the API call to the service.
  1522. // the "output" return value is not valid until after Send returns without error.
  1523. //
  1524. // See ListImages for more information on using the ListImages
  1525. // API call, and error handling.
  1526. //
  1527. // This method is useful when you want to inject custom logic or configuration
  1528. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1529. //
  1530. //
  1531. // // Example sending a request using the ListImagesRequest method.
  1532. // req, resp := client.ListImagesRequest(params)
  1533. //
  1534. // err := req.Send()
  1535. // if err == nil { // resp is now filled
  1536. // fmt.Println(resp)
  1537. // }
  1538. //
  1539. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImages
  1540. func (c *ECR) ListImagesRequest(input *ListImagesInput) (req *request.Request, output *ListImagesOutput) {
  1541. op := &request.Operation{
  1542. Name: opListImages,
  1543. HTTPMethod: "POST",
  1544. HTTPPath: "/",
  1545. Paginator: &request.Paginator{
  1546. InputTokens: []string{"nextToken"},
  1547. OutputTokens: []string{"nextToken"},
  1548. LimitToken: "maxResults",
  1549. TruncationToken: "",
  1550. },
  1551. }
  1552. if input == nil {
  1553. input = &ListImagesInput{}
  1554. }
  1555. output = &ListImagesOutput{}
  1556. req = c.newRequest(op, input, output)
  1557. return
  1558. }
  1559. // ListImages API operation for Amazon EC2 Container Registry.
  1560. //
  1561. // Lists all the image IDs for a given repository.
  1562. //
  1563. // You can filter images based on whether or not they are tagged by setting
  1564. // the tagStatus parameter to TAGGED or UNTAGGED. For example, you can filter
  1565. // your results to return only UNTAGGED images and then pipe that result to
  1566. // a BatchDeleteImage operation to delete them. Or, you can filter your results
  1567. // to return only TAGGED images to list all of the tags in your repository.
  1568. //
  1569. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1570. // with awserr.Error's Code and Message methods to get detailed information about
  1571. // the error.
  1572. //
  1573. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1574. // API operation ListImages for usage and error information.
  1575. //
  1576. // Returned Error Codes:
  1577. // * ErrCodeServerException "ServerException"
  1578. // These errors are usually caused by a server-side issue.
  1579. //
  1580. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1581. // The specified parameter is invalid. Review the available parameters for the
  1582. // API request.
  1583. //
  1584. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  1585. // The specified repository could not be found. Check the spelling of the specified
  1586. // repository and ensure that you are performing operations on the correct registry.
  1587. //
  1588. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImages
  1589. func (c *ECR) ListImages(input *ListImagesInput) (*ListImagesOutput, error) {
  1590. req, out := c.ListImagesRequest(input)
  1591. return out, req.Send()
  1592. }
  1593. // ListImagesWithContext is the same as ListImages with the addition of
  1594. // the ability to pass a context and additional request options.
  1595. //
  1596. // See ListImages for details on how to use this API operation.
  1597. //
  1598. // The context must be non-nil and will be used for request cancellation. If
  1599. // the context is nil a panic will occur. In the future the SDK may create
  1600. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1601. // for more information on using Contexts.
  1602. func (c *ECR) ListImagesWithContext(ctx aws.Context, input *ListImagesInput, opts ...request.Option) (*ListImagesOutput, error) {
  1603. req, out := c.ListImagesRequest(input)
  1604. req.SetContext(ctx)
  1605. req.ApplyOptions(opts...)
  1606. return out, req.Send()
  1607. }
  1608. // ListImagesPages iterates over the pages of a ListImages operation,
  1609. // calling the "fn" function with the response data for each page. To stop
  1610. // iterating, return false from the fn function.
  1611. //
  1612. // See ListImages method for more information on how to use this operation.
  1613. //
  1614. // Note: This operation can generate multiple requests to a service.
  1615. //
  1616. // // Example iterating over at most 3 pages of a ListImages operation.
  1617. // pageNum := 0
  1618. // err := client.ListImagesPages(params,
  1619. // func(page *ListImagesOutput, lastPage bool) bool {
  1620. // pageNum++
  1621. // fmt.Println(page)
  1622. // return pageNum <= 3
  1623. // })
  1624. //
  1625. func (c *ECR) ListImagesPages(input *ListImagesInput, fn func(*ListImagesOutput, bool) bool) error {
  1626. return c.ListImagesPagesWithContext(aws.BackgroundContext(), input, fn)
  1627. }
  1628. // ListImagesPagesWithContext same as ListImagesPages except
  1629. // it takes a Context and allows setting request options on the pages.
  1630. //
  1631. // The context must be non-nil and will be used for request cancellation. If
  1632. // the context is nil a panic will occur. In the future the SDK may create
  1633. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1634. // for more information on using Contexts.
  1635. func (c *ECR) ListImagesPagesWithContext(ctx aws.Context, input *ListImagesInput, fn func(*ListImagesOutput, bool) bool, opts ...request.Option) error {
  1636. p := request.Pagination{
  1637. NewRequest: func() (*request.Request, error) {
  1638. var inCpy *ListImagesInput
  1639. if input != nil {
  1640. tmp := *input
  1641. inCpy = &tmp
  1642. }
  1643. req, _ := c.ListImagesRequest(inCpy)
  1644. req.SetContext(ctx)
  1645. req.ApplyOptions(opts...)
  1646. return req, nil
  1647. },
  1648. }
  1649. cont := true
  1650. for p.Next() && cont {
  1651. cont = fn(p.Page().(*ListImagesOutput), !p.HasNextPage())
  1652. }
  1653. return p.Err()
  1654. }
  1655. const opListTagsForResource = "ListTagsForResource"
  1656. // ListTagsForResourceRequest generates a "aws/request.Request" representing the
  1657. // client's request for the ListTagsForResource operation. The "output" return
  1658. // value will be populated with the request's response once the request completes
  1659. // successfully.
  1660. //
  1661. // Use "Send" method on the returned Request to send the API call to the service.
  1662. // the "output" return value is not valid until after Send returns without error.
  1663. //
  1664. // See ListTagsForResource for more information on using the ListTagsForResource
  1665. // API call, and error handling.
  1666. //
  1667. // This method is useful when you want to inject custom logic or configuration
  1668. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1669. //
  1670. //
  1671. // // Example sending a request using the ListTagsForResourceRequest method.
  1672. // req, resp := client.ListTagsForResourceRequest(params)
  1673. //
  1674. // err := req.Send()
  1675. // if err == nil { // resp is now filled
  1676. // fmt.Println(resp)
  1677. // }
  1678. //
  1679. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListTagsForResource
  1680. func (c *ECR) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
  1681. op := &request.Operation{
  1682. Name: opListTagsForResource,
  1683. HTTPMethod: "POST",
  1684. HTTPPath: "/",
  1685. }
  1686. if input == nil {
  1687. input = &ListTagsForResourceInput{}
  1688. }
  1689. output = &ListTagsForResourceOutput{}
  1690. req = c.newRequest(op, input, output)
  1691. return
  1692. }
  1693. // ListTagsForResource API operation for Amazon EC2 Container Registry.
  1694. //
  1695. // List the tags for an Amazon ECR resource.
  1696. //
  1697. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1698. // with awserr.Error's Code and Message methods to get detailed information about
  1699. // the error.
  1700. //
  1701. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1702. // API operation ListTagsForResource for usage and error information.
  1703. //
  1704. // Returned Error Codes:
  1705. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1706. // The specified parameter is invalid. Review the available parameters for the
  1707. // API request.
  1708. //
  1709. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  1710. // The specified repository could not be found. Check the spelling of the specified
  1711. // repository and ensure that you are performing operations on the correct registry.
  1712. //
  1713. // * ErrCodeServerException "ServerException"
  1714. // These errors are usually caused by a server-side issue.
  1715. //
  1716. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListTagsForResource
  1717. func (c *ECR) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
  1718. req, out := c.ListTagsForResourceRequest(input)
  1719. return out, req.Send()
  1720. }
  1721. // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
  1722. // the ability to pass a context and additional request options.
  1723. //
  1724. // See ListTagsForResource for details on how to use this API operation.
  1725. //
  1726. // The context must be non-nil and will be used for request cancellation. If
  1727. // the context is nil a panic will occur. In the future the SDK may create
  1728. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1729. // for more information on using Contexts.
  1730. func (c *ECR) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
  1731. req, out := c.ListTagsForResourceRequest(input)
  1732. req.SetContext(ctx)
  1733. req.ApplyOptions(opts...)
  1734. return out, req.Send()
  1735. }
  1736. const opPutImage = "PutImage"
  1737. // PutImageRequest generates a "aws/request.Request" representing the
  1738. // client's request for the PutImage operation. The "output" return
  1739. // value will be populated with the request's response once the request completes
  1740. // successfully.
  1741. //
  1742. // Use "Send" method on the returned Request to send the API call to the service.
  1743. // the "output" return value is not valid until after Send returns without error.
  1744. //
  1745. // See PutImage for more information on using the PutImage
  1746. // API call, and error handling.
  1747. //
  1748. // This method is useful when you want to inject custom logic or configuration
  1749. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1750. //
  1751. //
  1752. // // Example sending a request using the PutImageRequest method.
  1753. // req, resp := client.PutImageRequest(params)
  1754. //
  1755. // err := req.Send()
  1756. // if err == nil { // resp is now filled
  1757. // fmt.Println(resp)
  1758. // }
  1759. //
  1760. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImage
  1761. func (c *ECR) PutImageRequest(input *PutImageInput) (req *request.Request, output *PutImageOutput) {
  1762. op := &request.Operation{
  1763. Name: opPutImage,
  1764. HTTPMethod: "POST",
  1765. HTTPPath: "/",
  1766. }
  1767. if input == nil {
  1768. input = &PutImageInput{}
  1769. }
  1770. output = &PutImageOutput{}
  1771. req = c.newRequest(op, input, output)
  1772. return
  1773. }
  1774. // PutImage API operation for Amazon EC2 Container Registry.
  1775. //
  1776. // Creates or updates the image manifest and tags associated with an image.
  1777. //
  1778. // This operation is used by the Amazon ECR proxy, and it is not intended for
  1779. // general use by customers for pulling and pushing images. In most cases, you
  1780. // should use the docker CLI to pull, tag, and push images.
  1781. //
  1782. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1783. // with awserr.Error's Code and Message methods to get detailed information about
  1784. // the error.
  1785. //
  1786. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1787. // API operation PutImage for usage and error information.
  1788. //
  1789. // Returned Error Codes:
  1790. // * ErrCodeServerException "ServerException"
  1791. // These errors are usually caused by a server-side issue.
  1792. //
  1793. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1794. // The specified parameter is invalid. Review the available parameters for the
  1795. // API request.
  1796. //
  1797. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  1798. // The specified repository could not be found. Check the spelling of the specified
  1799. // repository and ensure that you are performing operations on the correct registry.
  1800. //
  1801. // * ErrCodeImageAlreadyExistsException "ImageAlreadyExistsException"
  1802. // The specified image has already been pushed, and there were no changes to
  1803. // the manifest or image tag after the last push.
  1804. //
  1805. // * ErrCodeLayersNotFoundException "LayersNotFoundException"
  1806. // The specified layers could not be found, or the specified layer is not valid
  1807. // for this repository.
  1808. //
  1809. // * ErrCodeLimitExceededException "LimitExceededException"
  1810. // The operation did not succeed because it would have exceeded a service limit
  1811. // for your account. For more information, see Amazon ECR Default Service Limits
  1812. // (http://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)
  1813. // in the Amazon Elastic Container Registry User Guide.
  1814. //
  1815. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImage
  1816. func (c *ECR) PutImage(input *PutImageInput) (*PutImageOutput, error) {
  1817. req, out := c.PutImageRequest(input)
  1818. return out, req.Send()
  1819. }
  1820. // PutImageWithContext is the same as PutImage with the addition of
  1821. // the ability to pass a context and additional request options.
  1822. //
  1823. // See PutImage for details on how to use this API operation.
  1824. //
  1825. // The context must be non-nil and will be used for request cancellation. If
  1826. // the context is nil a panic will occur. In the future the SDK may create
  1827. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1828. // for more information on using Contexts.
  1829. func (c *ECR) PutImageWithContext(ctx aws.Context, input *PutImageInput, opts ...request.Option) (*PutImageOutput, error) {
  1830. req, out := c.PutImageRequest(input)
  1831. req.SetContext(ctx)
  1832. req.ApplyOptions(opts...)
  1833. return out, req.Send()
  1834. }
  1835. const opPutLifecyclePolicy = "PutLifecyclePolicy"
  1836. // PutLifecyclePolicyRequest generates a "aws/request.Request" representing the
  1837. // client's request for the PutLifecyclePolicy operation. The "output" return
  1838. // value will be populated with the request's response once the request completes
  1839. // successfully.
  1840. //
  1841. // Use "Send" method on the returned Request to send the API call to the service.
  1842. // the "output" return value is not valid until after Send returns without error.
  1843. //
  1844. // See PutLifecyclePolicy for more information on using the PutLifecyclePolicy
  1845. // API call, and error handling.
  1846. //
  1847. // This method is useful when you want to inject custom logic or configuration
  1848. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1849. //
  1850. //
  1851. // // Example sending a request using the PutLifecyclePolicyRequest method.
  1852. // req, resp := client.PutLifecyclePolicyRequest(params)
  1853. //
  1854. // err := req.Send()
  1855. // if err == nil { // resp is now filled
  1856. // fmt.Println(resp)
  1857. // }
  1858. //
  1859. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicy
  1860. func (c *ECR) PutLifecyclePolicyRequest(input *PutLifecyclePolicyInput) (req *request.Request, output *PutLifecyclePolicyOutput) {
  1861. op := &request.Operation{
  1862. Name: opPutLifecyclePolicy,
  1863. HTTPMethod: "POST",
  1864. HTTPPath: "/",
  1865. }
  1866. if input == nil {
  1867. input = &PutLifecyclePolicyInput{}
  1868. }
  1869. output = &PutLifecyclePolicyOutput{}
  1870. req = c.newRequest(op, input, output)
  1871. return
  1872. }
  1873. // PutLifecyclePolicy API operation for Amazon EC2 Container Registry.
  1874. //
  1875. // Creates or updates a lifecycle policy. For information about lifecycle policy
  1876. // syntax, see Lifecycle Policy Template (http://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html).
  1877. //
  1878. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1879. // with awserr.Error's Code and Message methods to get detailed information about
  1880. // the error.
  1881. //
  1882. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1883. // API operation PutLifecyclePolicy for usage and error information.
  1884. //
  1885. // Returned Error Codes:
  1886. // * ErrCodeServerException "ServerException"
  1887. // These errors are usually caused by a server-side issue.
  1888. //
  1889. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1890. // The specified parameter is invalid. Review the available parameters for the
  1891. // API request.
  1892. //
  1893. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  1894. // The specified repository could not be found. Check the spelling of the specified
  1895. // repository and ensure that you are performing operations on the correct registry.
  1896. //
  1897. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicy
  1898. func (c *ECR) PutLifecyclePolicy(input *PutLifecyclePolicyInput) (*PutLifecyclePolicyOutput, error) {
  1899. req, out := c.PutLifecyclePolicyRequest(input)
  1900. return out, req.Send()
  1901. }
  1902. // PutLifecyclePolicyWithContext is the same as PutLifecyclePolicy with the addition of
  1903. // the ability to pass a context and additional request options.
  1904. //
  1905. // See PutLifecyclePolicy for details on how to use this API operation.
  1906. //
  1907. // The context must be non-nil and will be used for request cancellation. If
  1908. // the context is nil a panic will occur. In the future the SDK may create
  1909. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1910. // for more information on using Contexts.
  1911. func (c *ECR) PutLifecyclePolicyWithContext(ctx aws.Context, input *PutLifecyclePolicyInput, opts ...request.Option) (*PutLifecyclePolicyOutput, error) {
  1912. req, out := c.PutLifecyclePolicyRequest(input)
  1913. req.SetContext(ctx)
  1914. req.ApplyOptions(opts...)
  1915. return out, req.Send()
  1916. }
  1917. const opSetRepositoryPolicy = "SetRepositoryPolicy"
  1918. // SetRepositoryPolicyRequest generates a "aws/request.Request" representing the
  1919. // client's request for the SetRepositoryPolicy operation. The "output" return
  1920. // value will be populated with the request's response once the request completes
  1921. // successfully.
  1922. //
  1923. // Use "Send" method on the returned Request to send the API call to the service.
  1924. // the "output" return value is not valid until after Send returns without error.
  1925. //
  1926. // See SetRepositoryPolicy for more information on using the SetRepositoryPolicy
  1927. // API call, and error handling.
  1928. //
  1929. // This method is useful when you want to inject custom logic or configuration
  1930. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1931. //
  1932. //
  1933. // // Example sending a request using the SetRepositoryPolicyRequest method.
  1934. // req, resp := client.SetRepositoryPolicyRequest(params)
  1935. //
  1936. // err := req.Send()
  1937. // if err == nil { // resp is now filled
  1938. // fmt.Println(resp)
  1939. // }
  1940. //
  1941. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicy
  1942. func (c *ECR) SetRepositoryPolicyRequest(input *SetRepositoryPolicyInput) (req *request.Request, output *SetRepositoryPolicyOutput) {
  1943. op := &request.Operation{
  1944. Name: opSetRepositoryPolicy,
  1945. HTTPMethod: "POST",
  1946. HTTPPath: "/",
  1947. }
  1948. if input == nil {
  1949. input = &SetRepositoryPolicyInput{}
  1950. }
  1951. output = &SetRepositoryPolicyOutput{}
  1952. req = c.newRequest(op, input, output)
  1953. return
  1954. }
  1955. // SetRepositoryPolicy API operation for Amazon EC2 Container Registry.
  1956. //
  1957. // Applies a repository policy on a specified repository to control access permissions.
  1958. //
  1959. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1960. // with awserr.Error's Code and Message methods to get detailed information about
  1961. // the error.
  1962. //
  1963. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1964. // API operation SetRepositoryPolicy for usage and error information.
  1965. //
  1966. // Returned Error Codes:
  1967. // * ErrCodeServerException "ServerException"
  1968. // These errors are usually caused by a server-side issue.
  1969. //
  1970. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1971. // The specified parameter is invalid. Review the available parameters for the
  1972. // API request.
  1973. //
  1974. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  1975. // The specified repository could not be found. Check the spelling of the specified
  1976. // repository and ensure that you are performing operations on the correct registry.
  1977. //
  1978. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicy
  1979. func (c *ECR) SetRepositoryPolicy(input *SetRepositoryPolicyInput) (*SetRepositoryPolicyOutput, error) {
  1980. req, out := c.SetRepositoryPolicyRequest(input)
  1981. return out, req.Send()
  1982. }
  1983. // SetRepositoryPolicyWithContext is the same as SetRepositoryPolicy with the addition of
  1984. // the ability to pass a context and additional request options.
  1985. //
  1986. // See SetRepositoryPolicy for details on how to use this API operation.
  1987. //
  1988. // The context must be non-nil and will be used for request cancellation. If
  1989. // the context is nil a panic will occur. In the future the SDK may create
  1990. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1991. // for more information on using Contexts.
  1992. func (c *ECR) SetRepositoryPolicyWithContext(ctx aws.Context, input *SetRepositoryPolicyInput, opts ...request.Option) (*SetRepositoryPolicyOutput, error) {
  1993. req, out := c.SetRepositoryPolicyRequest(input)
  1994. req.SetContext(ctx)
  1995. req.ApplyOptions(opts...)
  1996. return out, req.Send()
  1997. }
  1998. const opStartLifecyclePolicyPreview = "StartLifecyclePolicyPreview"
  1999. // StartLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the
  2000. // client's request for the StartLifecyclePolicyPreview operation. The "output" return
  2001. // value will be populated with the request's response once the request completes
  2002. // successfully.
  2003. //
  2004. // Use "Send" method on the returned Request to send the API call to the service.
  2005. // the "output" return value is not valid until after Send returns without error.
  2006. //
  2007. // See StartLifecyclePolicyPreview for more information on using the StartLifecyclePolicyPreview
  2008. // API call, and error handling.
  2009. //
  2010. // This method is useful when you want to inject custom logic or configuration
  2011. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2012. //
  2013. //
  2014. // // Example sending a request using the StartLifecyclePolicyPreviewRequest method.
  2015. // req, resp := client.StartLifecyclePolicyPreviewRequest(params)
  2016. //
  2017. // err := req.Send()
  2018. // if err == nil { // resp is now filled
  2019. // fmt.Println(resp)
  2020. // }
  2021. //
  2022. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview
  2023. func (c *ECR) StartLifecyclePolicyPreviewRequest(input *StartLifecyclePolicyPreviewInput) (req *request.Request, output *StartLifecyclePolicyPreviewOutput) {
  2024. op := &request.Operation{
  2025. Name: opStartLifecyclePolicyPreview,
  2026. HTTPMethod: "POST",
  2027. HTTPPath: "/",
  2028. }
  2029. if input == nil {
  2030. input = &StartLifecyclePolicyPreviewInput{}
  2031. }
  2032. output = &StartLifecyclePolicyPreviewOutput{}
  2033. req = c.newRequest(op, input, output)
  2034. return
  2035. }
  2036. // StartLifecyclePolicyPreview API operation for Amazon EC2 Container Registry.
  2037. //
  2038. // Starts a preview of the specified lifecycle policy. This allows you to see
  2039. // the results before creating the lifecycle policy.
  2040. //
  2041. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2042. // with awserr.Error's Code and Message methods to get detailed information about
  2043. // the error.
  2044. //
  2045. // See the AWS API reference guide for Amazon EC2 Container Registry's
  2046. // API operation StartLifecyclePolicyPreview for usage and error information.
  2047. //
  2048. // Returned Error Codes:
  2049. // * ErrCodeServerException "ServerException"
  2050. // These errors are usually caused by a server-side issue.
  2051. //
  2052. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2053. // The specified parameter is invalid. Review the available parameters for the
  2054. // API request.
  2055. //
  2056. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  2057. // The specified repository could not be found. Check the spelling of the specified
  2058. // repository and ensure that you are performing operations on the correct registry.
  2059. //
  2060. // * ErrCodeLifecyclePolicyNotFoundException "LifecyclePolicyNotFoundException"
  2061. // The lifecycle policy could not be found, and no policy is set to the repository.
  2062. //
  2063. // * ErrCodeLifecyclePolicyPreviewInProgressException "LifecyclePolicyPreviewInProgressException"
  2064. // The previous lifecycle policy preview request has not completed. Please try
  2065. // again later.
  2066. //
  2067. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview
  2068. func (c *ECR) StartLifecyclePolicyPreview(input *StartLifecyclePolicyPreviewInput) (*StartLifecyclePolicyPreviewOutput, error) {
  2069. req, out := c.StartLifecyclePolicyPreviewRequest(input)
  2070. return out, req.Send()
  2071. }
  2072. // StartLifecyclePolicyPreviewWithContext is the same as StartLifecyclePolicyPreview with the addition of
  2073. // the ability to pass a context and additional request options.
  2074. //
  2075. // See StartLifecyclePolicyPreview for details on how to use this API operation.
  2076. //
  2077. // The context must be non-nil and will be used for request cancellation. If
  2078. // the context is nil a panic will occur. In the future the SDK may create
  2079. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2080. // for more information on using Contexts.
  2081. func (c *ECR) StartLifecyclePolicyPreviewWithContext(ctx aws.Context, input *StartLifecyclePolicyPreviewInput, opts ...request.Option) (*StartLifecyclePolicyPreviewOutput, error) {
  2082. req, out := c.StartLifecyclePolicyPreviewRequest(input)
  2083. req.SetContext(ctx)
  2084. req.ApplyOptions(opts...)
  2085. return out, req.Send()
  2086. }
  2087. const opTagResource = "TagResource"
  2088. // TagResourceRequest generates a "aws/request.Request" representing the
  2089. // client's request for the TagResource operation. The "output" return
  2090. // value will be populated with the request's response once the request completes
  2091. // successfully.
  2092. //
  2093. // Use "Send" method on the returned Request to send the API call to the service.
  2094. // the "output" return value is not valid until after Send returns without error.
  2095. //
  2096. // See TagResource for more information on using the TagResource
  2097. // API call, and error handling.
  2098. //
  2099. // This method is useful when you want to inject custom logic or configuration
  2100. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2101. //
  2102. //
  2103. // // Example sending a request using the TagResourceRequest method.
  2104. // req, resp := client.TagResourceRequest(params)
  2105. //
  2106. // err := req.Send()
  2107. // if err == nil { // resp is now filled
  2108. // fmt.Println(resp)
  2109. // }
  2110. //
  2111. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TagResource
  2112. func (c *ECR) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
  2113. op := &request.Operation{
  2114. Name: opTagResource,
  2115. HTTPMethod: "POST",
  2116. HTTPPath: "/",
  2117. }
  2118. if input == nil {
  2119. input = &TagResourceInput{}
  2120. }
  2121. output = &TagResourceOutput{}
  2122. req = c.newRequest(op, input, output)
  2123. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2124. return
  2125. }
  2126. // TagResource API operation for Amazon EC2 Container Registry.
  2127. //
  2128. // Adds specified tags to a resource with the specified ARN. Existing tags on
  2129. // a resource are not changed if they are not specified in the request parameters.
  2130. //
  2131. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2132. // with awserr.Error's Code and Message methods to get detailed information about
  2133. // the error.
  2134. //
  2135. // See the AWS API reference guide for Amazon EC2 Container Registry's
  2136. // API operation TagResource for usage and error information.
  2137. //
  2138. // Returned Error Codes:
  2139. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2140. // The specified parameter is invalid. Review the available parameters for the
  2141. // API request.
  2142. //
  2143. // * ErrCodeInvalidTagParameterException "InvalidTagParameterException"
  2144. // An invalid parameter has been specified. Tag keys can have a maximum character
  2145. // length of 128 characters, and tag values can have a maximum length of 256
  2146. // characters.
  2147. //
  2148. // * ErrCodeTooManyTagsException "TooManyTagsException"
  2149. // The list of tags on the repository is over the limit. The maximum number
  2150. // of tags that can be applied to a repository is 50.
  2151. //
  2152. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  2153. // The specified repository could not be found. Check the spelling of the specified
  2154. // repository and ensure that you are performing operations on the correct registry.
  2155. //
  2156. // * ErrCodeServerException "ServerException"
  2157. // These errors are usually caused by a server-side issue.
  2158. //
  2159. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TagResource
  2160. func (c *ECR) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
  2161. req, out := c.TagResourceRequest(input)
  2162. return out, req.Send()
  2163. }
  2164. // TagResourceWithContext is the same as TagResource with the addition of
  2165. // the ability to pass a context and additional request options.
  2166. //
  2167. // See TagResource for details on how to use this API operation.
  2168. //
  2169. // The context must be non-nil and will be used for request cancellation. If
  2170. // the context is nil a panic will occur. In the future the SDK may create
  2171. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2172. // for more information on using Contexts.
  2173. func (c *ECR) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
  2174. req, out := c.TagResourceRequest(input)
  2175. req.SetContext(ctx)
  2176. req.ApplyOptions(opts...)
  2177. return out, req.Send()
  2178. }
  2179. const opUntagResource = "UntagResource"
  2180. // UntagResourceRequest generates a "aws/request.Request" representing the
  2181. // client's request for the UntagResource operation. The "output" return
  2182. // value will be populated with the request's response once the request completes
  2183. // successfully.
  2184. //
  2185. // Use "Send" method on the returned Request to send the API call to the service.
  2186. // the "output" return value is not valid until after Send returns without error.
  2187. //
  2188. // See UntagResource for more information on using the UntagResource
  2189. // API call, and error handling.
  2190. //
  2191. // This method is useful when you want to inject custom logic or configuration
  2192. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2193. //
  2194. //
  2195. // // Example sending a request using the UntagResourceRequest method.
  2196. // req, resp := client.UntagResourceRequest(params)
  2197. //
  2198. // err := req.Send()
  2199. // if err == nil { // resp is now filled
  2200. // fmt.Println(resp)
  2201. // }
  2202. //
  2203. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UntagResource
  2204. func (c *ECR) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
  2205. op := &request.Operation{
  2206. Name: opUntagResource,
  2207. HTTPMethod: "POST",
  2208. HTTPPath: "/",
  2209. }
  2210. if input == nil {
  2211. input = &UntagResourceInput{}
  2212. }
  2213. output = &UntagResourceOutput{}
  2214. req = c.newRequest(op, input, output)
  2215. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2216. return
  2217. }
  2218. // UntagResource API operation for Amazon EC2 Container Registry.
  2219. //
  2220. // Deletes specified tags from a resource.
  2221. //
  2222. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2223. // with awserr.Error's Code and Message methods to get detailed information about
  2224. // the error.
  2225. //
  2226. // See the AWS API reference guide for Amazon EC2 Container Registry's
  2227. // API operation UntagResource for usage and error information.
  2228. //
  2229. // Returned Error Codes:
  2230. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2231. // The specified parameter is invalid. Review the available parameters for the
  2232. // API request.
  2233. //
  2234. // * ErrCodeInvalidTagParameterException "InvalidTagParameterException"
  2235. // An invalid parameter has been specified. Tag keys can have a maximum character
  2236. // length of 128 characters, and tag values can have a maximum length of 256
  2237. // characters.
  2238. //
  2239. // * ErrCodeTooManyTagsException "TooManyTagsException"
  2240. // The list of tags on the repository is over the limit. The maximum number
  2241. // of tags that can be applied to a repository is 50.
  2242. //
  2243. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  2244. // The specified repository could not be found. Check the spelling of the specified
  2245. // repository and ensure that you are performing operations on the correct registry.
  2246. //
  2247. // * ErrCodeServerException "ServerException"
  2248. // These errors are usually caused by a server-side issue.
  2249. //
  2250. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UntagResource
  2251. func (c *ECR) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  2252. req, out := c.UntagResourceRequest(input)
  2253. return out, req.Send()
  2254. }
  2255. // UntagResourceWithContext is the same as UntagResource with the addition of
  2256. // the ability to pass a context and additional request options.
  2257. //
  2258. // See UntagResource for details on how to use this API operation.
  2259. //
  2260. // The context must be non-nil and will be used for request cancellation. If
  2261. // the context is nil a panic will occur. In the future the SDK may create
  2262. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2263. // for more information on using Contexts.
  2264. func (c *ECR) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
  2265. req, out := c.UntagResourceRequest(input)
  2266. req.SetContext(ctx)
  2267. req.ApplyOptions(opts...)
  2268. return out, req.Send()
  2269. }
  2270. const opUploadLayerPart = "UploadLayerPart"
  2271. // UploadLayerPartRequest generates a "aws/request.Request" representing the
  2272. // client's request for the UploadLayerPart operation. The "output" return
  2273. // value will be populated with the request's response once the request completes
  2274. // successfully.
  2275. //
  2276. // Use "Send" method on the returned Request to send the API call to the service.
  2277. // the "output" return value is not valid until after Send returns without error.
  2278. //
  2279. // See UploadLayerPart for more information on using the UploadLayerPart
  2280. // API call, and error handling.
  2281. //
  2282. // This method is useful when you want to inject custom logic or configuration
  2283. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2284. //
  2285. //
  2286. // // Example sending a request using the UploadLayerPartRequest method.
  2287. // req, resp := client.UploadLayerPartRequest(params)
  2288. //
  2289. // err := req.Send()
  2290. // if err == nil { // resp is now filled
  2291. // fmt.Println(resp)
  2292. // }
  2293. //
  2294. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPart
  2295. func (c *ECR) UploadLayerPartRequest(input *UploadLayerPartInput) (req *request.Request, output *UploadLayerPartOutput) {
  2296. op := &request.Operation{
  2297. Name: opUploadLayerPart,
  2298. HTTPMethod: "POST",
  2299. HTTPPath: "/",
  2300. }
  2301. if input == nil {
  2302. input = &UploadLayerPartInput{}
  2303. }
  2304. output = &UploadLayerPartOutput{}
  2305. req = c.newRequest(op, input, output)
  2306. return
  2307. }
  2308. // UploadLayerPart API operation for Amazon EC2 Container Registry.
  2309. //
  2310. // Uploads an image layer part to Amazon ECR.
  2311. //
  2312. // This operation is used by the Amazon ECR proxy, and it is not intended for
  2313. // general use by customers for pulling and pushing images. In most cases, you
  2314. // should use the docker CLI to pull, tag, and push images.
  2315. //
  2316. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2317. // with awserr.Error's Code and Message methods to get detailed information about
  2318. // the error.
  2319. //
  2320. // See the AWS API reference guide for Amazon EC2 Container Registry's
  2321. // API operation UploadLayerPart for usage and error information.
  2322. //
  2323. // Returned Error Codes:
  2324. // * ErrCodeServerException "ServerException"
  2325. // These errors are usually caused by a server-side issue.
  2326. //
  2327. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2328. // The specified parameter is invalid. Review the available parameters for the
  2329. // API request.
  2330. //
  2331. // * ErrCodeInvalidLayerPartException "InvalidLayerPartException"
  2332. // The layer part size is not valid, or the first byte specified is not consecutive
  2333. // to the last byte of a previous layer part upload.
  2334. //
  2335. // * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
  2336. // The specified repository could not be found. Check the spelling of the specified
  2337. // repository and ensure that you are performing operations on the correct registry.
  2338. //
  2339. // * ErrCodeUploadNotFoundException "UploadNotFoundException"
  2340. // The upload could not be found, or the specified upload id is not valid for
  2341. // this repository.
  2342. //
  2343. // * ErrCodeLimitExceededException "LimitExceededException"
  2344. // The operation did not succeed because it would have exceeded a service limit
  2345. // for your account. For more information, see Amazon ECR Default Service Limits
  2346. // (http://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)
  2347. // in the Amazon Elastic Container Registry User Guide.
  2348. //
  2349. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPart
  2350. func (c *ECR) UploadLayerPart(input *UploadLayerPartInput) (*UploadLayerPartOutput, error) {
  2351. req, out := c.UploadLayerPartRequest(input)
  2352. return out, req.Send()
  2353. }
  2354. // UploadLayerPartWithContext is the same as UploadLayerPart with the addition of
  2355. // the ability to pass a context and additional request options.
  2356. //
  2357. // See UploadLayerPart for details on how to use this API operation.
  2358. //
  2359. // The context must be non-nil and will be used for request cancellation. If
  2360. // the context is nil a panic will occur. In the future the SDK may create
  2361. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2362. // for more information on using Contexts.
  2363. func (c *ECR) UploadLayerPartWithContext(ctx aws.Context, input *UploadLayerPartInput, opts ...request.Option) (*UploadLayerPartOutput, error) {
  2364. req, out := c.UploadLayerPartRequest(input)
  2365. req.SetContext(ctx)
  2366. req.ApplyOptions(opts...)
  2367. return out, req.Send()
  2368. }
  2369. // An object representing authorization data for an Amazon ECR registry.
  2370. type AuthorizationData struct {
  2371. _ struct{} `type:"structure"`
  2372. // A base64-encoded string that contains authorization data for the specified
  2373. // Amazon ECR registry. When the string is decoded, it is presented in the format
  2374. // user:password for private registry authentication using docker login.
  2375. AuthorizationToken *string `locationName:"authorizationToken" type:"string"`
  2376. // The Unix time in seconds and milliseconds when the authorization token expires.
  2377. // Authorization tokens are valid for 12 hours.
  2378. ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp"`
  2379. // The registry URL to use for this authorization token in a docker login command.
  2380. // The Amazon ECR registry URL format is https://aws_account_id.dkr.ecr.region.amazonaws.com.
  2381. // For example, https://012345678910.dkr.ecr.us-east-1.amazonaws.com..
  2382. ProxyEndpoint *string `locationName:"proxyEndpoint" type:"string"`
  2383. }
  2384. // String returns the string representation
  2385. func (s AuthorizationData) String() string {
  2386. return awsutil.Prettify(s)
  2387. }
  2388. // GoString returns the string representation
  2389. func (s AuthorizationData) GoString() string {
  2390. return s.String()
  2391. }
  2392. // SetAuthorizationToken sets the AuthorizationToken field's value.
  2393. func (s *AuthorizationData) SetAuthorizationToken(v string) *AuthorizationData {
  2394. s.AuthorizationToken = &v
  2395. return s
  2396. }
  2397. // SetExpiresAt sets the ExpiresAt field's value.
  2398. func (s *AuthorizationData) SetExpiresAt(v time.Time) *AuthorizationData {
  2399. s.ExpiresAt = &v
  2400. return s
  2401. }
  2402. // SetProxyEndpoint sets the ProxyEndpoint field's value.
  2403. func (s *AuthorizationData) SetProxyEndpoint(v string) *AuthorizationData {
  2404. s.ProxyEndpoint = &v
  2405. return s
  2406. }
  2407. type BatchCheckLayerAvailabilityInput struct {
  2408. _ struct{} `type:"structure"`
  2409. // The digests of the image layers to check.
  2410. //
  2411. // LayerDigests is a required field
  2412. LayerDigests []*string `locationName:"layerDigests" min:"1" type:"list" required:"true"`
  2413. // The AWS account ID associated with the registry that contains the image layers
  2414. // to check. If you do not specify a registry, the default registry is assumed.
  2415. RegistryId *string `locationName:"registryId" type:"string"`
  2416. // The name of the repository that is associated with the image layers to check.
  2417. //
  2418. // RepositoryName is a required field
  2419. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2420. }
  2421. // String returns the string representation
  2422. func (s BatchCheckLayerAvailabilityInput) String() string {
  2423. return awsutil.Prettify(s)
  2424. }
  2425. // GoString returns the string representation
  2426. func (s BatchCheckLayerAvailabilityInput) GoString() string {
  2427. return s.String()
  2428. }
  2429. // Validate inspects the fields of the type to determine if they are valid.
  2430. func (s *BatchCheckLayerAvailabilityInput) Validate() error {
  2431. invalidParams := request.ErrInvalidParams{Context: "BatchCheckLayerAvailabilityInput"}
  2432. if s.LayerDigests == nil {
  2433. invalidParams.Add(request.NewErrParamRequired("LayerDigests"))
  2434. }
  2435. if s.LayerDigests != nil && len(s.LayerDigests) < 1 {
  2436. invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1))
  2437. }
  2438. if s.RepositoryName == nil {
  2439. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2440. }
  2441. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  2442. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  2443. }
  2444. if invalidParams.Len() > 0 {
  2445. return invalidParams
  2446. }
  2447. return nil
  2448. }
  2449. // SetLayerDigests sets the LayerDigests field's value.
  2450. func (s *BatchCheckLayerAvailabilityInput) SetLayerDigests(v []*string) *BatchCheckLayerAvailabilityInput {
  2451. s.LayerDigests = v
  2452. return s
  2453. }
  2454. // SetRegistryId sets the RegistryId field's value.
  2455. func (s *BatchCheckLayerAvailabilityInput) SetRegistryId(v string) *BatchCheckLayerAvailabilityInput {
  2456. s.RegistryId = &v
  2457. return s
  2458. }
  2459. // SetRepositoryName sets the RepositoryName field's value.
  2460. func (s *BatchCheckLayerAvailabilityInput) SetRepositoryName(v string) *BatchCheckLayerAvailabilityInput {
  2461. s.RepositoryName = &v
  2462. return s
  2463. }
  2464. type BatchCheckLayerAvailabilityOutput struct {
  2465. _ struct{} `type:"structure"`
  2466. // Any failures associated with the call.
  2467. Failures []*LayerFailure `locationName:"failures" type:"list"`
  2468. // A list of image layer objects corresponding to the image layer references
  2469. // in the request.
  2470. Layers []*Layer `locationName:"layers" type:"list"`
  2471. }
  2472. // String returns the string representation
  2473. func (s BatchCheckLayerAvailabilityOutput) String() string {
  2474. return awsutil.Prettify(s)
  2475. }
  2476. // GoString returns the string representation
  2477. func (s BatchCheckLayerAvailabilityOutput) GoString() string {
  2478. return s.String()
  2479. }
  2480. // SetFailures sets the Failures field's value.
  2481. func (s *BatchCheckLayerAvailabilityOutput) SetFailures(v []*LayerFailure) *BatchCheckLayerAvailabilityOutput {
  2482. s.Failures = v
  2483. return s
  2484. }
  2485. // SetLayers sets the Layers field's value.
  2486. func (s *BatchCheckLayerAvailabilityOutput) SetLayers(v []*Layer) *BatchCheckLayerAvailabilityOutput {
  2487. s.Layers = v
  2488. return s
  2489. }
  2490. // Deletes specified images within a specified repository. Images are specified
  2491. // with either the imageTag or imageDigest.
  2492. type BatchDeleteImageInput struct {
  2493. _ struct{} `type:"structure"`
  2494. // A list of image ID references that correspond to images to delete. The format
  2495. // of the imageIds reference is imageTag=tag or imageDigest=digest.
  2496. //
  2497. // ImageIds is a required field
  2498. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list" required:"true"`
  2499. // The AWS account ID associated with the registry that contains the image to
  2500. // delete. If you do not specify a registry, the default registry is assumed.
  2501. RegistryId *string `locationName:"registryId" type:"string"`
  2502. // The repository that contains the image to delete.
  2503. //
  2504. // RepositoryName is a required field
  2505. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2506. }
  2507. // String returns the string representation
  2508. func (s BatchDeleteImageInput) String() string {
  2509. return awsutil.Prettify(s)
  2510. }
  2511. // GoString returns the string representation
  2512. func (s BatchDeleteImageInput) GoString() string {
  2513. return s.String()
  2514. }
  2515. // Validate inspects the fields of the type to determine if they are valid.
  2516. func (s *BatchDeleteImageInput) Validate() error {
  2517. invalidParams := request.ErrInvalidParams{Context: "BatchDeleteImageInput"}
  2518. if s.ImageIds == nil {
  2519. invalidParams.Add(request.NewErrParamRequired("ImageIds"))
  2520. }
  2521. if s.ImageIds != nil && len(s.ImageIds) < 1 {
  2522. invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
  2523. }
  2524. if s.RepositoryName == nil {
  2525. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2526. }
  2527. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  2528. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  2529. }
  2530. if invalidParams.Len() > 0 {
  2531. return invalidParams
  2532. }
  2533. return nil
  2534. }
  2535. // SetImageIds sets the ImageIds field's value.
  2536. func (s *BatchDeleteImageInput) SetImageIds(v []*ImageIdentifier) *BatchDeleteImageInput {
  2537. s.ImageIds = v
  2538. return s
  2539. }
  2540. // SetRegistryId sets the RegistryId field's value.
  2541. func (s *BatchDeleteImageInput) SetRegistryId(v string) *BatchDeleteImageInput {
  2542. s.RegistryId = &v
  2543. return s
  2544. }
  2545. // SetRepositoryName sets the RepositoryName field's value.
  2546. func (s *BatchDeleteImageInput) SetRepositoryName(v string) *BatchDeleteImageInput {
  2547. s.RepositoryName = &v
  2548. return s
  2549. }
  2550. type BatchDeleteImageOutput struct {
  2551. _ struct{} `type:"structure"`
  2552. // Any failures associated with the call.
  2553. Failures []*ImageFailure `locationName:"failures" type:"list"`
  2554. // The image IDs of the deleted images.
  2555. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
  2556. }
  2557. // String returns the string representation
  2558. func (s BatchDeleteImageOutput) String() string {
  2559. return awsutil.Prettify(s)
  2560. }
  2561. // GoString returns the string representation
  2562. func (s BatchDeleteImageOutput) GoString() string {
  2563. return s.String()
  2564. }
  2565. // SetFailures sets the Failures field's value.
  2566. func (s *BatchDeleteImageOutput) SetFailures(v []*ImageFailure) *BatchDeleteImageOutput {
  2567. s.Failures = v
  2568. return s
  2569. }
  2570. // SetImageIds sets the ImageIds field's value.
  2571. func (s *BatchDeleteImageOutput) SetImageIds(v []*ImageIdentifier) *BatchDeleteImageOutput {
  2572. s.ImageIds = v
  2573. return s
  2574. }
  2575. type BatchGetImageInput struct {
  2576. _ struct{} `type:"structure"`
  2577. // The accepted media types for the request.
  2578. //
  2579. // Valid values: application/vnd.docker.distribution.manifest.v1+json | application/vnd.docker.distribution.manifest.v2+json
  2580. // | application/vnd.oci.image.manifest.v1+json
  2581. AcceptedMediaTypes []*string `locationName:"acceptedMediaTypes" min:"1" type:"list"`
  2582. // A list of image ID references that correspond to images to describe. The
  2583. // format of the imageIds reference is imageTag=tag or imageDigest=digest.
  2584. //
  2585. // ImageIds is a required field
  2586. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list" required:"true"`
  2587. // The AWS account ID associated with the registry that contains the images
  2588. // to describe. If you do not specify a registry, the default registry is assumed.
  2589. RegistryId *string `locationName:"registryId" type:"string"`
  2590. // The repository that contains the images to describe.
  2591. //
  2592. // RepositoryName is a required field
  2593. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2594. }
  2595. // String returns the string representation
  2596. func (s BatchGetImageInput) String() string {
  2597. return awsutil.Prettify(s)
  2598. }
  2599. // GoString returns the string representation
  2600. func (s BatchGetImageInput) GoString() string {
  2601. return s.String()
  2602. }
  2603. // Validate inspects the fields of the type to determine if they are valid.
  2604. func (s *BatchGetImageInput) Validate() error {
  2605. invalidParams := request.ErrInvalidParams{Context: "BatchGetImageInput"}
  2606. if s.AcceptedMediaTypes != nil && len(s.AcceptedMediaTypes) < 1 {
  2607. invalidParams.Add(request.NewErrParamMinLen("AcceptedMediaTypes", 1))
  2608. }
  2609. if s.ImageIds == nil {
  2610. invalidParams.Add(request.NewErrParamRequired("ImageIds"))
  2611. }
  2612. if s.ImageIds != nil && len(s.ImageIds) < 1 {
  2613. invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
  2614. }
  2615. if s.RepositoryName == nil {
  2616. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2617. }
  2618. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  2619. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  2620. }
  2621. if invalidParams.Len() > 0 {
  2622. return invalidParams
  2623. }
  2624. return nil
  2625. }
  2626. // SetAcceptedMediaTypes sets the AcceptedMediaTypes field's value.
  2627. func (s *BatchGetImageInput) SetAcceptedMediaTypes(v []*string) *BatchGetImageInput {
  2628. s.AcceptedMediaTypes = v
  2629. return s
  2630. }
  2631. // SetImageIds sets the ImageIds field's value.
  2632. func (s *BatchGetImageInput) SetImageIds(v []*ImageIdentifier) *BatchGetImageInput {
  2633. s.ImageIds = v
  2634. return s
  2635. }
  2636. // SetRegistryId sets the RegistryId field's value.
  2637. func (s *BatchGetImageInput) SetRegistryId(v string) *BatchGetImageInput {
  2638. s.RegistryId = &v
  2639. return s
  2640. }
  2641. // SetRepositoryName sets the RepositoryName field's value.
  2642. func (s *BatchGetImageInput) SetRepositoryName(v string) *BatchGetImageInput {
  2643. s.RepositoryName = &v
  2644. return s
  2645. }
  2646. type BatchGetImageOutput struct {
  2647. _ struct{} `type:"structure"`
  2648. // Any failures associated with the call.
  2649. Failures []*ImageFailure `locationName:"failures" type:"list"`
  2650. // A list of image objects corresponding to the image references in the request.
  2651. Images []*Image `locationName:"images" type:"list"`
  2652. }
  2653. // String returns the string representation
  2654. func (s BatchGetImageOutput) String() string {
  2655. return awsutil.Prettify(s)
  2656. }
  2657. // GoString returns the string representation
  2658. func (s BatchGetImageOutput) GoString() string {
  2659. return s.String()
  2660. }
  2661. // SetFailures sets the Failures field's value.
  2662. func (s *BatchGetImageOutput) SetFailures(v []*ImageFailure) *BatchGetImageOutput {
  2663. s.Failures = v
  2664. return s
  2665. }
  2666. // SetImages sets the Images field's value.
  2667. func (s *BatchGetImageOutput) SetImages(v []*Image) *BatchGetImageOutput {
  2668. s.Images = v
  2669. return s
  2670. }
  2671. type CompleteLayerUploadInput struct {
  2672. _ struct{} `type:"structure"`
  2673. // The sha256 digest of the image layer.
  2674. //
  2675. // LayerDigests is a required field
  2676. LayerDigests []*string `locationName:"layerDigests" min:"1" type:"list" required:"true"`
  2677. // The AWS account ID associated with the registry to which to upload layers.
  2678. // If you do not specify a registry, the default registry is assumed.
  2679. RegistryId *string `locationName:"registryId" type:"string"`
  2680. // The name of the repository to associate with the image layer.
  2681. //
  2682. // RepositoryName is a required field
  2683. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2684. // The upload ID from a previous InitiateLayerUpload operation to associate
  2685. // with the image layer.
  2686. //
  2687. // UploadId is a required field
  2688. UploadId *string `locationName:"uploadId" type:"string" required:"true"`
  2689. }
  2690. // String returns the string representation
  2691. func (s CompleteLayerUploadInput) String() string {
  2692. return awsutil.Prettify(s)
  2693. }
  2694. // GoString returns the string representation
  2695. func (s CompleteLayerUploadInput) GoString() string {
  2696. return s.String()
  2697. }
  2698. // Validate inspects the fields of the type to determine if they are valid.
  2699. func (s *CompleteLayerUploadInput) Validate() error {
  2700. invalidParams := request.ErrInvalidParams{Context: "CompleteLayerUploadInput"}
  2701. if s.LayerDigests == nil {
  2702. invalidParams.Add(request.NewErrParamRequired("LayerDigests"))
  2703. }
  2704. if s.LayerDigests != nil && len(s.LayerDigests) < 1 {
  2705. invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1))
  2706. }
  2707. if s.RepositoryName == nil {
  2708. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2709. }
  2710. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  2711. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  2712. }
  2713. if s.UploadId == nil {
  2714. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  2715. }
  2716. if invalidParams.Len() > 0 {
  2717. return invalidParams
  2718. }
  2719. return nil
  2720. }
  2721. // SetLayerDigests sets the LayerDigests field's value.
  2722. func (s *CompleteLayerUploadInput) SetLayerDigests(v []*string) *CompleteLayerUploadInput {
  2723. s.LayerDigests = v
  2724. return s
  2725. }
  2726. // SetRegistryId sets the RegistryId field's value.
  2727. func (s *CompleteLayerUploadInput) SetRegistryId(v string) *CompleteLayerUploadInput {
  2728. s.RegistryId = &v
  2729. return s
  2730. }
  2731. // SetRepositoryName sets the RepositoryName field's value.
  2732. func (s *CompleteLayerUploadInput) SetRepositoryName(v string) *CompleteLayerUploadInput {
  2733. s.RepositoryName = &v
  2734. return s
  2735. }
  2736. // SetUploadId sets the UploadId field's value.
  2737. func (s *CompleteLayerUploadInput) SetUploadId(v string) *CompleteLayerUploadInput {
  2738. s.UploadId = &v
  2739. return s
  2740. }
  2741. type CompleteLayerUploadOutput struct {
  2742. _ struct{} `type:"structure"`
  2743. // The sha256 digest of the image layer.
  2744. LayerDigest *string `locationName:"layerDigest" type:"string"`
  2745. // The registry ID associated with the request.
  2746. RegistryId *string `locationName:"registryId" type:"string"`
  2747. // The repository name associated with the request.
  2748. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  2749. // The upload ID associated with the layer.
  2750. UploadId *string `locationName:"uploadId" type:"string"`
  2751. }
  2752. // String returns the string representation
  2753. func (s CompleteLayerUploadOutput) String() string {
  2754. return awsutil.Prettify(s)
  2755. }
  2756. // GoString returns the string representation
  2757. func (s CompleteLayerUploadOutput) GoString() string {
  2758. return s.String()
  2759. }
  2760. // SetLayerDigest sets the LayerDigest field's value.
  2761. func (s *CompleteLayerUploadOutput) SetLayerDigest(v string) *CompleteLayerUploadOutput {
  2762. s.LayerDigest = &v
  2763. return s
  2764. }
  2765. // SetRegistryId sets the RegistryId field's value.
  2766. func (s *CompleteLayerUploadOutput) SetRegistryId(v string) *CompleteLayerUploadOutput {
  2767. s.RegistryId = &v
  2768. return s
  2769. }
  2770. // SetRepositoryName sets the RepositoryName field's value.
  2771. func (s *CompleteLayerUploadOutput) SetRepositoryName(v string) *CompleteLayerUploadOutput {
  2772. s.RepositoryName = &v
  2773. return s
  2774. }
  2775. // SetUploadId sets the UploadId field's value.
  2776. func (s *CompleteLayerUploadOutput) SetUploadId(v string) *CompleteLayerUploadOutput {
  2777. s.UploadId = &v
  2778. return s
  2779. }
  2780. type CreateRepositoryInput struct {
  2781. _ struct{} `type:"structure"`
  2782. // The name to use for the repository. The repository name may be specified
  2783. // on its own (such as nginx-web-app) or it can be prepended with a namespace
  2784. // to group the repository into a category (such as project-a/nginx-web-app).
  2785. //
  2786. // RepositoryName is a required field
  2787. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2788. Tags []*Tag `locationName:"tags" type:"list"`
  2789. }
  2790. // String returns the string representation
  2791. func (s CreateRepositoryInput) String() string {
  2792. return awsutil.Prettify(s)
  2793. }
  2794. // GoString returns the string representation
  2795. func (s CreateRepositoryInput) GoString() string {
  2796. return s.String()
  2797. }
  2798. // Validate inspects the fields of the type to determine if they are valid.
  2799. func (s *CreateRepositoryInput) Validate() error {
  2800. invalidParams := request.ErrInvalidParams{Context: "CreateRepositoryInput"}
  2801. if s.RepositoryName == nil {
  2802. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2803. }
  2804. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  2805. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  2806. }
  2807. if invalidParams.Len() > 0 {
  2808. return invalidParams
  2809. }
  2810. return nil
  2811. }
  2812. // SetRepositoryName sets the RepositoryName field's value.
  2813. func (s *CreateRepositoryInput) SetRepositoryName(v string) *CreateRepositoryInput {
  2814. s.RepositoryName = &v
  2815. return s
  2816. }
  2817. // SetTags sets the Tags field's value.
  2818. func (s *CreateRepositoryInput) SetTags(v []*Tag) *CreateRepositoryInput {
  2819. s.Tags = v
  2820. return s
  2821. }
  2822. type CreateRepositoryOutput struct {
  2823. _ struct{} `type:"structure"`
  2824. // The repository that was created.
  2825. Repository *Repository `locationName:"repository" type:"structure"`
  2826. }
  2827. // String returns the string representation
  2828. func (s CreateRepositoryOutput) String() string {
  2829. return awsutil.Prettify(s)
  2830. }
  2831. // GoString returns the string representation
  2832. func (s CreateRepositoryOutput) GoString() string {
  2833. return s.String()
  2834. }
  2835. // SetRepository sets the Repository field's value.
  2836. func (s *CreateRepositoryOutput) SetRepository(v *Repository) *CreateRepositoryOutput {
  2837. s.Repository = v
  2838. return s
  2839. }
  2840. type DeleteLifecyclePolicyInput struct {
  2841. _ struct{} `type:"structure"`
  2842. // The AWS account ID associated with the registry that contains the repository.
  2843. // If you do not specify a registry, the default registry is assumed.
  2844. RegistryId *string `locationName:"registryId" type:"string"`
  2845. // The name of the repository.
  2846. //
  2847. // RepositoryName is a required field
  2848. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2849. }
  2850. // String returns the string representation
  2851. func (s DeleteLifecyclePolicyInput) String() string {
  2852. return awsutil.Prettify(s)
  2853. }
  2854. // GoString returns the string representation
  2855. func (s DeleteLifecyclePolicyInput) GoString() string {
  2856. return s.String()
  2857. }
  2858. // Validate inspects the fields of the type to determine if they are valid.
  2859. func (s *DeleteLifecyclePolicyInput) Validate() error {
  2860. invalidParams := request.ErrInvalidParams{Context: "DeleteLifecyclePolicyInput"}
  2861. if s.RepositoryName == nil {
  2862. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2863. }
  2864. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  2865. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  2866. }
  2867. if invalidParams.Len() > 0 {
  2868. return invalidParams
  2869. }
  2870. return nil
  2871. }
  2872. // SetRegistryId sets the RegistryId field's value.
  2873. func (s *DeleteLifecyclePolicyInput) SetRegistryId(v string) *DeleteLifecyclePolicyInput {
  2874. s.RegistryId = &v
  2875. return s
  2876. }
  2877. // SetRepositoryName sets the RepositoryName field's value.
  2878. func (s *DeleteLifecyclePolicyInput) SetRepositoryName(v string) *DeleteLifecyclePolicyInput {
  2879. s.RepositoryName = &v
  2880. return s
  2881. }
  2882. type DeleteLifecyclePolicyOutput struct {
  2883. _ struct{} `type:"structure"`
  2884. // The time stamp of the last time that the lifecycle policy was run.
  2885. LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp"`
  2886. // The JSON lifecycle policy text.
  2887. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"`
  2888. // The registry ID associated with the request.
  2889. RegistryId *string `locationName:"registryId" type:"string"`
  2890. // The repository name associated with the request.
  2891. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  2892. }
  2893. // String returns the string representation
  2894. func (s DeleteLifecyclePolicyOutput) String() string {
  2895. return awsutil.Prettify(s)
  2896. }
  2897. // GoString returns the string representation
  2898. func (s DeleteLifecyclePolicyOutput) GoString() string {
  2899. return s.String()
  2900. }
  2901. // SetLastEvaluatedAt sets the LastEvaluatedAt field's value.
  2902. func (s *DeleteLifecyclePolicyOutput) SetLastEvaluatedAt(v time.Time) *DeleteLifecyclePolicyOutput {
  2903. s.LastEvaluatedAt = &v
  2904. return s
  2905. }
  2906. // SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
  2907. func (s *DeleteLifecyclePolicyOutput) SetLifecyclePolicyText(v string) *DeleteLifecyclePolicyOutput {
  2908. s.LifecyclePolicyText = &v
  2909. return s
  2910. }
  2911. // SetRegistryId sets the RegistryId field's value.
  2912. func (s *DeleteLifecyclePolicyOutput) SetRegistryId(v string) *DeleteLifecyclePolicyOutput {
  2913. s.RegistryId = &v
  2914. return s
  2915. }
  2916. // SetRepositoryName sets the RepositoryName field's value.
  2917. func (s *DeleteLifecyclePolicyOutput) SetRepositoryName(v string) *DeleteLifecyclePolicyOutput {
  2918. s.RepositoryName = &v
  2919. return s
  2920. }
  2921. type DeleteRepositoryInput struct {
  2922. _ struct{} `type:"structure"`
  2923. // If a repository contains images, forces the deletion.
  2924. Force *bool `locationName:"force" type:"boolean"`
  2925. // The AWS account ID associated with the registry that contains the repository
  2926. // to delete. If you do not specify a registry, the default registry is assumed.
  2927. RegistryId *string `locationName:"registryId" type:"string"`
  2928. // The name of the repository to delete.
  2929. //
  2930. // RepositoryName is a required field
  2931. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2932. }
  2933. // String returns the string representation
  2934. func (s DeleteRepositoryInput) String() string {
  2935. return awsutil.Prettify(s)
  2936. }
  2937. // GoString returns the string representation
  2938. func (s DeleteRepositoryInput) GoString() string {
  2939. return s.String()
  2940. }
  2941. // Validate inspects the fields of the type to determine if they are valid.
  2942. func (s *DeleteRepositoryInput) Validate() error {
  2943. invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"}
  2944. if s.RepositoryName == nil {
  2945. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2946. }
  2947. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  2948. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  2949. }
  2950. if invalidParams.Len() > 0 {
  2951. return invalidParams
  2952. }
  2953. return nil
  2954. }
  2955. // SetForce sets the Force field's value.
  2956. func (s *DeleteRepositoryInput) SetForce(v bool) *DeleteRepositoryInput {
  2957. s.Force = &v
  2958. return s
  2959. }
  2960. // SetRegistryId sets the RegistryId field's value.
  2961. func (s *DeleteRepositoryInput) SetRegistryId(v string) *DeleteRepositoryInput {
  2962. s.RegistryId = &v
  2963. return s
  2964. }
  2965. // SetRepositoryName sets the RepositoryName field's value.
  2966. func (s *DeleteRepositoryInput) SetRepositoryName(v string) *DeleteRepositoryInput {
  2967. s.RepositoryName = &v
  2968. return s
  2969. }
  2970. type DeleteRepositoryOutput struct {
  2971. _ struct{} `type:"structure"`
  2972. // The repository that was deleted.
  2973. Repository *Repository `locationName:"repository" type:"structure"`
  2974. }
  2975. // String returns the string representation
  2976. func (s DeleteRepositoryOutput) String() string {
  2977. return awsutil.Prettify(s)
  2978. }
  2979. // GoString returns the string representation
  2980. func (s DeleteRepositoryOutput) GoString() string {
  2981. return s.String()
  2982. }
  2983. // SetRepository sets the Repository field's value.
  2984. func (s *DeleteRepositoryOutput) SetRepository(v *Repository) *DeleteRepositoryOutput {
  2985. s.Repository = v
  2986. return s
  2987. }
  2988. type DeleteRepositoryPolicyInput struct {
  2989. _ struct{} `type:"structure"`
  2990. // The AWS account ID associated with the registry that contains the repository
  2991. // policy to delete. If you do not specify a registry, the default registry
  2992. // is assumed.
  2993. RegistryId *string `locationName:"registryId" type:"string"`
  2994. // The name of the repository that is associated with the repository policy
  2995. // to delete.
  2996. //
  2997. // RepositoryName is a required field
  2998. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2999. }
  3000. // String returns the string representation
  3001. func (s DeleteRepositoryPolicyInput) String() string {
  3002. return awsutil.Prettify(s)
  3003. }
  3004. // GoString returns the string representation
  3005. func (s DeleteRepositoryPolicyInput) GoString() string {
  3006. return s.String()
  3007. }
  3008. // Validate inspects the fields of the type to determine if they are valid.
  3009. func (s *DeleteRepositoryPolicyInput) Validate() error {
  3010. invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryPolicyInput"}
  3011. if s.RepositoryName == nil {
  3012. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3013. }
  3014. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3015. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3016. }
  3017. if invalidParams.Len() > 0 {
  3018. return invalidParams
  3019. }
  3020. return nil
  3021. }
  3022. // SetRegistryId sets the RegistryId field's value.
  3023. func (s *DeleteRepositoryPolicyInput) SetRegistryId(v string) *DeleteRepositoryPolicyInput {
  3024. s.RegistryId = &v
  3025. return s
  3026. }
  3027. // SetRepositoryName sets the RepositoryName field's value.
  3028. func (s *DeleteRepositoryPolicyInput) SetRepositoryName(v string) *DeleteRepositoryPolicyInput {
  3029. s.RepositoryName = &v
  3030. return s
  3031. }
  3032. type DeleteRepositoryPolicyOutput struct {
  3033. _ struct{} `type:"structure"`
  3034. // The JSON repository policy that was deleted from the repository.
  3035. PolicyText *string `locationName:"policyText" type:"string"`
  3036. // The registry ID associated with the request.
  3037. RegistryId *string `locationName:"registryId" type:"string"`
  3038. // The repository name associated with the request.
  3039. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  3040. }
  3041. // String returns the string representation
  3042. func (s DeleteRepositoryPolicyOutput) String() string {
  3043. return awsutil.Prettify(s)
  3044. }
  3045. // GoString returns the string representation
  3046. func (s DeleteRepositoryPolicyOutput) GoString() string {
  3047. return s.String()
  3048. }
  3049. // SetPolicyText sets the PolicyText field's value.
  3050. func (s *DeleteRepositoryPolicyOutput) SetPolicyText(v string) *DeleteRepositoryPolicyOutput {
  3051. s.PolicyText = &v
  3052. return s
  3053. }
  3054. // SetRegistryId sets the RegistryId field's value.
  3055. func (s *DeleteRepositoryPolicyOutput) SetRegistryId(v string) *DeleteRepositoryPolicyOutput {
  3056. s.RegistryId = &v
  3057. return s
  3058. }
  3059. // SetRepositoryName sets the RepositoryName field's value.
  3060. func (s *DeleteRepositoryPolicyOutput) SetRepositoryName(v string) *DeleteRepositoryPolicyOutput {
  3061. s.RepositoryName = &v
  3062. return s
  3063. }
  3064. // An object representing a filter on a DescribeImages operation.
  3065. type DescribeImagesFilter struct {
  3066. _ struct{} `type:"structure"`
  3067. // The tag status with which to filter your DescribeImages results. You can
  3068. // filter results based on whether they are TAGGED or UNTAGGED.
  3069. TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"`
  3070. }
  3071. // String returns the string representation
  3072. func (s DescribeImagesFilter) String() string {
  3073. return awsutil.Prettify(s)
  3074. }
  3075. // GoString returns the string representation
  3076. func (s DescribeImagesFilter) GoString() string {
  3077. return s.String()
  3078. }
  3079. // SetTagStatus sets the TagStatus field's value.
  3080. func (s *DescribeImagesFilter) SetTagStatus(v string) *DescribeImagesFilter {
  3081. s.TagStatus = &v
  3082. return s
  3083. }
  3084. type DescribeImagesInput struct {
  3085. _ struct{} `type:"structure"`
  3086. // The filter key and value with which to filter your DescribeImages results.
  3087. Filter *DescribeImagesFilter `locationName:"filter" type:"structure"`
  3088. // The list of image IDs for the requested repository.
  3089. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
  3090. // The maximum number of repository results returned by DescribeImages in paginated
  3091. // output. When this parameter is used, DescribeImages only returns maxResults
  3092. // results in a single page along with a nextToken response element. The remaining
  3093. // results of the initial request can be seen by sending another DescribeImages
  3094. // request with the returned nextToken value. This value can be between 1 and
  3095. // 1000. If this parameter is not used, then DescribeImages returns up to 100
  3096. // results and a nextToken value, if applicable. This option cannot be used
  3097. // when you specify images with imageIds.
  3098. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  3099. // The nextToken value returned from a previous paginated DescribeImages request
  3100. // where maxResults was used and the results exceeded the value of that parameter.
  3101. // Pagination continues from the end of the previous results that returned the
  3102. // nextToken value. This value is null when there are no more results to return.
  3103. // This option cannot be used when you specify images with imageIds.
  3104. NextToken *string `locationName:"nextToken" type:"string"`
  3105. // The AWS account ID associated with the registry that contains the repository
  3106. // in which to describe images. If you do not specify a registry, the default
  3107. // registry is assumed.
  3108. RegistryId *string `locationName:"registryId" type:"string"`
  3109. // A list of repositories to describe.
  3110. //
  3111. // RepositoryName is a required field
  3112. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  3113. }
  3114. // String returns the string representation
  3115. func (s DescribeImagesInput) String() string {
  3116. return awsutil.Prettify(s)
  3117. }
  3118. // GoString returns the string representation
  3119. func (s DescribeImagesInput) GoString() string {
  3120. return s.String()
  3121. }
  3122. // Validate inspects the fields of the type to determine if they are valid.
  3123. func (s *DescribeImagesInput) Validate() error {
  3124. invalidParams := request.ErrInvalidParams{Context: "DescribeImagesInput"}
  3125. if s.ImageIds != nil && len(s.ImageIds) < 1 {
  3126. invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
  3127. }
  3128. if s.MaxResults != nil && *s.MaxResults < 1 {
  3129. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3130. }
  3131. if s.RepositoryName == nil {
  3132. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3133. }
  3134. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3135. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3136. }
  3137. if invalidParams.Len() > 0 {
  3138. return invalidParams
  3139. }
  3140. return nil
  3141. }
  3142. // SetFilter sets the Filter field's value.
  3143. func (s *DescribeImagesInput) SetFilter(v *DescribeImagesFilter) *DescribeImagesInput {
  3144. s.Filter = v
  3145. return s
  3146. }
  3147. // SetImageIds sets the ImageIds field's value.
  3148. func (s *DescribeImagesInput) SetImageIds(v []*ImageIdentifier) *DescribeImagesInput {
  3149. s.ImageIds = v
  3150. return s
  3151. }
  3152. // SetMaxResults sets the MaxResults field's value.
  3153. func (s *DescribeImagesInput) SetMaxResults(v int64) *DescribeImagesInput {
  3154. s.MaxResults = &v
  3155. return s
  3156. }
  3157. // SetNextToken sets the NextToken field's value.
  3158. func (s *DescribeImagesInput) SetNextToken(v string) *DescribeImagesInput {
  3159. s.NextToken = &v
  3160. return s
  3161. }
  3162. // SetRegistryId sets the RegistryId field's value.
  3163. func (s *DescribeImagesInput) SetRegistryId(v string) *DescribeImagesInput {
  3164. s.RegistryId = &v
  3165. return s
  3166. }
  3167. // SetRepositoryName sets the RepositoryName field's value.
  3168. func (s *DescribeImagesInput) SetRepositoryName(v string) *DescribeImagesInput {
  3169. s.RepositoryName = &v
  3170. return s
  3171. }
  3172. type DescribeImagesOutput struct {
  3173. _ struct{} `type:"structure"`
  3174. // A list of ImageDetail objects that contain data about the image.
  3175. ImageDetails []*ImageDetail `locationName:"imageDetails" type:"list"`
  3176. // The nextToken value to include in a future DescribeImages request. When the
  3177. // results of a DescribeImages request exceed maxResults, this value can be
  3178. // used to retrieve the next page of results. This value is null when there
  3179. // are no more results to return.
  3180. NextToken *string `locationName:"nextToken" type:"string"`
  3181. }
  3182. // String returns the string representation
  3183. func (s DescribeImagesOutput) String() string {
  3184. return awsutil.Prettify(s)
  3185. }
  3186. // GoString returns the string representation
  3187. func (s DescribeImagesOutput) GoString() string {
  3188. return s.String()
  3189. }
  3190. // SetImageDetails sets the ImageDetails field's value.
  3191. func (s *DescribeImagesOutput) SetImageDetails(v []*ImageDetail) *DescribeImagesOutput {
  3192. s.ImageDetails = v
  3193. return s
  3194. }
  3195. // SetNextToken sets the NextToken field's value.
  3196. func (s *DescribeImagesOutput) SetNextToken(v string) *DescribeImagesOutput {
  3197. s.NextToken = &v
  3198. return s
  3199. }
  3200. type DescribeRepositoriesInput struct {
  3201. _ struct{} `type:"structure"`
  3202. // The maximum number of repository results returned by DescribeRepositories
  3203. // in paginated output. When this parameter is used, DescribeRepositories only
  3204. // returns maxResults results in a single page along with a nextToken response
  3205. // element. The remaining results of the initial request can be seen by sending
  3206. // another DescribeRepositories request with the returned nextToken value. This
  3207. // value can be between 1 and 1000. If this parameter is not used, then DescribeRepositories
  3208. // returns up to 100 results and a nextToken value, if applicable. This option
  3209. // cannot be used when you specify repositories with repositoryNames.
  3210. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  3211. // The nextToken value returned from a previous paginated DescribeRepositories
  3212. // request where maxResults was used and the results exceeded the value of that
  3213. // parameter. Pagination continues from the end of the previous results that
  3214. // returned the nextToken value. This value is null when there are no more results
  3215. // to return. This option cannot be used when you specify repositories with
  3216. // repositoryNames.
  3217. //
  3218. // This token should be treated as an opaque identifier that is only used to
  3219. // retrieve the next items in a list and not for other programmatic purposes.
  3220. NextToken *string `locationName:"nextToken" type:"string"`
  3221. // The AWS account ID associated with the registry that contains the repositories
  3222. // to be described. If you do not specify a registry, the default registry is
  3223. // assumed.
  3224. RegistryId *string `locationName:"registryId" type:"string"`
  3225. // A list of repositories to describe. If this parameter is omitted, then all
  3226. // repositories in a registry are described.
  3227. RepositoryNames []*string `locationName:"repositoryNames" min:"1" type:"list"`
  3228. }
  3229. // String returns the string representation
  3230. func (s DescribeRepositoriesInput) String() string {
  3231. return awsutil.Prettify(s)
  3232. }
  3233. // GoString returns the string representation
  3234. func (s DescribeRepositoriesInput) GoString() string {
  3235. return s.String()
  3236. }
  3237. // Validate inspects the fields of the type to determine if they are valid.
  3238. func (s *DescribeRepositoriesInput) Validate() error {
  3239. invalidParams := request.ErrInvalidParams{Context: "DescribeRepositoriesInput"}
  3240. if s.MaxResults != nil && *s.MaxResults < 1 {
  3241. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3242. }
  3243. if s.RepositoryNames != nil && len(s.RepositoryNames) < 1 {
  3244. invalidParams.Add(request.NewErrParamMinLen("RepositoryNames", 1))
  3245. }
  3246. if invalidParams.Len() > 0 {
  3247. return invalidParams
  3248. }
  3249. return nil
  3250. }
  3251. // SetMaxResults sets the MaxResults field's value.
  3252. func (s *DescribeRepositoriesInput) SetMaxResults(v int64) *DescribeRepositoriesInput {
  3253. s.MaxResults = &v
  3254. return s
  3255. }
  3256. // SetNextToken sets the NextToken field's value.
  3257. func (s *DescribeRepositoriesInput) SetNextToken(v string) *DescribeRepositoriesInput {
  3258. s.NextToken = &v
  3259. return s
  3260. }
  3261. // SetRegistryId sets the RegistryId field's value.
  3262. func (s *DescribeRepositoriesInput) SetRegistryId(v string) *DescribeRepositoriesInput {
  3263. s.RegistryId = &v
  3264. return s
  3265. }
  3266. // SetRepositoryNames sets the RepositoryNames field's value.
  3267. func (s *DescribeRepositoriesInput) SetRepositoryNames(v []*string) *DescribeRepositoriesInput {
  3268. s.RepositoryNames = v
  3269. return s
  3270. }
  3271. type DescribeRepositoriesOutput struct {
  3272. _ struct{} `type:"structure"`
  3273. // The nextToken value to include in a future DescribeRepositories request.
  3274. // When the results of a DescribeRepositories request exceed maxResults, this
  3275. // value can be used to retrieve the next page of results. This value is null
  3276. // when there are no more results to return.
  3277. NextToken *string `locationName:"nextToken" type:"string"`
  3278. // A list of repository objects corresponding to valid repositories.
  3279. Repositories []*Repository `locationName:"repositories" type:"list"`
  3280. }
  3281. // String returns the string representation
  3282. func (s DescribeRepositoriesOutput) String() string {
  3283. return awsutil.Prettify(s)
  3284. }
  3285. // GoString returns the string representation
  3286. func (s DescribeRepositoriesOutput) GoString() string {
  3287. return s.String()
  3288. }
  3289. // SetNextToken sets the NextToken field's value.
  3290. func (s *DescribeRepositoriesOutput) SetNextToken(v string) *DescribeRepositoriesOutput {
  3291. s.NextToken = &v
  3292. return s
  3293. }
  3294. // SetRepositories sets the Repositories field's value.
  3295. func (s *DescribeRepositoriesOutput) SetRepositories(v []*Repository) *DescribeRepositoriesOutput {
  3296. s.Repositories = v
  3297. return s
  3298. }
  3299. type GetAuthorizationTokenInput struct {
  3300. _ struct{} `type:"structure"`
  3301. // A list of AWS account IDs that are associated with the registries for which
  3302. // to get authorization tokens. If you do not specify a registry, the default
  3303. // registry is assumed.
  3304. RegistryIds []*string `locationName:"registryIds" min:"1" type:"list"`
  3305. }
  3306. // String returns the string representation
  3307. func (s GetAuthorizationTokenInput) String() string {
  3308. return awsutil.Prettify(s)
  3309. }
  3310. // GoString returns the string representation
  3311. func (s GetAuthorizationTokenInput) GoString() string {
  3312. return s.String()
  3313. }
  3314. // Validate inspects the fields of the type to determine if they are valid.
  3315. func (s *GetAuthorizationTokenInput) Validate() error {
  3316. invalidParams := request.ErrInvalidParams{Context: "GetAuthorizationTokenInput"}
  3317. if s.RegistryIds != nil && len(s.RegistryIds) < 1 {
  3318. invalidParams.Add(request.NewErrParamMinLen("RegistryIds", 1))
  3319. }
  3320. if invalidParams.Len() > 0 {
  3321. return invalidParams
  3322. }
  3323. return nil
  3324. }
  3325. // SetRegistryIds sets the RegistryIds field's value.
  3326. func (s *GetAuthorizationTokenInput) SetRegistryIds(v []*string) *GetAuthorizationTokenInput {
  3327. s.RegistryIds = v
  3328. return s
  3329. }
  3330. type GetAuthorizationTokenOutput struct {
  3331. _ struct{} `type:"structure"`
  3332. // A list of authorization token data objects that correspond to the registryIds
  3333. // values in the request.
  3334. AuthorizationData []*AuthorizationData `locationName:"authorizationData" type:"list"`
  3335. }
  3336. // String returns the string representation
  3337. func (s GetAuthorizationTokenOutput) String() string {
  3338. return awsutil.Prettify(s)
  3339. }
  3340. // GoString returns the string representation
  3341. func (s GetAuthorizationTokenOutput) GoString() string {
  3342. return s.String()
  3343. }
  3344. // SetAuthorizationData sets the AuthorizationData field's value.
  3345. func (s *GetAuthorizationTokenOutput) SetAuthorizationData(v []*AuthorizationData) *GetAuthorizationTokenOutput {
  3346. s.AuthorizationData = v
  3347. return s
  3348. }
  3349. type GetDownloadUrlForLayerInput struct {
  3350. _ struct{} `type:"structure"`
  3351. // The digest of the image layer to download.
  3352. //
  3353. // LayerDigest is a required field
  3354. LayerDigest *string `locationName:"layerDigest" type:"string" required:"true"`
  3355. // The AWS account ID associated with the registry that contains the image layer
  3356. // to download. If you do not specify a registry, the default registry is assumed.
  3357. RegistryId *string `locationName:"registryId" type:"string"`
  3358. // The name of the repository that is associated with the image layer to download.
  3359. //
  3360. // RepositoryName is a required field
  3361. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  3362. }
  3363. // String returns the string representation
  3364. func (s GetDownloadUrlForLayerInput) String() string {
  3365. return awsutil.Prettify(s)
  3366. }
  3367. // GoString returns the string representation
  3368. func (s GetDownloadUrlForLayerInput) GoString() string {
  3369. return s.String()
  3370. }
  3371. // Validate inspects the fields of the type to determine if they are valid.
  3372. func (s *GetDownloadUrlForLayerInput) Validate() error {
  3373. invalidParams := request.ErrInvalidParams{Context: "GetDownloadUrlForLayerInput"}
  3374. if s.LayerDigest == nil {
  3375. invalidParams.Add(request.NewErrParamRequired("LayerDigest"))
  3376. }
  3377. if s.RepositoryName == nil {
  3378. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3379. }
  3380. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3381. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3382. }
  3383. if invalidParams.Len() > 0 {
  3384. return invalidParams
  3385. }
  3386. return nil
  3387. }
  3388. // SetLayerDigest sets the LayerDigest field's value.
  3389. func (s *GetDownloadUrlForLayerInput) SetLayerDigest(v string) *GetDownloadUrlForLayerInput {
  3390. s.LayerDigest = &v
  3391. return s
  3392. }
  3393. // SetRegistryId sets the RegistryId field's value.
  3394. func (s *GetDownloadUrlForLayerInput) SetRegistryId(v string) *GetDownloadUrlForLayerInput {
  3395. s.RegistryId = &v
  3396. return s
  3397. }
  3398. // SetRepositoryName sets the RepositoryName field's value.
  3399. func (s *GetDownloadUrlForLayerInput) SetRepositoryName(v string) *GetDownloadUrlForLayerInput {
  3400. s.RepositoryName = &v
  3401. return s
  3402. }
  3403. type GetDownloadUrlForLayerOutput struct {
  3404. _ struct{} `type:"structure"`
  3405. // The pre-signed Amazon S3 download URL for the requested layer.
  3406. DownloadUrl *string `locationName:"downloadUrl" type:"string"`
  3407. // The digest of the image layer to download.
  3408. LayerDigest *string `locationName:"layerDigest" type:"string"`
  3409. }
  3410. // String returns the string representation
  3411. func (s GetDownloadUrlForLayerOutput) String() string {
  3412. return awsutil.Prettify(s)
  3413. }
  3414. // GoString returns the string representation
  3415. func (s GetDownloadUrlForLayerOutput) GoString() string {
  3416. return s.String()
  3417. }
  3418. // SetDownloadUrl sets the DownloadUrl field's value.
  3419. func (s *GetDownloadUrlForLayerOutput) SetDownloadUrl(v string) *GetDownloadUrlForLayerOutput {
  3420. s.DownloadUrl = &v
  3421. return s
  3422. }
  3423. // SetLayerDigest sets the LayerDigest field's value.
  3424. func (s *GetDownloadUrlForLayerOutput) SetLayerDigest(v string) *GetDownloadUrlForLayerOutput {
  3425. s.LayerDigest = &v
  3426. return s
  3427. }
  3428. type GetLifecyclePolicyInput struct {
  3429. _ struct{} `type:"structure"`
  3430. // The AWS account ID associated with the registry that contains the repository.
  3431. // If you do not specify a registry, the default registry is assumed.
  3432. RegistryId *string `locationName:"registryId" type:"string"`
  3433. // The name of the repository.
  3434. //
  3435. // RepositoryName is a required field
  3436. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  3437. }
  3438. // String returns the string representation
  3439. func (s GetLifecyclePolicyInput) String() string {
  3440. return awsutil.Prettify(s)
  3441. }
  3442. // GoString returns the string representation
  3443. func (s GetLifecyclePolicyInput) GoString() string {
  3444. return s.String()
  3445. }
  3446. // Validate inspects the fields of the type to determine if they are valid.
  3447. func (s *GetLifecyclePolicyInput) Validate() error {
  3448. invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyInput"}
  3449. if s.RepositoryName == nil {
  3450. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3451. }
  3452. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3453. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3454. }
  3455. if invalidParams.Len() > 0 {
  3456. return invalidParams
  3457. }
  3458. return nil
  3459. }
  3460. // SetRegistryId sets the RegistryId field's value.
  3461. func (s *GetLifecyclePolicyInput) SetRegistryId(v string) *GetLifecyclePolicyInput {
  3462. s.RegistryId = &v
  3463. return s
  3464. }
  3465. // SetRepositoryName sets the RepositoryName field's value.
  3466. func (s *GetLifecyclePolicyInput) SetRepositoryName(v string) *GetLifecyclePolicyInput {
  3467. s.RepositoryName = &v
  3468. return s
  3469. }
  3470. type GetLifecyclePolicyOutput struct {
  3471. _ struct{} `type:"structure"`
  3472. // The time stamp of the last time that the lifecycle policy was run.
  3473. LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp"`
  3474. // The JSON lifecycle policy text.
  3475. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"`
  3476. // The registry ID associated with the request.
  3477. RegistryId *string `locationName:"registryId" type:"string"`
  3478. // The repository name associated with the request.
  3479. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  3480. }
  3481. // String returns the string representation
  3482. func (s GetLifecyclePolicyOutput) String() string {
  3483. return awsutil.Prettify(s)
  3484. }
  3485. // GoString returns the string representation
  3486. func (s GetLifecyclePolicyOutput) GoString() string {
  3487. return s.String()
  3488. }
  3489. // SetLastEvaluatedAt sets the LastEvaluatedAt field's value.
  3490. func (s *GetLifecyclePolicyOutput) SetLastEvaluatedAt(v time.Time) *GetLifecyclePolicyOutput {
  3491. s.LastEvaluatedAt = &v
  3492. return s
  3493. }
  3494. // SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
  3495. func (s *GetLifecyclePolicyOutput) SetLifecyclePolicyText(v string) *GetLifecyclePolicyOutput {
  3496. s.LifecyclePolicyText = &v
  3497. return s
  3498. }
  3499. // SetRegistryId sets the RegistryId field's value.
  3500. func (s *GetLifecyclePolicyOutput) SetRegistryId(v string) *GetLifecyclePolicyOutput {
  3501. s.RegistryId = &v
  3502. return s
  3503. }
  3504. // SetRepositoryName sets the RepositoryName field's value.
  3505. func (s *GetLifecyclePolicyOutput) SetRepositoryName(v string) *GetLifecyclePolicyOutput {
  3506. s.RepositoryName = &v
  3507. return s
  3508. }
  3509. type GetLifecyclePolicyPreviewInput struct {
  3510. _ struct{} `type:"structure"`
  3511. // An optional parameter that filters results based on image tag status and
  3512. // all tags, if tagged.
  3513. Filter *LifecyclePolicyPreviewFilter `locationName:"filter" type:"structure"`
  3514. // The list of imageIDs to be included.
  3515. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
  3516. // The maximum number of repository results returned by GetLifecyclePolicyPreviewRequest
  3517. // in
 paginated output. When this parameter is used, GetLifecyclePolicyPreviewRequest
  3518. // only returns
 maxResults results in a single page along with a nextToken
  3519. // response element. The remaining results of the initial request can be seen
  3520. // by sending
 another GetLifecyclePolicyPreviewRequest request with the returned
  3521. // nextToken
 value. This value can be between 1 and 1000. If this
 parameter
  3522. // is not used, then GetLifecyclePolicyPreviewRequest returns up to
 100 results
  3523. // and a nextToken value, if
 applicable. This option cannot be used when you
  3524. // specify images with imageIds.
  3525. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  3526. // The nextToken value returned from a previous paginated
 GetLifecyclePolicyPreviewRequest
  3527. // request where maxResults was used and the
 results exceeded the value of
  3528. // that parameter. Pagination continues from the end of the
 previous results
  3529. // that returned the nextToken value. This value is
 null when there are no
  3530. // more results to return. This option cannot be used when you specify images
  3531. // with imageIds.
  3532. NextToken *string `locationName:"nextToken" type:"string"`
  3533. // The AWS account ID associated with the registry that contains the repository.
  3534. // If you do not specify a registry, the default registry is assumed.
  3535. RegistryId *string `locationName:"registryId" type:"string"`
  3536. // The name of the repository.
  3537. //
  3538. // RepositoryName is a required field
  3539. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  3540. }
  3541. // String returns the string representation
  3542. func (s GetLifecyclePolicyPreviewInput) String() string {
  3543. return awsutil.Prettify(s)
  3544. }
  3545. // GoString returns the string representation
  3546. func (s GetLifecyclePolicyPreviewInput) GoString() string {
  3547. return s.String()
  3548. }
  3549. // Validate inspects the fields of the type to determine if they are valid.
  3550. func (s *GetLifecyclePolicyPreviewInput) Validate() error {
  3551. invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyPreviewInput"}
  3552. if s.ImageIds != nil && len(s.ImageIds) < 1 {
  3553. invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
  3554. }
  3555. if s.MaxResults != nil && *s.MaxResults < 1 {
  3556. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3557. }
  3558. if s.RepositoryName == nil {
  3559. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3560. }
  3561. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3562. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3563. }
  3564. if invalidParams.Len() > 0 {
  3565. return invalidParams
  3566. }
  3567. return nil
  3568. }
  3569. // SetFilter sets the Filter field's value.
  3570. func (s *GetLifecyclePolicyPreviewInput) SetFilter(v *LifecyclePolicyPreviewFilter) *GetLifecyclePolicyPreviewInput {
  3571. s.Filter = v
  3572. return s
  3573. }
  3574. // SetImageIds sets the ImageIds field's value.
  3575. func (s *GetLifecyclePolicyPreviewInput) SetImageIds(v []*ImageIdentifier) *GetLifecyclePolicyPreviewInput {
  3576. s.ImageIds = v
  3577. return s
  3578. }
  3579. // SetMaxResults sets the MaxResults field's value.
  3580. func (s *GetLifecyclePolicyPreviewInput) SetMaxResults(v int64) *GetLifecyclePolicyPreviewInput {
  3581. s.MaxResults = &v
  3582. return s
  3583. }
  3584. // SetNextToken sets the NextToken field's value.
  3585. func (s *GetLifecyclePolicyPreviewInput) SetNextToken(v string) *GetLifecyclePolicyPreviewInput {
  3586. s.NextToken = &v
  3587. return s
  3588. }
  3589. // SetRegistryId sets the RegistryId field's value.
  3590. func (s *GetLifecyclePolicyPreviewInput) SetRegistryId(v string) *GetLifecyclePolicyPreviewInput {
  3591. s.RegistryId = &v
  3592. return s
  3593. }
  3594. // SetRepositoryName sets the RepositoryName field's value.
  3595. func (s *GetLifecyclePolicyPreviewInput) SetRepositoryName(v string) *GetLifecyclePolicyPreviewInput {
  3596. s.RepositoryName = &v
  3597. return s
  3598. }
  3599. type GetLifecyclePolicyPreviewOutput struct {
  3600. _ struct{} `type:"structure"`
  3601. // The JSON lifecycle policy text.
  3602. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"`
  3603. // The nextToken value to include in a future GetLifecyclePolicyPreview request.
  3604. // When the results of a GetLifecyclePolicyPreview request exceed maxResults,
  3605. // this value can be used to retrieve the next page of results. This value is
  3606. // null when there are no more results to return.
  3607. NextToken *string `locationName:"nextToken" type:"string"`
  3608. // The results of the lifecycle policy preview request.
  3609. PreviewResults []*LifecyclePolicyPreviewResult `locationName:"previewResults" type:"list"`
  3610. // The registry ID associated with the request.
  3611. RegistryId *string `locationName:"registryId" type:"string"`
  3612. // The repository name associated with the request.
  3613. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  3614. // The status of the lifecycle policy preview request.
  3615. Status *string `locationName:"status" type:"string" enum:"LifecyclePolicyPreviewStatus"`
  3616. // The list of images that is returned as a result of the action.
  3617. Summary *LifecyclePolicyPreviewSummary `locationName:"summary" type:"structure"`
  3618. }
  3619. // String returns the string representation
  3620. func (s GetLifecyclePolicyPreviewOutput) String() string {
  3621. return awsutil.Prettify(s)
  3622. }
  3623. // GoString returns the string representation
  3624. func (s GetLifecyclePolicyPreviewOutput) GoString() string {
  3625. return s.String()
  3626. }
  3627. // SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
  3628. func (s *GetLifecyclePolicyPreviewOutput) SetLifecyclePolicyText(v string) *GetLifecyclePolicyPreviewOutput {
  3629. s.LifecyclePolicyText = &v
  3630. return s
  3631. }
  3632. // SetNextToken sets the NextToken field's value.
  3633. func (s *GetLifecyclePolicyPreviewOutput) SetNextToken(v string) *GetLifecyclePolicyPreviewOutput {
  3634. s.NextToken = &v
  3635. return s
  3636. }
  3637. // SetPreviewResults sets the PreviewResults field's value.
  3638. func (s *GetLifecyclePolicyPreviewOutput) SetPreviewResults(v []*LifecyclePolicyPreviewResult) *GetLifecyclePolicyPreviewOutput {
  3639. s.PreviewResults = v
  3640. return s
  3641. }
  3642. // SetRegistryId sets the RegistryId field's value.
  3643. func (s *GetLifecyclePolicyPreviewOutput) SetRegistryId(v string) *GetLifecyclePolicyPreviewOutput {
  3644. s.RegistryId = &v
  3645. return s
  3646. }
  3647. // SetRepositoryName sets the RepositoryName field's value.
  3648. func (s *GetLifecyclePolicyPreviewOutput) SetRepositoryName(v string) *GetLifecyclePolicyPreviewOutput {
  3649. s.RepositoryName = &v
  3650. return s
  3651. }
  3652. // SetStatus sets the Status field's value.
  3653. func (s *GetLifecyclePolicyPreviewOutput) SetStatus(v string) *GetLifecyclePolicyPreviewOutput {
  3654. s.Status = &v
  3655. return s
  3656. }
  3657. // SetSummary sets the Summary field's value.
  3658. func (s *GetLifecyclePolicyPreviewOutput) SetSummary(v *LifecyclePolicyPreviewSummary) *GetLifecyclePolicyPreviewOutput {
  3659. s.Summary = v
  3660. return s
  3661. }
  3662. type GetRepositoryPolicyInput struct {
  3663. _ struct{} `type:"structure"`
  3664. // The AWS account ID associated with the registry that contains the repository.
  3665. // If you do not specify a registry, the default registry is assumed.
  3666. RegistryId *string `locationName:"registryId" type:"string"`
  3667. // The name of the repository with the policy to retrieve.
  3668. //
  3669. // RepositoryName is a required field
  3670. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  3671. }
  3672. // String returns the string representation
  3673. func (s GetRepositoryPolicyInput) String() string {
  3674. return awsutil.Prettify(s)
  3675. }
  3676. // GoString returns the string representation
  3677. func (s GetRepositoryPolicyInput) GoString() string {
  3678. return s.String()
  3679. }
  3680. // Validate inspects the fields of the type to determine if they are valid.
  3681. func (s *GetRepositoryPolicyInput) Validate() error {
  3682. invalidParams := request.ErrInvalidParams{Context: "GetRepositoryPolicyInput"}
  3683. if s.RepositoryName == nil {
  3684. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3685. }
  3686. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3687. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3688. }
  3689. if invalidParams.Len() > 0 {
  3690. return invalidParams
  3691. }
  3692. return nil
  3693. }
  3694. // SetRegistryId sets the RegistryId field's value.
  3695. func (s *GetRepositoryPolicyInput) SetRegistryId(v string) *GetRepositoryPolicyInput {
  3696. s.RegistryId = &v
  3697. return s
  3698. }
  3699. // SetRepositoryName sets the RepositoryName field's value.
  3700. func (s *GetRepositoryPolicyInput) SetRepositoryName(v string) *GetRepositoryPolicyInput {
  3701. s.RepositoryName = &v
  3702. return s
  3703. }
  3704. type GetRepositoryPolicyOutput struct {
  3705. _ struct{} `type:"structure"`
  3706. // The JSON repository policy text associated with the repository.
  3707. PolicyText *string `locationName:"policyText" type:"string"`
  3708. // The registry ID associated with the request.
  3709. RegistryId *string `locationName:"registryId" type:"string"`
  3710. // The repository name associated with the request.
  3711. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  3712. }
  3713. // String returns the string representation
  3714. func (s GetRepositoryPolicyOutput) String() string {
  3715. return awsutil.Prettify(s)
  3716. }
  3717. // GoString returns the string representation
  3718. func (s GetRepositoryPolicyOutput) GoString() string {
  3719. return s.String()
  3720. }
  3721. // SetPolicyText sets the PolicyText field's value.
  3722. func (s *GetRepositoryPolicyOutput) SetPolicyText(v string) *GetRepositoryPolicyOutput {
  3723. s.PolicyText = &v
  3724. return s
  3725. }
  3726. // SetRegistryId sets the RegistryId field's value.
  3727. func (s *GetRepositoryPolicyOutput) SetRegistryId(v string) *GetRepositoryPolicyOutput {
  3728. s.RegistryId = &v
  3729. return s
  3730. }
  3731. // SetRepositoryName sets the RepositoryName field's value.
  3732. func (s *GetRepositoryPolicyOutput) SetRepositoryName(v string) *GetRepositoryPolicyOutput {
  3733. s.RepositoryName = &v
  3734. return s
  3735. }
  3736. // An object representing an Amazon ECR image.
  3737. type Image struct {
  3738. _ struct{} `type:"structure"`
  3739. // An object containing the image tag and image digest associated with an image.
  3740. ImageId *ImageIdentifier `locationName:"imageId" type:"structure"`
  3741. // The image manifest associated with the image.
  3742. ImageManifest *string `locationName:"imageManifest" type:"string"`
  3743. // The AWS account ID associated with the registry containing the image.
  3744. RegistryId *string `locationName:"registryId" type:"string"`
  3745. // The name of the repository associated with the image.
  3746. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  3747. }
  3748. // String returns the string representation
  3749. func (s Image) String() string {
  3750. return awsutil.Prettify(s)
  3751. }
  3752. // GoString returns the string representation
  3753. func (s Image) GoString() string {
  3754. return s.String()
  3755. }
  3756. // SetImageId sets the ImageId field's value.
  3757. func (s *Image) SetImageId(v *ImageIdentifier) *Image {
  3758. s.ImageId = v
  3759. return s
  3760. }
  3761. // SetImageManifest sets the ImageManifest field's value.
  3762. func (s *Image) SetImageManifest(v string) *Image {
  3763. s.ImageManifest = &v
  3764. return s
  3765. }
  3766. // SetRegistryId sets the RegistryId field's value.
  3767. func (s *Image) SetRegistryId(v string) *Image {
  3768. s.RegistryId = &v
  3769. return s
  3770. }
  3771. // SetRepositoryName sets the RepositoryName field's value.
  3772. func (s *Image) SetRepositoryName(v string) *Image {
  3773. s.RepositoryName = &v
  3774. return s
  3775. }
  3776. // An object that describes an image returned by a DescribeImages operation.
  3777. type ImageDetail struct {
  3778. _ struct{} `type:"structure"`
  3779. // The sha256 digest of the image manifest.
  3780. ImageDigest *string `locationName:"imageDigest" type:"string"`
  3781. // The date and time, expressed in standard JavaScript date format, at which
  3782. // the current image was pushed to the repository.
  3783. ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp"`
  3784. // The size, in bytes, of the image in the repository.
  3785. //
  3786. // Beginning with Docker version 1.9, the Docker client compresses image layers
  3787. // before pushing them to a V2 Docker registry. The output of the docker images
  3788. // command shows the uncompressed image size, so it may return a larger image
  3789. // size than the image sizes returned by DescribeImages.
  3790. ImageSizeInBytes *int64 `locationName:"imageSizeInBytes" type:"long"`
  3791. // The list of tags associated with this image.
  3792. ImageTags []*string `locationName:"imageTags" type:"list"`
  3793. // The AWS account ID associated with the registry to which this image belongs.
  3794. RegistryId *string `locationName:"registryId" type:"string"`
  3795. // The name of the repository to which this image belongs.
  3796. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  3797. }
  3798. // String returns the string representation
  3799. func (s ImageDetail) String() string {
  3800. return awsutil.Prettify(s)
  3801. }
  3802. // GoString returns the string representation
  3803. func (s ImageDetail) GoString() string {
  3804. return s.String()
  3805. }
  3806. // SetImageDigest sets the ImageDigest field's value.
  3807. func (s *ImageDetail) SetImageDigest(v string) *ImageDetail {
  3808. s.ImageDigest = &v
  3809. return s
  3810. }
  3811. // SetImagePushedAt sets the ImagePushedAt field's value.
  3812. func (s *ImageDetail) SetImagePushedAt(v time.Time) *ImageDetail {
  3813. s.ImagePushedAt = &v
  3814. return s
  3815. }
  3816. // SetImageSizeInBytes sets the ImageSizeInBytes field's value.
  3817. func (s *ImageDetail) SetImageSizeInBytes(v int64) *ImageDetail {
  3818. s.ImageSizeInBytes = &v
  3819. return s
  3820. }
  3821. // SetImageTags sets the ImageTags field's value.
  3822. func (s *ImageDetail) SetImageTags(v []*string) *ImageDetail {
  3823. s.ImageTags = v
  3824. return s
  3825. }
  3826. // SetRegistryId sets the RegistryId field's value.
  3827. func (s *ImageDetail) SetRegistryId(v string) *ImageDetail {
  3828. s.RegistryId = &v
  3829. return s
  3830. }
  3831. // SetRepositoryName sets the RepositoryName field's value.
  3832. func (s *ImageDetail) SetRepositoryName(v string) *ImageDetail {
  3833. s.RepositoryName = &v
  3834. return s
  3835. }
  3836. // An object representing an Amazon ECR image failure.
  3837. type ImageFailure struct {
  3838. _ struct{} `type:"structure"`
  3839. // The code associated with the failure.
  3840. FailureCode *string `locationName:"failureCode" type:"string" enum:"ImageFailureCode"`
  3841. // The reason for the failure.
  3842. FailureReason *string `locationName:"failureReason" type:"string"`
  3843. // The image ID associated with the failure.
  3844. ImageId *ImageIdentifier `locationName:"imageId" type:"structure"`
  3845. }
  3846. // String returns the string representation
  3847. func (s ImageFailure) String() string {
  3848. return awsutil.Prettify(s)
  3849. }
  3850. // GoString returns the string representation
  3851. func (s ImageFailure) GoString() string {
  3852. return s.String()
  3853. }
  3854. // SetFailureCode sets the FailureCode field's value.
  3855. func (s *ImageFailure) SetFailureCode(v string) *ImageFailure {
  3856. s.FailureCode = &v
  3857. return s
  3858. }
  3859. // SetFailureReason sets the FailureReason field's value.
  3860. func (s *ImageFailure) SetFailureReason(v string) *ImageFailure {
  3861. s.FailureReason = &v
  3862. return s
  3863. }
  3864. // SetImageId sets the ImageId field's value.
  3865. func (s *ImageFailure) SetImageId(v *ImageIdentifier) *ImageFailure {
  3866. s.ImageId = v
  3867. return s
  3868. }
  3869. // An object with identifying information for an Amazon ECR image.
  3870. type ImageIdentifier struct {
  3871. _ struct{} `type:"structure"`
  3872. // The sha256 digest of the image manifest.
  3873. ImageDigest *string `locationName:"imageDigest" type:"string"`
  3874. // The tag used for the image.
  3875. ImageTag *string `locationName:"imageTag" type:"string"`
  3876. }
  3877. // String returns the string representation
  3878. func (s ImageIdentifier) String() string {
  3879. return awsutil.Prettify(s)
  3880. }
  3881. // GoString returns the string representation
  3882. func (s ImageIdentifier) GoString() string {
  3883. return s.String()
  3884. }
  3885. // SetImageDigest sets the ImageDigest field's value.
  3886. func (s *ImageIdentifier) SetImageDigest(v string) *ImageIdentifier {
  3887. s.ImageDigest = &v
  3888. return s
  3889. }
  3890. // SetImageTag sets the ImageTag field's value.
  3891. func (s *ImageIdentifier) SetImageTag(v string) *ImageIdentifier {
  3892. s.ImageTag = &v
  3893. return s
  3894. }
  3895. type InitiateLayerUploadInput struct {
  3896. _ struct{} `type:"structure"`
  3897. // The AWS account ID associated with the registry to which you intend to upload
  3898. // layers. If you do not specify a registry, the default registry is assumed.
  3899. RegistryId *string `locationName:"registryId" type:"string"`
  3900. // The name of the repository to which you intend to upload layers.
  3901. //
  3902. // RepositoryName is a required field
  3903. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  3904. }
  3905. // String returns the string representation
  3906. func (s InitiateLayerUploadInput) String() string {
  3907. return awsutil.Prettify(s)
  3908. }
  3909. // GoString returns the string representation
  3910. func (s InitiateLayerUploadInput) GoString() string {
  3911. return s.String()
  3912. }
  3913. // Validate inspects the fields of the type to determine if they are valid.
  3914. func (s *InitiateLayerUploadInput) Validate() error {
  3915. invalidParams := request.ErrInvalidParams{Context: "InitiateLayerUploadInput"}
  3916. if s.RepositoryName == nil {
  3917. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3918. }
  3919. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3920. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3921. }
  3922. if invalidParams.Len() > 0 {
  3923. return invalidParams
  3924. }
  3925. return nil
  3926. }
  3927. // SetRegistryId sets the RegistryId field's value.
  3928. func (s *InitiateLayerUploadInput) SetRegistryId(v string) *InitiateLayerUploadInput {
  3929. s.RegistryId = &v
  3930. return s
  3931. }
  3932. // SetRepositoryName sets the RepositoryName field's value.
  3933. func (s *InitiateLayerUploadInput) SetRepositoryName(v string) *InitiateLayerUploadInput {
  3934. s.RepositoryName = &v
  3935. return s
  3936. }
  3937. type InitiateLayerUploadOutput struct {
  3938. _ struct{} `type:"structure"`
  3939. // The size, in bytes, that Amazon ECR expects future layer part uploads to
  3940. // be.
  3941. PartSize *int64 `locationName:"partSize" type:"long"`
  3942. // The upload ID for the layer upload. This parameter is passed to further UploadLayerPart
  3943. // and CompleteLayerUpload operations.
  3944. UploadId *string `locationName:"uploadId" type:"string"`
  3945. }
  3946. // String returns the string representation
  3947. func (s InitiateLayerUploadOutput) String() string {
  3948. return awsutil.Prettify(s)
  3949. }
  3950. // GoString returns the string representation
  3951. func (s InitiateLayerUploadOutput) GoString() string {
  3952. return s.String()
  3953. }
  3954. // SetPartSize sets the PartSize field's value.
  3955. func (s *InitiateLayerUploadOutput) SetPartSize(v int64) *InitiateLayerUploadOutput {
  3956. s.PartSize = &v
  3957. return s
  3958. }
  3959. // SetUploadId sets the UploadId field's value.
  3960. func (s *InitiateLayerUploadOutput) SetUploadId(v string) *InitiateLayerUploadOutput {
  3961. s.UploadId = &v
  3962. return s
  3963. }
  3964. // An object representing an Amazon ECR image layer.
  3965. type Layer struct {
  3966. _ struct{} `type:"structure"`
  3967. // The availability status of the image layer.
  3968. LayerAvailability *string `locationName:"layerAvailability" type:"string" enum:"LayerAvailability"`
  3969. // The sha256 digest of the image layer.
  3970. LayerDigest *string `locationName:"layerDigest" type:"string"`
  3971. // The size, in bytes, of the image layer.
  3972. LayerSize *int64 `locationName:"layerSize" type:"long"`
  3973. // The media type of the layer, such as application/vnd.docker.image.rootfs.diff.tar.gzip
  3974. // or application/vnd.oci.image.layer.v1.tar+gzip.
  3975. MediaType *string `locationName:"mediaType" type:"string"`
  3976. }
  3977. // String returns the string representation
  3978. func (s Layer) String() string {
  3979. return awsutil.Prettify(s)
  3980. }
  3981. // GoString returns the string representation
  3982. func (s Layer) GoString() string {
  3983. return s.String()
  3984. }
  3985. // SetLayerAvailability sets the LayerAvailability field's value.
  3986. func (s *Layer) SetLayerAvailability(v string) *Layer {
  3987. s.LayerAvailability = &v
  3988. return s
  3989. }
  3990. // SetLayerDigest sets the LayerDigest field's value.
  3991. func (s *Layer) SetLayerDigest(v string) *Layer {
  3992. s.LayerDigest = &v
  3993. return s
  3994. }
  3995. // SetLayerSize sets the LayerSize field's value.
  3996. func (s *Layer) SetLayerSize(v int64) *Layer {
  3997. s.LayerSize = &v
  3998. return s
  3999. }
  4000. // SetMediaType sets the MediaType field's value.
  4001. func (s *Layer) SetMediaType(v string) *Layer {
  4002. s.MediaType = &v
  4003. return s
  4004. }
  4005. // An object representing an Amazon ECR image layer failure.
  4006. type LayerFailure struct {
  4007. _ struct{} `type:"structure"`
  4008. // The failure code associated with the failure.
  4009. FailureCode *string `locationName:"failureCode" type:"string" enum:"LayerFailureCode"`
  4010. // The reason for the failure.
  4011. FailureReason *string `locationName:"failureReason" type:"string"`
  4012. // The layer digest associated with the failure.
  4013. LayerDigest *string `locationName:"layerDigest" type:"string"`
  4014. }
  4015. // String returns the string representation
  4016. func (s LayerFailure) String() string {
  4017. return awsutil.Prettify(s)
  4018. }
  4019. // GoString returns the string representation
  4020. func (s LayerFailure) GoString() string {
  4021. return s.String()
  4022. }
  4023. // SetFailureCode sets the FailureCode field's value.
  4024. func (s *LayerFailure) SetFailureCode(v string) *LayerFailure {
  4025. s.FailureCode = &v
  4026. return s
  4027. }
  4028. // SetFailureReason sets the FailureReason field's value.
  4029. func (s *LayerFailure) SetFailureReason(v string) *LayerFailure {
  4030. s.FailureReason = &v
  4031. return s
  4032. }
  4033. // SetLayerDigest sets the LayerDigest field's value.
  4034. func (s *LayerFailure) SetLayerDigest(v string) *LayerFailure {
  4035. s.LayerDigest = &v
  4036. return s
  4037. }
  4038. // The filter for the lifecycle policy preview.
  4039. type LifecyclePolicyPreviewFilter struct {
  4040. _ struct{} `type:"structure"`
  4041. // The tag status of the image.
  4042. TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"`
  4043. }
  4044. // String returns the string representation
  4045. func (s LifecyclePolicyPreviewFilter) String() string {
  4046. return awsutil.Prettify(s)
  4047. }
  4048. // GoString returns the string representation
  4049. func (s LifecyclePolicyPreviewFilter) GoString() string {
  4050. return s.String()
  4051. }
  4052. // SetTagStatus sets the TagStatus field's value.
  4053. func (s *LifecyclePolicyPreviewFilter) SetTagStatus(v string) *LifecyclePolicyPreviewFilter {
  4054. s.TagStatus = &v
  4055. return s
  4056. }
  4057. // The result of the lifecycle policy preview.
  4058. type LifecyclePolicyPreviewResult struct {
  4059. _ struct{} `type:"structure"`
  4060. // The type of action to be taken.
  4061. Action *LifecyclePolicyRuleAction `locationName:"action" type:"structure"`
  4062. // The priority of the applied rule.
  4063. AppliedRulePriority *int64 `locationName:"appliedRulePriority" min:"1" type:"integer"`
  4064. // The sha256 digest of the image manifest.
  4065. ImageDigest *string `locationName:"imageDigest" type:"string"`
  4066. // The date and time, expressed in standard JavaScript date format, at which
  4067. // the current image was pushed to the repository.
  4068. ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp"`
  4069. // The list of tags associated with this image.
  4070. ImageTags []*string `locationName:"imageTags" type:"list"`
  4071. }
  4072. // String returns the string representation
  4073. func (s LifecyclePolicyPreviewResult) String() string {
  4074. return awsutil.Prettify(s)
  4075. }
  4076. // GoString returns the string representation
  4077. func (s LifecyclePolicyPreviewResult) GoString() string {
  4078. return s.String()
  4079. }
  4080. // SetAction sets the Action field's value.
  4081. func (s *LifecyclePolicyPreviewResult) SetAction(v *LifecyclePolicyRuleAction) *LifecyclePolicyPreviewResult {
  4082. s.Action = v
  4083. return s
  4084. }
  4085. // SetAppliedRulePriority sets the AppliedRulePriority field's value.
  4086. func (s *LifecyclePolicyPreviewResult) SetAppliedRulePriority(v int64) *LifecyclePolicyPreviewResult {
  4087. s.AppliedRulePriority = &v
  4088. return s
  4089. }
  4090. // SetImageDigest sets the ImageDigest field's value.
  4091. func (s *LifecyclePolicyPreviewResult) SetImageDigest(v string) *LifecyclePolicyPreviewResult {
  4092. s.ImageDigest = &v
  4093. return s
  4094. }
  4095. // SetImagePushedAt sets the ImagePushedAt field's value.
  4096. func (s *LifecyclePolicyPreviewResult) SetImagePushedAt(v time.Time) *LifecyclePolicyPreviewResult {
  4097. s.ImagePushedAt = &v
  4098. return s
  4099. }
  4100. // SetImageTags sets the ImageTags field's value.
  4101. func (s *LifecyclePolicyPreviewResult) SetImageTags(v []*string) *LifecyclePolicyPreviewResult {
  4102. s.ImageTags = v
  4103. return s
  4104. }
  4105. // The summary of the lifecycle policy preview request.
  4106. type LifecyclePolicyPreviewSummary struct {
  4107. _ struct{} `type:"structure"`
  4108. // The number of expiring images.
  4109. ExpiringImageTotalCount *int64 `locationName:"expiringImageTotalCount" type:"integer"`
  4110. }
  4111. // String returns the string representation
  4112. func (s LifecyclePolicyPreviewSummary) String() string {
  4113. return awsutil.Prettify(s)
  4114. }
  4115. // GoString returns the string representation
  4116. func (s LifecyclePolicyPreviewSummary) GoString() string {
  4117. return s.String()
  4118. }
  4119. // SetExpiringImageTotalCount sets the ExpiringImageTotalCount field's value.
  4120. func (s *LifecyclePolicyPreviewSummary) SetExpiringImageTotalCount(v int64) *LifecyclePolicyPreviewSummary {
  4121. s.ExpiringImageTotalCount = &v
  4122. return s
  4123. }
  4124. // The type of action to be taken.
  4125. type LifecyclePolicyRuleAction struct {
  4126. _ struct{} `type:"structure"`
  4127. // The type of action to be taken.
  4128. Type *string `locationName:"type" type:"string" enum:"ImageActionType"`
  4129. }
  4130. // String returns the string representation
  4131. func (s LifecyclePolicyRuleAction) String() string {
  4132. return awsutil.Prettify(s)
  4133. }
  4134. // GoString returns the string representation
  4135. func (s LifecyclePolicyRuleAction) GoString() string {
  4136. return s.String()
  4137. }
  4138. // SetType sets the Type field's value.
  4139. func (s *LifecyclePolicyRuleAction) SetType(v string) *LifecyclePolicyRuleAction {
  4140. s.Type = &v
  4141. return s
  4142. }
  4143. // An object representing a filter on a ListImages operation.
  4144. type ListImagesFilter struct {
  4145. _ struct{} `type:"structure"`
  4146. // The tag status with which to filter your ListImages results. You can filter
  4147. // results based on whether they are TAGGED or UNTAGGED.
  4148. TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"`
  4149. }
  4150. // String returns the string representation
  4151. func (s ListImagesFilter) String() string {
  4152. return awsutil.Prettify(s)
  4153. }
  4154. // GoString returns the string representation
  4155. func (s ListImagesFilter) GoString() string {
  4156. return s.String()
  4157. }
  4158. // SetTagStatus sets the TagStatus field's value.
  4159. func (s *ListImagesFilter) SetTagStatus(v string) *ListImagesFilter {
  4160. s.TagStatus = &v
  4161. return s
  4162. }
  4163. type ListImagesInput struct {
  4164. _ struct{} `type:"structure"`
  4165. // The filter key and value with which to filter your ListImages results.
  4166. Filter *ListImagesFilter `locationName:"filter" type:"structure"`
  4167. // The maximum number of image results returned by ListImages in paginated output.
  4168. // When this parameter is used, ListImages only returns maxResults results in
  4169. // a single page along with a nextToken response element. The remaining results
  4170. // of the initial request can be seen by sending another ListImages request
  4171. // with the returned nextToken value. This value can be between 1 and 1000.
  4172. // If this parameter is not used, then ListImages returns up to 100 results
  4173. // and a nextToken value, if applicable.
  4174. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  4175. // The nextToken value returned from a previous paginated ListImages request
  4176. // where maxResults was used and the results exceeded the value of that parameter.
  4177. // Pagination continues from the end of the previous results that returned the
  4178. // nextToken value. This value is null when there are no more results to return.
  4179. //
  4180. // This token should be treated as an opaque identifier that is only used to
  4181. // retrieve the next items in a list and not for other programmatic purposes.
  4182. NextToken *string `locationName:"nextToken" type:"string"`
  4183. // The AWS account ID associated with the registry that contains the repository
  4184. // in which to list images. If you do not specify a registry, the default registry
  4185. // is assumed.
  4186. RegistryId *string `locationName:"registryId" type:"string"`
  4187. // The repository with image IDs to be listed.
  4188. //
  4189. // RepositoryName is a required field
  4190. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  4191. }
  4192. // String returns the string representation
  4193. func (s ListImagesInput) String() string {
  4194. return awsutil.Prettify(s)
  4195. }
  4196. // GoString returns the string representation
  4197. func (s ListImagesInput) GoString() string {
  4198. return s.String()
  4199. }
  4200. // Validate inspects the fields of the type to determine if they are valid.
  4201. func (s *ListImagesInput) Validate() error {
  4202. invalidParams := request.ErrInvalidParams{Context: "ListImagesInput"}
  4203. if s.MaxResults != nil && *s.MaxResults < 1 {
  4204. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  4205. }
  4206. if s.RepositoryName == nil {
  4207. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  4208. }
  4209. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  4210. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  4211. }
  4212. if invalidParams.Len() > 0 {
  4213. return invalidParams
  4214. }
  4215. return nil
  4216. }
  4217. // SetFilter sets the Filter field's value.
  4218. func (s *ListImagesInput) SetFilter(v *ListImagesFilter) *ListImagesInput {
  4219. s.Filter = v
  4220. return s
  4221. }
  4222. // SetMaxResults sets the MaxResults field's value.
  4223. func (s *ListImagesInput) SetMaxResults(v int64) *ListImagesInput {
  4224. s.MaxResults = &v
  4225. return s
  4226. }
  4227. // SetNextToken sets the NextToken field's value.
  4228. func (s *ListImagesInput) SetNextToken(v string) *ListImagesInput {
  4229. s.NextToken = &v
  4230. return s
  4231. }
  4232. // SetRegistryId sets the RegistryId field's value.
  4233. func (s *ListImagesInput) SetRegistryId(v string) *ListImagesInput {
  4234. s.RegistryId = &v
  4235. return s
  4236. }
  4237. // SetRepositoryName sets the RepositoryName field's value.
  4238. func (s *ListImagesInput) SetRepositoryName(v string) *ListImagesInput {
  4239. s.RepositoryName = &v
  4240. return s
  4241. }
  4242. type ListImagesOutput struct {
  4243. _ struct{} `type:"structure"`
  4244. // The list of image IDs for the requested repository.
  4245. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
  4246. // The nextToken value to include in a future ListImages request. When the results
  4247. // of a ListImages request exceed maxResults, this value can be used to retrieve
  4248. // the next page of results. This value is null when there are no more results
  4249. // to return.
  4250. NextToken *string `locationName:"nextToken" type:"string"`
  4251. }
  4252. // String returns the string representation
  4253. func (s ListImagesOutput) String() string {
  4254. return awsutil.Prettify(s)
  4255. }
  4256. // GoString returns the string representation
  4257. func (s ListImagesOutput) GoString() string {
  4258. return s.String()
  4259. }
  4260. // SetImageIds sets the ImageIds field's value.
  4261. func (s *ListImagesOutput) SetImageIds(v []*ImageIdentifier) *ListImagesOutput {
  4262. s.ImageIds = v
  4263. return s
  4264. }
  4265. // SetNextToken sets the NextToken field's value.
  4266. func (s *ListImagesOutput) SetNextToken(v string) *ListImagesOutput {
  4267. s.NextToken = &v
  4268. return s
  4269. }
  4270. type ListTagsForResourceInput struct {
  4271. _ struct{} `type:"structure"`
  4272. // The Amazon Resource Name (ARN) that identifies the resource for which to
  4273. // list the tags. Currently, the only supported resource is an Amazon ECR repository.
  4274. //
  4275. // ResourceArn is a required field
  4276. ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"`
  4277. }
  4278. // String returns the string representation
  4279. func (s ListTagsForResourceInput) String() string {
  4280. return awsutil.Prettify(s)
  4281. }
  4282. // GoString returns the string representation
  4283. func (s ListTagsForResourceInput) GoString() string {
  4284. return s.String()
  4285. }
  4286. // Validate inspects the fields of the type to determine if they are valid.
  4287. func (s *ListTagsForResourceInput) Validate() error {
  4288. invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
  4289. if s.ResourceArn == nil {
  4290. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  4291. }
  4292. if invalidParams.Len() > 0 {
  4293. return invalidParams
  4294. }
  4295. return nil
  4296. }
  4297. // SetResourceArn sets the ResourceArn field's value.
  4298. func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput {
  4299. s.ResourceArn = &v
  4300. return s
  4301. }
  4302. type ListTagsForResourceOutput struct {
  4303. _ struct{} `type:"structure"`
  4304. // The tags for the resource.
  4305. Tags []*Tag `locationName:"tags" type:"list"`
  4306. }
  4307. // String returns the string representation
  4308. func (s ListTagsForResourceOutput) String() string {
  4309. return awsutil.Prettify(s)
  4310. }
  4311. // GoString returns the string representation
  4312. func (s ListTagsForResourceOutput) GoString() string {
  4313. return s.String()
  4314. }
  4315. // SetTags sets the Tags field's value.
  4316. func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput {
  4317. s.Tags = v
  4318. return s
  4319. }
  4320. type PutImageInput struct {
  4321. _ struct{} `type:"structure"`
  4322. // The image manifest corresponding to the image to be uploaded.
  4323. //
  4324. // ImageManifest is a required field
  4325. ImageManifest *string `locationName:"imageManifest" type:"string" required:"true"`
  4326. // The tag to associate with the image. This parameter is required for images
  4327. // that use the Docker Image Manifest V2 Schema 2 or OCI formats.
  4328. ImageTag *string `locationName:"imageTag" type:"string"`
  4329. // The AWS account ID associated with the registry that contains the repository
  4330. // in which to put the image. If you do not specify a registry, the default
  4331. // registry is assumed.
  4332. RegistryId *string `locationName:"registryId" type:"string"`
  4333. // The name of the repository in which to put the image.
  4334. //
  4335. // RepositoryName is a required field
  4336. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  4337. }
  4338. // String returns the string representation
  4339. func (s PutImageInput) String() string {
  4340. return awsutil.Prettify(s)
  4341. }
  4342. // GoString returns the string representation
  4343. func (s PutImageInput) GoString() string {
  4344. return s.String()
  4345. }
  4346. // Validate inspects the fields of the type to determine if they are valid.
  4347. func (s *PutImageInput) Validate() error {
  4348. invalidParams := request.ErrInvalidParams{Context: "PutImageInput"}
  4349. if s.ImageManifest == nil {
  4350. invalidParams.Add(request.NewErrParamRequired("ImageManifest"))
  4351. }
  4352. if s.RepositoryName == nil {
  4353. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  4354. }
  4355. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  4356. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  4357. }
  4358. if invalidParams.Len() > 0 {
  4359. return invalidParams
  4360. }
  4361. return nil
  4362. }
  4363. // SetImageManifest sets the ImageManifest field's value.
  4364. func (s *PutImageInput) SetImageManifest(v string) *PutImageInput {
  4365. s.ImageManifest = &v
  4366. return s
  4367. }
  4368. // SetImageTag sets the ImageTag field's value.
  4369. func (s *PutImageInput) SetImageTag(v string) *PutImageInput {
  4370. s.ImageTag = &v
  4371. return s
  4372. }
  4373. // SetRegistryId sets the RegistryId field's value.
  4374. func (s *PutImageInput) SetRegistryId(v string) *PutImageInput {
  4375. s.RegistryId = &v
  4376. return s
  4377. }
  4378. // SetRepositoryName sets the RepositoryName field's value.
  4379. func (s *PutImageInput) SetRepositoryName(v string) *PutImageInput {
  4380. s.RepositoryName = &v
  4381. return s
  4382. }
  4383. type PutImageOutput struct {
  4384. _ struct{} `type:"structure"`
  4385. // Details of the image uploaded.
  4386. Image *Image `locationName:"image" type:"structure"`
  4387. }
  4388. // String returns the string representation
  4389. func (s PutImageOutput) String() string {
  4390. return awsutil.Prettify(s)
  4391. }
  4392. // GoString returns the string representation
  4393. func (s PutImageOutput) GoString() string {
  4394. return s.String()
  4395. }
  4396. // SetImage sets the Image field's value.
  4397. func (s *PutImageOutput) SetImage(v *Image) *PutImageOutput {
  4398. s.Image = v
  4399. return s
  4400. }
  4401. type PutLifecyclePolicyInput struct {
  4402. _ struct{} `type:"structure"`
  4403. // The JSON repository policy text to apply to the repository.
  4404. //
  4405. // LifecyclePolicyText is a required field
  4406. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string" required:"true"`
  4407. // The AWS account ID associated with the registry that contains the repository.
  4408. // If you do
 not specify a registry, the default registry is assumed.
  4409. RegistryId *string `locationName:"registryId" type:"string"`
  4410. // The name of the repository to receive the policy.
  4411. //
  4412. // RepositoryName is a required field
  4413. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  4414. }
  4415. // String returns the string representation
  4416. func (s PutLifecyclePolicyInput) String() string {
  4417. return awsutil.Prettify(s)
  4418. }
  4419. // GoString returns the string representation
  4420. func (s PutLifecyclePolicyInput) GoString() string {
  4421. return s.String()
  4422. }
  4423. // Validate inspects the fields of the type to determine if they are valid.
  4424. func (s *PutLifecyclePolicyInput) Validate() error {
  4425. invalidParams := request.ErrInvalidParams{Context: "PutLifecyclePolicyInput"}
  4426. if s.LifecyclePolicyText == nil {
  4427. invalidParams.Add(request.NewErrParamRequired("LifecyclePolicyText"))
  4428. }
  4429. if s.LifecyclePolicyText != nil && len(*s.LifecyclePolicyText) < 100 {
  4430. invalidParams.Add(request.NewErrParamMinLen("LifecyclePolicyText", 100))
  4431. }
  4432. if s.RepositoryName == nil {
  4433. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  4434. }
  4435. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  4436. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  4437. }
  4438. if invalidParams.Len() > 0 {
  4439. return invalidParams
  4440. }
  4441. return nil
  4442. }
  4443. // SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
  4444. func (s *PutLifecyclePolicyInput) SetLifecyclePolicyText(v string) *PutLifecyclePolicyInput {
  4445. s.LifecyclePolicyText = &v
  4446. return s
  4447. }
  4448. // SetRegistryId sets the RegistryId field's value.
  4449. func (s *PutLifecyclePolicyInput) SetRegistryId(v string) *PutLifecyclePolicyInput {
  4450. s.RegistryId = &v
  4451. return s
  4452. }
  4453. // SetRepositoryName sets the RepositoryName field's value.
  4454. func (s *PutLifecyclePolicyInput) SetRepositoryName(v string) *PutLifecyclePolicyInput {
  4455. s.RepositoryName = &v
  4456. return s
  4457. }
  4458. type PutLifecyclePolicyOutput struct {
  4459. _ struct{} `type:"structure"`
  4460. // The JSON repository policy text.
  4461. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"`
  4462. // The registry ID associated with the request.
  4463. RegistryId *string `locationName:"registryId" type:"string"`
  4464. // The repository name associated with the request.
  4465. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  4466. }
  4467. // String returns the string representation
  4468. func (s PutLifecyclePolicyOutput) String() string {
  4469. return awsutil.Prettify(s)
  4470. }
  4471. // GoString returns the string representation
  4472. func (s PutLifecyclePolicyOutput) GoString() string {
  4473. return s.String()
  4474. }
  4475. // SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
  4476. func (s *PutLifecyclePolicyOutput) SetLifecyclePolicyText(v string) *PutLifecyclePolicyOutput {
  4477. s.LifecyclePolicyText = &v
  4478. return s
  4479. }
  4480. // SetRegistryId sets the RegistryId field's value.
  4481. func (s *PutLifecyclePolicyOutput) SetRegistryId(v string) *PutLifecyclePolicyOutput {
  4482. s.RegistryId = &v
  4483. return s
  4484. }
  4485. // SetRepositoryName sets the RepositoryName field's value.
  4486. func (s *PutLifecyclePolicyOutput) SetRepositoryName(v string) *PutLifecyclePolicyOutput {
  4487. s.RepositoryName = &v
  4488. return s
  4489. }
  4490. // An object representing a repository.
  4491. type Repository struct {
  4492. _ struct{} `type:"structure"`
  4493. // The date and time, in JavaScript date format, when the repository was created.
  4494. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"`
  4495. // The AWS account ID associated with the registry that contains the repository.
  4496. RegistryId *string `locationName:"registryId" type:"string"`
  4497. // The Amazon Resource Name (ARN) that identifies the repository. The ARN contains
  4498. // the arn:aws:ecr namespace, followed by the region of the repository, AWS
  4499. // account ID of the repository owner, repository namespace, and repository
  4500. // name. For example, arn:aws:ecr:region:012345678910:repository/test.
  4501. RepositoryArn *string `locationName:"repositoryArn" type:"string"`
  4502. // The name of the repository.
  4503. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  4504. // The URI for the repository. You can use this URI for Docker push or pull
  4505. // operations.
  4506. RepositoryUri *string `locationName:"repositoryUri" type:"string"`
  4507. }
  4508. // String returns the string representation
  4509. func (s Repository) String() string {
  4510. return awsutil.Prettify(s)
  4511. }
  4512. // GoString returns the string representation
  4513. func (s Repository) GoString() string {
  4514. return s.String()
  4515. }
  4516. // SetCreatedAt sets the CreatedAt field's value.
  4517. func (s *Repository) SetCreatedAt(v time.Time) *Repository {
  4518. s.CreatedAt = &v
  4519. return s
  4520. }
  4521. // SetRegistryId sets the RegistryId field's value.
  4522. func (s *Repository) SetRegistryId(v string) *Repository {
  4523. s.RegistryId = &v
  4524. return s
  4525. }
  4526. // SetRepositoryArn sets the RepositoryArn field's value.
  4527. func (s *Repository) SetRepositoryArn(v string) *Repository {
  4528. s.RepositoryArn = &v
  4529. return s
  4530. }
  4531. // SetRepositoryName sets the RepositoryName field's value.
  4532. func (s *Repository) SetRepositoryName(v string) *Repository {
  4533. s.RepositoryName = &v
  4534. return s
  4535. }
  4536. // SetRepositoryUri sets the RepositoryUri field's value.
  4537. func (s *Repository) SetRepositoryUri(v string) *Repository {
  4538. s.RepositoryUri = &v
  4539. return s
  4540. }
  4541. type SetRepositoryPolicyInput struct {
  4542. _ struct{} `type:"structure"`
  4543. // If the policy you are attempting to set on a repository policy would prevent
  4544. // you from setting another policy in the future, you must force the SetRepositoryPolicy
  4545. // operation. This is intended to prevent accidental repository lock outs.
  4546. Force *bool `locationName:"force" type:"boolean"`
  4547. // The JSON repository policy text to apply to the repository.
  4548. //
  4549. // PolicyText is a required field
  4550. PolicyText *string `locationName:"policyText" type:"string" required:"true"`
  4551. // The AWS account ID associated with the registry that contains the repository.
  4552. // If you do not specify a registry, the default registry is assumed.
  4553. RegistryId *string `locationName:"registryId" type:"string"`
  4554. // The name of the repository to receive the policy.
  4555. //
  4556. // RepositoryName is a required field
  4557. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  4558. }
  4559. // String returns the string representation
  4560. func (s SetRepositoryPolicyInput) String() string {
  4561. return awsutil.Prettify(s)
  4562. }
  4563. // GoString returns the string representation
  4564. func (s SetRepositoryPolicyInput) GoString() string {
  4565. return s.String()
  4566. }
  4567. // Validate inspects the fields of the type to determine if they are valid.
  4568. func (s *SetRepositoryPolicyInput) Validate() error {
  4569. invalidParams := request.ErrInvalidParams{Context: "SetRepositoryPolicyInput"}
  4570. if s.PolicyText == nil {
  4571. invalidParams.Add(request.NewErrParamRequired("PolicyText"))
  4572. }
  4573. if s.RepositoryName == nil {
  4574. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  4575. }
  4576. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  4577. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  4578. }
  4579. if invalidParams.Len() > 0 {
  4580. return invalidParams
  4581. }
  4582. return nil
  4583. }
  4584. // SetForce sets the Force field's value.
  4585. func (s *SetRepositoryPolicyInput) SetForce(v bool) *SetRepositoryPolicyInput {
  4586. s.Force = &v
  4587. return s
  4588. }
  4589. // SetPolicyText sets the PolicyText field's value.
  4590. func (s *SetRepositoryPolicyInput) SetPolicyText(v string) *SetRepositoryPolicyInput {
  4591. s.PolicyText = &v
  4592. return s
  4593. }
  4594. // SetRegistryId sets the RegistryId field's value.
  4595. func (s *SetRepositoryPolicyInput) SetRegistryId(v string) *SetRepositoryPolicyInput {
  4596. s.RegistryId = &v
  4597. return s
  4598. }
  4599. // SetRepositoryName sets the RepositoryName field's value.
  4600. func (s *SetRepositoryPolicyInput) SetRepositoryName(v string) *SetRepositoryPolicyInput {
  4601. s.RepositoryName = &v
  4602. return s
  4603. }
  4604. type SetRepositoryPolicyOutput struct {
  4605. _ struct{} `type:"structure"`
  4606. // The JSON repository policy text applied to the repository.
  4607. PolicyText *string `locationName:"policyText" type:"string"`
  4608. // The registry ID associated with the request.
  4609. RegistryId *string `locationName:"registryId" type:"string"`
  4610. // The repository name associated with the request.
  4611. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  4612. }
  4613. // String returns the string representation
  4614. func (s SetRepositoryPolicyOutput) String() string {
  4615. return awsutil.Prettify(s)
  4616. }
  4617. // GoString returns the string representation
  4618. func (s SetRepositoryPolicyOutput) GoString() string {
  4619. return s.String()
  4620. }
  4621. // SetPolicyText sets the PolicyText field's value.
  4622. func (s *SetRepositoryPolicyOutput) SetPolicyText(v string) *SetRepositoryPolicyOutput {
  4623. s.PolicyText = &v
  4624. return s
  4625. }
  4626. // SetRegistryId sets the RegistryId field's value.
  4627. func (s *SetRepositoryPolicyOutput) SetRegistryId(v string) *SetRepositoryPolicyOutput {
  4628. s.RegistryId = &v
  4629. return s
  4630. }
  4631. // SetRepositoryName sets the RepositoryName field's value.
  4632. func (s *SetRepositoryPolicyOutput) SetRepositoryName(v string) *SetRepositoryPolicyOutput {
  4633. s.RepositoryName = &v
  4634. return s
  4635. }
  4636. type StartLifecyclePolicyPreviewInput struct {
  4637. _ struct{} `type:"structure"`
  4638. // The policy to be evaluated against. If you do not specify a policy, the current
  4639. // policy for the repository is used.
  4640. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"`
  4641. // The AWS account ID associated with the registry that contains the repository.
  4642. // If you do not specify a registry, the default registry is assumed.
  4643. RegistryId *string `locationName:"registryId" type:"string"`
  4644. // The name of the repository to be evaluated.
  4645. //
  4646. // RepositoryName is a required field
  4647. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  4648. }
  4649. // String returns the string representation
  4650. func (s StartLifecyclePolicyPreviewInput) String() string {
  4651. return awsutil.Prettify(s)
  4652. }
  4653. // GoString returns the string representation
  4654. func (s StartLifecyclePolicyPreviewInput) GoString() string {
  4655. return s.String()
  4656. }
  4657. // Validate inspects the fields of the type to determine if they are valid.
  4658. func (s *StartLifecyclePolicyPreviewInput) Validate() error {
  4659. invalidParams := request.ErrInvalidParams{Context: "StartLifecyclePolicyPreviewInput"}
  4660. if s.LifecyclePolicyText != nil && len(*s.LifecyclePolicyText) < 100 {
  4661. invalidParams.Add(request.NewErrParamMinLen("LifecyclePolicyText", 100))
  4662. }
  4663. if s.RepositoryName == nil {
  4664. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  4665. }
  4666. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  4667. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  4668. }
  4669. if invalidParams.Len() > 0 {
  4670. return invalidParams
  4671. }
  4672. return nil
  4673. }
  4674. // SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
  4675. func (s *StartLifecyclePolicyPreviewInput) SetLifecyclePolicyText(v string) *StartLifecyclePolicyPreviewInput {
  4676. s.LifecyclePolicyText = &v
  4677. return s
  4678. }
  4679. // SetRegistryId sets the RegistryId field's value.
  4680. func (s *StartLifecyclePolicyPreviewInput) SetRegistryId(v string) *StartLifecyclePolicyPreviewInput {
  4681. s.RegistryId = &v
  4682. return s
  4683. }
  4684. // SetRepositoryName sets the RepositoryName field's value.
  4685. func (s *StartLifecyclePolicyPreviewInput) SetRepositoryName(v string) *StartLifecyclePolicyPreviewInput {
  4686. s.RepositoryName = &v
  4687. return s
  4688. }
  4689. type StartLifecyclePolicyPreviewOutput struct {
  4690. _ struct{} `type:"structure"`
  4691. // The JSON repository policy text.
  4692. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"`
  4693. // The registry ID associated with the request.
  4694. RegistryId *string `locationName:"registryId" type:"string"`
  4695. // The repository name associated with the request.
  4696. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  4697. // The status of the lifecycle policy preview request.
  4698. Status *string `locationName:"status" type:"string" enum:"LifecyclePolicyPreviewStatus"`
  4699. }
  4700. // String returns the string representation
  4701. func (s StartLifecyclePolicyPreviewOutput) String() string {
  4702. return awsutil.Prettify(s)
  4703. }
  4704. // GoString returns the string representation
  4705. func (s StartLifecyclePolicyPreviewOutput) GoString() string {
  4706. return s.String()
  4707. }
  4708. // SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
  4709. func (s *StartLifecyclePolicyPreviewOutput) SetLifecyclePolicyText(v string) *StartLifecyclePolicyPreviewOutput {
  4710. s.LifecyclePolicyText = &v
  4711. return s
  4712. }
  4713. // SetRegistryId sets the RegistryId field's value.
  4714. func (s *StartLifecyclePolicyPreviewOutput) SetRegistryId(v string) *StartLifecyclePolicyPreviewOutput {
  4715. s.RegistryId = &v
  4716. return s
  4717. }
  4718. // SetRepositoryName sets the RepositoryName field's value.
  4719. func (s *StartLifecyclePolicyPreviewOutput) SetRepositoryName(v string) *StartLifecyclePolicyPreviewOutput {
  4720. s.RepositoryName = &v
  4721. return s
  4722. }
  4723. // SetStatus sets the Status field's value.
  4724. func (s *StartLifecyclePolicyPreviewOutput) SetStatus(v string) *StartLifecyclePolicyPreviewOutput {
  4725. s.Status = &v
  4726. return s
  4727. }
  4728. // The metadata that you apply to a resource to help you categorize and organize
  4729. // them. Each tag consists of a key and an optional value, both of which you
  4730. // define. Tag keys can have a maximum character length of 128 characters, and
  4731. // tag values can have a maximum length of 256 characters.
  4732. type Tag struct {
  4733. _ struct{} `type:"structure"`
  4734. // One part of a key-value pair that make up a tag. A key is a general label
  4735. // that acts like a category for more specific tag values.
  4736. Key *string `type:"string"`
  4737. // The optional part of a key-value pair that make up a tag. A value acts as
  4738. // a descriptor within a tag category (key).
  4739. Value *string `type:"string"`
  4740. }
  4741. // String returns the string representation
  4742. func (s Tag) String() string {
  4743. return awsutil.Prettify(s)
  4744. }
  4745. // GoString returns the string representation
  4746. func (s Tag) GoString() string {
  4747. return s.String()
  4748. }
  4749. // SetKey sets the Key field's value.
  4750. func (s *Tag) SetKey(v string) *Tag {
  4751. s.Key = &v
  4752. return s
  4753. }
  4754. // SetValue sets the Value field's value.
  4755. func (s *Tag) SetValue(v string) *Tag {
  4756. s.Value = &v
  4757. return s
  4758. }
  4759. type TagResourceInput struct {
  4760. _ struct{} `type:"structure"`
  4761. // The Amazon Resource Name (ARN) of the the resource to which to add tags.
  4762. // Currently, the only supported resource is an Amazon ECR repository.
  4763. //
  4764. // ResourceArn is a required field
  4765. ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"`
  4766. // The tags to add to the resource. A tag is an array of key-value pairs. Tag
  4767. // keys can have a maximum character length of 128 characters, and tag values
  4768. // can have a maximum length of 256 characters.
  4769. //
  4770. // Tags is a required field
  4771. Tags []*Tag `locationName:"tags" type:"list" required:"true"`
  4772. }
  4773. // String returns the string representation
  4774. func (s TagResourceInput) String() string {
  4775. return awsutil.Prettify(s)
  4776. }
  4777. // GoString returns the string representation
  4778. func (s TagResourceInput) GoString() string {
  4779. return s.String()
  4780. }
  4781. // Validate inspects the fields of the type to determine if they are valid.
  4782. func (s *TagResourceInput) Validate() error {
  4783. invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  4784. if s.ResourceArn == nil {
  4785. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  4786. }
  4787. if s.Tags == nil {
  4788. invalidParams.Add(request.NewErrParamRequired("Tags"))
  4789. }
  4790. if invalidParams.Len() > 0 {
  4791. return invalidParams
  4792. }
  4793. return nil
  4794. }
  4795. // SetResourceArn sets the ResourceArn field's value.
  4796. func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput {
  4797. s.ResourceArn = &v
  4798. return s
  4799. }
  4800. // SetTags sets the Tags field's value.
  4801. func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
  4802. s.Tags = v
  4803. return s
  4804. }
  4805. type TagResourceOutput struct {
  4806. _ struct{} `type:"structure"`
  4807. }
  4808. // String returns the string representation
  4809. func (s TagResourceOutput) String() string {
  4810. return awsutil.Prettify(s)
  4811. }
  4812. // GoString returns the string representation
  4813. func (s TagResourceOutput) GoString() string {
  4814. return s.String()
  4815. }
  4816. type UntagResourceInput struct {
  4817. _ struct{} `type:"structure"`
  4818. // The Amazon Resource Name (ARN) of the resource from which to remove tags.
  4819. // Currently, the only supported resource is an Amazon ECR repository.
  4820. //
  4821. // ResourceArn is a required field
  4822. ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"`
  4823. // The keys of the tags to be removed.
  4824. //
  4825. // TagKeys is a required field
  4826. TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"`
  4827. }
  4828. // String returns the string representation
  4829. func (s UntagResourceInput) String() string {
  4830. return awsutil.Prettify(s)
  4831. }
  4832. // GoString returns the string representation
  4833. func (s UntagResourceInput) GoString() string {
  4834. return s.String()
  4835. }
  4836. // Validate inspects the fields of the type to determine if they are valid.
  4837. func (s *UntagResourceInput) Validate() error {
  4838. invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  4839. if s.ResourceArn == nil {
  4840. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  4841. }
  4842. if s.TagKeys == nil {
  4843. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  4844. }
  4845. if invalidParams.Len() > 0 {
  4846. return invalidParams
  4847. }
  4848. return nil
  4849. }
  4850. // SetResourceArn sets the ResourceArn field's value.
  4851. func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput {
  4852. s.ResourceArn = &v
  4853. return s
  4854. }
  4855. // SetTagKeys sets the TagKeys field's value.
  4856. func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
  4857. s.TagKeys = v
  4858. return s
  4859. }
  4860. type UntagResourceOutput struct {
  4861. _ struct{} `type:"structure"`
  4862. }
  4863. // String returns the string representation
  4864. func (s UntagResourceOutput) String() string {
  4865. return awsutil.Prettify(s)
  4866. }
  4867. // GoString returns the string representation
  4868. func (s UntagResourceOutput) GoString() string {
  4869. return s.String()
  4870. }
  4871. type UploadLayerPartInput struct {
  4872. _ struct{} `type:"structure"`
  4873. // The base64-encoded layer part payload.
  4874. //
  4875. // LayerPartBlob is automatically base64 encoded/decoded by the SDK.
  4876. //
  4877. // LayerPartBlob is a required field
  4878. LayerPartBlob []byte `locationName:"layerPartBlob" type:"blob" required:"true"`
  4879. // The integer value of the first byte of the layer part.
  4880. //
  4881. // PartFirstByte is a required field
  4882. PartFirstByte *int64 `locationName:"partFirstByte" type:"long" required:"true"`
  4883. // The integer value of the last byte of the layer part.
  4884. //
  4885. // PartLastByte is a required field
  4886. PartLastByte *int64 `locationName:"partLastByte" type:"long" required:"true"`
  4887. // The AWS account ID associated with the registry to which you are uploading
  4888. // layer parts. If you do not specify a registry, the default registry is assumed.
  4889. RegistryId *string `locationName:"registryId" type:"string"`
  4890. // The name of the repository to which you are uploading layer parts.
  4891. //
  4892. // RepositoryName is a required field
  4893. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  4894. // The upload ID from a previous InitiateLayerUpload operation to associate
  4895. // with the layer part upload.
  4896. //
  4897. // UploadId is a required field
  4898. UploadId *string `locationName:"uploadId" type:"string" required:"true"`
  4899. }
  4900. // String returns the string representation
  4901. func (s UploadLayerPartInput) String() string {
  4902. return awsutil.Prettify(s)
  4903. }
  4904. // GoString returns the string representation
  4905. func (s UploadLayerPartInput) GoString() string {
  4906. return s.String()
  4907. }
  4908. // Validate inspects the fields of the type to determine if they are valid.
  4909. func (s *UploadLayerPartInput) Validate() error {
  4910. invalidParams := request.ErrInvalidParams{Context: "UploadLayerPartInput"}
  4911. if s.LayerPartBlob == nil {
  4912. invalidParams.Add(request.NewErrParamRequired("LayerPartBlob"))
  4913. }
  4914. if s.PartFirstByte == nil {
  4915. invalidParams.Add(request.NewErrParamRequired("PartFirstByte"))
  4916. }
  4917. if s.PartLastByte == nil {
  4918. invalidParams.Add(request.NewErrParamRequired("PartLastByte"))
  4919. }
  4920. if s.RepositoryName == nil {
  4921. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  4922. }
  4923. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  4924. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  4925. }
  4926. if s.UploadId == nil {
  4927. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  4928. }
  4929. if invalidParams.Len() > 0 {
  4930. return invalidParams
  4931. }
  4932. return nil
  4933. }
  4934. // SetLayerPartBlob sets the LayerPartBlob field's value.
  4935. func (s *UploadLayerPartInput) SetLayerPartBlob(v []byte) *UploadLayerPartInput {
  4936. s.LayerPartBlob = v
  4937. return s
  4938. }
  4939. // SetPartFirstByte sets the PartFirstByte field's value.
  4940. func (s *UploadLayerPartInput) SetPartFirstByte(v int64) *UploadLayerPartInput {
  4941. s.PartFirstByte = &v
  4942. return s
  4943. }
  4944. // SetPartLastByte sets the PartLastByte field's value.
  4945. func (s *UploadLayerPartInput) SetPartLastByte(v int64) *UploadLayerPartInput {
  4946. s.PartLastByte = &v
  4947. return s
  4948. }
  4949. // SetRegistryId sets the RegistryId field's value.
  4950. func (s *UploadLayerPartInput) SetRegistryId(v string) *UploadLayerPartInput {
  4951. s.RegistryId = &v
  4952. return s
  4953. }
  4954. // SetRepositoryName sets the RepositoryName field's value.
  4955. func (s *UploadLayerPartInput) SetRepositoryName(v string) *UploadLayerPartInput {
  4956. s.RepositoryName = &v
  4957. return s
  4958. }
  4959. // SetUploadId sets the UploadId field's value.
  4960. func (s *UploadLayerPartInput) SetUploadId(v string) *UploadLayerPartInput {
  4961. s.UploadId = &v
  4962. return s
  4963. }
  4964. type UploadLayerPartOutput struct {
  4965. _ struct{} `type:"structure"`
  4966. // The integer value of the last byte received in the request.
  4967. LastByteReceived *int64 `locationName:"lastByteReceived" type:"long"`
  4968. // The registry ID associated with the request.
  4969. RegistryId *string `locationName:"registryId" type:"string"`
  4970. // The repository name associated with the request.
  4971. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  4972. // The upload ID associated with the request.
  4973. UploadId *string `locationName:"uploadId" type:"string"`
  4974. }
  4975. // String returns the string representation
  4976. func (s UploadLayerPartOutput) String() string {
  4977. return awsutil.Prettify(s)
  4978. }
  4979. // GoString returns the string representation
  4980. func (s UploadLayerPartOutput) GoString() string {
  4981. return s.String()
  4982. }
  4983. // SetLastByteReceived sets the LastByteReceived field's value.
  4984. func (s *UploadLayerPartOutput) SetLastByteReceived(v int64) *UploadLayerPartOutput {
  4985. s.LastByteReceived = &v
  4986. return s
  4987. }
  4988. // SetRegistryId sets the RegistryId field's value.
  4989. func (s *UploadLayerPartOutput) SetRegistryId(v string) *UploadLayerPartOutput {
  4990. s.RegistryId = &v
  4991. return s
  4992. }
  4993. // SetRepositoryName sets the RepositoryName field's value.
  4994. func (s *UploadLayerPartOutput) SetRepositoryName(v string) *UploadLayerPartOutput {
  4995. s.RepositoryName = &v
  4996. return s
  4997. }
  4998. // SetUploadId sets the UploadId field's value.
  4999. func (s *UploadLayerPartOutput) SetUploadId(v string) *UploadLayerPartOutput {
  5000. s.UploadId = &v
  5001. return s
  5002. }
  5003. const (
  5004. // ImageActionTypeExpire is a ImageActionType enum value
  5005. ImageActionTypeExpire = "EXPIRE"
  5006. )
  5007. const (
  5008. // ImageFailureCodeInvalidImageDigest is a ImageFailureCode enum value
  5009. ImageFailureCodeInvalidImageDigest = "InvalidImageDigest"
  5010. // ImageFailureCodeInvalidImageTag is a ImageFailureCode enum value
  5011. ImageFailureCodeInvalidImageTag = "InvalidImageTag"
  5012. // ImageFailureCodeImageTagDoesNotMatchDigest is a ImageFailureCode enum value
  5013. ImageFailureCodeImageTagDoesNotMatchDigest = "ImageTagDoesNotMatchDigest"
  5014. // ImageFailureCodeImageNotFound is a ImageFailureCode enum value
  5015. ImageFailureCodeImageNotFound = "ImageNotFound"
  5016. // ImageFailureCodeMissingDigestAndTag is a ImageFailureCode enum value
  5017. ImageFailureCodeMissingDigestAndTag = "MissingDigestAndTag"
  5018. )
  5019. const (
  5020. // LayerAvailabilityAvailable is a LayerAvailability enum value
  5021. LayerAvailabilityAvailable = "AVAILABLE"
  5022. // LayerAvailabilityUnavailable is a LayerAvailability enum value
  5023. LayerAvailabilityUnavailable = "UNAVAILABLE"
  5024. )
  5025. const (
  5026. // LayerFailureCodeInvalidLayerDigest is a LayerFailureCode enum value
  5027. LayerFailureCodeInvalidLayerDigest = "InvalidLayerDigest"
  5028. // LayerFailureCodeMissingLayerDigest is a LayerFailureCode enum value
  5029. LayerFailureCodeMissingLayerDigest = "MissingLayerDigest"
  5030. )
  5031. const (
  5032. // LifecyclePolicyPreviewStatusInProgress is a LifecyclePolicyPreviewStatus enum value
  5033. LifecyclePolicyPreviewStatusInProgress = "IN_PROGRESS"
  5034. // LifecyclePolicyPreviewStatusComplete is a LifecyclePolicyPreviewStatus enum value
  5035. LifecyclePolicyPreviewStatusComplete = "COMPLETE"
  5036. // LifecyclePolicyPreviewStatusExpired is a LifecyclePolicyPreviewStatus enum value
  5037. LifecyclePolicyPreviewStatusExpired = "EXPIRED"
  5038. // LifecyclePolicyPreviewStatusFailed is a LifecyclePolicyPreviewStatus enum value
  5039. LifecyclePolicyPreviewStatusFailed = "FAILED"
  5040. )
  5041. const (
  5042. // TagStatusTagged is a TagStatus enum value
  5043. TagStatusTagged = "TAGGED"
  5044. // TagStatusUntagged is a TagStatus enum value
  5045. TagStatusUntagged = "UNTAGGED"
  5046. // TagStatusAny is a TagStatus enum value
  5047. TagStatusAny = "ANY"
  5048. )