api.go 289 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package ecr
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  11. )
  12. const opBatchCheckLayerAvailability = "BatchCheckLayerAvailability"
  13. // BatchCheckLayerAvailabilityRequest generates a "aws/request.Request" representing the
  14. // client's request for the BatchCheckLayerAvailability operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See BatchCheckLayerAvailability for more information on using the BatchCheckLayerAvailability
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. //
  28. // // Example sending a request using the BatchCheckLayerAvailabilityRequest method.
  29. // req, resp := client.BatchCheckLayerAvailabilityRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailability
  37. func (c *ECR) BatchCheckLayerAvailabilityRequest(input *BatchCheckLayerAvailabilityInput) (req *request.Request, output *BatchCheckLayerAvailabilityOutput) {
  38. op := &request.Operation{
  39. Name: opBatchCheckLayerAvailability,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &BatchCheckLayerAvailabilityInput{}
  45. }
  46. output = &BatchCheckLayerAvailabilityOutput{}
  47. req = c.newRequest(op, input, output)
  48. return
  49. }
  50. // BatchCheckLayerAvailability API operation for Amazon EC2 Container Registry.
  51. //
  52. // Check the availability of multiple image layers in a specified registry and
  53. // repository.
  54. //
  55. // This operation is used by the Amazon ECR proxy, and it is not intended for
  56. // general use by customers for pulling and pushing images. In most cases, you
  57. // should use the docker CLI to pull, tag, and push images.
  58. //
  59. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  60. // with awserr.Error's Code and Message methods to get detailed information about
  61. // the error.
  62. //
  63. // See the AWS API reference guide for Amazon EC2 Container Registry's
  64. // API operation BatchCheckLayerAvailability for usage and error information.
  65. //
  66. // Returned Error Types:
  67. // * RepositoryNotFoundException
  68. // The specified repository could not be found. Check the spelling of the specified
  69. // repository and ensure that you are performing operations on the correct registry.
  70. //
  71. // * InvalidParameterException
  72. // The specified parameter is invalid. Review the available parameters for the
  73. // API request.
  74. //
  75. // * ServerException
  76. // These errors are usually caused by a server-side issue.
  77. //
  78. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailability
  79. func (c *ECR) BatchCheckLayerAvailability(input *BatchCheckLayerAvailabilityInput) (*BatchCheckLayerAvailabilityOutput, error) {
  80. req, out := c.BatchCheckLayerAvailabilityRequest(input)
  81. return out, req.Send()
  82. }
  83. // BatchCheckLayerAvailabilityWithContext is the same as BatchCheckLayerAvailability with the addition of
  84. // the ability to pass a context and additional request options.
  85. //
  86. // See BatchCheckLayerAvailability for details on how to use this API operation.
  87. //
  88. // The context must be non-nil and will be used for request cancellation. If
  89. // the context is nil a panic will occur. In the future the SDK may create
  90. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  91. // for more information on using Contexts.
  92. func (c *ECR) BatchCheckLayerAvailabilityWithContext(ctx aws.Context, input *BatchCheckLayerAvailabilityInput, opts ...request.Option) (*BatchCheckLayerAvailabilityOutput, error) {
  93. req, out := c.BatchCheckLayerAvailabilityRequest(input)
  94. req.SetContext(ctx)
  95. req.ApplyOptions(opts...)
  96. return out, req.Send()
  97. }
  98. const opBatchDeleteImage = "BatchDeleteImage"
  99. // BatchDeleteImageRequest generates a "aws/request.Request" representing the
  100. // client's request for the BatchDeleteImage operation. The "output" return
  101. // value will be populated with the request's response once the request completes
  102. // successfully.
  103. //
  104. // Use "Send" method on the returned Request to send the API call to the service.
  105. // the "output" return value is not valid until after Send returns without error.
  106. //
  107. // See BatchDeleteImage for more information on using the BatchDeleteImage
  108. // API call, and error handling.
  109. //
  110. // This method is useful when you want to inject custom logic or configuration
  111. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  112. //
  113. //
  114. // // Example sending a request using the BatchDeleteImageRequest method.
  115. // req, resp := client.BatchDeleteImageRequest(params)
  116. //
  117. // err := req.Send()
  118. // if err == nil { // resp is now filled
  119. // fmt.Println(resp)
  120. // }
  121. //
  122. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImage
  123. func (c *ECR) BatchDeleteImageRequest(input *BatchDeleteImageInput) (req *request.Request, output *BatchDeleteImageOutput) {
  124. op := &request.Operation{
  125. Name: opBatchDeleteImage,
  126. HTTPMethod: "POST",
  127. HTTPPath: "/",
  128. }
  129. if input == nil {
  130. input = &BatchDeleteImageInput{}
  131. }
  132. output = &BatchDeleteImageOutput{}
  133. req = c.newRequest(op, input, output)
  134. return
  135. }
  136. // BatchDeleteImage API operation for Amazon EC2 Container Registry.
  137. //
  138. // Deletes a list of specified images within a specified repository. Images
  139. // are specified with either imageTag or imageDigest.
  140. //
  141. // You can remove a tag from an image by specifying the image's tag in your
  142. // request. When you remove the last tag from an image, the image is deleted
  143. // from your repository.
  144. //
  145. // You can completely delete an image (and all of its tags) by specifying the
  146. // image's digest in your request.
  147. //
  148. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  149. // with awserr.Error's Code and Message methods to get detailed information about
  150. // the error.
  151. //
  152. // See the AWS API reference guide for Amazon EC2 Container Registry's
  153. // API operation BatchDeleteImage for usage and error information.
  154. //
  155. // Returned Error Types:
  156. // * ServerException
  157. // These errors are usually caused by a server-side issue.
  158. //
  159. // * InvalidParameterException
  160. // The specified parameter is invalid. Review the available parameters for the
  161. // API request.
  162. //
  163. // * RepositoryNotFoundException
  164. // The specified repository could not be found. Check the spelling of the specified
  165. // repository and ensure that you are performing operations on the correct registry.
  166. //
  167. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImage
  168. func (c *ECR) BatchDeleteImage(input *BatchDeleteImageInput) (*BatchDeleteImageOutput, error) {
  169. req, out := c.BatchDeleteImageRequest(input)
  170. return out, req.Send()
  171. }
  172. // BatchDeleteImageWithContext is the same as BatchDeleteImage with the addition of
  173. // the ability to pass a context and additional request options.
  174. //
  175. // See BatchDeleteImage for details on how to use this API operation.
  176. //
  177. // The context must be non-nil and will be used for request cancellation. If
  178. // the context is nil a panic will occur. In the future the SDK may create
  179. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  180. // for more information on using Contexts.
  181. func (c *ECR) BatchDeleteImageWithContext(ctx aws.Context, input *BatchDeleteImageInput, opts ...request.Option) (*BatchDeleteImageOutput, error) {
  182. req, out := c.BatchDeleteImageRequest(input)
  183. req.SetContext(ctx)
  184. req.ApplyOptions(opts...)
  185. return out, req.Send()
  186. }
  187. const opBatchGetImage = "BatchGetImage"
  188. // BatchGetImageRequest generates a "aws/request.Request" representing the
  189. // client's request for the BatchGetImage operation. The "output" return
  190. // value will be populated with the request's response once the request completes
  191. // successfully.
  192. //
  193. // Use "Send" method on the returned Request to send the API call to the service.
  194. // the "output" return value is not valid until after Send returns without error.
  195. //
  196. // See BatchGetImage for more information on using the BatchGetImage
  197. // API call, and error handling.
  198. //
  199. // This method is useful when you want to inject custom logic or configuration
  200. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  201. //
  202. //
  203. // // Example sending a request using the BatchGetImageRequest method.
  204. // req, resp := client.BatchGetImageRequest(params)
  205. //
  206. // err := req.Send()
  207. // if err == nil { // resp is now filled
  208. // fmt.Println(resp)
  209. // }
  210. //
  211. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImage
  212. func (c *ECR) BatchGetImageRequest(input *BatchGetImageInput) (req *request.Request, output *BatchGetImageOutput) {
  213. op := &request.Operation{
  214. Name: opBatchGetImage,
  215. HTTPMethod: "POST",
  216. HTTPPath: "/",
  217. }
  218. if input == nil {
  219. input = &BatchGetImageInput{}
  220. }
  221. output = &BatchGetImageOutput{}
  222. req = c.newRequest(op, input, output)
  223. return
  224. }
  225. // BatchGetImage API operation for Amazon EC2 Container Registry.
  226. //
  227. // Gets detailed information for specified images within a specified repository.
  228. // Images are specified with either imageTag or imageDigest.
  229. //
  230. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  231. // with awserr.Error's Code and Message methods to get detailed information about
  232. // the error.
  233. //
  234. // See the AWS API reference guide for Amazon EC2 Container Registry's
  235. // API operation BatchGetImage for usage and error information.
  236. //
  237. // Returned Error Types:
  238. // * ServerException
  239. // These errors are usually caused by a server-side issue.
  240. //
  241. // * InvalidParameterException
  242. // The specified parameter is invalid. Review the available parameters for the
  243. // API request.
  244. //
  245. // * RepositoryNotFoundException
  246. // The specified repository could not be found. Check the spelling of the specified
  247. // repository and ensure that you are performing operations on the correct registry.
  248. //
  249. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImage
  250. func (c *ECR) BatchGetImage(input *BatchGetImageInput) (*BatchGetImageOutput, error) {
  251. req, out := c.BatchGetImageRequest(input)
  252. return out, req.Send()
  253. }
  254. // BatchGetImageWithContext is the same as BatchGetImage with the addition of
  255. // the ability to pass a context and additional request options.
  256. //
  257. // See BatchGetImage for details on how to use this API operation.
  258. //
  259. // The context must be non-nil and will be used for request cancellation. If
  260. // the context is nil a panic will occur. In the future the SDK may create
  261. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  262. // for more information on using Contexts.
  263. func (c *ECR) BatchGetImageWithContext(ctx aws.Context, input *BatchGetImageInput, opts ...request.Option) (*BatchGetImageOutput, error) {
  264. req, out := c.BatchGetImageRequest(input)
  265. req.SetContext(ctx)
  266. req.ApplyOptions(opts...)
  267. return out, req.Send()
  268. }
  269. const opCompleteLayerUpload = "CompleteLayerUpload"
  270. // CompleteLayerUploadRequest generates a "aws/request.Request" representing the
  271. // client's request for the CompleteLayerUpload operation. The "output" return
  272. // value will be populated with the request's response once the request completes
  273. // successfully.
  274. //
  275. // Use "Send" method on the returned Request to send the API call to the service.
  276. // the "output" return value is not valid until after Send returns without error.
  277. //
  278. // See CompleteLayerUpload for more information on using the CompleteLayerUpload
  279. // API call, and error handling.
  280. //
  281. // This method is useful when you want to inject custom logic or configuration
  282. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  283. //
  284. //
  285. // // Example sending a request using the CompleteLayerUploadRequest method.
  286. // req, resp := client.CompleteLayerUploadRequest(params)
  287. //
  288. // err := req.Send()
  289. // if err == nil { // resp is now filled
  290. // fmt.Println(resp)
  291. // }
  292. //
  293. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUpload
  294. func (c *ECR) CompleteLayerUploadRequest(input *CompleteLayerUploadInput) (req *request.Request, output *CompleteLayerUploadOutput) {
  295. op := &request.Operation{
  296. Name: opCompleteLayerUpload,
  297. HTTPMethod: "POST",
  298. HTTPPath: "/",
  299. }
  300. if input == nil {
  301. input = &CompleteLayerUploadInput{}
  302. }
  303. output = &CompleteLayerUploadOutput{}
  304. req = c.newRequest(op, input, output)
  305. return
  306. }
  307. // CompleteLayerUpload API operation for Amazon EC2 Container Registry.
  308. //
  309. // Informs Amazon ECR that the image layer upload has completed for a specified
  310. // registry, repository name, and upload ID. You can optionally provide a sha256
  311. // digest of the image layer for data validation purposes.
  312. //
  313. // This operation is used by the Amazon ECR proxy, and it is not intended for
  314. // general use by customers for pulling and pushing images. In most cases, you
  315. // should use the docker CLI to pull, tag, and push images.
  316. //
  317. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  318. // with awserr.Error's Code and Message methods to get detailed information about
  319. // the error.
  320. //
  321. // See the AWS API reference guide for Amazon EC2 Container Registry's
  322. // API operation CompleteLayerUpload for usage and error information.
  323. //
  324. // Returned Error Types:
  325. // * ServerException
  326. // These errors are usually caused by a server-side issue.
  327. //
  328. // * InvalidParameterException
  329. // The specified parameter is invalid. Review the available parameters for the
  330. // API request.
  331. //
  332. // * RepositoryNotFoundException
  333. // The specified repository could not be found. Check the spelling of the specified
  334. // repository and ensure that you are performing operations on the correct registry.
  335. //
  336. // * UploadNotFoundException
  337. // The upload could not be found, or the specified upload id is not valid for
  338. // this repository.
  339. //
  340. // * InvalidLayerException
  341. // The layer digest calculation performed by Amazon ECR upon receipt of the
  342. // image layer does not match the digest specified.
  343. //
  344. // * LayerPartTooSmallException
  345. // Layer parts must be at least 5 MiB in size.
  346. //
  347. // * LayerAlreadyExistsException
  348. // The image layer already exists in the associated repository.
  349. //
  350. // * EmptyUploadException
  351. // The specified layer upload does not contain any layer parts.
  352. //
  353. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUpload
  354. func (c *ECR) CompleteLayerUpload(input *CompleteLayerUploadInput) (*CompleteLayerUploadOutput, error) {
  355. req, out := c.CompleteLayerUploadRequest(input)
  356. return out, req.Send()
  357. }
  358. // CompleteLayerUploadWithContext is the same as CompleteLayerUpload with the addition of
  359. // the ability to pass a context and additional request options.
  360. //
  361. // See CompleteLayerUpload for details on how to use this API operation.
  362. //
  363. // The context must be non-nil and will be used for request cancellation. If
  364. // the context is nil a panic will occur. In the future the SDK may create
  365. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  366. // for more information on using Contexts.
  367. func (c *ECR) CompleteLayerUploadWithContext(ctx aws.Context, input *CompleteLayerUploadInput, opts ...request.Option) (*CompleteLayerUploadOutput, error) {
  368. req, out := c.CompleteLayerUploadRequest(input)
  369. req.SetContext(ctx)
  370. req.ApplyOptions(opts...)
  371. return out, req.Send()
  372. }
  373. const opCreateRepository = "CreateRepository"
  374. // CreateRepositoryRequest generates a "aws/request.Request" representing the
  375. // client's request for the CreateRepository operation. The "output" return
  376. // value will be populated with the request's response once the request completes
  377. // successfully.
  378. //
  379. // Use "Send" method on the returned Request to send the API call to the service.
  380. // the "output" return value is not valid until after Send returns without error.
  381. //
  382. // See CreateRepository for more information on using the CreateRepository
  383. // API call, and error handling.
  384. //
  385. // This method is useful when you want to inject custom logic or configuration
  386. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  387. //
  388. //
  389. // // Example sending a request using the CreateRepositoryRequest method.
  390. // req, resp := client.CreateRepositoryRequest(params)
  391. //
  392. // err := req.Send()
  393. // if err == nil { // resp is now filled
  394. // fmt.Println(resp)
  395. // }
  396. //
  397. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepository
  398. func (c *ECR) CreateRepositoryRequest(input *CreateRepositoryInput) (req *request.Request, output *CreateRepositoryOutput) {
  399. op := &request.Operation{
  400. Name: opCreateRepository,
  401. HTTPMethod: "POST",
  402. HTTPPath: "/",
  403. }
  404. if input == nil {
  405. input = &CreateRepositoryInput{}
  406. }
  407. output = &CreateRepositoryOutput{}
  408. req = c.newRequest(op, input, output)
  409. return
  410. }
  411. // CreateRepository API operation for Amazon EC2 Container Registry.
  412. //
  413. // Creates an Amazon Elastic Container Registry (Amazon ECR) repository, where
  414. // users can push and pull Docker images. For more information, see Amazon ECR
  415. // Repositories (https://docs.aws.amazon.com/AmazonECR/latest/userguide/Repositories.html)
  416. // in the Amazon Elastic Container Registry User Guide.
  417. //
  418. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  419. // with awserr.Error's Code and Message methods to get detailed information about
  420. // the error.
  421. //
  422. // See the AWS API reference guide for Amazon EC2 Container Registry's
  423. // API operation CreateRepository for usage and error information.
  424. //
  425. // Returned Error Types:
  426. // * ServerException
  427. // These errors are usually caused by a server-side issue.
  428. //
  429. // * InvalidParameterException
  430. // The specified parameter is invalid. Review the available parameters for the
  431. // API request.
  432. //
  433. // * InvalidTagParameterException
  434. // An invalid parameter has been specified. Tag keys can have a maximum character
  435. // length of 128 characters, and tag values can have a maximum length of 256
  436. // characters.
  437. //
  438. // * TooManyTagsException
  439. // The list of tags on the repository is over the limit. The maximum number
  440. // of tags that can be applied to a repository is 50.
  441. //
  442. // * RepositoryAlreadyExistsException
  443. // The specified repository already exists in the specified registry.
  444. //
  445. // * LimitExceededException
  446. // The operation did not succeed because it would have exceeded a service limit
  447. // for your account. For more information, see Amazon ECR Default Service Limits
  448. // (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)
  449. // in the Amazon Elastic Container Registry User Guide.
  450. //
  451. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepository
  452. func (c *ECR) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) {
  453. req, out := c.CreateRepositoryRequest(input)
  454. return out, req.Send()
  455. }
  456. // CreateRepositoryWithContext is the same as CreateRepository with the addition of
  457. // the ability to pass a context and additional request options.
  458. //
  459. // See CreateRepository for details on how to use this API operation.
  460. //
  461. // The context must be non-nil and will be used for request cancellation. If
  462. // the context is nil a panic will occur. In the future the SDK may create
  463. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  464. // for more information on using Contexts.
  465. func (c *ECR) CreateRepositoryWithContext(ctx aws.Context, input *CreateRepositoryInput, opts ...request.Option) (*CreateRepositoryOutput, error) {
  466. req, out := c.CreateRepositoryRequest(input)
  467. req.SetContext(ctx)
  468. req.ApplyOptions(opts...)
  469. return out, req.Send()
  470. }
  471. const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy"
  472. // DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the
  473. // client's request for the DeleteLifecyclePolicy operation. The "output" return
  474. // value will be populated with the request's response once the request completes
  475. // successfully.
  476. //
  477. // Use "Send" method on the returned Request to send the API call to the service.
  478. // the "output" return value is not valid until after Send returns without error.
  479. //
  480. // See DeleteLifecyclePolicy for more information on using the DeleteLifecyclePolicy
  481. // API call, and error handling.
  482. //
  483. // This method is useful when you want to inject custom logic or configuration
  484. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  485. //
  486. //
  487. // // Example sending a request using the DeleteLifecyclePolicyRequest method.
  488. // req, resp := client.DeleteLifecyclePolicyRequest(params)
  489. //
  490. // err := req.Send()
  491. // if err == nil { // resp is now filled
  492. // fmt.Println(resp)
  493. // }
  494. //
  495. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicy
  496. func (c *ECR) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput) {
  497. op := &request.Operation{
  498. Name: opDeleteLifecyclePolicy,
  499. HTTPMethod: "POST",
  500. HTTPPath: "/",
  501. }
  502. if input == nil {
  503. input = &DeleteLifecyclePolicyInput{}
  504. }
  505. output = &DeleteLifecyclePolicyOutput{}
  506. req = c.newRequest(op, input, output)
  507. return
  508. }
  509. // DeleteLifecyclePolicy API operation for Amazon EC2 Container Registry.
  510. //
  511. // Deletes the specified lifecycle policy.
  512. //
  513. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  514. // with awserr.Error's Code and Message methods to get detailed information about
  515. // the error.
  516. //
  517. // See the AWS API reference guide for Amazon EC2 Container Registry's
  518. // API operation DeleteLifecyclePolicy for usage and error information.
  519. //
  520. // Returned Error Types:
  521. // * ServerException
  522. // These errors are usually caused by a server-side issue.
  523. //
  524. // * InvalidParameterException
  525. // The specified parameter is invalid. Review the available parameters for the
  526. // API request.
  527. //
  528. // * RepositoryNotFoundException
  529. // The specified repository could not be found. Check the spelling of the specified
  530. // repository and ensure that you are performing operations on the correct registry.
  531. //
  532. // * LifecyclePolicyNotFoundException
  533. // The lifecycle policy could not be found, and no policy is set to the repository.
  534. //
  535. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicy
  536. func (c *ECR) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error) {
  537. req, out := c.DeleteLifecyclePolicyRequest(input)
  538. return out, req.Send()
  539. }
  540. // DeleteLifecyclePolicyWithContext is the same as DeleteLifecyclePolicy with the addition of
  541. // the ability to pass a context and additional request options.
  542. //
  543. // See DeleteLifecyclePolicy for details on how to use this API operation.
  544. //
  545. // The context must be non-nil and will be used for request cancellation. If
  546. // the context is nil a panic will occur. In the future the SDK may create
  547. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  548. // for more information on using Contexts.
  549. func (c *ECR) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error) {
  550. req, out := c.DeleteLifecyclePolicyRequest(input)
  551. req.SetContext(ctx)
  552. req.ApplyOptions(opts...)
  553. return out, req.Send()
  554. }
  555. const opDeleteRepository = "DeleteRepository"
  556. // DeleteRepositoryRequest generates a "aws/request.Request" representing the
  557. // client's request for the DeleteRepository operation. The "output" return
  558. // value will be populated with the request's response once the request completes
  559. // successfully.
  560. //
  561. // Use "Send" method on the returned Request to send the API call to the service.
  562. // the "output" return value is not valid until after Send returns without error.
  563. //
  564. // See DeleteRepository for more information on using the DeleteRepository
  565. // API call, and error handling.
  566. //
  567. // This method is useful when you want to inject custom logic or configuration
  568. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  569. //
  570. //
  571. // // Example sending a request using the DeleteRepositoryRequest method.
  572. // req, resp := client.DeleteRepositoryRequest(params)
  573. //
  574. // err := req.Send()
  575. // if err == nil { // resp is now filled
  576. // fmt.Println(resp)
  577. // }
  578. //
  579. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepository
  580. func (c *ECR) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *request.Request, output *DeleteRepositoryOutput) {
  581. op := &request.Operation{
  582. Name: opDeleteRepository,
  583. HTTPMethod: "POST",
  584. HTTPPath: "/",
  585. }
  586. if input == nil {
  587. input = &DeleteRepositoryInput{}
  588. }
  589. output = &DeleteRepositoryOutput{}
  590. req = c.newRequest(op, input, output)
  591. return
  592. }
  593. // DeleteRepository API operation for Amazon EC2 Container Registry.
  594. //
  595. // Deletes an existing image repository. If a repository contains images, you
  596. // must use the force option to delete it.
  597. //
  598. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  599. // with awserr.Error's Code and Message methods to get detailed information about
  600. // the error.
  601. //
  602. // See the AWS API reference guide for Amazon EC2 Container Registry's
  603. // API operation DeleteRepository for usage and error information.
  604. //
  605. // Returned Error Types:
  606. // * ServerException
  607. // These errors are usually caused by a server-side issue.
  608. //
  609. // * InvalidParameterException
  610. // The specified parameter is invalid. Review the available parameters for the
  611. // API request.
  612. //
  613. // * RepositoryNotFoundException
  614. // The specified repository could not be found. Check the spelling of the specified
  615. // repository and ensure that you are performing operations on the correct registry.
  616. //
  617. // * RepositoryNotEmptyException
  618. // The specified repository contains images. To delete a repository that contains
  619. // images, you must force the deletion with the force parameter.
  620. //
  621. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepository
  622. func (c *ECR) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) {
  623. req, out := c.DeleteRepositoryRequest(input)
  624. return out, req.Send()
  625. }
  626. // DeleteRepositoryWithContext is the same as DeleteRepository with the addition of
  627. // the ability to pass a context and additional request options.
  628. //
  629. // See DeleteRepository for details on how to use this API operation.
  630. //
  631. // The context must be non-nil and will be used for request cancellation. If
  632. // the context is nil a panic will occur. In the future the SDK may create
  633. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  634. // for more information on using Contexts.
  635. func (c *ECR) DeleteRepositoryWithContext(ctx aws.Context, input *DeleteRepositoryInput, opts ...request.Option) (*DeleteRepositoryOutput, error) {
  636. req, out := c.DeleteRepositoryRequest(input)
  637. req.SetContext(ctx)
  638. req.ApplyOptions(opts...)
  639. return out, req.Send()
  640. }
  641. const opDeleteRepositoryPolicy = "DeleteRepositoryPolicy"
  642. // DeleteRepositoryPolicyRequest generates a "aws/request.Request" representing the
  643. // client's request for the DeleteRepositoryPolicy operation. The "output" return
  644. // value will be populated with the request's response once the request completes
  645. // successfully.
  646. //
  647. // Use "Send" method on the returned Request to send the API call to the service.
  648. // the "output" return value is not valid until after Send returns without error.
  649. //
  650. // See DeleteRepositoryPolicy for more information on using the DeleteRepositoryPolicy
  651. // API call, and error handling.
  652. //
  653. // This method is useful when you want to inject custom logic or configuration
  654. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  655. //
  656. //
  657. // // Example sending a request using the DeleteRepositoryPolicyRequest method.
  658. // req, resp := client.DeleteRepositoryPolicyRequest(params)
  659. //
  660. // err := req.Send()
  661. // if err == nil { // resp is now filled
  662. // fmt.Println(resp)
  663. // }
  664. //
  665. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicy
  666. func (c *ECR) DeleteRepositoryPolicyRequest(input *DeleteRepositoryPolicyInput) (req *request.Request, output *DeleteRepositoryPolicyOutput) {
  667. op := &request.Operation{
  668. Name: opDeleteRepositoryPolicy,
  669. HTTPMethod: "POST",
  670. HTTPPath: "/",
  671. }
  672. if input == nil {
  673. input = &DeleteRepositoryPolicyInput{}
  674. }
  675. output = &DeleteRepositoryPolicyOutput{}
  676. req = c.newRequest(op, input, output)
  677. return
  678. }
  679. // DeleteRepositoryPolicy API operation for Amazon EC2 Container Registry.
  680. //
  681. // Deletes the repository policy from a specified repository.
  682. //
  683. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  684. // with awserr.Error's Code and Message methods to get detailed information about
  685. // the error.
  686. //
  687. // See the AWS API reference guide for Amazon EC2 Container Registry's
  688. // API operation DeleteRepositoryPolicy for usage and error information.
  689. //
  690. // Returned Error Types:
  691. // * ServerException
  692. // These errors are usually caused by a server-side issue.
  693. //
  694. // * InvalidParameterException
  695. // The specified parameter is invalid. Review the available parameters for the
  696. // API request.
  697. //
  698. // * RepositoryNotFoundException
  699. // The specified repository could not be found. Check the spelling of the specified
  700. // repository and ensure that you are performing operations on the correct registry.
  701. //
  702. // * RepositoryPolicyNotFoundException
  703. // The specified repository and registry combination does not have an associated
  704. // repository policy.
  705. //
  706. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicy
  707. func (c *ECR) DeleteRepositoryPolicy(input *DeleteRepositoryPolicyInput) (*DeleteRepositoryPolicyOutput, error) {
  708. req, out := c.DeleteRepositoryPolicyRequest(input)
  709. return out, req.Send()
  710. }
  711. // DeleteRepositoryPolicyWithContext is the same as DeleteRepositoryPolicy with the addition of
  712. // the ability to pass a context and additional request options.
  713. //
  714. // See DeleteRepositoryPolicy for details on how to use this API operation.
  715. //
  716. // The context must be non-nil and will be used for request cancellation. If
  717. // the context is nil a panic will occur. In the future the SDK may create
  718. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  719. // for more information on using Contexts.
  720. func (c *ECR) DeleteRepositoryPolicyWithContext(ctx aws.Context, input *DeleteRepositoryPolicyInput, opts ...request.Option) (*DeleteRepositoryPolicyOutput, error) {
  721. req, out := c.DeleteRepositoryPolicyRequest(input)
  722. req.SetContext(ctx)
  723. req.ApplyOptions(opts...)
  724. return out, req.Send()
  725. }
  726. const opDescribeImageScanFindings = "DescribeImageScanFindings"
  727. // DescribeImageScanFindingsRequest generates a "aws/request.Request" representing the
  728. // client's request for the DescribeImageScanFindings operation. The "output" return
  729. // value will be populated with the request's response once the request completes
  730. // successfully.
  731. //
  732. // Use "Send" method on the returned Request to send the API call to the service.
  733. // the "output" return value is not valid until after Send returns without error.
  734. //
  735. // See DescribeImageScanFindings for more information on using the DescribeImageScanFindings
  736. // API call, and error handling.
  737. //
  738. // This method is useful when you want to inject custom logic or configuration
  739. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  740. //
  741. //
  742. // // Example sending a request using the DescribeImageScanFindingsRequest method.
  743. // req, resp := client.DescribeImageScanFindingsRequest(params)
  744. //
  745. // err := req.Send()
  746. // if err == nil { // resp is now filled
  747. // fmt.Println(resp)
  748. // }
  749. //
  750. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImageScanFindings
  751. func (c *ECR) DescribeImageScanFindingsRequest(input *DescribeImageScanFindingsInput) (req *request.Request, output *DescribeImageScanFindingsOutput) {
  752. op := &request.Operation{
  753. Name: opDescribeImageScanFindings,
  754. HTTPMethod: "POST",
  755. HTTPPath: "/",
  756. Paginator: &request.Paginator{
  757. InputTokens: []string{"nextToken"},
  758. OutputTokens: []string{"nextToken"},
  759. LimitToken: "maxResults",
  760. TruncationToken: "",
  761. },
  762. }
  763. if input == nil {
  764. input = &DescribeImageScanFindingsInput{}
  765. }
  766. output = &DescribeImageScanFindingsOutput{}
  767. req = c.newRequest(op, input, output)
  768. return
  769. }
  770. // DescribeImageScanFindings API operation for Amazon EC2 Container Registry.
  771. //
  772. // Describes the image scan findings for the specified image.
  773. //
  774. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  775. // with awserr.Error's Code and Message methods to get detailed information about
  776. // the error.
  777. //
  778. // See the AWS API reference guide for Amazon EC2 Container Registry's
  779. // API operation DescribeImageScanFindings for usage and error information.
  780. //
  781. // Returned Error Types:
  782. // * ServerException
  783. // These errors are usually caused by a server-side issue.
  784. //
  785. // * InvalidParameterException
  786. // The specified parameter is invalid. Review the available parameters for the
  787. // API request.
  788. //
  789. // * RepositoryNotFoundException
  790. // The specified repository could not be found. Check the spelling of the specified
  791. // repository and ensure that you are performing operations on the correct registry.
  792. //
  793. // * ImageNotFoundException
  794. // The image requested does not exist in the specified repository.
  795. //
  796. // * ScanNotFoundException
  797. // The specified image scan could not be found. Ensure that image scanning is
  798. // enabled on the repository and try again.
  799. //
  800. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImageScanFindings
  801. func (c *ECR) DescribeImageScanFindings(input *DescribeImageScanFindingsInput) (*DescribeImageScanFindingsOutput, error) {
  802. req, out := c.DescribeImageScanFindingsRequest(input)
  803. return out, req.Send()
  804. }
  805. // DescribeImageScanFindingsWithContext is the same as DescribeImageScanFindings with the addition of
  806. // the ability to pass a context and additional request options.
  807. //
  808. // See DescribeImageScanFindings for details on how to use this API operation.
  809. //
  810. // The context must be non-nil and will be used for request cancellation. If
  811. // the context is nil a panic will occur. In the future the SDK may create
  812. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  813. // for more information on using Contexts.
  814. func (c *ECR) DescribeImageScanFindingsWithContext(ctx aws.Context, input *DescribeImageScanFindingsInput, opts ...request.Option) (*DescribeImageScanFindingsOutput, error) {
  815. req, out := c.DescribeImageScanFindingsRequest(input)
  816. req.SetContext(ctx)
  817. req.ApplyOptions(opts...)
  818. return out, req.Send()
  819. }
  820. // DescribeImageScanFindingsPages iterates over the pages of a DescribeImageScanFindings operation,
  821. // calling the "fn" function with the response data for each page. To stop
  822. // iterating, return false from the fn function.
  823. //
  824. // See DescribeImageScanFindings method for more information on how to use this operation.
  825. //
  826. // Note: This operation can generate multiple requests to a service.
  827. //
  828. // // Example iterating over at most 3 pages of a DescribeImageScanFindings operation.
  829. // pageNum := 0
  830. // err := client.DescribeImageScanFindingsPages(params,
  831. // func(page *ecr.DescribeImageScanFindingsOutput, lastPage bool) bool {
  832. // pageNum++
  833. // fmt.Println(page)
  834. // return pageNum <= 3
  835. // })
  836. //
  837. func (c *ECR) DescribeImageScanFindingsPages(input *DescribeImageScanFindingsInput, fn func(*DescribeImageScanFindingsOutput, bool) bool) error {
  838. return c.DescribeImageScanFindingsPagesWithContext(aws.BackgroundContext(), input, fn)
  839. }
  840. // DescribeImageScanFindingsPagesWithContext same as DescribeImageScanFindingsPages except
  841. // it takes a Context and allows setting request options on the pages.
  842. //
  843. // The context must be non-nil and will be used for request cancellation. If
  844. // the context is nil a panic will occur. In the future the SDK may create
  845. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  846. // for more information on using Contexts.
  847. func (c *ECR) DescribeImageScanFindingsPagesWithContext(ctx aws.Context, input *DescribeImageScanFindingsInput, fn func(*DescribeImageScanFindingsOutput, bool) bool, opts ...request.Option) error {
  848. p := request.Pagination{
  849. NewRequest: func() (*request.Request, error) {
  850. var inCpy *DescribeImageScanFindingsInput
  851. if input != nil {
  852. tmp := *input
  853. inCpy = &tmp
  854. }
  855. req, _ := c.DescribeImageScanFindingsRequest(inCpy)
  856. req.SetContext(ctx)
  857. req.ApplyOptions(opts...)
  858. return req, nil
  859. },
  860. }
  861. for p.Next() {
  862. if !fn(p.Page().(*DescribeImageScanFindingsOutput), !p.HasNextPage()) {
  863. break
  864. }
  865. }
  866. return p.Err()
  867. }
  868. const opDescribeImages = "DescribeImages"
  869. // DescribeImagesRequest generates a "aws/request.Request" representing the
  870. // client's request for the DescribeImages operation. The "output" return
  871. // value will be populated with the request's response once the request completes
  872. // successfully.
  873. //
  874. // Use "Send" method on the returned Request to send the API call to the service.
  875. // the "output" return value is not valid until after Send returns without error.
  876. //
  877. // See DescribeImages for more information on using the DescribeImages
  878. // API call, and error handling.
  879. //
  880. // This method is useful when you want to inject custom logic or configuration
  881. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  882. //
  883. //
  884. // // Example sending a request using the DescribeImagesRequest method.
  885. // req, resp := client.DescribeImagesRequest(params)
  886. //
  887. // err := req.Send()
  888. // if err == nil { // resp is now filled
  889. // fmt.Println(resp)
  890. // }
  891. //
  892. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImages
  893. func (c *ECR) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Request, output *DescribeImagesOutput) {
  894. op := &request.Operation{
  895. Name: opDescribeImages,
  896. HTTPMethod: "POST",
  897. HTTPPath: "/",
  898. Paginator: &request.Paginator{
  899. InputTokens: []string{"nextToken"},
  900. OutputTokens: []string{"nextToken"},
  901. LimitToken: "maxResults",
  902. TruncationToken: "",
  903. },
  904. }
  905. if input == nil {
  906. input = &DescribeImagesInput{}
  907. }
  908. output = &DescribeImagesOutput{}
  909. req = c.newRequest(op, input, output)
  910. return
  911. }
  912. // DescribeImages API operation for Amazon EC2 Container Registry.
  913. //
  914. // Returns metadata about the images in a repository, including image size,
  915. // image tags, and creation date.
  916. //
  917. // Beginning with Docker version 1.9, the Docker client compresses image layers
  918. // before pushing them to a V2 Docker registry. The output of the docker images
  919. // command shows the uncompressed image size, so it may return a larger image
  920. // size than the image sizes returned by DescribeImages.
  921. //
  922. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  923. // with awserr.Error's Code and Message methods to get detailed information about
  924. // the error.
  925. //
  926. // See the AWS API reference guide for Amazon EC2 Container Registry's
  927. // API operation DescribeImages for usage and error information.
  928. //
  929. // Returned Error Types:
  930. // * ServerException
  931. // These errors are usually caused by a server-side issue.
  932. //
  933. // * InvalidParameterException
  934. // The specified parameter is invalid. Review the available parameters for the
  935. // API request.
  936. //
  937. // * RepositoryNotFoundException
  938. // The specified repository could not be found. Check the spelling of the specified
  939. // repository and ensure that you are performing operations on the correct registry.
  940. //
  941. // * ImageNotFoundException
  942. // The image requested does not exist in the specified repository.
  943. //
  944. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImages
  945. func (c *ECR) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) {
  946. req, out := c.DescribeImagesRequest(input)
  947. return out, req.Send()
  948. }
  949. // DescribeImagesWithContext is the same as DescribeImages with the addition of
  950. // the ability to pass a context and additional request options.
  951. //
  952. // See DescribeImages for details on how to use this API operation.
  953. //
  954. // The context must be non-nil and will be used for request cancellation. If
  955. // the context is nil a panic will occur. In the future the SDK may create
  956. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  957. // for more information on using Contexts.
  958. func (c *ECR) DescribeImagesWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.Option) (*DescribeImagesOutput, error) {
  959. req, out := c.DescribeImagesRequest(input)
  960. req.SetContext(ctx)
  961. req.ApplyOptions(opts...)
  962. return out, req.Send()
  963. }
  964. // DescribeImagesPages iterates over the pages of a DescribeImages operation,
  965. // calling the "fn" function with the response data for each page. To stop
  966. // iterating, return false from the fn function.
  967. //
  968. // See DescribeImages method for more information on how to use this operation.
  969. //
  970. // Note: This operation can generate multiple requests to a service.
  971. //
  972. // // Example iterating over at most 3 pages of a DescribeImages operation.
  973. // pageNum := 0
  974. // err := client.DescribeImagesPages(params,
  975. // func(page *ecr.DescribeImagesOutput, lastPage bool) bool {
  976. // pageNum++
  977. // fmt.Println(page)
  978. // return pageNum <= 3
  979. // })
  980. //
  981. func (c *ECR) DescribeImagesPages(input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool) error {
  982. return c.DescribeImagesPagesWithContext(aws.BackgroundContext(), input, fn)
  983. }
  984. // DescribeImagesPagesWithContext same as DescribeImagesPages except
  985. // it takes a Context and allows setting request options on the pages.
  986. //
  987. // The context must be non-nil and will be used for request cancellation. If
  988. // the context is nil a panic will occur. In the future the SDK may create
  989. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  990. // for more information on using Contexts.
  991. func (c *ECR) DescribeImagesPagesWithContext(ctx aws.Context, input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool, opts ...request.Option) error {
  992. p := request.Pagination{
  993. NewRequest: func() (*request.Request, error) {
  994. var inCpy *DescribeImagesInput
  995. if input != nil {
  996. tmp := *input
  997. inCpy = &tmp
  998. }
  999. req, _ := c.DescribeImagesRequest(inCpy)
  1000. req.SetContext(ctx)
  1001. req.ApplyOptions(opts...)
  1002. return req, nil
  1003. },
  1004. }
  1005. for p.Next() {
  1006. if !fn(p.Page().(*DescribeImagesOutput), !p.HasNextPage()) {
  1007. break
  1008. }
  1009. }
  1010. return p.Err()
  1011. }
  1012. const opDescribeRepositories = "DescribeRepositories"
  1013. // DescribeRepositoriesRequest generates a "aws/request.Request" representing the
  1014. // client's request for the DescribeRepositories operation. The "output" return
  1015. // value will be populated with the request's response once the request completes
  1016. // successfully.
  1017. //
  1018. // Use "Send" method on the returned Request to send the API call to the service.
  1019. // the "output" return value is not valid until after Send returns without error.
  1020. //
  1021. // See DescribeRepositories for more information on using the DescribeRepositories
  1022. // API call, and error handling.
  1023. //
  1024. // This method is useful when you want to inject custom logic or configuration
  1025. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1026. //
  1027. //
  1028. // // Example sending a request using the DescribeRepositoriesRequest method.
  1029. // req, resp := client.DescribeRepositoriesRequest(params)
  1030. //
  1031. // err := req.Send()
  1032. // if err == nil { // resp is now filled
  1033. // fmt.Println(resp)
  1034. // }
  1035. //
  1036. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositories
  1037. func (c *ECR) DescribeRepositoriesRequest(input *DescribeRepositoriesInput) (req *request.Request, output *DescribeRepositoriesOutput) {
  1038. op := &request.Operation{
  1039. Name: opDescribeRepositories,
  1040. HTTPMethod: "POST",
  1041. HTTPPath: "/",
  1042. Paginator: &request.Paginator{
  1043. InputTokens: []string{"nextToken"},
  1044. OutputTokens: []string{"nextToken"},
  1045. LimitToken: "maxResults",
  1046. TruncationToken: "",
  1047. },
  1048. }
  1049. if input == nil {
  1050. input = &DescribeRepositoriesInput{}
  1051. }
  1052. output = &DescribeRepositoriesOutput{}
  1053. req = c.newRequest(op, input, output)
  1054. return
  1055. }
  1056. // DescribeRepositories API operation for Amazon EC2 Container Registry.
  1057. //
  1058. // Describes image repositories in a registry.
  1059. //
  1060. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1061. // with awserr.Error's Code and Message methods to get detailed information about
  1062. // the error.
  1063. //
  1064. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1065. // API operation DescribeRepositories for usage and error information.
  1066. //
  1067. // Returned Error Types:
  1068. // * ServerException
  1069. // These errors are usually caused by a server-side issue.
  1070. //
  1071. // * InvalidParameterException
  1072. // The specified parameter is invalid. Review the available parameters for the
  1073. // API request.
  1074. //
  1075. // * RepositoryNotFoundException
  1076. // The specified repository could not be found. Check the spelling of the specified
  1077. // repository and ensure that you are performing operations on the correct registry.
  1078. //
  1079. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositories
  1080. func (c *ECR) DescribeRepositories(input *DescribeRepositoriesInput) (*DescribeRepositoriesOutput, error) {
  1081. req, out := c.DescribeRepositoriesRequest(input)
  1082. return out, req.Send()
  1083. }
  1084. // DescribeRepositoriesWithContext is the same as DescribeRepositories with the addition of
  1085. // the ability to pass a context and additional request options.
  1086. //
  1087. // See DescribeRepositories for details on how to use this API operation.
  1088. //
  1089. // The context must be non-nil and will be used for request cancellation. If
  1090. // the context is nil a panic will occur. In the future the SDK may create
  1091. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1092. // for more information on using Contexts.
  1093. func (c *ECR) DescribeRepositoriesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, opts ...request.Option) (*DescribeRepositoriesOutput, error) {
  1094. req, out := c.DescribeRepositoriesRequest(input)
  1095. req.SetContext(ctx)
  1096. req.ApplyOptions(opts...)
  1097. return out, req.Send()
  1098. }
  1099. // DescribeRepositoriesPages iterates over the pages of a DescribeRepositories operation,
  1100. // calling the "fn" function with the response data for each page. To stop
  1101. // iterating, return false from the fn function.
  1102. //
  1103. // See DescribeRepositories method for more information on how to use this operation.
  1104. //
  1105. // Note: This operation can generate multiple requests to a service.
  1106. //
  1107. // // Example iterating over at most 3 pages of a DescribeRepositories operation.
  1108. // pageNum := 0
  1109. // err := client.DescribeRepositoriesPages(params,
  1110. // func(page *ecr.DescribeRepositoriesOutput, lastPage bool) bool {
  1111. // pageNum++
  1112. // fmt.Println(page)
  1113. // return pageNum <= 3
  1114. // })
  1115. //
  1116. func (c *ECR) DescribeRepositoriesPages(input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool) error {
  1117. return c.DescribeRepositoriesPagesWithContext(aws.BackgroundContext(), input, fn)
  1118. }
  1119. // DescribeRepositoriesPagesWithContext same as DescribeRepositoriesPages except
  1120. // it takes a Context and allows setting request options on the pages.
  1121. //
  1122. // The context must be non-nil and will be used for request cancellation. If
  1123. // the context is nil a panic will occur. In the future the SDK may create
  1124. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1125. // for more information on using Contexts.
  1126. func (c *ECR) DescribeRepositoriesPagesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool, opts ...request.Option) error {
  1127. p := request.Pagination{
  1128. NewRequest: func() (*request.Request, error) {
  1129. var inCpy *DescribeRepositoriesInput
  1130. if input != nil {
  1131. tmp := *input
  1132. inCpy = &tmp
  1133. }
  1134. req, _ := c.DescribeRepositoriesRequest(inCpy)
  1135. req.SetContext(ctx)
  1136. req.ApplyOptions(opts...)
  1137. return req, nil
  1138. },
  1139. }
  1140. for p.Next() {
  1141. if !fn(p.Page().(*DescribeRepositoriesOutput), !p.HasNextPage()) {
  1142. break
  1143. }
  1144. }
  1145. return p.Err()
  1146. }
  1147. const opGetAuthorizationToken = "GetAuthorizationToken"
  1148. // GetAuthorizationTokenRequest generates a "aws/request.Request" representing the
  1149. // client's request for the GetAuthorizationToken operation. The "output" return
  1150. // value will be populated with the request's response once the request completes
  1151. // successfully.
  1152. //
  1153. // Use "Send" method on the returned Request to send the API call to the service.
  1154. // the "output" return value is not valid until after Send returns without error.
  1155. //
  1156. // See GetAuthorizationToken for more information on using the GetAuthorizationToken
  1157. // API call, and error handling.
  1158. //
  1159. // This method is useful when you want to inject custom logic or configuration
  1160. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1161. //
  1162. //
  1163. // // Example sending a request using the GetAuthorizationTokenRequest method.
  1164. // req, resp := client.GetAuthorizationTokenRequest(params)
  1165. //
  1166. // err := req.Send()
  1167. // if err == nil { // resp is now filled
  1168. // fmt.Println(resp)
  1169. // }
  1170. //
  1171. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationToken
  1172. func (c *ECR) GetAuthorizationTokenRequest(input *GetAuthorizationTokenInput) (req *request.Request, output *GetAuthorizationTokenOutput) {
  1173. op := &request.Operation{
  1174. Name: opGetAuthorizationToken,
  1175. HTTPMethod: "POST",
  1176. HTTPPath: "/",
  1177. }
  1178. if input == nil {
  1179. input = &GetAuthorizationTokenInput{}
  1180. }
  1181. output = &GetAuthorizationTokenOutput{}
  1182. req = c.newRequest(op, input, output)
  1183. return
  1184. }
  1185. // GetAuthorizationToken API operation for Amazon EC2 Container Registry.
  1186. //
  1187. // Retrieves a token that is valid for a specified registry for 12 hours. This
  1188. // command allows you to use the docker CLI to push and pull images with Amazon
  1189. // ECR. If you do not specify a registry, the default registry is assumed.
  1190. //
  1191. // The authorizationToken returned for each registry specified is a base64 encoded
  1192. // string that can be decoded and used in a docker login command to authenticate
  1193. // to a registry. The AWS CLI offers an aws ecr get-login command that simplifies
  1194. // the login process.
  1195. //
  1196. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1197. // with awserr.Error's Code and Message methods to get detailed information about
  1198. // the error.
  1199. //
  1200. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1201. // API operation GetAuthorizationToken for usage and error information.
  1202. //
  1203. // Returned Error Types:
  1204. // * ServerException
  1205. // These errors are usually caused by a server-side issue.
  1206. //
  1207. // * InvalidParameterException
  1208. // The specified parameter is invalid. Review the available parameters for the
  1209. // API request.
  1210. //
  1211. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationToken
  1212. func (c *ECR) GetAuthorizationToken(input *GetAuthorizationTokenInput) (*GetAuthorizationTokenOutput, error) {
  1213. req, out := c.GetAuthorizationTokenRequest(input)
  1214. return out, req.Send()
  1215. }
  1216. // GetAuthorizationTokenWithContext is the same as GetAuthorizationToken with the addition of
  1217. // the ability to pass a context and additional request options.
  1218. //
  1219. // See GetAuthorizationToken for details on how to use this API operation.
  1220. //
  1221. // The context must be non-nil and will be used for request cancellation. If
  1222. // the context is nil a panic will occur. In the future the SDK may create
  1223. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1224. // for more information on using Contexts.
  1225. func (c *ECR) GetAuthorizationTokenWithContext(ctx aws.Context, input *GetAuthorizationTokenInput, opts ...request.Option) (*GetAuthorizationTokenOutput, error) {
  1226. req, out := c.GetAuthorizationTokenRequest(input)
  1227. req.SetContext(ctx)
  1228. req.ApplyOptions(opts...)
  1229. return out, req.Send()
  1230. }
  1231. const opGetDownloadUrlForLayer = "GetDownloadUrlForLayer"
  1232. // GetDownloadUrlForLayerRequest generates a "aws/request.Request" representing the
  1233. // client's request for the GetDownloadUrlForLayer operation. The "output" return
  1234. // value will be populated with the request's response once the request completes
  1235. // successfully.
  1236. //
  1237. // Use "Send" method on the returned Request to send the API call to the service.
  1238. // the "output" return value is not valid until after Send returns without error.
  1239. //
  1240. // See GetDownloadUrlForLayer for more information on using the GetDownloadUrlForLayer
  1241. // API call, and error handling.
  1242. //
  1243. // This method is useful when you want to inject custom logic or configuration
  1244. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1245. //
  1246. //
  1247. // // Example sending a request using the GetDownloadUrlForLayerRequest method.
  1248. // req, resp := client.GetDownloadUrlForLayerRequest(params)
  1249. //
  1250. // err := req.Send()
  1251. // if err == nil { // resp is now filled
  1252. // fmt.Println(resp)
  1253. // }
  1254. //
  1255. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayer
  1256. func (c *ECR) GetDownloadUrlForLayerRequest(input *GetDownloadUrlForLayerInput) (req *request.Request, output *GetDownloadUrlForLayerOutput) {
  1257. op := &request.Operation{
  1258. Name: opGetDownloadUrlForLayer,
  1259. HTTPMethod: "POST",
  1260. HTTPPath: "/",
  1261. }
  1262. if input == nil {
  1263. input = &GetDownloadUrlForLayerInput{}
  1264. }
  1265. output = &GetDownloadUrlForLayerOutput{}
  1266. req = c.newRequest(op, input, output)
  1267. return
  1268. }
  1269. // GetDownloadUrlForLayer API operation for Amazon EC2 Container Registry.
  1270. //
  1271. // Retrieves the pre-signed Amazon S3 download URL corresponding to an image
  1272. // layer. You can only get URLs for image layers that are referenced in an image.
  1273. //
  1274. // This operation is used by the Amazon ECR proxy, and it is not intended for
  1275. // general use by customers for pulling and pushing images. In most cases, you
  1276. // should use the docker CLI to pull, tag, and push images.
  1277. //
  1278. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1279. // with awserr.Error's Code and Message methods to get detailed information about
  1280. // the error.
  1281. //
  1282. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1283. // API operation GetDownloadUrlForLayer for usage and error information.
  1284. //
  1285. // Returned Error Types:
  1286. // * ServerException
  1287. // These errors are usually caused by a server-side issue.
  1288. //
  1289. // * InvalidParameterException
  1290. // The specified parameter is invalid. Review the available parameters for the
  1291. // API request.
  1292. //
  1293. // * LayersNotFoundException
  1294. // The specified layers could not be found, or the specified layer is not valid
  1295. // for this repository.
  1296. //
  1297. // * LayerInaccessibleException
  1298. // The specified layer is not available because it is not associated with an
  1299. // image. Unassociated image layers may be cleaned up at any time.
  1300. //
  1301. // * RepositoryNotFoundException
  1302. // The specified repository could not be found. Check the spelling of the specified
  1303. // repository and ensure that you are performing operations on the correct registry.
  1304. //
  1305. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayer
  1306. func (c *ECR) GetDownloadUrlForLayer(input *GetDownloadUrlForLayerInput) (*GetDownloadUrlForLayerOutput, error) {
  1307. req, out := c.GetDownloadUrlForLayerRequest(input)
  1308. return out, req.Send()
  1309. }
  1310. // GetDownloadUrlForLayerWithContext is the same as GetDownloadUrlForLayer with the addition of
  1311. // the ability to pass a context and additional request options.
  1312. //
  1313. // See GetDownloadUrlForLayer for details on how to use this API operation.
  1314. //
  1315. // The context must be non-nil and will be used for request cancellation. If
  1316. // the context is nil a panic will occur. In the future the SDK may create
  1317. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1318. // for more information on using Contexts.
  1319. func (c *ECR) GetDownloadUrlForLayerWithContext(ctx aws.Context, input *GetDownloadUrlForLayerInput, opts ...request.Option) (*GetDownloadUrlForLayerOutput, error) {
  1320. req, out := c.GetDownloadUrlForLayerRequest(input)
  1321. req.SetContext(ctx)
  1322. req.ApplyOptions(opts...)
  1323. return out, req.Send()
  1324. }
  1325. const opGetLifecyclePolicy = "GetLifecyclePolicy"
  1326. // GetLifecyclePolicyRequest generates a "aws/request.Request" representing the
  1327. // client's request for the GetLifecyclePolicy operation. The "output" return
  1328. // value will be populated with the request's response once the request completes
  1329. // successfully.
  1330. //
  1331. // Use "Send" method on the returned Request to send the API call to the service.
  1332. // the "output" return value is not valid until after Send returns without error.
  1333. //
  1334. // See GetLifecyclePolicy for more information on using the GetLifecyclePolicy
  1335. // API call, and error handling.
  1336. //
  1337. // This method is useful when you want to inject custom logic or configuration
  1338. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1339. //
  1340. //
  1341. // // Example sending a request using the GetLifecyclePolicyRequest method.
  1342. // req, resp := client.GetLifecyclePolicyRequest(params)
  1343. //
  1344. // err := req.Send()
  1345. // if err == nil { // resp is now filled
  1346. // fmt.Println(resp)
  1347. // }
  1348. //
  1349. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicy
  1350. func (c *ECR) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput) {
  1351. op := &request.Operation{
  1352. Name: opGetLifecyclePolicy,
  1353. HTTPMethod: "POST",
  1354. HTTPPath: "/",
  1355. }
  1356. if input == nil {
  1357. input = &GetLifecyclePolicyInput{}
  1358. }
  1359. output = &GetLifecyclePolicyOutput{}
  1360. req = c.newRequest(op, input, output)
  1361. return
  1362. }
  1363. // GetLifecyclePolicy API operation for Amazon EC2 Container Registry.
  1364. //
  1365. // Retrieves the specified lifecycle policy.
  1366. //
  1367. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1368. // with awserr.Error's Code and Message methods to get detailed information about
  1369. // the error.
  1370. //
  1371. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1372. // API operation GetLifecyclePolicy for usage and error information.
  1373. //
  1374. // Returned Error Types:
  1375. // * ServerException
  1376. // These errors are usually caused by a server-side issue.
  1377. //
  1378. // * InvalidParameterException
  1379. // The specified parameter is invalid. Review the available parameters for the
  1380. // API request.
  1381. //
  1382. // * RepositoryNotFoundException
  1383. // The specified repository could not be found. Check the spelling of the specified
  1384. // repository and ensure that you are performing operations on the correct registry.
  1385. //
  1386. // * LifecyclePolicyNotFoundException
  1387. // The lifecycle policy could not be found, and no policy is set to the repository.
  1388. //
  1389. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicy
  1390. func (c *ECR) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error) {
  1391. req, out := c.GetLifecyclePolicyRequest(input)
  1392. return out, req.Send()
  1393. }
  1394. // GetLifecyclePolicyWithContext is the same as GetLifecyclePolicy with the addition of
  1395. // the ability to pass a context and additional request options.
  1396. //
  1397. // See GetLifecyclePolicy for details on how to use this API operation.
  1398. //
  1399. // The context must be non-nil and will be used for request cancellation. If
  1400. // the context is nil a panic will occur. In the future the SDK may create
  1401. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1402. // for more information on using Contexts.
  1403. func (c *ECR) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error) {
  1404. req, out := c.GetLifecyclePolicyRequest(input)
  1405. req.SetContext(ctx)
  1406. req.ApplyOptions(opts...)
  1407. return out, req.Send()
  1408. }
  1409. const opGetLifecyclePolicyPreview = "GetLifecyclePolicyPreview"
  1410. // GetLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the
  1411. // client's request for the GetLifecyclePolicyPreview operation. The "output" return
  1412. // value will be populated with the request's response once the request completes
  1413. // successfully.
  1414. //
  1415. // Use "Send" method on the returned Request to send the API call to the service.
  1416. // the "output" return value is not valid until after Send returns without error.
  1417. //
  1418. // See GetLifecyclePolicyPreview for more information on using the GetLifecyclePolicyPreview
  1419. // API call, and error handling.
  1420. //
  1421. // This method is useful when you want to inject custom logic or configuration
  1422. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1423. //
  1424. //
  1425. // // Example sending a request using the GetLifecyclePolicyPreviewRequest method.
  1426. // req, resp := client.GetLifecyclePolicyPreviewRequest(params)
  1427. //
  1428. // err := req.Send()
  1429. // if err == nil { // resp is now filled
  1430. // fmt.Println(resp)
  1431. // }
  1432. //
  1433. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreview
  1434. func (c *ECR) GetLifecyclePolicyPreviewRequest(input *GetLifecyclePolicyPreviewInput) (req *request.Request, output *GetLifecyclePolicyPreviewOutput) {
  1435. op := &request.Operation{
  1436. Name: opGetLifecyclePolicyPreview,
  1437. HTTPMethod: "POST",
  1438. HTTPPath: "/",
  1439. Paginator: &request.Paginator{
  1440. InputTokens: []string{"nextToken"},
  1441. OutputTokens: []string{"nextToken"},
  1442. LimitToken: "maxResults",
  1443. TruncationToken: "",
  1444. },
  1445. }
  1446. if input == nil {
  1447. input = &GetLifecyclePolicyPreviewInput{}
  1448. }
  1449. output = &GetLifecyclePolicyPreviewOutput{}
  1450. req = c.newRequest(op, input, output)
  1451. return
  1452. }
  1453. // GetLifecyclePolicyPreview API operation for Amazon EC2 Container Registry.
  1454. //
  1455. // Retrieves the results of the specified lifecycle policy preview request.
  1456. //
  1457. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1458. // with awserr.Error's Code and Message methods to get detailed information about
  1459. // the error.
  1460. //
  1461. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1462. // API operation GetLifecyclePolicyPreview for usage and error information.
  1463. //
  1464. // Returned Error Types:
  1465. // * ServerException
  1466. // These errors are usually caused by a server-side issue.
  1467. //
  1468. // * InvalidParameterException
  1469. // The specified parameter is invalid. Review the available parameters for the
  1470. // API request.
  1471. //
  1472. // * RepositoryNotFoundException
  1473. // The specified repository could not be found. Check the spelling of the specified
  1474. // repository and ensure that you are performing operations on the correct registry.
  1475. //
  1476. // * LifecyclePolicyPreviewNotFoundException
  1477. // There is no dry run for this repository.
  1478. //
  1479. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreview
  1480. func (c *ECR) GetLifecyclePolicyPreview(input *GetLifecyclePolicyPreviewInput) (*GetLifecyclePolicyPreviewOutput, error) {
  1481. req, out := c.GetLifecyclePolicyPreviewRequest(input)
  1482. return out, req.Send()
  1483. }
  1484. // GetLifecyclePolicyPreviewWithContext is the same as GetLifecyclePolicyPreview with the addition of
  1485. // the ability to pass a context and additional request options.
  1486. //
  1487. // See GetLifecyclePolicyPreview for details on how to use this API operation.
  1488. //
  1489. // The context must be non-nil and will be used for request cancellation. If
  1490. // the context is nil a panic will occur. In the future the SDK may create
  1491. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1492. // for more information on using Contexts.
  1493. func (c *ECR) GetLifecyclePolicyPreviewWithContext(ctx aws.Context, input *GetLifecyclePolicyPreviewInput, opts ...request.Option) (*GetLifecyclePolicyPreviewOutput, error) {
  1494. req, out := c.GetLifecyclePolicyPreviewRequest(input)
  1495. req.SetContext(ctx)
  1496. req.ApplyOptions(opts...)
  1497. return out, req.Send()
  1498. }
  1499. // GetLifecyclePolicyPreviewPages iterates over the pages of a GetLifecyclePolicyPreview operation,
  1500. // calling the "fn" function with the response data for each page. To stop
  1501. // iterating, return false from the fn function.
  1502. //
  1503. // See GetLifecyclePolicyPreview method for more information on how to use this operation.
  1504. //
  1505. // Note: This operation can generate multiple requests to a service.
  1506. //
  1507. // // Example iterating over at most 3 pages of a GetLifecyclePolicyPreview operation.
  1508. // pageNum := 0
  1509. // err := client.GetLifecyclePolicyPreviewPages(params,
  1510. // func(page *ecr.GetLifecyclePolicyPreviewOutput, lastPage bool) bool {
  1511. // pageNum++
  1512. // fmt.Println(page)
  1513. // return pageNum <= 3
  1514. // })
  1515. //
  1516. func (c *ECR) GetLifecyclePolicyPreviewPages(input *GetLifecyclePolicyPreviewInput, fn func(*GetLifecyclePolicyPreviewOutput, bool) bool) error {
  1517. return c.GetLifecyclePolicyPreviewPagesWithContext(aws.BackgroundContext(), input, fn)
  1518. }
  1519. // GetLifecyclePolicyPreviewPagesWithContext same as GetLifecyclePolicyPreviewPages except
  1520. // it takes a Context and allows setting request options on the pages.
  1521. //
  1522. // The context must be non-nil and will be used for request cancellation. If
  1523. // the context is nil a panic will occur. In the future the SDK may create
  1524. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1525. // for more information on using Contexts.
  1526. func (c *ECR) GetLifecyclePolicyPreviewPagesWithContext(ctx aws.Context, input *GetLifecyclePolicyPreviewInput, fn func(*GetLifecyclePolicyPreviewOutput, bool) bool, opts ...request.Option) error {
  1527. p := request.Pagination{
  1528. NewRequest: func() (*request.Request, error) {
  1529. var inCpy *GetLifecyclePolicyPreviewInput
  1530. if input != nil {
  1531. tmp := *input
  1532. inCpy = &tmp
  1533. }
  1534. req, _ := c.GetLifecyclePolicyPreviewRequest(inCpy)
  1535. req.SetContext(ctx)
  1536. req.ApplyOptions(opts...)
  1537. return req, nil
  1538. },
  1539. }
  1540. for p.Next() {
  1541. if !fn(p.Page().(*GetLifecyclePolicyPreviewOutput), !p.HasNextPage()) {
  1542. break
  1543. }
  1544. }
  1545. return p.Err()
  1546. }
  1547. const opGetRepositoryPolicy = "GetRepositoryPolicy"
  1548. // GetRepositoryPolicyRequest generates a "aws/request.Request" representing the
  1549. // client's request for the GetRepositoryPolicy operation. The "output" return
  1550. // value will be populated with the request's response once the request completes
  1551. // successfully.
  1552. //
  1553. // Use "Send" method on the returned Request to send the API call to the service.
  1554. // the "output" return value is not valid until after Send returns without error.
  1555. //
  1556. // See GetRepositoryPolicy for more information on using the GetRepositoryPolicy
  1557. // API call, and error handling.
  1558. //
  1559. // This method is useful when you want to inject custom logic or configuration
  1560. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1561. //
  1562. //
  1563. // // Example sending a request using the GetRepositoryPolicyRequest method.
  1564. // req, resp := client.GetRepositoryPolicyRequest(params)
  1565. //
  1566. // err := req.Send()
  1567. // if err == nil { // resp is now filled
  1568. // fmt.Println(resp)
  1569. // }
  1570. //
  1571. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicy
  1572. func (c *ECR) GetRepositoryPolicyRequest(input *GetRepositoryPolicyInput) (req *request.Request, output *GetRepositoryPolicyOutput) {
  1573. op := &request.Operation{
  1574. Name: opGetRepositoryPolicy,
  1575. HTTPMethod: "POST",
  1576. HTTPPath: "/",
  1577. }
  1578. if input == nil {
  1579. input = &GetRepositoryPolicyInput{}
  1580. }
  1581. output = &GetRepositoryPolicyOutput{}
  1582. req = c.newRequest(op, input, output)
  1583. return
  1584. }
  1585. // GetRepositoryPolicy API operation for Amazon EC2 Container Registry.
  1586. //
  1587. // Retrieves the repository policy for a specified repository.
  1588. //
  1589. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1590. // with awserr.Error's Code and Message methods to get detailed information about
  1591. // the error.
  1592. //
  1593. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1594. // API operation GetRepositoryPolicy for usage and error information.
  1595. //
  1596. // Returned Error Types:
  1597. // * ServerException
  1598. // These errors are usually caused by a server-side issue.
  1599. //
  1600. // * InvalidParameterException
  1601. // The specified parameter is invalid. Review the available parameters for the
  1602. // API request.
  1603. //
  1604. // * RepositoryNotFoundException
  1605. // The specified repository could not be found. Check the spelling of the specified
  1606. // repository and ensure that you are performing operations on the correct registry.
  1607. //
  1608. // * RepositoryPolicyNotFoundException
  1609. // The specified repository and registry combination does not have an associated
  1610. // repository policy.
  1611. //
  1612. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicy
  1613. func (c *ECR) GetRepositoryPolicy(input *GetRepositoryPolicyInput) (*GetRepositoryPolicyOutput, error) {
  1614. req, out := c.GetRepositoryPolicyRequest(input)
  1615. return out, req.Send()
  1616. }
  1617. // GetRepositoryPolicyWithContext is the same as GetRepositoryPolicy with the addition of
  1618. // the ability to pass a context and additional request options.
  1619. //
  1620. // See GetRepositoryPolicy for details on how to use this API operation.
  1621. //
  1622. // The context must be non-nil and will be used for request cancellation. If
  1623. // the context is nil a panic will occur. In the future the SDK may create
  1624. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1625. // for more information on using Contexts.
  1626. func (c *ECR) GetRepositoryPolicyWithContext(ctx aws.Context, input *GetRepositoryPolicyInput, opts ...request.Option) (*GetRepositoryPolicyOutput, error) {
  1627. req, out := c.GetRepositoryPolicyRequest(input)
  1628. req.SetContext(ctx)
  1629. req.ApplyOptions(opts...)
  1630. return out, req.Send()
  1631. }
  1632. const opInitiateLayerUpload = "InitiateLayerUpload"
  1633. // InitiateLayerUploadRequest generates a "aws/request.Request" representing the
  1634. // client's request for the InitiateLayerUpload operation. The "output" return
  1635. // value will be populated with the request's response once the request completes
  1636. // successfully.
  1637. //
  1638. // Use "Send" method on the returned Request to send the API call to the service.
  1639. // the "output" return value is not valid until after Send returns without error.
  1640. //
  1641. // See InitiateLayerUpload for more information on using the InitiateLayerUpload
  1642. // API call, and error handling.
  1643. //
  1644. // This method is useful when you want to inject custom logic or configuration
  1645. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1646. //
  1647. //
  1648. // // Example sending a request using the InitiateLayerUploadRequest method.
  1649. // req, resp := client.InitiateLayerUploadRequest(params)
  1650. //
  1651. // err := req.Send()
  1652. // if err == nil { // resp is now filled
  1653. // fmt.Println(resp)
  1654. // }
  1655. //
  1656. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUpload
  1657. func (c *ECR) InitiateLayerUploadRequest(input *InitiateLayerUploadInput) (req *request.Request, output *InitiateLayerUploadOutput) {
  1658. op := &request.Operation{
  1659. Name: opInitiateLayerUpload,
  1660. HTTPMethod: "POST",
  1661. HTTPPath: "/",
  1662. }
  1663. if input == nil {
  1664. input = &InitiateLayerUploadInput{}
  1665. }
  1666. output = &InitiateLayerUploadOutput{}
  1667. req = c.newRequest(op, input, output)
  1668. return
  1669. }
  1670. // InitiateLayerUpload API operation for Amazon EC2 Container Registry.
  1671. //
  1672. // Notify Amazon ECR that you intend to upload an image layer.
  1673. //
  1674. // This operation is used by the Amazon ECR proxy, and it is not intended for
  1675. // general use by customers for pulling and pushing images. In most cases, you
  1676. // should use the docker CLI to pull, tag, and push images.
  1677. //
  1678. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1679. // with awserr.Error's Code and Message methods to get detailed information about
  1680. // the error.
  1681. //
  1682. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1683. // API operation InitiateLayerUpload for usage and error information.
  1684. //
  1685. // Returned Error Types:
  1686. // * ServerException
  1687. // These errors are usually caused by a server-side issue.
  1688. //
  1689. // * InvalidParameterException
  1690. // The specified parameter is invalid. Review the available parameters for the
  1691. // API request.
  1692. //
  1693. // * RepositoryNotFoundException
  1694. // The specified repository could not be found. Check the spelling of the specified
  1695. // repository and ensure that you are performing operations on the correct registry.
  1696. //
  1697. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUpload
  1698. func (c *ECR) InitiateLayerUpload(input *InitiateLayerUploadInput) (*InitiateLayerUploadOutput, error) {
  1699. req, out := c.InitiateLayerUploadRequest(input)
  1700. return out, req.Send()
  1701. }
  1702. // InitiateLayerUploadWithContext is the same as InitiateLayerUpload with the addition of
  1703. // the ability to pass a context and additional request options.
  1704. //
  1705. // See InitiateLayerUpload for details on how to use this API operation.
  1706. //
  1707. // The context must be non-nil and will be used for request cancellation. If
  1708. // the context is nil a panic will occur. In the future the SDK may create
  1709. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1710. // for more information on using Contexts.
  1711. func (c *ECR) InitiateLayerUploadWithContext(ctx aws.Context, input *InitiateLayerUploadInput, opts ...request.Option) (*InitiateLayerUploadOutput, error) {
  1712. req, out := c.InitiateLayerUploadRequest(input)
  1713. req.SetContext(ctx)
  1714. req.ApplyOptions(opts...)
  1715. return out, req.Send()
  1716. }
  1717. const opListImages = "ListImages"
  1718. // ListImagesRequest generates a "aws/request.Request" representing the
  1719. // client's request for the ListImages operation. The "output" return
  1720. // value will be populated with the request's response once the request completes
  1721. // successfully.
  1722. //
  1723. // Use "Send" method on the returned Request to send the API call to the service.
  1724. // the "output" return value is not valid until after Send returns without error.
  1725. //
  1726. // See ListImages for more information on using the ListImages
  1727. // API call, and error handling.
  1728. //
  1729. // This method is useful when you want to inject custom logic or configuration
  1730. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1731. //
  1732. //
  1733. // // Example sending a request using the ListImagesRequest method.
  1734. // req, resp := client.ListImagesRequest(params)
  1735. //
  1736. // err := req.Send()
  1737. // if err == nil { // resp is now filled
  1738. // fmt.Println(resp)
  1739. // }
  1740. //
  1741. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImages
  1742. func (c *ECR) ListImagesRequest(input *ListImagesInput) (req *request.Request, output *ListImagesOutput) {
  1743. op := &request.Operation{
  1744. Name: opListImages,
  1745. HTTPMethod: "POST",
  1746. HTTPPath: "/",
  1747. Paginator: &request.Paginator{
  1748. InputTokens: []string{"nextToken"},
  1749. OutputTokens: []string{"nextToken"},
  1750. LimitToken: "maxResults",
  1751. TruncationToken: "",
  1752. },
  1753. }
  1754. if input == nil {
  1755. input = &ListImagesInput{}
  1756. }
  1757. output = &ListImagesOutput{}
  1758. req = c.newRequest(op, input, output)
  1759. return
  1760. }
  1761. // ListImages API operation for Amazon EC2 Container Registry.
  1762. //
  1763. // Lists all the image IDs for a given repository.
  1764. //
  1765. // You can filter images based on whether or not they are tagged by setting
  1766. // the tagStatus parameter to TAGGED or UNTAGGED. For example, you can filter
  1767. // your results to return only UNTAGGED images and then pipe that result to
  1768. // a BatchDeleteImage operation to delete them. Or, you can filter your results
  1769. // to return only TAGGED images to list all of the tags in your repository.
  1770. //
  1771. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1772. // with awserr.Error's Code and Message methods to get detailed information about
  1773. // the error.
  1774. //
  1775. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1776. // API operation ListImages for usage and error information.
  1777. //
  1778. // Returned Error Types:
  1779. // * ServerException
  1780. // These errors are usually caused by a server-side issue.
  1781. //
  1782. // * InvalidParameterException
  1783. // The specified parameter is invalid. Review the available parameters for the
  1784. // API request.
  1785. //
  1786. // * RepositoryNotFoundException
  1787. // The specified repository could not be found. Check the spelling of the specified
  1788. // repository and ensure that you are performing operations on the correct registry.
  1789. //
  1790. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImages
  1791. func (c *ECR) ListImages(input *ListImagesInput) (*ListImagesOutput, error) {
  1792. req, out := c.ListImagesRequest(input)
  1793. return out, req.Send()
  1794. }
  1795. // ListImagesWithContext is the same as ListImages with the addition of
  1796. // the ability to pass a context and additional request options.
  1797. //
  1798. // See ListImages for details on how to use this API operation.
  1799. //
  1800. // The context must be non-nil and will be used for request cancellation. If
  1801. // the context is nil a panic will occur. In the future the SDK may create
  1802. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1803. // for more information on using Contexts.
  1804. func (c *ECR) ListImagesWithContext(ctx aws.Context, input *ListImagesInput, opts ...request.Option) (*ListImagesOutput, error) {
  1805. req, out := c.ListImagesRequest(input)
  1806. req.SetContext(ctx)
  1807. req.ApplyOptions(opts...)
  1808. return out, req.Send()
  1809. }
  1810. // ListImagesPages iterates over the pages of a ListImages operation,
  1811. // calling the "fn" function with the response data for each page. To stop
  1812. // iterating, return false from the fn function.
  1813. //
  1814. // See ListImages method for more information on how to use this operation.
  1815. //
  1816. // Note: This operation can generate multiple requests to a service.
  1817. //
  1818. // // Example iterating over at most 3 pages of a ListImages operation.
  1819. // pageNum := 0
  1820. // err := client.ListImagesPages(params,
  1821. // func(page *ecr.ListImagesOutput, lastPage bool) bool {
  1822. // pageNum++
  1823. // fmt.Println(page)
  1824. // return pageNum <= 3
  1825. // })
  1826. //
  1827. func (c *ECR) ListImagesPages(input *ListImagesInput, fn func(*ListImagesOutput, bool) bool) error {
  1828. return c.ListImagesPagesWithContext(aws.BackgroundContext(), input, fn)
  1829. }
  1830. // ListImagesPagesWithContext same as ListImagesPages except
  1831. // it takes a Context and allows setting request options on the pages.
  1832. //
  1833. // The context must be non-nil and will be used for request cancellation. If
  1834. // the context is nil a panic will occur. In the future the SDK may create
  1835. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1836. // for more information on using Contexts.
  1837. func (c *ECR) ListImagesPagesWithContext(ctx aws.Context, input *ListImagesInput, fn func(*ListImagesOutput, bool) bool, opts ...request.Option) error {
  1838. p := request.Pagination{
  1839. NewRequest: func() (*request.Request, error) {
  1840. var inCpy *ListImagesInput
  1841. if input != nil {
  1842. tmp := *input
  1843. inCpy = &tmp
  1844. }
  1845. req, _ := c.ListImagesRequest(inCpy)
  1846. req.SetContext(ctx)
  1847. req.ApplyOptions(opts...)
  1848. return req, nil
  1849. },
  1850. }
  1851. for p.Next() {
  1852. if !fn(p.Page().(*ListImagesOutput), !p.HasNextPage()) {
  1853. break
  1854. }
  1855. }
  1856. return p.Err()
  1857. }
  1858. const opListTagsForResource = "ListTagsForResource"
  1859. // ListTagsForResourceRequest generates a "aws/request.Request" representing the
  1860. // client's request for the ListTagsForResource operation. The "output" return
  1861. // value will be populated with the request's response once the request completes
  1862. // successfully.
  1863. //
  1864. // Use "Send" method on the returned Request to send the API call to the service.
  1865. // the "output" return value is not valid until after Send returns without error.
  1866. //
  1867. // See ListTagsForResource for more information on using the ListTagsForResource
  1868. // API call, and error handling.
  1869. //
  1870. // This method is useful when you want to inject custom logic or configuration
  1871. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1872. //
  1873. //
  1874. // // Example sending a request using the ListTagsForResourceRequest method.
  1875. // req, resp := client.ListTagsForResourceRequest(params)
  1876. //
  1877. // err := req.Send()
  1878. // if err == nil { // resp is now filled
  1879. // fmt.Println(resp)
  1880. // }
  1881. //
  1882. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListTagsForResource
  1883. func (c *ECR) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
  1884. op := &request.Operation{
  1885. Name: opListTagsForResource,
  1886. HTTPMethod: "POST",
  1887. HTTPPath: "/",
  1888. }
  1889. if input == nil {
  1890. input = &ListTagsForResourceInput{}
  1891. }
  1892. output = &ListTagsForResourceOutput{}
  1893. req = c.newRequest(op, input, output)
  1894. return
  1895. }
  1896. // ListTagsForResource API operation for Amazon EC2 Container Registry.
  1897. //
  1898. // List the tags for an Amazon ECR resource.
  1899. //
  1900. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1901. // with awserr.Error's Code and Message methods to get detailed information about
  1902. // the error.
  1903. //
  1904. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1905. // API operation ListTagsForResource for usage and error information.
  1906. //
  1907. // Returned Error Types:
  1908. // * InvalidParameterException
  1909. // The specified parameter is invalid. Review the available parameters for the
  1910. // API request.
  1911. //
  1912. // * RepositoryNotFoundException
  1913. // The specified repository could not be found. Check the spelling of the specified
  1914. // repository and ensure that you are performing operations on the correct registry.
  1915. //
  1916. // * ServerException
  1917. // These errors are usually caused by a server-side issue.
  1918. //
  1919. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListTagsForResource
  1920. func (c *ECR) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
  1921. req, out := c.ListTagsForResourceRequest(input)
  1922. return out, req.Send()
  1923. }
  1924. // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
  1925. // the ability to pass a context and additional request options.
  1926. //
  1927. // See ListTagsForResource for details on how to use this API operation.
  1928. //
  1929. // The context must be non-nil and will be used for request cancellation. If
  1930. // the context is nil a panic will occur. In the future the SDK may create
  1931. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1932. // for more information on using Contexts.
  1933. func (c *ECR) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
  1934. req, out := c.ListTagsForResourceRequest(input)
  1935. req.SetContext(ctx)
  1936. req.ApplyOptions(opts...)
  1937. return out, req.Send()
  1938. }
  1939. const opPutImage = "PutImage"
  1940. // PutImageRequest generates a "aws/request.Request" representing the
  1941. // client's request for the PutImage operation. The "output" return
  1942. // value will be populated with the request's response once the request completes
  1943. // successfully.
  1944. //
  1945. // Use "Send" method on the returned Request to send the API call to the service.
  1946. // the "output" return value is not valid until after Send returns without error.
  1947. //
  1948. // See PutImage for more information on using the PutImage
  1949. // API call, and error handling.
  1950. //
  1951. // This method is useful when you want to inject custom logic or configuration
  1952. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1953. //
  1954. //
  1955. // // Example sending a request using the PutImageRequest method.
  1956. // req, resp := client.PutImageRequest(params)
  1957. //
  1958. // err := req.Send()
  1959. // if err == nil { // resp is now filled
  1960. // fmt.Println(resp)
  1961. // }
  1962. //
  1963. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImage
  1964. func (c *ECR) PutImageRequest(input *PutImageInput) (req *request.Request, output *PutImageOutput) {
  1965. op := &request.Operation{
  1966. Name: opPutImage,
  1967. HTTPMethod: "POST",
  1968. HTTPPath: "/",
  1969. }
  1970. if input == nil {
  1971. input = &PutImageInput{}
  1972. }
  1973. output = &PutImageOutput{}
  1974. req = c.newRequest(op, input, output)
  1975. return
  1976. }
  1977. // PutImage API operation for Amazon EC2 Container Registry.
  1978. //
  1979. // Creates or updates the image manifest and tags associated with an image.
  1980. //
  1981. // This operation is used by the Amazon ECR proxy, and it is not intended for
  1982. // general use by customers for pulling and pushing images. In most cases, you
  1983. // should use the docker CLI to pull, tag, and push images.
  1984. //
  1985. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1986. // with awserr.Error's Code and Message methods to get detailed information about
  1987. // the error.
  1988. //
  1989. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1990. // API operation PutImage for usage and error information.
  1991. //
  1992. // Returned Error Types:
  1993. // * ServerException
  1994. // These errors are usually caused by a server-side issue.
  1995. //
  1996. // * InvalidParameterException
  1997. // The specified parameter is invalid. Review the available parameters for the
  1998. // API request.
  1999. //
  2000. // * RepositoryNotFoundException
  2001. // The specified repository could not be found. Check the spelling of the specified
  2002. // repository and ensure that you are performing operations on the correct registry.
  2003. //
  2004. // * ImageAlreadyExistsException
  2005. // The specified image has already been pushed, and there were no changes to
  2006. // the manifest or image tag after the last push.
  2007. //
  2008. // * LayersNotFoundException
  2009. // The specified layers could not be found, or the specified layer is not valid
  2010. // for this repository.
  2011. //
  2012. // * LimitExceededException
  2013. // The operation did not succeed because it would have exceeded a service limit
  2014. // for your account. For more information, see Amazon ECR Default Service Limits
  2015. // (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)
  2016. // in the Amazon Elastic Container Registry User Guide.
  2017. //
  2018. // * ImageTagAlreadyExistsException
  2019. // The specified image is tagged with a tag that already exists. The repository
  2020. // is configured for tag immutability.
  2021. //
  2022. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImage
  2023. func (c *ECR) PutImage(input *PutImageInput) (*PutImageOutput, error) {
  2024. req, out := c.PutImageRequest(input)
  2025. return out, req.Send()
  2026. }
  2027. // PutImageWithContext is the same as PutImage with the addition of
  2028. // the ability to pass a context and additional request options.
  2029. //
  2030. // See PutImage for details on how to use this API operation.
  2031. //
  2032. // The context must be non-nil and will be used for request cancellation. If
  2033. // the context is nil a panic will occur. In the future the SDK may create
  2034. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2035. // for more information on using Contexts.
  2036. func (c *ECR) PutImageWithContext(ctx aws.Context, input *PutImageInput, opts ...request.Option) (*PutImageOutput, error) {
  2037. req, out := c.PutImageRequest(input)
  2038. req.SetContext(ctx)
  2039. req.ApplyOptions(opts...)
  2040. return out, req.Send()
  2041. }
  2042. const opPutImageScanningConfiguration = "PutImageScanningConfiguration"
  2043. // PutImageScanningConfigurationRequest generates a "aws/request.Request" representing the
  2044. // client's request for the PutImageScanningConfiguration operation. The "output" return
  2045. // value will be populated with the request's response once the request completes
  2046. // successfully.
  2047. //
  2048. // Use "Send" method on the returned Request to send the API call to the service.
  2049. // the "output" return value is not valid until after Send returns without error.
  2050. //
  2051. // See PutImageScanningConfiguration for more information on using the PutImageScanningConfiguration
  2052. // API call, and error handling.
  2053. //
  2054. // This method is useful when you want to inject custom logic or configuration
  2055. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2056. //
  2057. //
  2058. // // Example sending a request using the PutImageScanningConfigurationRequest method.
  2059. // req, resp := client.PutImageScanningConfigurationRequest(params)
  2060. //
  2061. // err := req.Send()
  2062. // if err == nil { // resp is now filled
  2063. // fmt.Println(resp)
  2064. // }
  2065. //
  2066. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageScanningConfiguration
  2067. func (c *ECR) PutImageScanningConfigurationRequest(input *PutImageScanningConfigurationInput) (req *request.Request, output *PutImageScanningConfigurationOutput) {
  2068. op := &request.Operation{
  2069. Name: opPutImageScanningConfiguration,
  2070. HTTPMethod: "POST",
  2071. HTTPPath: "/",
  2072. }
  2073. if input == nil {
  2074. input = &PutImageScanningConfigurationInput{}
  2075. }
  2076. output = &PutImageScanningConfigurationOutput{}
  2077. req = c.newRequest(op, input, output)
  2078. return
  2079. }
  2080. // PutImageScanningConfiguration API operation for Amazon EC2 Container Registry.
  2081. //
  2082. // Updates the image scanning configuration for a repository.
  2083. //
  2084. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2085. // with awserr.Error's Code and Message methods to get detailed information about
  2086. // the error.
  2087. //
  2088. // See the AWS API reference guide for Amazon EC2 Container Registry's
  2089. // API operation PutImageScanningConfiguration for usage and error information.
  2090. //
  2091. // Returned Error Types:
  2092. // * ServerException
  2093. // These errors are usually caused by a server-side issue.
  2094. //
  2095. // * InvalidParameterException
  2096. // The specified parameter is invalid. Review the available parameters for the
  2097. // API request.
  2098. //
  2099. // * RepositoryNotFoundException
  2100. // The specified repository could not be found. Check the spelling of the specified
  2101. // repository and ensure that you are performing operations on the correct registry.
  2102. //
  2103. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageScanningConfiguration
  2104. func (c *ECR) PutImageScanningConfiguration(input *PutImageScanningConfigurationInput) (*PutImageScanningConfigurationOutput, error) {
  2105. req, out := c.PutImageScanningConfigurationRequest(input)
  2106. return out, req.Send()
  2107. }
  2108. // PutImageScanningConfigurationWithContext is the same as PutImageScanningConfiguration with the addition of
  2109. // the ability to pass a context and additional request options.
  2110. //
  2111. // See PutImageScanningConfiguration for details on how to use this API operation.
  2112. //
  2113. // The context must be non-nil and will be used for request cancellation. If
  2114. // the context is nil a panic will occur. In the future the SDK may create
  2115. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2116. // for more information on using Contexts.
  2117. func (c *ECR) PutImageScanningConfigurationWithContext(ctx aws.Context, input *PutImageScanningConfigurationInput, opts ...request.Option) (*PutImageScanningConfigurationOutput, error) {
  2118. req, out := c.PutImageScanningConfigurationRequest(input)
  2119. req.SetContext(ctx)
  2120. req.ApplyOptions(opts...)
  2121. return out, req.Send()
  2122. }
  2123. const opPutImageTagMutability = "PutImageTagMutability"
  2124. // PutImageTagMutabilityRequest generates a "aws/request.Request" representing the
  2125. // client's request for the PutImageTagMutability operation. The "output" return
  2126. // value will be populated with the request's response once the request completes
  2127. // successfully.
  2128. //
  2129. // Use "Send" method on the returned Request to send the API call to the service.
  2130. // the "output" return value is not valid until after Send returns without error.
  2131. //
  2132. // See PutImageTagMutability for more information on using the PutImageTagMutability
  2133. // API call, and error handling.
  2134. //
  2135. // This method is useful when you want to inject custom logic or configuration
  2136. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2137. //
  2138. //
  2139. // // Example sending a request using the PutImageTagMutabilityRequest method.
  2140. // req, resp := client.PutImageTagMutabilityRequest(params)
  2141. //
  2142. // err := req.Send()
  2143. // if err == nil { // resp is now filled
  2144. // fmt.Println(resp)
  2145. // }
  2146. //
  2147. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageTagMutability
  2148. func (c *ECR) PutImageTagMutabilityRequest(input *PutImageTagMutabilityInput) (req *request.Request, output *PutImageTagMutabilityOutput) {
  2149. op := &request.Operation{
  2150. Name: opPutImageTagMutability,
  2151. HTTPMethod: "POST",
  2152. HTTPPath: "/",
  2153. }
  2154. if input == nil {
  2155. input = &PutImageTagMutabilityInput{}
  2156. }
  2157. output = &PutImageTagMutabilityOutput{}
  2158. req = c.newRequest(op, input, output)
  2159. return
  2160. }
  2161. // PutImageTagMutability API operation for Amazon EC2 Container Registry.
  2162. //
  2163. // Updates the image tag mutability settings for a repository. When a repository
  2164. // is configured with tag immutability, all image tags within the repository
  2165. // will be prevented them from being overwritten. For more information, see
  2166. // Image Tag Mutability (https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-tag-mutability.html)
  2167. // in the Amazon Elastic Container Registry User Guide.
  2168. //
  2169. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2170. // with awserr.Error's Code and Message methods to get detailed information about
  2171. // the error.
  2172. //
  2173. // See the AWS API reference guide for Amazon EC2 Container Registry's
  2174. // API operation PutImageTagMutability for usage and error information.
  2175. //
  2176. // Returned Error Types:
  2177. // * ServerException
  2178. // These errors are usually caused by a server-side issue.
  2179. //
  2180. // * InvalidParameterException
  2181. // The specified parameter is invalid. Review the available parameters for the
  2182. // API request.
  2183. //
  2184. // * RepositoryNotFoundException
  2185. // The specified repository could not be found. Check the spelling of the specified
  2186. // repository and ensure that you are performing operations on the correct registry.
  2187. //
  2188. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageTagMutability
  2189. func (c *ECR) PutImageTagMutability(input *PutImageTagMutabilityInput) (*PutImageTagMutabilityOutput, error) {
  2190. req, out := c.PutImageTagMutabilityRequest(input)
  2191. return out, req.Send()
  2192. }
  2193. // PutImageTagMutabilityWithContext is the same as PutImageTagMutability with the addition of
  2194. // the ability to pass a context and additional request options.
  2195. //
  2196. // See PutImageTagMutability for details on how to use this API operation.
  2197. //
  2198. // The context must be non-nil and will be used for request cancellation. If
  2199. // the context is nil a panic will occur. In the future the SDK may create
  2200. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2201. // for more information on using Contexts.
  2202. func (c *ECR) PutImageTagMutabilityWithContext(ctx aws.Context, input *PutImageTagMutabilityInput, opts ...request.Option) (*PutImageTagMutabilityOutput, error) {
  2203. req, out := c.PutImageTagMutabilityRequest(input)
  2204. req.SetContext(ctx)
  2205. req.ApplyOptions(opts...)
  2206. return out, req.Send()
  2207. }
  2208. const opPutLifecyclePolicy = "PutLifecyclePolicy"
  2209. // PutLifecyclePolicyRequest generates a "aws/request.Request" representing the
  2210. // client's request for the PutLifecyclePolicy operation. The "output" return
  2211. // value will be populated with the request's response once the request completes
  2212. // successfully.
  2213. //
  2214. // Use "Send" method on the returned Request to send the API call to the service.
  2215. // the "output" return value is not valid until after Send returns without error.
  2216. //
  2217. // See PutLifecyclePolicy for more information on using the PutLifecyclePolicy
  2218. // API call, and error handling.
  2219. //
  2220. // This method is useful when you want to inject custom logic or configuration
  2221. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2222. //
  2223. //
  2224. // // Example sending a request using the PutLifecyclePolicyRequest method.
  2225. // req, resp := client.PutLifecyclePolicyRequest(params)
  2226. //
  2227. // err := req.Send()
  2228. // if err == nil { // resp is now filled
  2229. // fmt.Println(resp)
  2230. // }
  2231. //
  2232. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicy
  2233. func (c *ECR) PutLifecyclePolicyRequest(input *PutLifecyclePolicyInput) (req *request.Request, output *PutLifecyclePolicyOutput) {
  2234. op := &request.Operation{
  2235. Name: opPutLifecyclePolicy,
  2236. HTTPMethod: "POST",
  2237. HTTPPath: "/",
  2238. }
  2239. if input == nil {
  2240. input = &PutLifecyclePolicyInput{}
  2241. }
  2242. output = &PutLifecyclePolicyOutput{}
  2243. req = c.newRequest(op, input, output)
  2244. return
  2245. }
  2246. // PutLifecyclePolicy API operation for Amazon EC2 Container Registry.
  2247. //
  2248. // Creates or updates a lifecycle policy. For information about lifecycle policy
  2249. // syntax, see Lifecycle Policy Template (https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html).
  2250. //
  2251. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2252. // with awserr.Error's Code and Message methods to get detailed information about
  2253. // the error.
  2254. //
  2255. // See the AWS API reference guide for Amazon EC2 Container Registry's
  2256. // API operation PutLifecyclePolicy for usage and error information.
  2257. //
  2258. // Returned Error Types:
  2259. // * ServerException
  2260. // These errors are usually caused by a server-side issue.
  2261. //
  2262. // * InvalidParameterException
  2263. // The specified parameter is invalid. Review the available parameters for the
  2264. // API request.
  2265. //
  2266. // * RepositoryNotFoundException
  2267. // The specified repository could not be found. Check the spelling of the specified
  2268. // repository and ensure that you are performing operations on the correct registry.
  2269. //
  2270. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicy
  2271. func (c *ECR) PutLifecyclePolicy(input *PutLifecyclePolicyInput) (*PutLifecyclePolicyOutput, error) {
  2272. req, out := c.PutLifecyclePolicyRequest(input)
  2273. return out, req.Send()
  2274. }
  2275. // PutLifecyclePolicyWithContext is the same as PutLifecyclePolicy with the addition of
  2276. // the ability to pass a context and additional request options.
  2277. //
  2278. // See PutLifecyclePolicy for details on how to use this API operation.
  2279. //
  2280. // The context must be non-nil and will be used for request cancellation. If
  2281. // the context is nil a panic will occur. In the future the SDK may create
  2282. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2283. // for more information on using Contexts.
  2284. func (c *ECR) PutLifecyclePolicyWithContext(ctx aws.Context, input *PutLifecyclePolicyInput, opts ...request.Option) (*PutLifecyclePolicyOutput, error) {
  2285. req, out := c.PutLifecyclePolicyRequest(input)
  2286. req.SetContext(ctx)
  2287. req.ApplyOptions(opts...)
  2288. return out, req.Send()
  2289. }
  2290. const opSetRepositoryPolicy = "SetRepositoryPolicy"
  2291. // SetRepositoryPolicyRequest generates a "aws/request.Request" representing the
  2292. // client's request for the SetRepositoryPolicy operation. The "output" return
  2293. // value will be populated with the request's response once the request completes
  2294. // successfully.
  2295. //
  2296. // Use "Send" method on the returned Request to send the API call to the service.
  2297. // the "output" return value is not valid until after Send returns without error.
  2298. //
  2299. // See SetRepositoryPolicy for more information on using the SetRepositoryPolicy
  2300. // API call, and error handling.
  2301. //
  2302. // This method is useful when you want to inject custom logic or configuration
  2303. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2304. //
  2305. //
  2306. // // Example sending a request using the SetRepositoryPolicyRequest method.
  2307. // req, resp := client.SetRepositoryPolicyRequest(params)
  2308. //
  2309. // err := req.Send()
  2310. // if err == nil { // resp is now filled
  2311. // fmt.Println(resp)
  2312. // }
  2313. //
  2314. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicy
  2315. func (c *ECR) SetRepositoryPolicyRequest(input *SetRepositoryPolicyInput) (req *request.Request, output *SetRepositoryPolicyOutput) {
  2316. op := &request.Operation{
  2317. Name: opSetRepositoryPolicy,
  2318. HTTPMethod: "POST",
  2319. HTTPPath: "/",
  2320. }
  2321. if input == nil {
  2322. input = &SetRepositoryPolicyInput{}
  2323. }
  2324. output = &SetRepositoryPolicyOutput{}
  2325. req = c.newRequest(op, input, output)
  2326. return
  2327. }
  2328. // SetRepositoryPolicy API operation for Amazon EC2 Container Registry.
  2329. //
  2330. // Applies a repository policy on a specified repository to control access permissions.
  2331. // For more information, see Amazon ECR Repository Policies (https://docs.aws.amazon.com/AmazonECR/latest/userguide/RepositoryPolicies.html)
  2332. // in the Amazon Elastic Container Registry User Guide.
  2333. //
  2334. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2335. // with awserr.Error's Code and Message methods to get detailed information about
  2336. // the error.
  2337. //
  2338. // See the AWS API reference guide for Amazon EC2 Container Registry's
  2339. // API operation SetRepositoryPolicy for usage and error information.
  2340. //
  2341. // Returned Error Types:
  2342. // * ServerException
  2343. // These errors are usually caused by a server-side issue.
  2344. //
  2345. // * InvalidParameterException
  2346. // The specified parameter is invalid. Review the available parameters for the
  2347. // API request.
  2348. //
  2349. // * RepositoryNotFoundException
  2350. // The specified repository could not be found. Check the spelling of the specified
  2351. // repository and ensure that you are performing operations on the correct registry.
  2352. //
  2353. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicy
  2354. func (c *ECR) SetRepositoryPolicy(input *SetRepositoryPolicyInput) (*SetRepositoryPolicyOutput, error) {
  2355. req, out := c.SetRepositoryPolicyRequest(input)
  2356. return out, req.Send()
  2357. }
  2358. // SetRepositoryPolicyWithContext is the same as SetRepositoryPolicy with the addition of
  2359. // the ability to pass a context and additional request options.
  2360. //
  2361. // See SetRepositoryPolicy for details on how to use this API operation.
  2362. //
  2363. // The context must be non-nil and will be used for request cancellation. If
  2364. // the context is nil a panic will occur. In the future the SDK may create
  2365. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2366. // for more information on using Contexts.
  2367. func (c *ECR) SetRepositoryPolicyWithContext(ctx aws.Context, input *SetRepositoryPolicyInput, opts ...request.Option) (*SetRepositoryPolicyOutput, error) {
  2368. req, out := c.SetRepositoryPolicyRequest(input)
  2369. req.SetContext(ctx)
  2370. req.ApplyOptions(opts...)
  2371. return out, req.Send()
  2372. }
  2373. const opStartImageScan = "StartImageScan"
  2374. // StartImageScanRequest generates a "aws/request.Request" representing the
  2375. // client's request for the StartImageScan operation. The "output" return
  2376. // value will be populated with the request's response once the request completes
  2377. // successfully.
  2378. //
  2379. // Use "Send" method on the returned Request to send the API call to the service.
  2380. // the "output" return value is not valid until after Send returns without error.
  2381. //
  2382. // See StartImageScan for more information on using the StartImageScan
  2383. // API call, and error handling.
  2384. //
  2385. // This method is useful when you want to inject custom logic or configuration
  2386. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2387. //
  2388. //
  2389. // // Example sending a request using the StartImageScanRequest method.
  2390. // req, resp := client.StartImageScanRequest(params)
  2391. //
  2392. // err := req.Send()
  2393. // if err == nil { // resp is now filled
  2394. // fmt.Println(resp)
  2395. // }
  2396. //
  2397. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartImageScan
  2398. func (c *ECR) StartImageScanRequest(input *StartImageScanInput) (req *request.Request, output *StartImageScanOutput) {
  2399. op := &request.Operation{
  2400. Name: opStartImageScan,
  2401. HTTPMethod: "POST",
  2402. HTTPPath: "/",
  2403. }
  2404. if input == nil {
  2405. input = &StartImageScanInput{}
  2406. }
  2407. output = &StartImageScanOutput{}
  2408. req = c.newRequest(op, input, output)
  2409. return
  2410. }
  2411. // StartImageScan API operation for Amazon EC2 Container Registry.
  2412. //
  2413. // Starts an image vulnerability scan. An image scan can only be started once
  2414. // per day on an individual image. This limit includes if an image was scanned
  2415. // on initial push. For more information, see Image Scanning (https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html)
  2416. // in the Amazon Elastic Container Registry User Guide.
  2417. //
  2418. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2419. // with awserr.Error's Code and Message methods to get detailed information about
  2420. // the error.
  2421. //
  2422. // See the AWS API reference guide for Amazon EC2 Container Registry's
  2423. // API operation StartImageScan for usage and error information.
  2424. //
  2425. // Returned Error Types:
  2426. // * ServerException
  2427. // These errors are usually caused by a server-side issue.
  2428. //
  2429. // * InvalidParameterException
  2430. // The specified parameter is invalid. Review the available parameters for the
  2431. // API request.
  2432. //
  2433. // * RepositoryNotFoundException
  2434. // The specified repository could not be found. Check the spelling of the specified
  2435. // repository and ensure that you are performing operations on the correct registry.
  2436. //
  2437. // * ImageNotFoundException
  2438. // The image requested does not exist in the specified repository.
  2439. //
  2440. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartImageScan
  2441. func (c *ECR) StartImageScan(input *StartImageScanInput) (*StartImageScanOutput, error) {
  2442. req, out := c.StartImageScanRequest(input)
  2443. return out, req.Send()
  2444. }
  2445. // StartImageScanWithContext is the same as StartImageScan with the addition of
  2446. // the ability to pass a context and additional request options.
  2447. //
  2448. // See StartImageScan for details on how to use this API operation.
  2449. //
  2450. // The context must be non-nil and will be used for request cancellation. If
  2451. // the context is nil a panic will occur. In the future the SDK may create
  2452. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2453. // for more information on using Contexts.
  2454. func (c *ECR) StartImageScanWithContext(ctx aws.Context, input *StartImageScanInput, opts ...request.Option) (*StartImageScanOutput, error) {
  2455. req, out := c.StartImageScanRequest(input)
  2456. req.SetContext(ctx)
  2457. req.ApplyOptions(opts...)
  2458. return out, req.Send()
  2459. }
  2460. const opStartLifecyclePolicyPreview = "StartLifecyclePolicyPreview"
  2461. // StartLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the
  2462. // client's request for the StartLifecyclePolicyPreview operation. The "output" return
  2463. // value will be populated with the request's response once the request completes
  2464. // successfully.
  2465. //
  2466. // Use "Send" method on the returned Request to send the API call to the service.
  2467. // the "output" return value is not valid until after Send returns without error.
  2468. //
  2469. // See StartLifecyclePolicyPreview for more information on using the StartLifecyclePolicyPreview
  2470. // API call, and error handling.
  2471. //
  2472. // This method is useful when you want to inject custom logic or configuration
  2473. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2474. //
  2475. //
  2476. // // Example sending a request using the StartLifecyclePolicyPreviewRequest method.
  2477. // req, resp := client.StartLifecyclePolicyPreviewRequest(params)
  2478. //
  2479. // err := req.Send()
  2480. // if err == nil { // resp is now filled
  2481. // fmt.Println(resp)
  2482. // }
  2483. //
  2484. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview
  2485. func (c *ECR) StartLifecyclePolicyPreviewRequest(input *StartLifecyclePolicyPreviewInput) (req *request.Request, output *StartLifecyclePolicyPreviewOutput) {
  2486. op := &request.Operation{
  2487. Name: opStartLifecyclePolicyPreview,
  2488. HTTPMethod: "POST",
  2489. HTTPPath: "/",
  2490. }
  2491. if input == nil {
  2492. input = &StartLifecyclePolicyPreviewInput{}
  2493. }
  2494. output = &StartLifecyclePolicyPreviewOutput{}
  2495. req = c.newRequest(op, input, output)
  2496. return
  2497. }
  2498. // StartLifecyclePolicyPreview API operation for Amazon EC2 Container Registry.
  2499. //
  2500. // Starts a preview of the specified lifecycle policy. This allows you to see
  2501. // the results before creating the lifecycle policy.
  2502. //
  2503. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2504. // with awserr.Error's Code and Message methods to get detailed information about
  2505. // the error.
  2506. //
  2507. // See the AWS API reference guide for Amazon EC2 Container Registry's
  2508. // API operation StartLifecyclePolicyPreview for usage and error information.
  2509. //
  2510. // Returned Error Types:
  2511. // * ServerException
  2512. // These errors are usually caused by a server-side issue.
  2513. //
  2514. // * InvalidParameterException
  2515. // The specified parameter is invalid. Review the available parameters for the
  2516. // API request.
  2517. //
  2518. // * RepositoryNotFoundException
  2519. // The specified repository could not be found. Check the spelling of the specified
  2520. // repository and ensure that you are performing operations on the correct registry.
  2521. //
  2522. // * LifecyclePolicyNotFoundException
  2523. // The lifecycle policy could not be found, and no policy is set to the repository.
  2524. //
  2525. // * LifecyclePolicyPreviewInProgressException
  2526. // The previous lifecycle policy preview request has not completed. Please try
  2527. // again later.
  2528. //
  2529. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview
  2530. func (c *ECR) StartLifecyclePolicyPreview(input *StartLifecyclePolicyPreviewInput) (*StartLifecyclePolicyPreviewOutput, error) {
  2531. req, out := c.StartLifecyclePolicyPreviewRequest(input)
  2532. return out, req.Send()
  2533. }
  2534. // StartLifecyclePolicyPreviewWithContext is the same as StartLifecyclePolicyPreview with the addition of
  2535. // the ability to pass a context and additional request options.
  2536. //
  2537. // See StartLifecyclePolicyPreview for details on how to use this API operation.
  2538. //
  2539. // The context must be non-nil and will be used for request cancellation. If
  2540. // the context is nil a panic will occur. In the future the SDK may create
  2541. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2542. // for more information on using Contexts.
  2543. func (c *ECR) StartLifecyclePolicyPreviewWithContext(ctx aws.Context, input *StartLifecyclePolicyPreviewInput, opts ...request.Option) (*StartLifecyclePolicyPreviewOutput, error) {
  2544. req, out := c.StartLifecyclePolicyPreviewRequest(input)
  2545. req.SetContext(ctx)
  2546. req.ApplyOptions(opts...)
  2547. return out, req.Send()
  2548. }
  2549. const opTagResource = "TagResource"
  2550. // TagResourceRequest generates a "aws/request.Request" representing the
  2551. // client's request for the TagResource operation. The "output" return
  2552. // value will be populated with the request's response once the request completes
  2553. // successfully.
  2554. //
  2555. // Use "Send" method on the returned Request to send the API call to the service.
  2556. // the "output" return value is not valid until after Send returns without error.
  2557. //
  2558. // See TagResource for more information on using the TagResource
  2559. // API call, and error handling.
  2560. //
  2561. // This method is useful when you want to inject custom logic or configuration
  2562. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2563. //
  2564. //
  2565. // // Example sending a request using the TagResourceRequest method.
  2566. // req, resp := client.TagResourceRequest(params)
  2567. //
  2568. // err := req.Send()
  2569. // if err == nil { // resp is now filled
  2570. // fmt.Println(resp)
  2571. // }
  2572. //
  2573. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TagResource
  2574. func (c *ECR) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
  2575. op := &request.Operation{
  2576. Name: opTagResource,
  2577. HTTPMethod: "POST",
  2578. HTTPPath: "/",
  2579. }
  2580. if input == nil {
  2581. input = &TagResourceInput{}
  2582. }
  2583. output = &TagResourceOutput{}
  2584. req = c.newRequest(op, input, output)
  2585. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2586. return
  2587. }
  2588. // TagResource API operation for Amazon EC2 Container Registry.
  2589. //
  2590. // Adds specified tags to a resource with the specified ARN. Existing tags on
  2591. // a resource are not changed if they are not specified in the request parameters.
  2592. //
  2593. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2594. // with awserr.Error's Code and Message methods to get detailed information about
  2595. // the error.
  2596. //
  2597. // See the AWS API reference guide for Amazon EC2 Container Registry's
  2598. // API operation TagResource for usage and error information.
  2599. //
  2600. // Returned Error Types:
  2601. // * InvalidParameterException
  2602. // The specified parameter is invalid. Review the available parameters for the
  2603. // API request.
  2604. //
  2605. // * InvalidTagParameterException
  2606. // An invalid parameter has been specified. Tag keys can have a maximum character
  2607. // length of 128 characters, and tag values can have a maximum length of 256
  2608. // characters.
  2609. //
  2610. // * TooManyTagsException
  2611. // The list of tags on the repository is over the limit. The maximum number
  2612. // of tags that can be applied to a repository is 50.
  2613. //
  2614. // * RepositoryNotFoundException
  2615. // The specified repository could not be found. Check the spelling of the specified
  2616. // repository and ensure that you are performing operations on the correct registry.
  2617. //
  2618. // * ServerException
  2619. // These errors are usually caused by a server-side issue.
  2620. //
  2621. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TagResource
  2622. func (c *ECR) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
  2623. req, out := c.TagResourceRequest(input)
  2624. return out, req.Send()
  2625. }
  2626. // TagResourceWithContext is the same as TagResource with the addition of
  2627. // the ability to pass a context and additional request options.
  2628. //
  2629. // See TagResource for details on how to use this API operation.
  2630. //
  2631. // The context must be non-nil and will be used for request cancellation. If
  2632. // the context is nil a panic will occur. In the future the SDK may create
  2633. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2634. // for more information on using Contexts.
  2635. func (c *ECR) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
  2636. req, out := c.TagResourceRequest(input)
  2637. req.SetContext(ctx)
  2638. req.ApplyOptions(opts...)
  2639. return out, req.Send()
  2640. }
  2641. const opUntagResource = "UntagResource"
  2642. // UntagResourceRequest generates a "aws/request.Request" representing the
  2643. // client's request for the UntagResource operation. The "output" return
  2644. // value will be populated with the request's response once the request completes
  2645. // successfully.
  2646. //
  2647. // Use "Send" method on the returned Request to send the API call to the service.
  2648. // the "output" return value is not valid until after Send returns without error.
  2649. //
  2650. // See UntagResource for more information on using the UntagResource
  2651. // API call, and error handling.
  2652. //
  2653. // This method is useful when you want to inject custom logic or configuration
  2654. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2655. //
  2656. //
  2657. // // Example sending a request using the UntagResourceRequest method.
  2658. // req, resp := client.UntagResourceRequest(params)
  2659. //
  2660. // err := req.Send()
  2661. // if err == nil { // resp is now filled
  2662. // fmt.Println(resp)
  2663. // }
  2664. //
  2665. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UntagResource
  2666. func (c *ECR) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
  2667. op := &request.Operation{
  2668. Name: opUntagResource,
  2669. HTTPMethod: "POST",
  2670. HTTPPath: "/",
  2671. }
  2672. if input == nil {
  2673. input = &UntagResourceInput{}
  2674. }
  2675. output = &UntagResourceOutput{}
  2676. req = c.newRequest(op, input, output)
  2677. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2678. return
  2679. }
  2680. // UntagResource API operation for Amazon EC2 Container Registry.
  2681. //
  2682. // Deletes specified tags from a resource.
  2683. //
  2684. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2685. // with awserr.Error's Code and Message methods to get detailed information about
  2686. // the error.
  2687. //
  2688. // See the AWS API reference guide for Amazon EC2 Container Registry's
  2689. // API operation UntagResource for usage and error information.
  2690. //
  2691. // Returned Error Types:
  2692. // * InvalidParameterException
  2693. // The specified parameter is invalid. Review the available parameters for the
  2694. // API request.
  2695. //
  2696. // * InvalidTagParameterException
  2697. // An invalid parameter has been specified. Tag keys can have a maximum character
  2698. // length of 128 characters, and tag values can have a maximum length of 256
  2699. // characters.
  2700. //
  2701. // * TooManyTagsException
  2702. // The list of tags on the repository is over the limit. The maximum number
  2703. // of tags that can be applied to a repository is 50.
  2704. //
  2705. // * RepositoryNotFoundException
  2706. // The specified repository could not be found. Check the spelling of the specified
  2707. // repository and ensure that you are performing operations on the correct registry.
  2708. //
  2709. // * ServerException
  2710. // These errors are usually caused by a server-side issue.
  2711. //
  2712. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UntagResource
  2713. func (c *ECR) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  2714. req, out := c.UntagResourceRequest(input)
  2715. return out, req.Send()
  2716. }
  2717. // UntagResourceWithContext is the same as UntagResource with the addition of
  2718. // the ability to pass a context and additional request options.
  2719. //
  2720. // See UntagResource for details on how to use this API operation.
  2721. //
  2722. // The context must be non-nil and will be used for request cancellation. If
  2723. // the context is nil a panic will occur. In the future the SDK may create
  2724. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2725. // for more information on using Contexts.
  2726. func (c *ECR) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
  2727. req, out := c.UntagResourceRequest(input)
  2728. req.SetContext(ctx)
  2729. req.ApplyOptions(opts...)
  2730. return out, req.Send()
  2731. }
  2732. const opUploadLayerPart = "UploadLayerPart"
  2733. // UploadLayerPartRequest generates a "aws/request.Request" representing the
  2734. // client's request for the UploadLayerPart operation. The "output" return
  2735. // value will be populated with the request's response once the request completes
  2736. // successfully.
  2737. //
  2738. // Use "Send" method on the returned Request to send the API call to the service.
  2739. // the "output" return value is not valid until after Send returns without error.
  2740. //
  2741. // See UploadLayerPart for more information on using the UploadLayerPart
  2742. // API call, and error handling.
  2743. //
  2744. // This method is useful when you want to inject custom logic or configuration
  2745. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2746. //
  2747. //
  2748. // // Example sending a request using the UploadLayerPartRequest method.
  2749. // req, resp := client.UploadLayerPartRequest(params)
  2750. //
  2751. // err := req.Send()
  2752. // if err == nil { // resp is now filled
  2753. // fmt.Println(resp)
  2754. // }
  2755. //
  2756. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPart
  2757. func (c *ECR) UploadLayerPartRequest(input *UploadLayerPartInput) (req *request.Request, output *UploadLayerPartOutput) {
  2758. op := &request.Operation{
  2759. Name: opUploadLayerPart,
  2760. HTTPMethod: "POST",
  2761. HTTPPath: "/",
  2762. }
  2763. if input == nil {
  2764. input = &UploadLayerPartInput{}
  2765. }
  2766. output = &UploadLayerPartOutput{}
  2767. req = c.newRequest(op, input, output)
  2768. return
  2769. }
  2770. // UploadLayerPart API operation for Amazon EC2 Container Registry.
  2771. //
  2772. // Uploads an image layer part to Amazon ECR.
  2773. //
  2774. // This operation is used by the Amazon ECR proxy, and it is not intended for
  2775. // general use by customers for pulling and pushing images. In most cases, you
  2776. // should use the docker CLI to pull, tag, and push images.
  2777. //
  2778. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2779. // with awserr.Error's Code and Message methods to get detailed information about
  2780. // the error.
  2781. //
  2782. // See the AWS API reference guide for Amazon EC2 Container Registry's
  2783. // API operation UploadLayerPart for usage and error information.
  2784. //
  2785. // Returned Error Types:
  2786. // * ServerException
  2787. // These errors are usually caused by a server-side issue.
  2788. //
  2789. // * InvalidParameterException
  2790. // The specified parameter is invalid. Review the available parameters for the
  2791. // API request.
  2792. //
  2793. // * InvalidLayerPartException
  2794. // The layer part size is not valid, or the first byte specified is not consecutive
  2795. // to the last byte of a previous layer part upload.
  2796. //
  2797. // * RepositoryNotFoundException
  2798. // The specified repository could not be found. Check the spelling of the specified
  2799. // repository and ensure that you are performing operations on the correct registry.
  2800. //
  2801. // * UploadNotFoundException
  2802. // The upload could not be found, or the specified upload id is not valid for
  2803. // this repository.
  2804. //
  2805. // * LimitExceededException
  2806. // The operation did not succeed because it would have exceeded a service limit
  2807. // for your account. For more information, see Amazon ECR Default Service Limits
  2808. // (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)
  2809. // in the Amazon Elastic Container Registry User Guide.
  2810. //
  2811. // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPart
  2812. func (c *ECR) UploadLayerPart(input *UploadLayerPartInput) (*UploadLayerPartOutput, error) {
  2813. req, out := c.UploadLayerPartRequest(input)
  2814. return out, req.Send()
  2815. }
  2816. // UploadLayerPartWithContext is the same as UploadLayerPart with the addition of
  2817. // the ability to pass a context and additional request options.
  2818. //
  2819. // See UploadLayerPart for details on how to use this API operation.
  2820. //
  2821. // The context must be non-nil and will be used for request cancellation. If
  2822. // the context is nil a panic will occur. In the future the SDK may create
  2823. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2824. // for more information on using Contexts.
  2825. func (c *ECR) UploadLayerPartWithContext(ctx aws.Context, input *UploadLayerPartInput, opts ...request.Option) (*UploadLayerPartOutput, error) {
  2826. req, out := c.UploadLayerPartRequest(input)
  2827. req.SetContext(ctx)
  2828. req.ApplyOptions(opts...)
  2829. return out, req.Send()
  2830. }
  2831. // This data type is used in the ImageScanFinding data type.
  2832. type Attribute struct {
  2833. _ struct{} `type:"structure"`
  2834. // The attribute key.
  2835. //
  2836. // Key is a required field
  2837. Key *string `locationName:"key" min:"1" type:"string" required:"true"`
  2838. // The value assigned to the attribute key.
  2839. Value *string `locationName:"value" min:"1" type:"string"`
  2840. }
  2841. // String returns the string representation
  2842. func (s Attribute) String() string {
  2843. return awsutil.Prettify(s)
  2844. }
  2845. // GoString returns the string representation
  2846. func (s Attribute) GoString() string {
  2847. return s.String()
  2848. }
  2849. // SetKey sets the Key field's value.
  2850. func (s *Attribute) SetKey(v string) *Attribute {
  2851. s.Key = &v
  2852. return s
  2853. }
  2854. // SetValue sets the Value field's value.
  2855. func (s *Attribute) SetValue(v string) *Attribute {
  2856. s.Value = &v
  2857. return s
  2858. }
  2859. // An object representing authorization data for an Amazon ECR registry.
  2860. type AuthorizationData struct {
  2861. _ struct{} `type:"structure"`
  2862. // A base64-encoded string that contains authorization data for the specified
  2863. // Amazon ECR registry. When the string is decoded, it is presented in the format
  2864. // user:password for private registry authentication using docker login.
  2865. AuthorizationToken *string `locationName:"authorizationToken" type:"string"`
  2866. // The Unix time in seconds and milliseconds when the authorization token expires.
  2867. // Authorization tokens are valid for 12 hours.
  2868. ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp"`
  2869. // The registry URL to use for this authorization token in a docker login command.
  2870. // The Amazon ECR registry URL format is https://aws_account_id.dkr.ecr.region.amazonaws.com.
  2871. // For example, https://012345678910.dkr.ecr.us-east-1.amazonaws.com..
  2872. ProxyEndpoint *string `locationName:"proxyEndpoint" type:"string"`
  2873. }
  2874. // String returns the string representation
  2875. func (s AuthorizationData) String() string {
  2876. return awsutil.Prettify(s)
  2877. }
  2878. // GoString returns the string representation
  2879. func (s AuthorizationData) GoString() string {
  2880. return s.String()
  2881. }
  2882. // SetAuthorizationToken sets the AuthorizationToken field's value.
  2883. func (s *AuthorizationData) SetAuthorizationToken(v string) *AuthorizationData {
  2884. s.AuthorizationToken = &v
  2885. return s
  2886. }
  2887. // SetExpiresAt sets the ExpiresAt field's value.
  2888. func (s *AuthorizationData) SetExpiresAt(v time.Time) *AuthorizationData {
  2889. s.ExpiresAt = &v
  2890. return s
  2891. }
  2892. // SetProxyEndpoint sets the ProxyEndpoint field's value.
  2893. func (s *AuthorizationData) SetProxyEndpoint(v string) *AuthorizationData {
  2894. s.ProxyEndpoint = &v
  2895. return s
  2896. }
  2897. type BatchCheckLayerAvailabilityInput struct {
  2898. _ struct{} `type:"structure"`
  2899. // The digests of the image layers to check.
  2900. //
  2901. // LayerDigests is a required field
  2902. LayerDigests []*string `locationName:"layerDigests" min:"1" type:"list" required:"true"`
  2903. // The AWS account ID associated with the registry that contains the image layers
  2904. // to check. If you do not specify a registry, the default registry is assumed.
  2905. RegistryId *string `locationName:"registryId" type:"string"`
  2906. // The name of the repository that is associated with the image layers to check.
  2907. //
  2908. // RepositoryName is a required field
  2909. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2910. }
  2911. // String returns the string representation
  2912. func (s BatchCheckLayerAvailabilityInput) String() string {
  2913. return awsutil.Prettify(s)
  2914. }
  2915. // GoString returns the string representation
  2916. func (s BatchCheckLayerAvailabilityInput) GoString() string {
  2917. return s.String()
  2918. }
  2919. // Validate inspects the fields of the type to determine if they are valid.
  2920. func (s *BatchCheckLayerAvailabilityInput) Validate() error {
  2921. invalidParams := request.ErrInvalidParams{Context: "BatchCheckLayerAvailabilityInput"}
  2922. if s.LayerDigests == nil {
  2923. invalidParams.Add(request.NewErrParamRequired("LayerDigests"))
  2924. }
  2925. if s.LayerDigests != nil && len(s.LayerDigests) < 1 {
  2926. invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1))
  2927. }
  2928. if s.RepositoryName == nil {
  2929. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2930. }
  2931. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  2932. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  2933. }
  2934. if invalidParams.Len() > 0 {
  2935. return invalidParams
  2936. }
  2937. return nil
  2938. }
  2939. // SetLayerDigests sets the LayerDigests field's value.
  2940. func (s *BatchCheckLayerAvailabilityInput) SetLayerDigests(v []*string) *BatchCheckLayerAvailabilityInput {
  2941. s.LayerDigests = v
  2942. return s
  2943. }
  2944. // SetRegistryId sets the RegistryId field's value.
  2945. func (s *BatchCheckLayerAvailabilityInput) SetRegistryId(v string) *BatchCheckLayerAvailabilityInput {
  2946. s.RegistryId = &v
  2947. return s
  2948. }
  2949. // SetRepositoryName sets the RepositoryName field's value.
  2950. func (s *BatchCheckLayerAvailabilityInput) SetRepositoryName(v string) *BatchCheckLayerAvailabilityInput {
  2951. s.RepositoryName = &v
  2952. return s
  2953. }
  2954. type BatchCheckLayerAvailabilityOutput struct {
  2955. _ struct{} `type:"structure"`
  2956. // Any failures associated with the call.
  2957. Failures []*LayerFailure `locationName:"failures" type:"list"`
  2958. // A list of image layer objects corresponding to the image layer references
  2959. // in the request.
  2960. Layers []*Layer `locationName:"layers" type:"list"`
  2961. }
  2962. // String returns the string representation
  2963. func (s BatchCheckLayerAvailabilityOutput) String() string {
  2964. return awsutil.Prettify(s)
  2965. }
  2966. // GoString returns the string representation
  2967. func (s BatchCheckLayerAvailabilityOutput) GoString() string {
  2968. return s.String()
  2969. }
  2970. // SetFailures sets the Failures field's value.
  2971. func (s *BatchCheckLayerAvailabilityOutput) SetFailures(v []*LayerFailure) *BatchCheckLayerAvailabilityOutput {
  2972. s.Failures = v
  2973. return s
  2974. }
  2975. // SetLayers sets the Layers field's value.
  2976. func (s *BatchCheckLayerAvailabilityOutput) SetLayers(v []*Layer) *BatchCheckLayerAvailabilityOutput {
  2977. s.Layers = v
  2978. return s
  2979. }
  2980. // Deletes specified images within a specified repository. Images are specified
  2981. // with either the imageTag or imageDigest.
  2982. type BatchDeleteImageInput struct {
  2983. _ struct{} `type:"structure"`
  2984. // A list of image ID references that correspond to images to delete. The format
  2985. // of the imageIds reference is imageTag=tag or imageDigest=digest.
  2986. //
  2987. // ImageIds is a required field
  2988. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list" required:"true"`
  2989. // The AWS account ID associated with the registry that contains the image to
  2990. // delete. If you do not specify a registry, the default registry is assumed.
  2991. RegistryId *string `locationName:"registryId" type:"string"`
  2992. // The repository that contains the image to delete.
  2993. //
  2994. // RepositoryName is a required field
  2995. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2996. }
  2997. // String returns the string representation
  2998. func (s BatchDeleteImageInput) String() string {
  2999. return awsutil.Prettify(s)
  3000. }
  3001. // GoString returns the string representation
  3002. func (s BatchDeleteImageInput) GoString() string {
  3003. return s.String()
  3004. }
  3005. // Validate inspects the fields of the type to determine if they are valid.
  3006. func (s *BatchDeleteImageInput) Validate() error {
  3007. invalidParams := request.ErrInvalidParams{Context: "BatchDeleteImageInput"}
  3008. if s.ImageIds == nil {
  3009. invalidParams.Add(request.NewErrParamRequired("ImageIds"))
  3010. }
  3011. if s.ImageIds != nil && len(s.ImageIds) < 1 {
  3012. invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
  3013. }
  3014. if s.RepositoryName == nil {
  3015. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3016. }
  3017. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3018. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3019. }
  3020. if s.ImageIds != nil {
  3021. for i, v := range s.ImageIds {
  3022. if v == nil {
  3023. continue
  3024. }
  3025. if err := v.Validate(); err != nil {
  3026. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ImageIds", i), err.(request.ErrInvalidParams))
  3027. }
  3028. }
  3029. }
  3030. if invalidParams.Len() > 0 {
  3031. return invalidParams
  3032. }
  3033. return nil
  3034. }
  3035. // SetImageIds sets the ImageIds field's value.
  3036. func (s *BatchDeleteImageInput) SetImageIds(v []*ImageIdentifier) *BatchDeleteImageInput {
  3037. s.ImageIds = v
  3038. return s
  3039. }
  3040. // SetRegistryId sets the RegistryId field's value.
  3041. func (s *BatchDeleteImageInput) SetRegistryId(v string) *BatchDeleteImageInput {
  3042. s.RegistryId = &v
  3043. return s
  3044. }
  3045. // SetRepositoryName sets the RepositoryName field's value.
  3046. func (s *BatchDeleteImageInput) SetRepositoryName(v string) *BatchDeleteImageInput {
  3047. s.RepositoryName = &v
  3048. return s
  3049. }
  3050. type BatchDeleteImageOutput struct {
  3051. _ struct{} `type:"structure"`
  3052. // Any failures associated with the call.
  3053. Failures []*ImageFailure `locationName:"failures" type:"list"`
  3054. // The image IDs of the deleted images.
  3055. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
  3056. }
  3057. // String returns the string representation
  3058. func (s BatchDeleteImageOutput) String() string {
  3059. return awsutil.Prettify(s)
  3060. }
  3061. // GoString returns the string representation
  3062. func (s BatchDeleteImageOutput) GoString() string {
  3063. return s.String()
  3064. }
  3065. // SetFailures sets the Failures field's value.
  3066. func (s *BatchDeleteImageOutput) SetFailures(v []*ImageFailure) *BatchDeleteImageOutput {
  3067. s.Failures = v
  3068. return s
  3069. }
  3070. // SetImageIds sets the ImageIds field's value.
  3071. func (s *BatchDeleteImageOutput) SetImageIds(v []*ImageIdentifier) *BatchDeleteImageOutput {
  3072. s.ImageIds = v
  3073. return s
  3074. }
  3075. type BatchGetImageInput struct {
  3076. _ struct{} `type:"structure"`
  3077. // The accepted media types for the request.
  3078. //
  3079. // Valid values: application/vnd.docker.distribution.manifest.v1+json | application/vnd.docker.distribution.manifest.v2+json
  3080. // | application/vnd.oci.image.manifest.v1+json
  3081. AcceptedMediaTypes []*string `locationName:"acceptedMediaTypes" min:"1" type:"list"`
  3082. // A list of image ID references that correspond to images to describe. The
  3083. // format of the imageIds reference is imageTag=tag or imageDigest=digest.
  3084. //
  3085. // ImageIds is a required field
  3086. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list" required:"true"`
  3087. // The AWS account ID associated with the registry that contains the images
  3088. // to describe. If you do not specify a registry, the default registry is assumed.
  3089. RegistryId *string `locationName:"registryId" type:"string"`
  3090. // The repository that contains the images to describe.
  3091. //
  3092. // RepositoryName is a required field
  3093. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  3094. }
  3095. // String returns the string representation
  3096. func (s BatchGetImageInput) String() string {
  3097. return awsutil.Prettify(s)
  3098. }
  3099. // GoString returns the string representation
  3100. func (s BatchGetImageInput) GoString() string {
  3101. return s.String()
  3102. }
  3103. // Validate inspects the fields of the type to determine if they are valid.
  3104. func (s *BatchGetImageInput) Validate() error {
  3105. invalidParams := request.ErrInvalidParams{Context: "BatchGetImageInput"}
  3106. if s.AcceptedMediaTypes != nil && len(s.AcceptedMediaTypes) < 1 {
  3107. invalidParams.Add(request.NewErrParamMinLen("AcceptedMediaTypes", 1))
  3108. }
  3109. if s.ImageIds == nil {
  3110. invalidParams.Add(request.NewErrParamRequired("ImageIds"))
  3111. }
  3112. if s.ImageIds != nil && len(s.ImageIds) < 1 {
  3113. invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
  3114. }
  3115. if s.RepositoryName == nil {
  3116. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3117. }
  3118. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3119. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3120. }
  3121. if s.ImageIds != nil {
  3122. for i, v := range s.ImageIds {
  3123. if v == nil {
  3124. continue
  3125. }
  3126. if err := v.Validate(); err != nil {
  3127. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ImageIds", i), err.(request.ErrInvalidParams))
  3128. }
  3129. }
  3130. }
  3131. if invalidParams.Len() > 0 {
  3132. return invalidParams
  3133. }
  3134. return nil
  3135. }
  3136. // SetAcceptedMediaTypes sets the AcceptedMediaTypes field's value.
  3137. func (s *BatchGetImageInput) SetAcceptedMediaTypes(v []*string) *BatchGetImageInput {
  3138. s.AcceptedMediaTypes = v
  3139. return s
  3140. }
  3141. // SetImageIds sets the ImageIds field's value.
  3142. func (s *BatchGetImageInput) SetImageIds(v []*ImageIdentifier) *BatchGetImageInput {
  3143. s.ImageIds = v
  3144. return s
  3145. }
  3146. // SetRegistryId sets the RegistryId field's value.
  3147. func (s *BatchGetImageInput) SetRegistryId(v string) *BatchGetImageInput {
  3148. s.RegistryId = &v
  3149. return s
  3150. }
  3151. // SetRepositoryName sets the RepositoryName field's value.
  3152. func (s *BatchGetImageInput) SetRepositoryName(v string) *BatchGetImageInput {
  3153. s.RepositoryName = &v
  3154. return s
  3155. }
  3156. type BatchGetImageOutput struct {
  3157. _ struct{} `type:"structure"`
  3158. // Any failures associated with the call.
  3159. Failures []*ImageFailure `locationName:"failures" type:"list"`
  3160. // A list of image objects corresponding to the image references in the request.
  3161. Images []*Image `locationName:"images" type:"list"`
  3162. }
  3163. // String returns the string representation
  3164. func (s BatchGetImageOutput) String() string {
  3165. return awsutil.Prettify(s)
  3166. }
  3167. // GoString returns the string representation
  3168. func (s BatchGetImageOutput) GoString() string {
  3169. return s.String()
  3170. }
  3171. // SetFailures sets the Failures field's value.
  3172. func (s *BatchGetImageOutput) SetFailures(v []*ImageFailure) *BatchGetImageOutput {
  3173. s.Failures = v
  3174. return s
  3175. }
  3176. // SetImages sets the Images field's value.
  3177. func (s *BatchGetImageOutput) SetImages(v []*Image) *BatchGetImageOutput {
  3178. s.Images = v
  3179. return s
  3180. }
  3181. type CompleteLayerUploadInput struct {
  3182. _ struct{} `type:"structure"`
  3183. // The sha256 digest of the image layer.
  3184. //
  3185. // LayerDigests is a required field
  3186. LayerDigests []*string `locationName:"layerDigests" min:"1" type:"list" required:"true"`
  3187. // The AWS account ID associated with the registry to which to upload layers.
  3188. // If you do not specify a registry, the default registry is assumed.
  3189. RegistryId *string `locationName:"registryId" type:"string"`
  3190. // The name of the repository to associate with the image layer.
  3191. //
  3192. // RepositoryName is a required field
  3193. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  3194. // The upload ID from a previous InitiateLayerUpload operation to associate
  3195. // with the image layer.
  3196. //
  3197. // UploadId is a required field
  3198. UploadId *string `locationName:"uploadId" type:"string" required:"true"`
  3199. }
  3200. // String returns the string representation
  3201. func (s CompleteLayerUploadInput) String() string {
  3202. return awsutil.Prettify(s)
  3203. }
  3204. // GoString returns the string representation
  3205. func (s CompleteLayerUploadInput) GoString() string {
  3206. return s.String()
  3207. }
  3208. // Validate inspects the fields of the type to determine if they are valid.
  3209. func (s *CompleteLayerUploadInput) Validate() error {
  3210. invalidParams := request.ErrInvalidParams{Context: "CompleteLayerUploadInput"}
  3211. if s.LayerDigests == nil {
  3212. invalidParams.Add(request.NewErrParamRequired("LayerDigests"))
  3213. }
  3214. if s.LayerDigests != nil && len(s.LayerDigests) < 1 {
  3215. invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1))
  3216. }
  3217. if s.RepositoryName == nil {
  3218. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3219. }
  3220. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3221. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3222. }
  3223. if s.UploadId == nil {
  3224. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  3225. }
  3226. if invalidParams.Len() > 0 {
  3227. return invalidParams
  3228. }
  3229. return nil
  3230. }
  3231. // SetLayerDigests sets the LayerDigests field's value.
  3232. func (s *CompleteLayerUploadInput) SetLayerDigests(v []*string) *CompleteLayerUploadInput {
  3233. s.LayerDigests = v
  3234. return s
  3235. }
  3236. // SetRegistryId sets the RegistryId field's value.
  3237. func (s *CompleteLayerUploadInput) SetRegistryId(v string) *CompleteLayerUploadInput {
  3238. s.RegistryId = &v
  3239. return s
  3240. }
  3241. // SetRepositoryName sets the RepositoryName field's value.
  3242. func (s *CompleteLayerUploadInput) SetRepositoryName(v string) *CompleteLayerUploadInput {
  3243. s.RepositoryName = &v
  3244. return s
  3245. }
  3246. // SetUploadId sets the UploadId field's value.
  3247. func (s *CompleteLayerUploadInput) SetUploadId(v string) *CompleteLayerUploadInput {
  3248. s.UploadId = &v
  3249. return s
  3250. }
  3251. type CompleteLayerUploadOutput struct {
  3252. _ struct{} `type:"structure"`
  3253. // The sha256 digest of the image layer.
  3254. LayerDigest *string `locationName:"layerDigest" type:"string"`
  3255. // The registry ID associated with the request.
  3256. RegistryId *string `locationName:"registryId" type:"string"`
  3257. // The repository name associated with the request.
  3258. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  3259. // The upload ID associated with the layer.
  3260. UploadId *string `locationName:"uploadId" type:"string"`
  3261. }
  3262. // String returns the string representation
  3263. func (s CompleteLayerUploadOutput) String() string {
  3264. return awsutil.Prettify(s)
  3265. }
  3266. // GoString returns the string representation
  3267. func (s CompleteLayerUploadOutput) GoString() string {
  3268. return s.String()
  3269. }
  3270. // SetLayerDigest sets the LayerDigest field's value.
  3271. func (s *CompleteLayerUploadOutput) SetLayerDigest(v string) *CompleteLayerUploadOutput {
  3272. s.LayerDigest = &v
  3273. return s
  3274. }
  3275. // SetRegistryId sets the RegistryId field's value.
  3276. func (s *CompleteLayerUploadOutput) SetRegistryId(v string) *CompleteLayerUploadOutput {
  3277. s.RegistryId = &v
  3278. return s
  3279. }
  3280. // SetRepositoryName sets the RepositoryName field's value.
  3281. func (s *CompleteLayerUploadOutput) SetRepositoryName(v string) *CompleteLayerUploadOutput {
  3282. s.RepositoryName = &v
  3283. return s
  3284. }
  3285. // SetUploadId sets the UploadId field's value.
  3286. func (s *CompleteLayerUploadOutput) SetUploadId(v string) *CompleteLayerUploadOutput {
  3287. s.UploadId = &v
  3288. return s
  3289. }
  3290. type CreateRepositoryInput struct {
  3291. _ struct{} `type:"structure"`
  3292. // The image scanning configuration for the repository. This setting determines
  3293. // whether images are scanned for known vulnerabilities after being pushed to
  3294. // the repository.
  3295. ImageScanningConfiguration *ImageScanningConfiguration `locationName:"imageScanningConfiguration" type:"structure"`
  3296. // The tag mutability setting for the repository. If this parameter is omitted,
  3297. // the default setting of MUTABLE will be used which will allow image tags to
  3298. // be overwritten. If IMMUTABLE is specified, all image tags within the repository
  3299. // will be immutable which will prevent them from being overwritten.
  3300. ImageTagMutability *string `locationName:"imageTagMutability" type:"string" enum:"ImageTagMutability"`
  3301. // The name to use for the repository. The repository name may be specified
  3302. // on its own (such as nginx-web-app) or it can be prepended with a namespace
  3303. // to group the repository into a category (such as project-a/nginx-web-app).
  3304. //
  3305. // RepositoryName is a required field
  3306. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  3307. // The metadata that you apply to the repository to help you categorize and
  3308. // organize them. Each tag consists of a key and an optional value, both of
  3309. // which you define. Tag keys can have a maximum character length of 128 characters,
  3310. // and tag values can have a maximum length of 256 characters.
  3311. Tags []*Tag `locationName:"tags" type:"list"`
  3312. }
  3313. // String returns the string representation
  3314. func (s CreateRepositoryInput) String() string {
  3315. return awsutil.Prettify(s)
  3316. }
  3317. // GoString returns the string representation
  3318. func (s CreateRepositoryInput) GoString() string {
  3319. return s.String()
  3320. }
  3321. // Validate inspects the fields of the type to determine if they are valid.
  3322. func (s *CreateRepositoryInput) Validate() error {
  3323. invalidParams := request.ErrInvalidParams{Context: "CreateRepositoryInput"}
  3324. if s.RepositoryName == nil {
  3325. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3326. }
  3327. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3328. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3329. }
  3330. if invalidParams.Len() > 0 {
  3331. return invalidParams
  3332. }
  3333. return nil
  3334. }
  3335. // SetImageScanningConfiguration sets the ImageScanningConfiguration field's value.
  3336. func (s *CreateRepositoryInput) SetImageScanningConfiguration(v *ImageScanningConfiguration) *CreateRepositoryInput {
  3337. s.ImageScanningConfiguration = v
  3338. return s
  3339. }
  3340. // SetImageTagMutability sets the ImageTagMutability field's value.
  3341. func (s *CreateRepositoryInput) SetImageTagMutability(v string) *CreateRepositoryInput {
  3342. s.ImageTagMutability = &v
  3343. return s
  3344. }
  3345. // SetRepositoryName sets the RepositoryName field's value.
  3346. func (s *CreateRepositoryInput) SetRepositoryName(v string) *CreateRepositoryInput {
  3347. s.RepositoryName = &v
  3348. return s
  3349. }
  3350. // SetTags sets the Tags field's value.
  3351. func (s *CreateRepositoryInput) SetTags(v []*Tag) *CreateRepositoryInput {
  3352. s.Tags = v
  3353. return s
  3354. }
  3355. type CreateRepositoryOutput struct {
  3356. _ struct{} `type:"structure"`
  3357. // The repository that was created.
  3358. Repository *Repository `locationName:"repository" type:"structure"`
  3359. }
  3360. // String returns the string representation
  3361. func (s CreateRepositoryOutput) String() string {
  3362. return awsutil.Prettify(s)
  3363. }
  3364. // GoString returns the string representation
  3365. func (s CreateRepositoryOutput) GoString() string {
  3366. return s.String()
  3367. }
  3368. // SetRepository sets the Repository field's value.
  3369. func (s *CreateRepositoryOutput) SetRepository(v *Repository) *CreateRepositoryOutput {
  3370. s.Repository = v
  3371. return s
  3372. }
  3373. type DeleteLifecyclePolicyInput struct {
  3374. _ struct{} `type:"structure"`
  3375. // The AWS account ID associated with the registry that contains the repository.
  3376. // If you do not specify a registry, the default registry is assumed.
  3377. RegistryId *string `locationName:"registryId" type:"string"`
  3378. // The name of the repository.
  3379. //
  3380. // RepositoryName is a required field
  3381. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  3382. }
  3383. // String returns the string representation
  3384. func (s DeleteLifecyclePolicyInput) String() string {
  3385. return awsutil.Prettify(s)
  3386. }
  3387. // GoString returns the string representation
  3388. func (s DeleteLifecyclePolicyInput) GoString() string {
  3389. return s.String()
  3390. }
  3391. // Validate inspects the fields of the type to determine if they are valid.
  3392. func (s *DeleteLifecyclePolicyInput) Validate() error {
  3393. invalidParams := request.ErrInvalidParams{Context: "DeleteLifecyclePolicyInput"}
  3394. if s.RepositoryName == nil {
  3395. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3396. }
  3397. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3398. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3399. }
  3400. if invalidParams.Len() > 0 {
  3401. return invalidParams
  3402. }
  3403. return nil
  3404. }
  3405. // SetRegistryId sets the RegistryId field's value.
  3406. func (s *DeleteLifecyclePolicyInput) SetRegistryId(v string) *DeleteLifecyclePolicyInput {
  3407. s.RegistryId = &v
  3408. return s
  3409. }
  3410. // SetRepositoryName sets the RepositoryName field's value.
  3411. func (s *DeleteLifecyclePolicyInput) SetRepositoryName(v string) *DeleteLifecyclePolicyInput {
  3412. s.RepositoryName = &v
  3413. return s
  3414. }
  3415. type DeleteLifecyclePolicyOutput struct {
  3416. _ struct{} `type:"structure"`
  3417. // The time stamp of the last time that the lifecycle policy was run.
  3418. LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp"`
  3419. // The JSON lifecycle policy text.
  3420. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"`
  3421. // The registry ID associated with the request.
  3422. RegistryId *string `locationName:"registryId" type:"string"`
  3423. // The repository name associated with the request.
  3424. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  3425. }
  3426. // String returns the string representation
  3427. func (s DeleteLifecyclePolicyOutput) String() string {
  3428. return awsutil.Prettify(s)
  3429. }
  3430. // GoString returns the string representation
  3431. func (s DeleteLifecyclePolicyOutput) GoString() string {
  3432. return s.String()
  3433. }
  3434. // SetLastEvaluatedAt sets the LastEvaluatedAt field's value.
  3435. func (s *DeleteLifecyclePolicyOutput) SetLastEvaluatedAt(v time.Time) *DeleteLifecyclePolicyOutput {
  3436. s.LastEvaluatedAt = &v
  3437. return s
  3438. }
  3439. // SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
  3440. func (s *DeleteLifecyclePolicyOutput) SetLifecyclePolicyText(v string) *DeleteLifecyclePolicyOutput {
  3441. s.LifecyclePolicyText = &v
  3442. return s
  3443. }
  3444. // SetRegistryId sets the RegistryId field's value.
  3445. func (s *DeleteLifecyclePolicyOutput) SetRegistryId(v string) *DeleteLifecyclePolicyOutput {
  3446. s.RegistryId = &v
  3447. return s
  3448. }
  3449. // SetRepositoryName sets the RepositoryName field's value.
  3450. func (s *DeleteLifecyclePolicyOutput) SetRepositoryName(v string) *DeleteLifecyclePolicyOutput {
  3451. s.RepositoryName = &v
  3452. return s
  3453. }
  3454. type DeleteRepositoryInput struct {
  3455. _ struct{} `type:"structure"`
  3456. // If a repository contains images, forces the deletion.
  3457. Force *bool `locationName:"force" type:"boolean"`
  3458. // The AWS account ID associated with the registry that contains the repository
  3459. // to delete. If you do not specify a registry, the default registry is assumed.
  3460. RegistryId *string `locationName:"registryId" type:"string"`
  3461. // The name of the repository to delete.
  3462. //
  3463. // RepositoryName is a required field
  3464. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  3465. }
  3466. // String returns the string representation
  3467. func (s DeleteRepositoryInput) String() string {
  3468. return awsutil.Prettify(s)
  3469. }
  3470. // GoString returns the string representation
  3471. func (s DeleteRepositoryInput) GoString() string {
  3472. return s.String()
  3473. }
  3474. // Validate inspects the fields of the type to determine if they are valid.
  3475. func (s *DeleteRepositoryInput) Validate() error {
  3476. invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"}
  3477. if s.RepositoryName == nil {
  3478. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3479. }
  3480. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3481. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3482. }
  3483. if invalidParams.Len() > 0 {
  3484. return invalidParams
  3485. }
  3486. return nil
  3487. }
  3488. // SetForce sets the Force field's value.
  3489. func (s *DeleteRepositoryInput) SetForce(v bool) *DeleteRepositoryInput {
  3490. s.Force = &v
  3491. return s
  3492. }
  3493. // SetRegistryId sets the RegistryId field's value.
  3494. func (s *DeleteRepositoryInput) SetRegistryId(v string) *DeleteRepositoryInput {
  3495. s.RegistryId = &v
  3496. return s
  3497. }
  3498. // SetRepositoryName sets the RepositoryName field's value.
  3499. func (s *DeleteRepositoryInput) SetRepositoryName(v string) *DeleteRepositoryInput {
  3500. s.RepositoryName = &v
  3501. return s
  3502. }
  3503. type DeleteRepositoryOutput struct {
  3504. _ struct{} `type:"structure"`
  3505. // The repository that was deleted.
  3506. Repository *Repository `locationName:"repository" type:"structure"`
  3507. }
  3508. // String returns the string representation
  3509. func (s DeleteRepositoryOutput) String() string {
  3510. return awsutil.Prettify(s)
  3511. }
  3512. // GoString returns the string representation
  3513. func (s DeleteRepositoryOutput) GoString() string {
  3514. return s.String()
  3515. }
  3516. // SetRepository sets the Repository field's value.
  3517. func (s *DeleteRepositoryOutput) SetRepository(v *Repository) *DeleteRepositoryOutput {
  3518. s.Repository = v
  3519. return s
  3520. }
  3521. type DeleteRepositoryPolicyInput struct {
  3522. _ struct{} `type:"structure"`
  3523. // The AWS account ID associated with the registry that contains the repository
  3524. // policy to delete. If you do not specify a registry, the default registry
  3525. // is assumed.
  3526. RegistryId *string `locationName:"registryId" type:"string"`
  3527. // The name of the repository that is associated with the repository policy
  3528. // to delete.
  3529. //
  3530. // RepositoryName is a required field
  3531. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  3532. }
  3533. // String returns the string representation
  3534. func (s DeleteRepositoryPolicyInput) String() string {
  3535. return awsutil.Prettify(s)
  3536. }
  3537. // GoString returns the string representation
  3538. func (s DeleteRepositoryPolicyInput) GoString() string {
  3539. return s.String()
  3540. }
  3541. // Validate inspects the fields of the type to determine if they are valid.
  3542. func (s *DeleteRepositoryPolicyInput) Validate() error {
  3543. invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryPolicyInput"}
  3544. if s.RepositoryName == nil {
  3545. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3546. }
  3547. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3548. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3549. }
  3550. if invalidParams.Len() > 0 {
  3551. return invalidParams
  3552. }
  3553. return nil
  3554. }
  3555. // SetRegistryId sets the RegistryId field's value.
  3556. func (s *DeleteRepositoryPolicyInput) SetRegistryId(v string) *DeleteRepositoryPolicyInput {
  3557. s.RegistryId = &v
  3558. return s
  3559. }
  3560. // SetRepositoryName sets the RepositoryName field's value.
  3561. func (s *DeleteRepositoryPolicyInput) SetRepositoryName(v string) *DeleteRepositoryPolicyInput {
  3562. s.RepositoryName = &v
  3563. return s
  3564. }
  3565. type DeleteRepositoryPolicyOutput struct {
  3566. _ struct{} `type:"structure"`
  3567. // The JSON repository policy that was deleted from the repository.
  3568. PolicyText *string `locationName:"policyText" type:"string"`
  3569. // The registry ID associated with the request.
  3570. RegistryId *string `locationName:"registryId" type:"string"`
  3571. // The repository name associated with the request.
  3572. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  3573. }
  3574. // String returns the string representation
  3575. func (s DeleteRepositoryPolicyOutput) String() string {
  3576. return awsutil.Prettify(s)
  3577. }
  3578. // GoString returns the string representation
  3579. func (s DeleteRepositoryPolicyOutput) GoString() string {
  3580. return s.String()
  3581. }
  3582. // SetPolicyText sets the PolicyText field's value.
  3583. func (s *DeleteRepositoryPolicyOutput) SetPolicyText(v string) *DeleteRepositoryPolicyOutput {
  3584. s.PolicyText = &v
  3585. return s
  3586. }
  3587. // SetRegistryId sets the RegistryId field's value.
  3588. func (s *DeleteRepositoryPolicyOutput) SetRegistryId(v string) *DeleteRepositoryPolicyOutput {
  3589. s.RegistryId = &v
  3590. return s
  3591. }
  3592. // SetRepositoryName sets the RepositoryName field's value.
  3593. func (s *DeleteRepositoryPolicyOutput) SetRepositoryName(v string) *DeleteRepositoryPolicyOutput {
  3594. s.RepositoryName = &v
  3595. return s
  3596. }
  3597. type DescribeImageScanFindingsInput struct {
  3598. _ struct{} `type:"structure"`
  3599. // An object with identifying information for an Amazon ECR image.
  3600. //
  3601. // ImageId is a required field
  3602. ImageId *ImageIdentifier `locationName:"imageId" type:"structure" required:"true"`
  3603. // The maximum number of image scan results returned by DescribeImageScanFindings
  3604. // in paginated output. When this parameter is used, DescribeImageScanFindings
  3605. // only returns maxResults results in a single page along with a nextToken response
  3606. // element. The remaining results of the initial request can be seen by sending
  3607. // another DescribeImageScanFindings request with the returned nextToken value.
  3608. // This value can be between 1 and 1000. If this parameter is not used, then
  3609. // DescribeImageScanFindings returns up to 100 results and a nextToken value,
  3610. // if applicable.
  3611. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  3612. // The nextToken value returned from a previous paginated DescribeImageScanFindings
  3613. // request where maxResults was used and the results exceeded the value of that
  3614. // parameter. Pagination continues from the end of the previous results that
  3615. // returned the nextToken value. This value is null when there are no more results
  3616. // to return.
  3617. NextToken *string `locationName:"nextToken" type:"string"`
  3618. // The AWS account ID associated with the registry that contains the repository
  3619. // in which to describe the image scan findings for. If you do not specify a
  3620. // registry, the default registry is assumed.
  3621. RegistryId *string `locationName:"registryId" type:"string"`
  3622. // The repository for the image for which to describe the scan findings.
  3623. //
  3624. // RepositoryName is a required field
  3625. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  3626. }
  3627. // String returns the string representation
  3628. func (s DescribeImageScanFindingsInput) String() string {
  3629. return awsutil.Prettify(s)
  3630. }
  3631. // GoString returns the string representation
  3632. func (s DescribeImageScanFindingsInput) GoString() string {
  3633. return s.String()
  3634. }
  3635. // Validate inspects the fields of the type to determine if they are valid.
  3636. func (s *DescribeImageScanFindingsInput) Validate() error {
  3637. invalidParams := request.ErrInvalidParams{Context: "DescribeImageScanFindingsInput"}
  3638. if s.ImageId == nil {
  3639. invalidParams.Add(request.NewErrParamRequired("ImageId"))
  3640. }
  3641. if s.MaxResults != nil && *s.MaxResults < 1 {
  3642. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3643. }
  3644. if s.RepositoryName == nil {
  3645. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3646. }
  3647. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3648. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3649. }
  3650. if s.ImageId != nil {
  3651. if err := s.ImageId.Validate(); err != nil {
  3652. invalidParams.AddNested("ImageId", err.(request.ErrInvalidParams))
  3653. }
  3654. }
  3655. if invalidParams.Len() > 0 {
  3656. return invalidParams
  3657. }
  3658. return nil
  3659. }
  3660. // SetImageId sets the ImageId field's value.
  3661. func (s *DescribeImageScanFindingsInput) SetImageId(v *ImageIdentifier) *DescribeImageScanFindingsInput {
  3662. s.ImageId = v
  3663. return s
  3664. }
  3665. // SetMaxResults sets the MaxResults field's value.
  3666. func (s *DescribeImageScanFindingsInput) SetMaxResults(v int64) *DescribeImageScanFindingsInput {
  3667. s.MaxResults = &v
  3668. return s
  3669. }
  3670. // SetNextToken sets the NextToken field's value.
  3671. func (s *DescribeImageScanFindingsInput) SetNextToken(v string) *DescribeImageScanFindingsInput {
  3672. s.NextToken = &v
  3673. return s
  3674. }
  3675. // SetRegistryId sets the RegistryId field's value.
  3676. func (s *DescribeImageScanFindingsInput) SetRegistryId(v string) *DescribeImageScanFindingsInput {
  3677. s.RegistryId = &v
  3678. return s
  3679. }
  3680. // SetRepositoryName sets the RepositoryName field's value.
  3681. func (s *DescribeImageScanFindingsInput) SetRepositoryName(v string) *DescribeImageScanFindingsInput {
  3682. s.RepositoryName = &v
  3683. return s
  3684. }
  3685. type DescribeImageScanFindingsOutput struct {
  3686. _ struct{} `type:"structure"`
  3687. // An object with identifying information for an Amazon ECR image.
  3688. ImageId *ImageIdentifier `locationName:"imageId" type:"structure"`
  3689. // The information contained in the image scan findings.
  3690. ImageScanFindings *ImageScanFindings `locationName:"imageScanFindings" type:"structure"`
  3691. // The current state of the scan.
  3692. ImageScanStatus *ImageScanStatus `locationName:"imageScanStatus" type:"structure"`
  3693. // The nextToken value to include in a future DescribeImageScanFindings request.
  3694. // When the results of a DescribeImageScanFindings request exceed maxResults,
  3695. // this value can be used to retrieve the next page of results. This value is
  3696. // null when there are no more results to return.
  3697. NextToken *string `locationName:"nextToken" type:"string"`
  3698. // The registry ID associated with the request.
  3699. RegistryId *string `locationName:"registryId" type:"string"`
  3700. // The repository name associated with the request.
  3701. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  3702. }
  3703. // String returns the string representation
  3704. func (s DescribeImageScanFindingsOutput) String() string {
  3705. return awsutil.Prettify(s)
  3706. }
  3707. // GoString returns the string representation
  3708. func (s DescribeImageScanFindingsOutput) GoString() string {
  3709. return s.String()
  3710. }
  3711. // SetImageId sets the ImageId field's value.
  3712. func (s *DescribeImageScanFindingsOutput) SetImageId(v *ImageIdentifier) *DescribeImageScanFindingsOutput {
  3713. s.ImageId = v
  3714. return s
  3715. }
  3716. // SetImageScanFindings sets the ImageScanFindings field's value.
  3717. func (s *DescribeImageScanFindingsOutput) SetImageScanFindings(v *ImageScanFindings) *DescribeImageScanFindingsOutput {
  3718. s.ImageScanFindings = v
  3719. return s
  3720. }
  3721. // SetImageScanStatus sets the ImageScanStatus field's value.
  3722. func (s *DescribeImageScanFindingsOutput) SetImageScanStatus(v *ImageScanStatus) *DescribeImageScanFindingsOutput {
  3723. s.ImageScanStatus = v
  3724. return s
  3725. }
  3726. // SetNextToken sets the NextToken field's value.
  3727. func (s *DescribeImageScanFindingsOutput) SetNextToken(v string) *DescribeImageScanFindingsOutput {
  3728. s.NextToken = &v
  3729. return s
  3730. }
  3731. // SetRegistryId sets the RegistryId field's value.
  3732. func (s *DescribeImageScanFindingsOutput) SetRegistryId(v string) *DescribeImageScanFindingsOutput {
  3733. s.RegistryId = &v
  3734. return s
  3735. }
  3736. // SetRepositoryName sets the RepositoryName field's value.
  3737. func (s *DescribeImageScanFindingsOutput) SetRepositoryName(v string) *DescribeImageScanFindingsOutput {
  3738. s.RepositoryName = &v
  3739. return s
  3740. }
  3741. // An object representing a filter on a DescribeImages operation.
  3742. type DescribeImagesFilter struct {
  3743. _ struct{} `type:"structure"`
  3744. // The tag status with which to filter your DescribeImages results. You can
  3745. // filter results based on whether they are TAGGED or UNTAGGED.
  3746. TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"`
  3747. }
  3748. // String returns the string representation
  3749. func (s DescribeImagesFilter) String() string {
  3750. return awsutil.Prettify(s)
  3751. }
  3752. // GoString returns the string representation
  3753. func (s DescribeImagesFilter) GoString() string {
  3754. return s.String()
  3755. }
  3756. // SetTagStatus sets the TagStatus field's value.
  3757. func (s *DescribeImagesFilter) SetTagStatus(v string) *DescribeImagesFilter {
  3758. s.TagStatus = &v
  3759. return s
  3760. }
  3761. type DescribeImagesInput struct {
  3762. _ struct{} `type:"structure"`
  3763. // The filter key and value with which to filter your DescribeImages results.
  3764. Filter *DescribeImagesFilter `locationName:"filter" type:"structure"`
  3765. // The list of image IDs for the requested repository.
  3766. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
  3767. // The maximum number of repository results returned by DescribeImages in paginated
  3768. // output. When this parameter is used, DescribeImages only returns maxResults
  3769. // results in a single page along with a nextToken response element. The remaining
  3770. // results of the initial request can be seen by sending another DescribeImages
  3771. // request with the returned nextToken value. This value can be between 1 and
  3772. // 1000. If this parameter is not used, then DescribeImages returns up to 100
  3773. // results and a nextToken value, if applicable. This option cannot be used
  3774. // when you specify images with imageIds.
  3775. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  3776. // The nextToken value returned from a previous paginated DescribeImages request
  3777. // where maxResults was used and the results exceeded the value of that parameter.
  3778. // Pagination continues from the end of the previous results that returned the
  3779. // nextToken value. This value is null when there are no more results to return.
  3780. // This option cannot be used when you specify images with imageIds.
  3781. NextToken *string `locationName:"nextToken" type:"string"`
  3782. // The AWS account ID associated with the registry that contains the repository
  3783. // in which to describe images. If you do not specify a registry, the default
  3784. // registry is assumed.
  3785. RegistryId *string `locationName:"registryId" type:"string"`
  3786. // The repository that contains the images to describe.
  3787. //
  3788. // RepositoryName is a required field
  3789. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  3790. }
  3791. // String returns the string representation
  3792. func (s DescribeImagesInput) String() string {
  3793. return awsutil.Prettify(s)
  3794. }
  3795. // GoString returns the string representation
  3796. func (s DescribeImagesInput) GoString() string {
  3797. return s.String()
  3798. }
  3799. // Validate inspects the fields of the type to determine if they are valid.
  3800. func (s *DescribeImagesInput) Validate() error {
  3801. invalidParams := request.ErrInvalidParams{Context: "DescribeImagesInput"}
  3802. if s.ImageIds != nil && len(s.ImageIds) < 1 {
  3803. invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
  3804. }
  3805. if s.MaxResults != nil && *s.MaxResults < 1 {
  3806. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3807. }
  3808. if s.RepositoryName == nil {
  3809. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  3810. }
  3811. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  3812. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  3813. }
  3814. if s.ImageIds != nil {
  3815. for i, v := range s.ImageIds {
  3816. if v == nil {
  3817. continue
  3818. }
  3819. if err := v.Validate(); err != nil {
  3820. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ImageIds", i), err.(request.ErrInvalidParams))
  3821. }
  3822. }
  3823. }
  3824. if invalidParams.Len() > 0 {
  3825. return invalidParams
  3826. }
  3827. return nil
  3828. }
  3829. // SetFilter sets the Filter field's value.
  3830. func (s *DescribeImagesInput) SetFilter(v *DescribeImagesFilter) *DescribeImagesInput {
  3831. s.Filter = v
  3832. return s
  3833. }
  3834. // SetImageIds sets the ImageIds field's value.
  3835. func (s *DescribeImagesInput) SetImageIds(v []*ImageIdentifier) *DescribeImagesInput {
  3836. s.ImageIds = v
  3837. return s
  3838. }
  3839. // SetMaxResults sets the MaxResults field's value.
  3840. func (s *DescribeImagesInput) SetMaxResults(v int64) *DescribeImagesInput {
  3841. s.MaxResults = &v
  3842. return s
  3843. }
  3844. // SetNextToken sets the NextToken field's value.
  3845. func (s *DescribeImagesInput) SetNextToken(v string) *DescribeImagesInput {
  3846. s.NextToken = &v
  3847. return s
  3848. }
  3849. // SetRegistryId sets the RegistryId field's value.
  3850. func (s *DescribeImagesInput) SetRegistryId(v string) *DescribeImagesInput {
  3851. s.RegistryId = &v
  3852. return s
  3853. }
  3854. // SetRepositoryName sets the RepositoryName field's value.
  3855. func (s *DescribeImagesInput) SetRepositoryName(v string) *DescribeImagesInput {
  3856. s.RepositoryName = &v
  3857. return s
  3858. }
  3859. type DescribeImagesOutput struct {
  3860. _ struct{} `type:"structure"`
  3861. // A list of ImageDetail objects that contain data about the image.
  3862. ImageDetails []*ImageDetail `locationName:"imageDetails" type:"list"`
  3863. // The nextToken value to include in a future DescribeImages request. When the
  3864. // results of a DescribeImages request exceed maxResults, this value can be
  3865. // used to retrieve the next page of results. This value is null when there
  3866. // are no more results to return.
  3867. NextToken *string `locationName:"nextToken" type:"string"`
  3868. }
  3869. // String returns the string representation
  3870. func (s DescribeImagesOutput) String() string {
  3871. return awsutil.Prettify(s)
  3872. }
  3873. // GoString returns the string representation
  3874. func (s DescribeImagesOutput) GoString() string {
  3875. return s.String()
  3876. }
  3877. // SetImageDetails sets the ImageDetails field's value.
  3878. func (s *DescribeImagesOutput) SetImageDetails(v []*ImageDetail) *DescribeImagesOutput {
  3879. s.ImageDetails = v
  3880. return s
  3881. }
  3882. // SetNextToken sets the NextToken field's value.
  3883. func (s *DescribeImagesOutput) SetNextToken(v string) *DescribeImagesOutput {
  3884. s.NextToken = &v
  3885. return s
  3886. }
  3887. type DescribeRepositoriesInput struct {
  3888. _ struct{} `type:"structure"`
  3889. // The maximum number of repository results returned by DescribeRepositories
  3890. // in paginated output. When this parameter is used, DescribeRepositories only
  3891. // returns maxResults results in a single page along with a nextToken response
  3892. // element. The remaining results of the initial request can be seen by sending
  3893. // another DescribeRepositories request with the returned nextToken value. This
  3894. // value can be between 1 and 1000. If this parameter is not used, then DescribeRepositories
  3895. // returns up to 100 results and a nextToken value, if applicable. This option
  3896. // cannot be used when you specify repositories with repositoryNames.
  3897. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  3898. // The nextToken value returned from a previous paginated DescribeRepositories
  3899. // request where maxResults was used and the results exceeded the value of that
  3900. // parameter. Pagination continues from the end of the previous results that
  3901. // returned the nextToken value. This value is null when there are no more results
  3902. // to return. This option cannot be used when you specify repositories with
  3903. // repositoryNames.
  3904. //
  3905. // This token should be treated as an opaque identifier that is only used to
  3906. // retrieve the next items in a list and not for other programmatic purposes.
  3907. NextToken *string `locationName:"nextToken" type:"string"`
  3908. // The AWS account ID associated with the registry that contains the repositories
  3909. // to be described. If you do not specify a registry, the default registry is
  3910. // assumed.
  3911. RegistryId *string `locationName:"registryId" type:"string"`
  3912. // A list of repositories to describe. If this parameter is omitted, then all
  3913. // repositories in a registry are described.
  3914. RepositoryNames []*string `locationName:"repositoryNames" min:"1" type:"list"`
  3915. }
  3916. // String returns the string representation
  3917. func (s DescribeRepositoriesInput) String() string {
  3918. return awsutil.Prettify(s)
  3919. }
  3920. // GoString returns the string representation
  3921. func (s DescribeRepositoriesInput) GoString() string {
  3922. return s.String()
  3923. }
  3924. // Validate inspects the fields of the type to determine if they are valid.
  3925. func (s *DescribeRepositoriesInput) Validate() error {
  3926. invalidParams := request.ErrInvalidParams{Context: "DescribeRepositoriesInput"}
  3927. if s.MaxResults != nil && *s.MaxResults < 1 {
  3928. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3929. }
  3930. if s.RepositoryNames != nil && len(s.RepositoryNames) < 1 {
  3931. invalidParams.Add(request.NewErrParamMinLen("RepositoryNames", 1))
  3932. }
  3933. if invalidParams.Len() > 0 {
  3934. return invalidParams
  3935. }
  3936. return nil
  3937. }
  3938. // SetMaxResults sets the MaxResults field's value.
  3939. func (s *DescribeRepositoriesInput) SetMaxResults(v int64) *DescribeRepositoriesInput {
  3940. s.MaxResults = &v
  3941. return s
  3942. }
  3943. // SetNextToken sets the NextToken field's value.
  3944. func (s *DescribeRepositoriesInput) SetNextToken(v string) *DescribeRepositoriesInput {
  3945. s.NextToken = &v
  3946. return s
  3947. }
  3948. // SetRegistryId sets the RegistryId field's value.
  3949. func (s *DescribeRepositoriesInput) SetRegistryId(v string) *DescribeRepositoriesInput {
  3950. s.RegistryId = &v
  3951. return s
  3952. }
  3953. // SetRepositoryNames sets the RepositoryNames field's value.
  3954. func (s *DescribeRepositoriesInput) SetRepositoryNames(v []*string) *DescribeRepositoriesInput {
  3955. s.RepositoryNames = v
  3956. return s
  3957. }
  3958. type DescribeRepositoriesOutput struct {
  3959. _ struct{} `type:"structure"`
  3960. // The nextToken value to include in a future DescribeRepositories request.
  3961. // When the results of a DescribeRepositories request exceed maxResults, this
  3962. // value can be used to retrieve the next page of results. This value is null
  3963. // when there are no more results to return.
  3964. NextToken *string `locationName:"nextToken" type:"string"`
  3965. // A list of repository objects corresponding to valid repositories.
  3966. Repositories []*Repository `locationName:"repositories" type:"list"`
  3967. }
  3968. // String returns the string representation
  3969. func (s DescribeRepositoriesOutput) String() string {
  3970. return awsutil.Prettify(s)
  3971. }
  3972. // GoString returns the string representation
  3973. func (s DescribeRepositoriesOutput) GoString() string {
  3974. return s.String()
  3975. }
  3976. // SetNextToken sets the NextToken field's value.
  3977. func (s *DescribeRepositoriesOutput) SetNextToken(v string) *DescribeRepositoriesOutput {
  3978. s.NextToken = &v
  3979. return s
  3980. }
  3981. // SetRepositories sets the Repositories field's value.
  3982. func (s *DescribeRepositoriesOutput) SetRepositories(v []*Repository) *DescribeRepositoriesOutput {
  3983. s.Repositories = v
  3984. return s
  3985. }
  3986. // The specified layer upload does not contain any layer parts.
  3987. type EmptyUploadException struct {
  3988. _ struct{} `type:"structure"`
  3989. respMetadata protocol.ResponseMetadata
  3990. // The error message associated with the exception.
  3991. Message_ *string `locationName:"message" type:"string"`
  3992. }
  3993. // String returns the string representation
  3994. func (s EmptyUploadException) String() string {
  3995. return awsutil.Prettify(s)
  3996. }
  3997. // GoString returns the string representation
  3998. func (s EmptyUploadException) GoString() string {
  3999. return s.String()
  4000. }
  4001. func newErrorEmptyUploadException(v protocol.ResponseMetadata) error {
  4002. return &EmptyUploadException{
  4003. respMetadata: v,
  4004. }
  4005. }
  4006. // Code returns the exception type name.
  4007. func (s EmptyUploadException) Code() string {
  4008. return "EmptyUploadException"
  4009. }
  4010. // Message returns the exception's message.
  4011. func (s EmptyUploadException) Message() string {
  4012. if s.Message_ != nil {
  4013. return *s.Message_
  4014. }
  4015. return ""
  4016. }
  4017. // OrigErr always returns nil, satisfies awserr.Error interface.
  4018. func (s EmptyUploadException) OrigErr() error {
  4019. return nil
  4020. }
  4021. func (s EmptyUploadException) Error() string {
  4022. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  4023. }
  4024. // Status code returns the HTTP status code for the request's response error.
  4025. func (s EmptyUploadException) StatusCode() int {
  4026. return s.respMetadata.StatusCode
  4027. }
  4028. // RequestID returns the service's response RequestID for request.
  4029. func (s EmptyUploadException) RequestID() string {
  4030. return s.respMetadata.RequestID
  4031. }
  4032. type GetAuthorizationTokenInput struct {
  4033. _ struct{} `type:"structure"`
  4034. // A list of AWS account IDs that are associated with the registries for which
  4035. // to get authorization tokens. If you do not specify a registry, the default
  4036. // registry is assumed.
  4037. RegistryIds []*string `locationName:"registryIds" min:"1" type:"list"`
  4038. }
  4039. // String returns the string representation
  4040. func (s GetAuthorizationTokenInput) String() string {
  4041. return awsutil.Prettify(s)
  4042. }
  4043. // GoString returns the string representation
  4044. func (s GetAuthorizationTokenInput) GoString() string {
  4045. return s.String()
  4046. }
  4047. // Validate inspects the fields of the type to determine if they are valid.
  4048. func (s *GetAuthorizationTokenInput) Validate() error {
  4049. invalidParams := request.ErrInvalidParams{Context: "GetAuthorizationTokenInput"}
  4050. if s.RegistryIds != nil && len(s.RegistryIds) < 1 {
  4051. invalidParams.Add(request.NewErrParamMinLen("RegistryIds", 1))
  4052. }
  4053. if invalidParams.Len() > 0 {
  4054. return invalidParams
  4055. }
  4056. return nil
  4057. }
  4058. // SetRegistryIds sets the RegistryIds field's value.
  4059. func (s *GetAuthorizationTokenInput) SetRegistryIds(v []*string) *GetAuthorizationTokenInput {
  4060. s.RegistryIds = v
  4061. return s
  4062. }
  4063. type GetAuthorizationTokenOutput struct {
  4064. _ struct{} `type:"structure"`
  4065. // A list of authorization token data objects that correspond to the registryIds
  4066. // values in the request.
  4067. AuthorizationData []*AuthorizationData `locationName:"authorizationData" type:"list"`
  4068. }
  4069. // String returns the string representation
  4070. func (s GetAuthorizationTokenOutput) String() string {
  4071. return awsutil.Prettify(s)
  4072. }
  4073. // GoString returns the string representation
  4074. func (s GetAuthorizationTokenOutput) GoString() string {
  4075. return s.String()
  4076. }
  4077. // SetAuthorizationData sets the AuthorizationData field's value.
  4078. func (s *GetAuthorizationTokenOutput) SetAuthorizationData(v []*AuthorizationData) *GetAuthorizationTokenOutput {
  4079. s.AuthorizationData = v
  4080. return s
  4081. }
  4082. type GetDownloadUrlForLayerInput struct {
  4083. _ struct{} `type:"structure"`
  4084. // The digest of the image layer to download.
  4085. //
  4086. // LayerDigest is a required field
  4087. LayerDigest *string `locationName:"layerDigest" type:"string" required:"true"`
  4088. // The AWS account ID associated with the registry that contains the image layer
  4089. // to download. If you do not specify a registry, the default registry is assumed.
  4090. RegistryId *string `locationName:"registryId" type:"string"`
  4091. // The name of the repository that is associated with the image layer to download.
  4092. //
  4093. // RepositoryName is a required field
  4094. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  4095. }
  4096. // String returns the string representation
  4097. func (s GetDownloadUrlForLayerInput) String() string {
  4098. return awsutil.Prettify(s)
  4099. }
  4100. // GoString returns the string representation
  4101. func (s GetDownloadUrlForLayerInput) GoString() string {
  4102. return s.String()
  4103. }
  4104. // Validate inspects the fields of the type to determine if they are valid.
  4105. func (s *GetDownloadUrlForLayerInput) Validate() error {
  4106. invalidParams := request.ErrInvalidParams{Context: "GetDownloadUrlForLayerInput"}
  4107. if s.LayerDigest == nil {
  4108. invalidParams.Add(request.NewErrParamRequired("LayerDigest"))
  4109. }
  4110. if s.RepositoryName == nil {
  4111. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  4112. }
  4113. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  4114. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  4115. }
  4116. if invalidParams.Len() > 0 {
  4117. return invalidParams
  4118. }
  4119. return nil
  4120. }
  4121. // SetLayerDigest sets the LayerDigest field's value.
  4122. func (s *GetDownloadUrlForLayerInput) SetLayerDigest(v string) *GetDownloadUrlForLayerInput {
  4123. s.LayerDigest = &v
  4124. return s
  4125. }
  4126. // SetRegistryId sets the RegistryId field's value.
  4127. func (s *GetDownloadUrlForLayerInput) SetRegistryId(v string) *GetDownloadUrlForLayerInput {
  4128. s.RegistryId = &v
  4129. return s
  4130. }
  4131. // SetRepositoryName sets the RepositoryName field's value.
  4132. func (s *GetDownloadUrlForLayerInput) SetRepositoryName(v string) *GetDownloadUrlForLayerInput {
  4133. s.RepositoryName = &v
  4134. return s
  4135. }
  4136. type GetDownloadUrlForLayerOutput struct {
  4137. _ struct{} `type:"structure"`
  4138. // The pre-signed Amazon S3 download URL for the requested layer.
  4139. DownloadUrl *string `locationName:"downloadUrl" type:"string"`
  4140. // The digest of the image layer to download.
  4141. LayerDigest *string `locationName:"layerDigest" type:"string"`
  4142. }
  4143. // String returns the string representation
  4144. func (s GetDownloadUrlForLayerOutput) String() string {
  4145. return awsutil.Prettify(s)
  4146. }
  4147. // GoString returns the string representation
  4148. func (s GetDownloadUrlForLayerOutput) GoString() string {
  4149. return s.String()
  4150. }
  4151. // SetDownloadUrl sets the DownloadUrl field's value.
  4152. func (s *GetDownloadUrlForLayerOutput) SetDownloadUrl(v string) *GetDownloadUrlForLayerOutput {
  4153. s.DownloadUrl = &v
  4154. return s
  4155. }
  4156. // SetLayerDigest sets the LayerDigest field's value.
  4157. func (s *GetDownloadUrlForLayerOutput) SetLayerDigest(v string) *GetDownloadUrlForLayerOutput {
  4158. s.LayerDigest = &v
  4159. return s
  4160. }
  4161. type GetLifecyclePolicyInput struct {
  4162. _ struct{} `type:"structure"`
  4163. // The AWS account ID associated with the registry that contains the repository.
  4164. // If you do not specify a registry, the default registry is assumed.
  4165. RegistryId *string `locationName:"registryId" type:"string"`
  4166. // The name of the repository.
  4167. //
  4168. // RepositoryName is a required field
  4169. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  4170. }
  4171. // String returns the string representation
  4172. func (s GetLifecyclePolicyInput) String() string {
  4173. return awsutil.Prettify(s)
  4174. }
  4175. // GoString returns the string representation
  4176. func (s GetLifecyclePolicyInput) GoString() string {
  4177. return s.String()
  4178. }
  4179. // Validate inspects the fields of the type to determine if they are valid.
  4180. func (s *GetLifecyclePolicyInput) Validate() error {
  4181. invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyInput"}
  4182. if s.RepositoryName == nil {
  4183. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  4184. }
  4185. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  4186. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  4187. }
  4188. if invalidParams.Len() > 0 {
  4189. return invalidParams
  4190. }
  4191. return nil
  4192. }
  4193. // SetRegistryId sets the RegistryId field's value.
  4194. func (s *GetLifecyclePolicyInput) SetRegistryId(v string) *GetLifecyclePolicyInput {
  4195. s.RegistryId = &v
  4196. return s
  4197. }
  4198. // SetRepositoryName sets the RepositoryName field's value.
  4199. func (s *GetLifecyclePolicyInput) SetRepositoryName(v string) *GetLifecyclePolicyInput {
  4200. s.RepositoryName = &v
  4201. return s
  4202. }
  4203. type GetLifecyclePolicyOutput struct {
  4204. _ struct{} `type:"structure"`
  4205. // The time stamp of the last time that the lifecycle policy was run.
  4206. LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp"`
  4207. // The JSON lifecycle policy text.
  4208. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"`
  4209. // The registry ID associated with the request.
  4210. RegistryId *string `locationName:"registryId" type:"string"`
  4211. // The repository name associated with the request.
  4212. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  4213. }
  4214. // String returns the string representation
  4215. func (s GetLifecyclePolicyOutput) String() string {
  4216. return awsutil.Prettify(s)
  4217. }
  4218. // GoString returns the string representation
  4219. func (s GetLifecyclePolicyOutput) GoString() string {
  4220. return s.String()
  4221. }
  4222. // SetLastEvaluatedAt sets the LastEvaluatedAt field's value.
  4223. func (s *GetLifecyclePolicyOutput) SetLastEvaluatedAt(v time.Time) *GetLifecyclePolicyOutput {
  4224. s.LastEvaluatedAt = &v
  4225. return s
  4226. }
  4227. // SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
  4228. func (s *GetLifecyclePolicyOutput) SetLifecyclePolicyText(v string) *GetLifecyclePolicyOutput {
  4229. s.LifecyclePolicyText = &v
  4230. return s
  4231. }
  4232. // SetRegistryId sets the RegistryId field's value.
  4233. func (s *GetLifecyclePolicyOutput) SetRegistryId(v string) *GetLifecyclePolicyOutput {
  4234. s.RegistryId = &v
  4235. return s
  4236. }
  4237. // SetRepositoryName sets the RepositoryName field's value.
  4238. func (s *GetLifecyclePolicyOutput) SetRepositoryName(v string) *GetLifecyclePolicyOutput {
  4239. s.RepositoryName = &v
  4240. return s
  4241. }
  4242. type GetLifecyclePolicyPreviewInput struct {
  4243. _ struct{} `type:"structure"`
  4244. // An optional parameter that filters results based on image tag status and
  4245. // all tags, if tagged.
  4246. Filter *LifecyclePolicyPreviewFilter `locationName:"filter" type:"structure"`
  4247. // The list of imageIDs to be included.
  4248. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
  4249. // The maximum number of repository results returned by GetLifecyclePolicyPreviewRequest
  4250. // in paginated output. When this parameter is used, GetLifecyclePolicyPreviewRequest
  4251. // only returns maxResults results in a single page along with a nextToken response
  4252. // element. The remaining results of the initial request can be seen by sending
  4253. // another GetLifecyclePolicyPreviewRequest request with the returned nextToken
  4254. // value. This value can be between 1 and 1000. If this parameter is not used,
  4255. // then GetLifecyclePolicyPreviewRequest returns up to 100 results and a nextToken
  4256. // value, if applicable. This option cannot be used when you specify images
  4257. // with imageIds.
  4258. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  4259. // The nextToken value returned from a previous paginated GetLifecyclePolicyPreviewRequest
  4260. // request where maxResults was used and the results exceeded the value of that
  4261. // parameter. Pagination continues from the end of the previous results that
  4262. // returned the nextToken value. This value is null when there are no more results
  4263. // to return. This option cannot be used when you specify images with imageIds.
  4264. NextToken *string `locationName:"nextToken" type:"string"`
  4265. // The AWS account ID associated with the registry that contains the repository.
  4266. // If you do not specify a registry, the default registry is assumed.
  4267. RegistryId *string `locationName:"registryId" type:"string"`
  4268. // The name of the repository.
  4269. //
  4270. // RepositoryName is a required field
  4271. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  4272. }
  4273. // String returns the string representation
  4274. func (s GetLifecyclePolicyPreviewInput) String() string {
  4275. return awsutil.Prettify(s)
  4276. }
  4277. // GoString returns the string representation
  4278. func (s GetLifecyclePolicyPreviewInput) GoString() string {
  4279. return s.String()
  4280. }
  4281. // Validate inspects the fields of the type to determine if they are valid.
  4282. func (s *GetLifecyclePolicyPreviewInput) Validate() error {
  4283. invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyPreviewInput"}
  4284. if s.ImageIds != nil && len(s.ImageIds) < 1 {
  4285. invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
  4286. }
  4287. if s.MaxResults != nil && *s.MaxResults < 1 {
  4288. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  4289. }
  4290. if s.RepositoryName == nil {
  4291. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  4292. }
  4293. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  4294. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  4295. }
  4296. if s.ImageIds != nil {
  4297. for i, v := range s.ImageIds {
  4298. if v == nil {
  4299. continue
  4300. }
  4301. if err := v.Validate(); err != nil {
  4302. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ImageIds", i), err.(request.ErrInvalidParams))
  4303. }
  4304. }
  4305. }
  4306. if invalidParams.Len() > 0 {
  4307. return invalidParams
  4308. }
  4309. return nil
  4310. }
  4311. // SetFilter sets the Filter field's value.
  4312. func (s *GetLifecyclePolicyPreviewInput) SetFilter(v *LifecyclePolicyPreviewFilter) *GetLifecyclePolicyPreviewInput {
  4313. s.Filter = v
  4314. return s
  4315. }
  4316. // SetImageIds sets the ImageIds field's value.
  4317. func (s *GetLifecyclePolicyPreviewInput) SetImageIds(v []*ImageIdentifier) *GetLifecyclePolicyPreviewInput {
  4318. s.ImageIds = v
  4319. return s
  4320. }
  4321. // SetMaxResults sets the MaxResults field's value.
  4322. func (s *GetLifecyclePolicyPreviewInput) SetMaxResults(v int64) *GetLifecyclePolicyPreviewInput {
  4323. s.MaxResults = &v
  4324. return s
  4325. }
  4326. // SetNextToken sets the NextToken field's value.
  4327. func (s *GetLifecyclePolicyPreviewInput) SetNextToken(v string) *GetLifecyclePolicyPreviewInput {
  4328. s.NextToken = &v
  4329. return s
  4330. }
  4331. // SetRegistryId sets the RegistryId field's value.
  4332. func (s *GetLifecyclePolicyPreviewInput) SetRegistryId(v string) *GetLifecyclePolicyPreviewInput {
  4333. s.RegistryId = &v
  4334. return s
  4335. }
  4336. // SetRepositoryName sets the RepositoryName field's value.
  4337. func (s *GetLifecyclePolicyPreviewInput) SetRepositoryName(v string) *GetLifecyclePolicyPreviewInput {
  4338. s.RepositoryName = &v
  4339. return s
  4340. }
  4341. type GetLifecyclePolicyPreviewOutput struct {
  4342. _ struct{} `type:"structure"`
  4343. // The JSON lifecycle policy text.
  4344. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"`
  4345. // The nextToken value to include in a future GetLifecyclePolicyPreview request.
  4346. // When the results of a GetLifecyclePolicyPreview request exceed maxResults,
  4347. // this value can be used to retrieve the next page of results. This value is
  4348. // null when there are no more results to return.
  4349. NextToken *string `locationName:"nextToken" type:"string"`
  4350. // The results of the lifecycle policy preview request.
  4351. PreviewResults []*LifecyclePolicyPreviewResult `locationName:"previewResults" type:"list"`
  4352. // The registry ID associated with the request.
  4353. RegistryId *string `locationName:"registryId" type:"string"`
  4354. // The repository name associated with the request.
  4355. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  4356. // The status of the lifecycle policy preview request.
  4357. Status *string `locationName:"status" type:"string" enum:"LifecyclePolicyPreviewStatus"`
  4358. // The list of images that is returned as a result of the action.
  4359. Summary *LifecyclePolicyPreviewSummary `locationName:"summary" type:"structure"`
  4360. }
  4361. // String returns the string representation
  4362. func (s GetLifecyclePolicyPreviewOutput) String() string {
  4363. return awsutil.Prettify(s)
  4364. }
  4365. // GoString returns the string representation
  4366. func (s GetLifecyclePolicyPreviewOutput) GoString() string {
  4367. return s.String()
  4368. }
  4369. // SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
  4370. func (s *GetLifecyclePolicyPreviewOutput) SetLifecyclePolicyText(v string) *GetLifecyclePolicyPreviewOutput {
  4371. s.LifecyclePolicyText = &v
  4372. return s
  4373. }
  4374. // SetNextToken sets the NextToken field's value.
  4375. func (s *GetLifecyclePolicyPreviewOutput) SetNextToken(v string) *GetLifecyclePolicyPreviewOutput {
  4376. s.NextToken = &v
  4377. return s
  4378. }
  4379. // SetPreviewResults sets the PreviewResults field's value.
  4380. func (s *GetLifecyclePolicyPreviewOutput) SetPreviewResults(v []*LifecyclePolicyPreviewResult) *GetLifecyclePolicyPreviewOutput {
  4381. s.PreviewResults = v
  4382. return s
  4383. }
  4384. // SetRegistryId sets the RegistryId field's value.
  4385. func (s *GetLifecyclePolicyPreviewOutput) SetRegistryId(v string) *GetLifecyclePolicyPreviewOutput {
  4386. s.RegistryId = &v
  4387. return s
  4388. }
  4389. // SetRepositoryName sets the RepositoryName field's value.
  4390. func (s *GetLifecyclePolicyPreviewOutput) SetRepositoryName(v string) *GetLifecyclePolicyPreviewOutput {
  4391. s.RepositoryName = &v
  4392. return s
  4393. }
  4394. // SetStatus sets the Status field's value.
  4395. func (s *GetLifecyclePolicyPreviewOutput) SetStatus(v string) *GetLifecyclePolicyPreviewOutput {
  4396. s.Status = &v
  4397. return s
  4398. }
  4399. // SetSummary sets the Summary field's value.
  4400. func (s *GetLifecyclePolicyPreviewOutput) SetSummary(v *LifecyclePolicyPreviewSummary) *GetLifecyclePolicyPreviewOutput {
  4401. s.Summary = v
  4402. return s
  4403. }
  4404. type GetRepositoryPolicyInput struct {
  4405. _ struct{} `type:"structure"`
  4406. // The AWS account ID associated with the registry that contains the repository.
  4407. // If you do not specify a registry, the default registry is assumed.
  4408. RegistryId *string `locationName:"registryId" type:"string"`
  4409. // The name of the repository with the policy to retrieve.
  4410. //
  4411. // RepositoryName is a required field
  4412. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  4413. }
  4414. // String returns the string representation
  4415. func (s GetRepositoryPolicyInput) String() string {
  4416. return awsutil.Prettify(s)
  4417. }
  4418. // GoString returns the string representation
  4419. func (s GetRepositoryPolicyInput) GoString() string {
  4420. return s.String()
  4421. }
  4422. // Validate inspects the fields of the type to determine if they are valid.
  4423. func (s *GetRepositoryPolicyInput) Validate() error {
  4424. invalidParams := request.ErrInvalidParams{Context: "GetRepositoryPolicyInput"}
  4425. if s.RepositoryName == nil {
  4426. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  4427. }
  4428. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  4429. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  4430. }
  4431. if invalidParams.Len() > 0 {
  4432. return invalidParams
  4433. }
  4434. return nil
  4435. }
  4436. // SetRegistryId sets the RegistryId field's value.
  4437. func (s *GetRepositoryPolicyInput) SetRegistryId(v string) *GetRepositoryPolicyInput {
  4438. s.RegistryId = &v
  4439. return s
  4440. }
  4441. // SetRepositoryName sets the RepositoryName field's value.
  4442. func (s *GetRepositoryPolicyInput) SetRepositoryName(v string) *GetRepositoryPolicyInput {
  4443. s.RepositoryName = &v
  4444. return s
  4445. }
  4446. type GetRepositoryPolicyOutput struct {
  4447. _ struct{} `type:"structure"`
  4448. // The JSON repository policy text associated with the repository.
  4449. PolicyText *string `locationName:"policyText" type:"string"`
  4450. // The registry ID associated with the request.
  4451. RegistryId *string `locationName:"registryId" type:"string"`
  4452. // The repository name associated with the request.
  4453. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  4454. }
  4455. // String returns the string representation
  4456. func (s GetRepositoryPolicyOutput) String() string {
  4457. return awsutil.Prettify(s)
  4458. }
  4459. // GoString returns the string representation
  4460. func (s GetRepositoryPolicyOutput) GoString() string {
  4461. return s.String()
  4462. }
  4463. // SetPolicyText sets the PolicyText field's value.
  4464. func (s *GetRepositoryPolicyOutput) SetPolicyText(v string) *GetRepositoryPolicyOutput {
  4465. s.PolicyText = &v
  4466. return s
  4467. }
  4468. // SetRegistryId sets the RegistryId field's value.
  4469. func (s *GetRepositoryPolicyOutput) SetRegistryId(v string) *GetRepositoryPolicyOutput {
  4470. s.RegistryId = &v
  4471. return s
  4472. }
  4473. // SetRepositoryName sets the RepositoryName field's value.
  4474. func (s *GetRepositoryPolicyOutput) SetRepositoryName(v string) *GetRepositoryPolicyOutput {
  4475. s.RepositoryName = &v
  4476. return s
  4477. }
  4478. // An object representing an Amazon ECR image.
  4479. type Image struct {
  4480. _ struct{} `type:"structure"`
  4481. // An object containing the image tag and image digest associated with an image.
  4482. ImageId *ImageIdentifier `locationName:"imageId" type:"structure"`
  4483. // The image manifest associated with the image.
  4484. ImageManifest *string `locationName:"imageManifest" min:"1" type:"string"`
  4485. // The AWS account ID associated with the registry containing the image.
  4486. RegistryId *string `locationName:"registryId" type:"string"`
  4487. // The name of the repository associated with the image.
  4488. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  4489. }
  4490. // String returns the string representation
  4491. func (s Image) String() string {
  4492. return awsutil.Prettify(s)
  4493. }
  4494. // GoString returns the string representation
  4495. func (s Image) GoString() string {
  4496. return s.String()
  4497. }
  4498. // SetImageId sets the ImageId field's value.
  4499. func (s *Image) SetImageId(v *ImageIdentifier) *Image {
  4500. s.ImageId = v
  4501. return s
  4502. }
  4503. // SetImageManifest sets the ImageManifest field's value.
  4504. func (s *Image) SetImageManifest(v string) *Image {
  4505. s.ImageManifest = &v
  4506. return s
  4507. }
  4508. // SetRegistryId sets the RegistryId field's value.
  4509. func (s *Image) SetRegistryId(v string) *Image {
  4510. s.RegistryId = &v
  4511. return s
  4512. }
  4513. // SetRepositoryName sets the RepositoryName field's value.
  4514. func (s *Image) SetRepositoryName(v string) *Image {
  4515. s.RepositoryName = &v
  4516. return s
  4517. }
  4518. // The specified image has already been pushed, and there were no changes to
  4519. // the manifest or image tag after the last push.
  4520. type ImageAlreadyExistsException struct {
  4521. _ struct{} `type:"structure"`
  4522. respMetadata protocol.ResponseMetadata
  4523. // The error message associated with the exception.
  4524. Message_ *string `locationName:"message" type:"string"`
  4525. }
  4526. // String returns the string representation
  4527. func (s ImageAlreadyExistsException) String() string {
  4528. return awsutil.Prettify(s)
  4529. }
  4530. // GoString returns the string representation
  4531. func (s ImageAlreadyExistsException) GoString() string {
  4532. return s.String()
  4533. }
  4534. func newErrorImageAlreadyExistsException(v protocol.ResponseMetadata) error {
  4535. return &ImageAlreadyExistsException{
  4536. respMetadata: v,
  4537. }
  4538. }
  4539. // Code returns the exception type name.
  4540. func (s ImageAlreadyExistsException) Code() string {
  4541. return "ImageAlreadyExistsException"
  4542. }
  4543. // Message returns the exception's message.
  4544. func (s ImageAlreadyExistsException) Message() string {
  4545. if s.Message_ != nil {
  4546. return *s.Message_
  4547. }
  4548. return ""
  4549. }
  4550. // OrigErr always returns nil, satisfies awserr.Error interface.
  4551. func (s ImageAlreadyExistsException) OrigErr() error {
  4552. return nil
  4553. }
  4554. func (s ImageAlreadyExistsException) Error() string {
  4555. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  4556. }
  4557. // Status code returns the HTTP status code for the request's response error.
  4558. func (s ImageAlreadyExistsException) StatusCode() int {
  4559. return s.respMetadata.StatusCode
  4560. }
  4561. // RequestID returns the service's response RequestID for request.
  4562. func (s ImageAlreadyExistsException) RequestID() string {
  4563. return s.respMetadata.RequestID
  4564. }
  4565. // An object that describes an image returned by a DescribeImages operation.
  4566. type ImageDetail struct {
  4567. _ struct{} `type:"structure"`
  4568. // The sha256 digest of the image manifest.
  4569. ImageDigest *string `locationName:"imageDigest" type:"string"`
  4570. // The date and time, expressed in standard JavaScript date format, at which
  4571. // the current image was pushed to the repository.
  4572. ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp"`
  4573. // A summary of the last completed image scan.
  4574. ImageScanFindingsSummary *ImageScanFindingsSummary `locationName:"imageScanFindingsSummary" type:"structure"`
  4575. // The current state of the scan.
  4576. ImageScanStatus *ImageScanStatus `locationName:"imageScanStatus" type:"structure"`
  4577. // The size, in bytes, of the image in the repository.
  4578. //
  4579. // Beginning with Docker version 1.9, the Docker client compresses image layers
  4580. // before pushing them to a V2 Docker registry. The output of the docker images
  4581. // command shows the uncompressed image size, so it may return a larger image
  4582. // size than the image sizes returned by DescribeImages.
  4583. ImageSizeInBytes *int64 `locationName:"imageSizeInBytes" type:"long"`
  4584. // The list of tags associated with this image.
  4585. ImageTags []*string `locationName:"imageTags" type:"list"`
  4586. // The AWS account ID associated with the registry to which this image belongs.
  4587. RegistryId *string `locationName:"registryId" type:"string"`
  4588. // The name of the repository to which this image belongs.
  4589. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  4590. }
  4591. // String returns the string representation
  4592. func (s ImageDetail) String() string {
  4593. return awsutil.Prettify(s)
  4594. }
  4595. // GoString returns the string representation
  4596. func (s ImageDetail) GoString() string {
  4597. return s.String()
  4598. }
  4599. // SetImageDigest sets the ImageDigest field's value.
  4600. func (s *ImageDetail) SetImageDigest(v string) *ImageDetail {
  4601. s.ImageDigest = &v
  4602. return s
  4603. }
  4604. // SetImagePushedAt sets the ImagePushedAt field's value.
  4605. func (s *ImageDetail) SetImagePushedAt(v time.Time) *ImageDetail {
  4606. s.ImagePushedAt = &v
  4607. return s
  4608. }
  4609. // SetImageScanFindingsSummary sets the ImageScanFindingsSummary field's value.
  4610. func (s *ImageDetail) SetImageScanFindingsSummary(v *ImageScanFindingsSummary) *ImageDetail {
  4611. s.ImageScanFindingsSummary = v
  4612. return s
  4613. }
  4614. // SetImageScanStatus sets the ImageScanStatus field's value.
  4615. func (s *ImageDetail) SetImageScanStatus(v *ImageScanStatus) *ImageDetail {
  4616. s.ImageScanStatus = v
  4617. return s
  4618. }
  4619. // SetImageSizeInBytes sets the ImageSizeInBytes field's value.
  4620. func (s *ImageDetail) SetImageSizeInBytes(v int64) *ImageDetail {
  4621. s.ImageSizeInBytes = &v
  4622. return s
  4623. }
  4624. // SetImageTags sets the ImageTags field's value.
  4625. func (s *ImageDetail) SetImageTags(v []*string) *ImageDetail {
  4626. s.ImageTags = v
  4627. return s
  4628. }
  4629. // SetRegistryId sets the RegistryId field's value.
  4630. func (s *ImageDetail) SetRegistryId(v string) *ImageDetail {
  4631. s.RegistryId = &v
  4632. return s
  4633. }
  4634. // SetRepositoryName sets the RepositoryName field's value.
  4635. func (s *ImageDetail) SetRepositoryName(v string) *ImageDetail {
  4636. s.RepositoryName = &v
  4637. return s
  4638. }
  4639. // An object representing an Amazon ECR image failure.
  4640. type ImageFailure struct {
  4641. _ struct{} `type:"structure"`
  4642. // The code associated with the failure.
  4643. FailureCode *string `locationName:"failureCode" type:"string" enum:"ImageFailureCode"`
  4644. // The reason for the failure.
  4645. FailureReason *string `locationName:"failureReason" type:"string"`
  4646. // The image ID associated with the failure.
  4647. ImageId *ImageIdentifier `locationName:"imageId" type:"structure"`
  4648. }
  4649. // String returns the string representation
  4650. func (s ImageFailure) String() string {
  4651. return awsutil.Prettify(s)
  4652. }
  4653. // GoString returns the string representation
  4654. func (s ImageFailure) GoString() string {
  4655. return s.String()
  4656. }
  4657. // SetFailureCode sets the FailureCode field's value.
  4658. func (s *ImageFailure) SetFailureCode(v string) *ImageFailure {
  4659. s.FailureCode = &v
  4660. return s
  4661. }
  4662. // SetFailureReason sets the FailureReason field's value.
  4663. func (s *ImageFailure) SetFailureReason(v string) *ImageFailure {
  4664. s.FailureReason = &v
  4665. return s
  4666. }
  4667. // SetImageId sets the ImageId field's value.
  4668. func (s *ImageFailure) SetImageId(v *ImageIdentifier) *ImageFailure {
  4669. s.ImageId = v
  4670. return s
  4671. }
  4672. // An object with identifying information for an Amazon ECR image.
  4673. type ImageIdentifier struct {
  4674. _ struct{} `type:"structure"`
  4675. // The sha256 digest of the image manifest.
  4676. ImageDigest *string `locationName:"imageDigest" type:"string"`
  4677. // The tag used for the image.
  4678. ImageTag *string `locationName:"imageTag" min:"1" type:"string"`
  4679. }
  4680. // String returns the string representation
  4681. func (s ImageIdentifier) String() string {
  4682. return awsutil.Prettify(s)
  4683. }
  4684. // GoString returns the string representation
  4685. func (s ImageIdentifier) GoString() string {
  4686. return s.String()
  4687. }
  4688. // Validate inspects the fields of the type to determine if they are valid.
  4689. func (s *ImageIdentifier) Validate() error {
  4690. invalidParams := request.ErrInvalidParams{Context: "ImageIdentifier"}
  4691. if s.ImageTag != nil && len(*s.ImageTag) < 1 {
  4692. invalidParams.Add(request.NewErrParamMinLen("ImageTag", 1))
  4693. }
  4694. if invalidParams.Len() > 0 {
  4695. return invalidParams
  4696. }
  4697. return nil
  4698. }
  4699. // SetImageDigest sets the ImageDigest field's value.
  4700. func (s *ImageIdentifier) SetImageDigest(v string) *ImageIdentifier {
  4701. s.ImageDigest = &v
  4702. return s
  4703. }
  4704. // SetImageTag sets the ImageTag field's value.
  4705. func (s *ImageIdentifier) SetImageTag(v string) *ImageIdentifier {
  4706. s.ImageTag = &v
  4707. return s
  4708. }
  4709. // The image requested does not exist in the specified repository.
  4710. type ImageNotFoundException struct {
  4711. _ struct{} `type:"structure"`
  4712. respMetadata protocol.ResponseMetadata
  4713. Message_ *string `locationName:"message" type:"string"`
  4714. }
  4715. // String returns the string representation
  4716. func (s ImageNotFoundException) String() string {
  4717. return awsutil.Prettify(s)
  4718. }
  4719. // GoString returns the string representation
  4720. func (s ImageNotFoundException) GoString() string {
  4721. return s.String()
  4722. }
  4723. func newErrorImageNotFoundException(v protocol.ResponseMetadata) error {
  4724. return &ImageNotFoundException{
  4725. respMetadata: v,
  4726. }
  4727. }
  4728. // Code returns the exception type name.
  4729. func (s ImageNotFoundException) Code() string {
  4730. return "ImageNotFoundException"
  4731. }
  4732. // Message returns the exception's message.
  4733. func (s ImageNotFoundException) Message() string {
  4734. if s.Message_ != nil {
  4735. return *s.Message_
  4736. }
  4737. return ""
  4738. }
  4739. // OrigErr always returns nil, satisfies awserr.Error interface.
  4740. func (s ImageNotFoundException) OrigErr() error {
  4741. return nil
  4742. }
  4743. func (s ImageNotFoundException) Error() string {
  4744. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  4745. }
  4746. // Status code returns the HTTP status code for the request's response error.
  4747. func (s ImageNotFoundException) StatusCode() int {
  4748. return s.respMetadata.StatusCode
  4749. }
  4750. // RequestID returns the service's response RequestID for request.
  4751. func (s ImageNotFoundException) RequestID() string {
  4752. return s.respMetadata.RequestID
  4753. }
  4754. // Contains information about an image scan finding.
  4755. type ImageScanFinding struct {
  4756. _ struct{} `type:"structure"`
  4757. // A collection of attributes of the host from which the finding is generated.
  4758. Attributes []*Attribute `locationName:"attributes" type:"list"`
  4759. // The description of the finding.
  4760. Description *string `locationName:"description" type:"string"`
  4761. // The name associated with the finding, usually a CVE number.
  4762. Name *string `locationName:"name" type:"string"`
  4763. // The finding severity.
  4764. Severity *string `locationName:"severity" type:"string" enum:"FindingSeverity"`
  4765. // A link containing additional details about the security vulnerability.
  4766. Uri *string `locationName:"uri" type:"string"`
  4767. }
  4768. // String returns the string representation
  4769. func (s ImageScanFinding) String() string {
  4770. return awsutil.Prettify(s)
  4771. }
  4772. // GoString returns the string representation
  4773. func (s ImageScanFinding) GoString() string {
  4774. return s.String()
  4775. }
  4776. // SetAttributes sets the Attributes field's value.
  4777. func (s *ImageScanFinding) SetAttributes(v []*Attribute) *ImageScanFinding {
  4778. s.Attributes = v
  4779. return s
  4780. }
  4781. // SetDescription sets the Description field's value.
  4782. func (s *ImageScanFinding) SetDescription(v string) *ImageScanFinding {
  4783. s.Description = &v
  4784. return s
  4785. }
  4786. // SetName sets the Name field's value.
  4787. func (s *ImageScanFinding) SetName(v string) *ImageScanFinding {
  4788. s.Name = &v
  4789. return s
  4790. }
  4791. // SetSeverity sets the Severity field's value.
  4792. func (s *ImageScanFinding) SetSeverity(v string) *ImageScanFinding {
  4793. s.Severity = &v
  4794. return s
  4795. }
  4796. // SetUri sets the Uri field's value.
  4797. func (s *ImageScanFinding) SetUri(v string) *ImageScanFinding {
  4798. s.Uri = &v
  4799. return s
  4800. }
  4801. // The details of an image scan.
  4802. type ImageScanFindings struct {
  4803. _ struct{} `type:"structure"`
  4804. // The image vulnerability counts, sorted by severity.
  4805. FindingSeverityCounts map[string]*int64 `locationName:"findingSeverityCounts" type:"map"`
  4806. // The findings from the image scan.
  4807. Findings []*ImageScanFinding `locationName:"findings" type:"list"`
  4808. // The time of the last completed image scan.
  4809. ImageScanCompletedAt *time.Time `locationName:"imageScanCompletedAt" type:"timestamp"`
  4810. // The time when the vulnerability data was last scanned.
  4811. VulnerabilitySourceUpdatedAt *time.Time `locationName:"vulnerabilitySourceUpdatedAt" type:"timestamp"`
  4812. }
  4813. // String returns the string representation
  4814. func (s ImageScanFindings) String() string {
  4815. return awsutil.Prettify(s)
  4816. }
  4817. // GoString returns the string representation
  4818. func (s ImageScanFindings) GoString() string {
  4819. return s.String()
  4820. }
  4821. // SetFindingSeverityCounts sets the FindingSeverityCounts field's value.
  4822. func (s *ImageScanFindings) SetFindingSeverityCounts(v map[string]*int64) *ImageScanFindings {
  4823. s.FindingSeverityCounts = v
  4824. return s
  4825. }
  4826. // SetFindings sets the Findings field's value.
  4827. func (s *ImageScanFindings) SetFindings(v []*ImageScanFinding) *ImageScanFindings {
  4828. s.Findings = v
  4829. return s
  4830. }
  4831. // SetImageScanCompletedAt sets the ImageScanCompletedAt field's value.
  4832. func (s *ImageScanFindings) SetImageScanCompletedAt(v time.Time) *ImageScanFindings {
  4833. s.ImageScanCompletedAt = &v
  4834. return s
  4835. }
  4836. // SetVulnerabilitySourceUpdatedAt sets the VulnerabilitySourceUpdatedAt field's value.
  4837. func (s *ImageScanFindings) SetVulnerabilitySourceUpdatedAt(v time.Time) *ImageScanFindings {
  4838. s.VulnerabilitySourceUpdatedAt = &v
  4839. return s
  4840. }
  4841. // A summary of the last completed image scan.
  4842. type ImageScanFindingsSummary struct {
  4843. _ struct{} `type:"structure"`
  4844. // The image vulnerability counts, sorted by severity.
  4845. FindingSeverityCounts map[string]*int64 `locationName:"findingSeverityCounts" type:"map"`
  4846. // The time of the last completed image scan.
  4847. ImageScanCompletedAt *time.Time `locationName:"imageScanCompletedAt" type:"timestamp"`
  4848. // The time when the vulnerability data was last scanned.
  4849. VulnerabilitySourceUpdatedAt *time.Time `locationName:"vulnerabilitySourceUpdatedAt" type:"timestamp"`
  4850. }
  4851. // String returns the string representation
  4852. func (s ImageScanFindingsSummary) String() string {
  4853. return awsutil.Prettify(s)
  4854. }
  4855. // GoString returns the string representation
  4856. func (s ImageScanFindingsSummary) GoString() string {
  4857. return s.String()
  4858. }
  4859. // SetFindingSeverityCounts sets the FindingSeverityCounts field's value.
  4860. func (s *ImageScanFindingsSummary) SetFindingSeverityCounts(v map[string]*int64) *ImageScanFindingsSummary {
  4861. s.FindingSeverityCounts = v
  4862. return s
  4863. }
  4864. // SetImageScanCompletedAt sets the ImageScanCompletedAt field's value.
  4865. func (s *ImageScanFindingsSummary) SetImageScanCompletedAt(v time.Time) *ImageScanFindingsSummary {
  4866. s.ImageScanCompletedAt = &v
  4867. return s
  4868. }
  4869. // SetVulnerabilitySourceUpdatedAt sets the VulnerabilitySourceUpdatedAt field's value.
  4870. func (s *ImageScanFindingsSummary) SetVulnerabilitySourceUpdatedAt(v time.Time) *ImageScanFindingsSummary {
  4871. s.VulnerabilitySourceUpdatedAt = &v
  4872. return s
  4873. }
  4874. // The current status of an image scan.
  4875. type ImageScanStatus struct {
  4876. _ struct{} `type:"structure"`
  4877. // The description of the image scan status.
  4878. Description *string `locationName:"description" type:"string"`
  4879. // The current state of an image scan.
  4880. Status *string `locationName:"status" type:"string" enum:"ScanStatus"`
  4881. }
  4882. // String returns the string representation
  4883. func (s ImageScanStatus) String() string {
  4884. return awsutil.Prettify(s)
  4885. }
  4886. // GoString returns the string representation
  4887. func (s ImageScanStatus) GoString() string {
  4888. return s.String()
  4889. }
  4890. // SetDescription sets the Description field's value.
  4891. func (s *ImageScanStatus) SetDescription(v string) *ImageScanStatus {
  4892. s.Description = &v
  4893. return s
  4894. }
  4895. // SetStatus sets the Status field's value.
  4896. func (s *ImageScanStatus) SetStatus(v string) *ImageScanStatus {
  4897. s.Status = &v
  4898. return s
  4899. }
  4900. // The image scanning configuration for a repository.
  4901. type ImageScanningConfiguration struct {
  4902. _ struct{} `type:"structure"`
  4903. // The setting that determines whether images are scanned after being pushed
  4904. // to a repository. If set to true, images will be scanned after being pushed.
  4905. // If this parameter is not specified, it will default to false and images will
  4906. // not be scanned unless a scan is manually started with the StartImageScan
  4907. // API.
  4908. ScanOnPush *bool `locationName:"scanOnPush" type:"boolean"`
  4909. }
  4910. // String returns the string representation
  4911. func (s ImageScanningConfiguration) String() string {
  4912. return awsutil.Prettify(s)
  4913. }
  4914. // GoString returns the string representation
  4915. func (s ImageScanningConfiguration) GoString() string {
  4916. return s.String()
  4917. }
  4918. // SetScanOnPush sets the ScanOnPush field's value.
  4919. func (s *ImageScanningConfiguration) SetScanOnPush(v bool) *ImageScanningConfiguration {
  4920. s.ScanOnPush = &v
  4921. return s
  4922. }
  4923. // The specified image is tagged with a tag that already exists. The repository
  4924. // is configured for tag immutability.
  4925. type ImageTagAlreadyExistsException struct {
  4926. _ struct{} `type:"structure"`
  4927. respMetadata protocol.ResponseMetadata
  4928. Message_ *string `locationName:"message" type:"string"`
  4929. }
  4930. // String returns the string representation
  4931. func (s ImageTagAlreadyExistsException) String() string {
  4932. return awsutil.Prettify(s)
  4933. }
  4934. // GoString returns the string representation
  4935. func (s ImageTagAlreadyExistsException) GoString() string {
  4936. return s.String()
  4937. }
  4938. func newErrorImageTagAlreadyExistsException(v protocol.ResponseMetadata) error {
  4939. return &ImageTagAlreadyExistsException{
  4940. respMetadata: v,
  4941. }
  4942. }
  4943. // Code returns the exception type name.
  4944. func (s ImageTagAlreadyExistsException) Code() string {
  4945. return "ImageTagAlreadyExistsException"
  4946. }
  4947. // Message returns the exception's message.
  4948. func (s ImageTagAlreadyExistsException) Message() string {
  4949. if s.Message_ != nil {
  4950. return *s.Message_
  4951. }
  4952. return ""
  4953. }
  4954. // OrigErr always returns nil, satisfies awserr.Error interface.
  4955. func (s ImageTagAlreadyExistsException) OrigErr() error {
  4956. return nil
  4957. }
  4958. func (s ImageTagAlreadyExistsException) Error() string {
  4959. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  4960. }
  4961. // Status code returns the HTTP status code for the request's response error.
  4962. func (s ImageTagAlreadyExistsException) StatusCode() int {
  4963. return s.respMetadata.StatusCode
  4964. }
  4965. // RequestID returns the service's response RequestID for request.
  4966. func (s ImageTagAlreadyExistsException) RequestID() string {
  4967. return s.respMetadata.RequestID
  4968. }
  4969. type InitiateLayerUploadInput struct {
  4970. _ struct{} `type:"structure"`
  4971. // The AWS account ID associated with the registry to which you intend to upload
  4972. // layers. If you do not specify a registry, the default registry is assumed.
  4973. RegistryId *string `locationName:"registryId" type:"string"`
  4974. // The name of the repository to which you intend to upload layers.
  4975. //
  4976. // RepositoryName is a required field
  4977. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  4978. }
  4979. // String returns the string representation
  4980. func (s InitiateLayerUploadInput) String() string {
  4981. return awsutil.Prettify(s)
  4982. }
  4983. // GoString returns the string representation
  4984. func (s InitiateLayerUploadInput) GoString() string {
  4985. return s.String()
  4986. }
  4987. // Validate inspects the fields of the type to determine if they are valid.
  4988. func (s *InitiateLayerUploadInput) Validate() error {
  4989. invalidParams := request.ErrInvalidParams{Context: "InitiateLayerUploadInput"}
  4990. if s.RepositoryName == nil {
  4991. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  4992. }
  4993. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  4994. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  4995. }
  4996. if invalidParams.Len() > 0 {
  4997. return invalidParams
  4998. }
  4999. return nil
  5000. }
  5001. // SetRegistryId sets the RegistryId field's value.
  5002. func (s *InitiateLayerUploadInput) SetRegistryId(v string) *InitiateLayerUploadInput {
  5003. s.RegistryId = &v
  5004. return s
  5005. }
  5006. // SetRepositoryName sets the RepositoryName field's value.
  5007. func (s *InitiateLayerUploadInput) SetRepositoryName(v string) *InitiateLayerUploadInput {
  5008. s.RepositoryName = &v
  5009. return s
  5010. }
  5011. type InitiateLayerUploadOutput struct {
  5012. _ struct{} `type:"structure"`
  5013. // The size, in bytes, that Amazon ECR expects future layer part uploads to
  5014. // be.
  5015. PartSize *int64 `locationName:"partSize" type:"long"`
  5016. // The upload ID for the layer upload. This parameter is passed to further UploadLayerPart
  5017. // and CompleteLayerUpload operations.
  5018. UploadId *string `locationName:"uploadId" type:"string"`
  5019. }
  5020. // String returns the string representation
  5021. func (s InitiateLayerUploadOutput) String() string {
  5022. return awsutil.Prettify(s)
  5023. }
  5024. // GoString returns the string representation
  5025. func (s InitiateLayerUploadOutput) GoString() string {
  5026. return s.String()
  5027. }
  5028. // SetPartSize sets the PartSize field's value.
  5029. func (s *InitiateLayerUploadOutput) SetPartSize(v int64) *InitiateLayerUploadOutput {
  5030. s.PartSize = &v
  5031. return s
  5032. }
  5033. // SetUploadId sets the UploadId field's value.
  5034. func (s *InitiateLayerUploadOutput) SetUploadId(v string) *InitiateLayerUploadOutput {
  5035. s.UploadId = &v
  5036. return s
  5037. }
  5038. // The layer digest calculation performed by Amazon ECR upon receipt of the
  5039. // image layer does not match the digest specified.
  5040. type InvalidLayerException struct {
  5041. _ struct{} `type:"structure"`
  5042. respMetadata protocol.ResponseMetadata
  5043. // The error message associated with the exception.
  5044. Message_ *string `locationName:"message" type:"string"`
  5045. }
  5046. // String returns the string representation
  5047. func (s InvalidLayerException) String() string {
  5048. return awsutil.Prettify(s)
  5049. }
  5050. // GoString returns the string representation
  5051. func (s InvalidLayerException) GoString() string {
  5052. return s.String()
  5053. }
  5054. func newErrorInvalidLayerException(v protocol.ResponseMetadata) error {
  5055. return &InvalidLayerException{
  5056. respMetadata: v,
  5057. }
  5058. }
  5059. // Code returns the exception type name.
  5060. func (s InvalidLayerException) Code() string {
  5061. return "InvalidLayerException"
  5062. }
  5063. // Message returns the exception's message.
  5064. func (s InvalidLayerException) Message() string {
  5065. if s.Message_ != nil {
  5066. return *s.Message_
  5067. }
  5068. return ""
  5069. }
  5070. // OrigErr always returns nil, satisfies awserr.Error interface.
  5071. func (s InvalidLayerException) OrigErr() error {
  5072. return nil
  5073. }
  5074. func (s InvalidLayerException) Error() string {
  5075. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5076. }
  5077. // Status code returns the HTTP status code for the request's response error.
  5078. func (s InvalidLayerException) StatusCode() int {
  5079. return s.respMetadata.StatusCode
  5080. }
  5081. // RequestID returns the service's response RequestID for request.
  5082. func (s InvalidLayerException) RequestID() string {
  5083. return s.respMetadata.RequestID
  5084. }
  5085. // The layer part size is not valid, or the first byte specified is not consecutive
  5086. // to the last byte of a previous layer part upload.
  5087. type InvalidLayerPartException struct {
  5088. _ struct{} `type:"structure"`
  5089. respMetadata protocol.ResponseMetadata
  5090. // The last valid byte received from the layer part upload that is associated
  5091. // with the exception.
  5092. LastValidByteReceived *int64 `locationName:"lastValidByteReceived" type:"long"`
  5093. // The error message associated with the exception.
  5094. Message_ *string `locationName:"message" type:"string"`
  5095. // The registry ID associated with the exception.
  5096. RegistryId *string `locationName:"registryId" type:"string"`
  5097. // The repository name associated with the exception.
  5098. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  5099. // The upload ID associated with the exception.
  5100. UploadId *string `locationName:"uploadId" type:"string"`
  5101. }
  5102. // String returns the string representation
  5103. func (s InvalidLayerPartException) String() string {
  5104. return awsutil.Prettify(s)
  5105. }
  5106. // GoString returns the string representation
  5107. func (s InvalidLayerPartException) GoString() string {
  5108. return s.String()
  5109. }
  5110. func newErrorInvalidLayerPartException(v protocol.ResponseMetadata) error {
  5111. return &InvalidLayerPartException{
  5112. respMetadata: v,
  5113. }
  5114. }
  5115. // Code returns the exception type name.
  5116. func (s InvalidLayerPartException) Code() string {
  5117. return "InvalidLayerPartException"
  5118. }
  5119. // Message returns the exception's message.
  5120. func (s InvalidLayerPartException) Message() string {
  5121. if s.Message_ != nil {
  5122. return *s.Message_
  5123. }
  5124. return ""
  5125. }
  5126. // OrigErr always returns nil, satisfies awserr.Error interface.
  5127. func (s InvalidLayerPartException) OrigErr() error {
  5128. return nil
  5129. }
  5130. func (s InvalidLayerPartException) Error() string {
  5131. return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  5132. }
  5133. // Status code returns the HTTP status code for the request's response error.
  5134. func (s InvalidLayerPartException) StatusCode() int {
  5135. return s.respMetadata.StatusCode
  5136. }
  5137. // RequestID returns the service's response RequestID for request.
  5138. func (s InvalidLayerPartException) RequestID() string {
  5139. return s.respMetadata.RequestID
  5140. }
  5141. // The specified parameter is invalid. Review the available parameters for the
  5142. // API request.
  5143. type InvalidParameterException struct {
  5144. _ struct{} `type:"structure"`
  5145. respMetadata protocol.ResponseMetadata
  5146. // The error message associated with the exception.
  5147. Message_ *string `locationName:"message" type:"string"`
  5148. }
  5149. // String returns the string representation
  5150. func (s InvalidParameterException) String() string {
  5151. return awsutil.Prettify(s)
  5152. }
  5153. // GoString returns the string representation
  5154. func (s InvalidParameterException) GoString() string {
  5155. return s.String()
  5156. }
  5157. func newErrorInvalidParameterException(v protocol.ResponseMetadata) error {
  5158. return &InvalidParameterException{
  5159. respMetadata: v,
  5160. }
  5161. }
  5162. // Code returns the exception type name.
  5163. func (s InvalidParameterException) Code() string {
  5164. return "InvalidParameterException"
  5165. }
  5166. // Message returns the exception's message.
  5167. func (s InvalidParameterException) Message() string {
  5168. if s.Message_ != nil {
  5169. return *s.Message_
  5170. }
  5171. return ""
  5172. }
  5173. // OrigErr always returns nil, satisfies awserr.Error interface.
  5174. func (s InvalidParameterException) OrigErr() error {
  5175. return nil
  5176. }
  5177. func (s InvalidParameterException) Error() string {
  5178. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5179. }
  5180. // Status code returns the HTTP status code for the request's response error.
  5181. func (s InvalidParameterException) StatusCode() int {
  5182. return s.respMetadata.StatusCode
  5183. }
  5184. // RequestID returns the service's response RequestID for request.
  5185. func (s InvalidParameterException) RequestID() string {
  5186. return s.respMetadata.RequestID
  5187. }
  5188. // An invalid parameter has been specified. Tag keys can have a maximum character
  5189. // length of 128 characters, and tag values can have a maximum length of 256
  5190. // characters.
  5191. type InvalidTagParameterException struct {
  5192. _ struct{} `type:"structure"`
  5193. respMetadata protocol.ResponseMetadata
  5194. Message_ *string `locationName:"message" type:"string"`
  5195. }
  5196. // String returns the string representation
  5197. func (s InvalidTagParameterException) String() string {
  5198. return awsutil.Prettify(s)
  5199. }
  5200. // GoString returns the string representation
  5201. func (s InvalidTagParameterException) GoString() string {
  5202. return s.String()
  5203. }
  5204. func newErrorInvalidTagParameterException(v protocol.ResponseMetadata) error {
  5205. return &InvalidTagParameterException{
  5206. respMetadata: v,
  5207. }
  5208. }
  5209. // Code returns the exception type name.
  5210. func (s InvalidTagParameterException) Code() string {
  5211. return "InvalidTagParameterException"
  5212. }
  5213. // Message returns the exception's message.
  5214. func (s InvalidTagParameterException) Message() string {
  5215. if s.Message_ != nil {
  5216. return *s.Message_
  5217. }
  5218. return ""
  5219. }
  5220. // OrigErr always returns nil, satisfies awserr.Error interface.
  5221. func (s InvalidTagParameterException) OrigErr() error {
  5222. return nil
  5223. }
  5224. func (s InvalidTagParameterException) Error() string {
  5225. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5226. }
  5227. // Status code returns the HTTP status code for the request's response error.
  5228. func (s InvalidTagParameterException) StatusCode() int {
  5229. return s.respMetadata.StatusCode
  5230. }
  5231. // RequestID returns the service's response RequestID for request.
  5232. func (s InvalidTagParameterException) RequestID() string {
  5233. return s.respMetadata.RequestID
  5234. }
  5235. // An object representing an Amazon ECR image layer.
  5236. type Layer struct {
  5237. _ struct{} `type:"structure"`
  5238. // The availability status of the image layer.
  5239. LayerAvailability *string `locationName:"layerAvailability" type:"string" enum:"LayerAvailability"`
  5240. // The sha256 digest of the image layer.
  5241. LayerDigest *string `locationName:"layerDigest" type:"string"`
  5242. // The size, in bytes, of the image layer.
  5243. LayerSize *int64 `locationName:"layerSize" type:"long"`
  5244. // The media type of the layer, such as application/vnd.docker.image.rootfs.diff.tar.gzip
  5245. // or application/vnd.oci.image.layer.v1.tar+gzip.
  5246. MediaType *string `locationName:"mediaType" type:"string"`
  5247. }
  5248. // String returns the string representation
  5249. func (s Layer) String() string {
  5250. return awsutil.Prettify(s)
  5251. }
  5252. // GoString returns the string representation
  5253. func (s Layer) GoString() string {
  5254. return s.String()
  5255. }
  5256. // SetLayerAvailability sets the LayerAvailability field's value.
  5257. func (s *Layer) SetLayerAvailability(v string) *Layer {
  5258. s.LayerAvailability = &v
  5259. return s
  5260. }
  5261. // SetLayerDigest sets the LayerDigest field's value.
  5262. func (s *Layer) SetLayerDigest(v string) *Layer {
  5263. s.LayerDigest = &v
  5264. return s
  5265. }
  5266. // SetLayerSize sets the LayerSize field's value.
  5267. func (s *Layer) SetLayerSize(v int64) *Layer {
  5268. s.LayerSize = &v
  5269. return s
  5270. }
  5271. // SetMediaType sets the MediaType field's value.
  5272. func (s *Layer) SetMediaType(v string) *Layer {
  5273. s.MediaType = &v
  5274. return s
  5275. }
  5276. // The image layer already exists in the associated repository.
  5277. type LayerAlreadyExistsException struct {
  5278. _ struct{} `type:"structure"`
  5279. respMetadata protocol.ResponseMetadata
  5280. // The error message associated with the exception.
  5281. Message_ *string `locationName:"message" type:"string"`
  5282. }
  5283. // String returns the string representation
  5284. func (s LayerAlreadyExistsException) String() string {
  5285. return awsutil.Prettify(s)
  5286. }
  5287. // GoString returns the string representation
  5288. func (s LayerAlreadyExistsException) GoString() string {
  5289. return s.String()
  5290. }
  5291. func newErrorLayerAlreadyExistsException(v protocol.ResponseMetadata) error {
  5292. return &LayerAlreadyExistsException{
  5293. respMetadata: v,
  5294. }
  5295. }
  5296. // Code returns the exception type name.
  5297. func (s LayerAlreadyExistsException) Code() string {
  5298. return "LayerAlreadyExistsException"
  5299. }
  5300. // Message returns the exception's message.
  5301. func (s LayerAlreadyExistsException) Message() string {
  5302. if s.Message_ != nil {
  5303. return *s.Message_
  5304. }
  5305. return ""
  5306. }
  5307. // OrigErr always returns nil, satisfies awserr.Error interface.
  5308. func (s LayerAlreadyExistsException) OrigErr() error {
  5309. return nil
  5310. }
  5311. func (s LayerAlreadyExistsException) Error() string {
  5312. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5313. }
  5314. // Status code returns the HTTP status code for the request's response error.
  5315. func (s LayerAlreadyExistsException) StatusCode() int {
  5316. return s.respMetadata.StatusCode
  5317. }
  5318. // RequestID returns the service's response RequestID for request.
  5319. func (s LayerAlreadyExistsException) RequestID() string {
  5320. return s.respMetadata.RequestID
  5321. }
  5322. // An object representing an Amazon ECR image layer failure.
  5323. type LayerFailure struct {
  5324. _ struct{} `type:"structure"`
  5325. // The failure code associated with the failure.
  5326. FailureCode *string `locationName:"failureCode" type:"string" enum:"LayerFailureCode"`
  5327. // The reason for the failure.
  5328. FailureReason *string `locationName:"failureReason" type:"string"`
  5329. // The layer digest associated with the failure.
  5330. LayerDigest *string `locationName:"layerDigest" type:"string"`
  5331. }
  5332. // String returns the string representation
  5333. func (s LayerFailure) String() string {
  5334. return awsutil.Prettify(s)
  5335. }
  5336. // GoString returns the string representation
  5337. func (s LayerFailure) GoString() string {
  5338. return s.String()
  5339. }
  5340. // SetFailureCode sets the FailureCode field's value.
  5341. func (s *LayerFailure) SetFailureCode(v string) *LayerFailure {
  5342. s.FailureCode = &v
  5343. return s
  5344. }
  5345. // SetFailureReason sets the FailureReason field's value.
  5346. func (s *LayerFailure) SetFailureReason(v string) *LayerFailure {
  5347. s.FailureReason = &v
  5348. return s
  5349. }
  5350. // SetLayerDigest sets the LayerDigest field's value.
  5351. func (s *LayerFailure) SetLayerDigest(v string) *LayerFailure {
  5352. s.LayerDigest = &v
  5353. return s
  5354. }
  5355. // The specified layer is not available because it is not associated with an
  5356. // image. Unassociated image layers may be cleaned up at any time.
  5357. type LayerInaccessibleException struct {
  5358. _ struct{} `type:"structure"`
  5359. respMetadata protocol.ResponseMetadata
  5360. // The error message associated with the exception.
  5361. Message_ *string `locationName:"message" type:"string"`
  5362. }
  5363. // String returns the string representation
  5364. func (s LayerInaccessibleException) String() string {
  5365. return awsutil.Prettify(s)
  5366. }
  5367. // GoString returns the string representation
  5368. func (s LayerInaccessibleException) GoString() string {
  5369. return s.String()
  5370. }
  5371. func newErrorLayerInaccessibleException(v protocol.ResponseMetadata) error {
  5372. return &LayerInaccessibleException{
  5373. respMetadata: v,
  5374. }
  5375. }
  5376. // Code returns the exception type name.
  5377. func (s LayerInaccessibleException) Code() string {
  5378. return "LayerInaccessibleException"
  5379. }
  5380. // Message returns the exception's message.
  5381. func (s LayerInaccessibleException) Message() string {
  5382. if s.Message_ != nil {
  5383. return *s.Message_
  5384. }
  5385. return ""
  5386. }
  5387. // OrigErr always returns nil, satisfies awserr.Error interface.
  5388. func (s LayerInaccessibleException) OrigErr() error {
  5389. return nil
  5390. }
  5391. func (s LayerInaccessibleException) Error() string {
  5392. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5393. }
  5394. // Status code returns the HTTP status code for the request's response error.
  5395. func (s LayerInaccessibleException) StatusCode() int {
  5396. return s.respMetadata.StatusCode
  5397. }
  5398. // RequestID returns the service's response RequestID for request.
  5399. func (s LayerInaccessibleException) RequestID() string {
  5400. return s.respMetadata.RequestID
  5401. }
  5402. // Layer parts must be at least 5 MiB in size.
  5403. type LayerPartTooSmallException struct {
  5404. _ struct{} `type:"structure"`
  5405. respMetadata protocol.ResponseMetadata
  5406. // The error message associated with the exception.
  5407. Message_ *string `locationName:"message" type:"string"`
  5408. }
  5409. // String returns the string representation
  5410. func (s LayerPartTooSmallException) String() string {
  5411. return awsutil.Prettify(s)
  5412. }
  5413. // GoString returns the string representation
  5414. func (s LayerPartTooSmallException) GoString() string {
  5415. return s.String()
  5416. }
  5417. func newErrorLayerPartTooSmallException(v protocol.ResponseMetadata) error {
  5418. return &LayerPartTooSmallException{
  5419. respMetadata: v,
  5420. }
  5421. }
  5422. // Code returns the exception type name.
  5423. func (s LayerPartTooSmallException) Code() string {
  5424. return "LayerPartTooSmallException"
  5425. }
  5426. // Message returns the exception's message.
  5427. func (s LayerPartTooSmallException) Message() string {
  5428. if s.Message_ != nil {
  5429. return *s.Message_
  5430. }
  5431. return ""
  5432. }
  5433. // OrigErr always returns nil, satisfies awserr.Error interface.
  5434. func (s LayerPartTooSmallException) OrigErr() error {
  5435. return nil
  5436. }
  5437. func (s LayerPartTooSmallException) Error() string {
  5438. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5439. }
  5440. // Status code returns the HTTP status code for the request's response error.
  5441. func (s LayerPartTooSmallException) StatusCode() int {
  5442. return s.respMetadata.StatusCode
  5443. }
  5444. // RequestID returns the service's response RequestID for request.
  5445. func (s LayerPartTooSmallException) RequestID() string {
  5446. return s.respMetadata.RequestID
  5447. }
  5448. // The specified layers could not be found, or the specified layer is not valid
  5449. // for this repository.
  5450. type LayersNotFoundException struct {
  5451. _ struct{} `type:"structure"`
  5452. respMetadata protocol.ResponseMetadata
  5453. // The error message associated with the exception.
  5454. Message_ *string `locationName:"message" type:"string"`
  5455. }
  5456. // String returns the string representation
  5457. func (s LayersNotFoundException) String() string {
  5458. return awsutil.Prettify(s)
  5459. }
  5460. // GoString returns the string representation
  5461. func (s LayersNotFoundException) GoString() string {
  5462. return s.String()
  5463. }
  5464. func newErrorLayersNotFoundException(v protocol.ResponseMetadata) error {
  5465. return &LayersNotFoundException{
  5466. respMetadata: v,
  5467. }
  5468. }
  5469. // Code returns the exception type name.
  5470. func (s LayersNotFoundException) Code() string {
  5471. return "LayersNotFoundException"
  5472. }
  5473. // Message returns the exception's message.
  5474. func (s LayersNotFoundException) Message() string {
  5475. if s.Message_ != nil {
  5476. return *s.Message_
  5477. }
  5478. return ""
  5479. }
  5480. // OrigErr always returns nil, satisfies awserr.Error interface.
  5481. func (s LayersNotFoundException) OrigErr() error {
  5482. return nil
  5483. }
  5484. func (s LayersNotFoundException) Error() string {
  5485. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5486. }
  5487. // Status code returns the HTTP status code for the request's response error.
  5488. func (s LayersNotFoundException) StatusCode() int {
  5489. return s.respMetadata.StatusCode
  5490. }
  5491. // RequestID returns the service's response RequestID for request.
  5492. func (s LayersNotFoundException) RequestID() string {
  5493. return s.respMetadata.RequestID
  5494. }
  5495. // The lifecycle policy could not be found, and no policy is set to the repository.
  5496. type LifecyclePolicyNotFoundException struct {
  5497. _ struct{} `type:"structure"`
  5498. respMetadata protocol.ResponseMetadata
  5499. Message_ *string `locationName:"message" type:"string"`
  5500. }
  5501. // String returns the string representation
  5502. func (s LifecyclePolicyNotFoundException) String() string {
  5503. return awsutil.Prettify(s)
  5504. }
  5505. // GoString returns the string representation
  5506. func (s LifecyclePolicyNotFoundException) GoString() string {
  5507. return s.String()
  5508. }
  5509. func newErrorLifecyclePolicyNotFoundException(v protocol.ResponseMetadata) error {
  5510. return &LifecyclePolicyNotFoundException{
  5511. respMetadata: v,
  5512. }
  5513. }
  5514. // Code returns the exception type name.
  5515. func (s LifecyclePolicyNotFoundException) Code() string {
  5516. return "LifecyclePolicyNotFoundException"
  5517. }
  5518. // Message returns the exception's message.
  5519. func (s LifecyclePolicyNotFoundException) Message() string {
  5520. if s.Message_ != nil {
  5521. return *s.Message_
  5522. }
  5523. return ""
  5524. }
  5525. // OrigErr always returns nil, satisfies awserr.Error interface.
  5526. func (s LifecyclePolicyNotFoundException) OrigErr() error {
  5527. return nil
  5528. }
  5529. func (s LifecyclePolicyNotFoundException) Error() string {
  5530. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5531. }
  5532. // Status code returns the HTTP status code for the request's response error.
  5533. func (s LifecyclePolicyNotFoundException) StatusCode() int {
  5534. return s.respMetadata.StatusCode
  5535. }
  5536. // RequestID returns the service's response RequestID for request.
  5537. func (s LifecyclePolicyNotFoundException) RequestID() string {
  5538. return s.respMetadata.RequestID
  5539. }
  5540. // The filter for the lifecycle policy preview.
  5541. type LifecyclePolicyPreviewFilter struct {
  5542. _ struct{} `type:"structure"`
  5543. // The tag status of the image.
  5544. TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"`
  5545. }
  5546. // String returns the string representation
  5547. func (s LifecyclePolicyPreviewFilter) String() string {
  5548. return awsutil.Prettify(s)
  5549. }
  5550. // GoString returns the string representation
  5551. func (s LifecyclePolicyPreviewFilter) GoString() string {
  5552. return s.String()
  5553. }
  5554. // SetTagStatus sets the TagStatus field's value.
  5555. func (s *LifecyclePolicyPreviewFilter) SetTagStatus(v string) *LifecyclePolicyPreviewFilter {
  5556. s.TagStatus = &v
  5557. return s
  5558. }
  5559. // The previous lifecycle policy preview request has not completed. Please try
  5560. // again later.
  5561. type LifecyclePolicyPreviewInProgressException struct {
  5562. _ struct{} `type:"structure"`
  5563. respMetadata protocol.ResponseMetadata
  5564. Message_ *string `locationName:"message" type:"string"`
  5565. }
  5566. // String returns the string representation
  5567. func (s LifecyclePolicyPreviewInProgressException) String() string {
  5568. return awsutil.Prettify(s)
  5569. }
  5570. // GoString returns the string representation
  5571. func (s LifecyclePolicyPreviewInProgressException) GoString() string {
  5572. return s.String()
  5573. }
  5574. func newErrorLifecyclePolicyPreviewInProgressException(v protocol.ResponseMetadata) error {
  5575. return &LifecyclePolicyPreviewInProgressException{
  5576. respMetadata: v,
  5577. }
  5578. }
  5579. // Code returns the exception type name.
  5580. func (s LifecyclePolicyPreviewInProgressException) Code() string {
  5581. return "LifecyclePolicyPreviewInProgressException"
  5582. }
  5583. // Message returns the exception's message.
  5584. func (s LifecyclePolicyPreviewInProgressException) Message() string {
  5585. if s.Message_ != nil {
  5586. return *s.Message_
  5587. }
  5588. return ""
  5589. }
  5590. // OrigErr always returns nil, satisfies awserr.Error interface.
  5591. func (s LifecyclePolicyPreviewInProgressException) OrigErr() error {
  5592. return nil
  5593. }
  5594. func (s LifecyclePolicyPreviewInProgressException) Error() string {
  5595. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5596. }
  5597. // Status code returns the HTTP status code for the request's response error.
  5598. func (s LifecyclePolicyPreviewInProgressException) StatusCode() int {
  5599. return s.respMetadata.StatusCode
  5600. }
  5601. // RequestID returns the service's response RequestID for request.
  5602. func (s LifecyclePolicyPreviewInProgressException) RequestID() string {
  5603. return s.respMetadata.RequestID
  5604. }
  5605. // There is no dry run for this repository.
  5606. type LifecyclePolicyPreviewNotFoundException struct {
  5607. _ struct{} `type:"structure"`
  5608. respMetadata protocol.ResponseMetadata
  5609. Message_ *string `locationName:"message" type:"string"`
  5610. }
  5611. // String returns the string representation
  5612. func (s LifecyclePolicyPreviewNotFoundException) String() string {
  5613. return awsutil.Prettify(s)
  5614. }
  5615. // GoString returns the string representation
  5616. func (s LifecyclePolicyPreviewNotFoundException) GoString() string {
  5617. return s.String()
  5618. }
  5619. func newErrorLifecyclePolicyPreviewNotFoundException(v protocol.ResponseMetadata) error {
  5620. return &LifecyclePolicyPreviewNotFoundException{
  5621. respMetadata: v,
  5622. }
  5623. }
  5624. // Code returns the exception type name.
  5625. func (s LifecyclePolicyPreviewNotFoundException) Code() string {
  5626. return "LifecyclePolicyPreviewNotFoundException"
  5627. }
  5628. // Message returns the exception's message.
  5629. func (s LifecyclePolicyPreviewNotFoundException) Message() string {
  5630. if s.Message_ != nil {
  5631. return *s.Message_
  5632. }
  5633. return ""
  5634. }
  5635. // OrigErr always returns nil, satisfies awserr.Error interface.
  5636. func (s LifecyclePolicyPreviewNotFoundException) OrigErr() error {
  5637. return nil
  5638. }
  5639. func (s LifecyclePolicyPreviewNotFoundException) Error() string {
  5640. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5641. }
  5642. // Status code returns the HTTP status code for the request's response error.
  5643. func (s LifecyclePolicyPreviewNotFoundException) StatusCode() int {
  5644. return s.respMetadata.StatusCode
  5645. }
  5646. // RequestID returns the service's response RequestID for request.
  5647. func (s LifecyclePolicyPreviewNotFoundException) RequestID() string {
  5648. return s.respMetadata.RequestID
  5649. }
  5650. // The result of the lifecycle policy preview.
  5651. type LifecyclePolicyPreviewResult struct {
  5652. _ struct{} `type:"structure"`
  5653. // The type of action to be taken.
  5654. Action *LifecyclePolicyRuleAction `locationName:"action" type:"structure"`
  5655. // The priority of the applied rule.
  5656. AppliedRulePriority *int64 `locationName:"appliedRulePriority" min:"1" type:"integer"`
  5657. // The sha256 digest of the image manifest.
  5658. ImageDigest *string `locationName:"imageDigest" type:"string"`
  5659. // The date and time, expressed in standard JavaScript date format, at which
  5660. // the current image was pushed to the repository.
  5661. ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp"`
  5662. // The list of tags associated with this image.
  5663. ImageTags []*string `locationName:"imageTags" type:"list"`
  5664. }
  5665. // String returns the string representation
  5666. func (s LifecyclePolicyPreviewResult) String() string {
  5667. return awsutil.Prettify(s)
  5668. }
  5669. // GoString returns the string representation
  5670. func (s LifecyclePolicyPreviewResult) GoString() string {
  5671. return s.String()
  5672. }
  5673. // SetAction sets the Action field's value.
  5674. func (s *LifecyclePolicyPreviewResult) SetAction(v *LifecyclePolicyRuleAction) *LifecyclePolicyPreviewResult {
  5675. s.Action = v
  5676. return s
  5677. }
  5678. // SetAppliedRulePriority sets the AppliedRulePriority field's value.
  5679. func (s *LifecyclePolicyPreviewResult) SetAppliedRulePriority(v int64) *LifecyclePolicyPreviewResult {
  5680. s.AppliedRulePriority = &v
  5681. return s
  5682. }
  5683. // SetImageDigest sets the ImageDigest field's value.
  5684. func (s *LifecyclePolicyPreviewResult) SetImageDigest(v string) *LifecyclePolicyPreviewResult {
  5685. s.ImageDigest = &v
  5686. return s
  5687. }
  5688. // SetImagePushedAt sets the ImagePushedAt field's value.
  5689. func (s *LifecyclePolicyPreviewResult) SetImagePushedAt(v time.Time) *LifecyclePolicyPreviewResult {
  5690. s.ImagePushedAt = &v
  5691. return s
  5692. }
  5693. // SetImageTags sets the ImageTags field's value.
  5694. func (s *LifecyclePolicyPreviewResult) SetImageTags(v []*string) *LifecyclePolicyPreviewResult {
  5695. s.ImageTags = v
  5696. return s
  5697. }
  5698. // The summary of the lifecycle policy preview request.
  5699. type LifecyclePolicyPreviewSummary struct {
  5700. _ struct{} `type:"structure"`
  5701. // The number of expiring images.
  5702. ExpiringImageTotalCount *int64 `locationName:"expiringImageTotalCount" type:"integer"`
  5703. }
  5704. // String returns the string representation
  5705. func (s LifecyclePolicyPreviewSummary) String() string {
  5706. return awsutil.Prettify(s)
  5707. }
  5708. // GoString returns the string representation
  5709. func (s LifecyclePolicyPreviewSummary) GoString() string {
  5710. return s.String()
  5711. }
  5712. // SetExpiringImageTotalCount sets the ExpiringImageTotalCount field's value.
  5713. func (s *LifecyclePolicyPreviewSummary) SetExpiringImageTotalCount(v int64) *LifecyclePolicyPreviewSummary {
  5714. s.ExpiringImageTotalCount = &v
  5715. return s
  5716. }
  5717. // The type of action to be taken.
  5718. type LifecyclePolicyRuleAction struct {
  5719. _ struct{} `type:"structure"`
  5720. // The type of action to be taken.
  5721. Type *string `locationName:"type" type:"string" enum:"ImageActionType"`
  5722. }
  5723. // String returns the string representation
  5724. func (s LifecyclePolicyRuleAction) String() string {
  5725. return awsutil.Prettify(s)
  5726. }
  5727. // GoString returns the string representation
  5728. func (s LifecyclePolicyRuleAction) GoString() string {
  5729. return s.String()
  5730. }
  5731. // SetType sets the Type field's value.
  5732. func (s *LifecyclePolicyRuleAction) SetType(v string) *LifecyclePolicyRuleAction {
  5733. s.Type = &v
  5734. return s
  5735. }
  5736. // The operation did not succeed because it would have exceeded a service limit
  5737. // for your account. For more information, see Amazon ECR Default Service Limits
  5738. // (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)
  5739. // in the Amazon Elastic Container Registry User Guide.
  5740. type LimitExceededException struct {
  5741. _ struct{} `type:"structure"`
  5742. respMetadata protocol.ResponseMetadata
  5743. // The error message associated with the exception.
  5744. Message_ *string `locationName:"message" type:"string"`
  5745. }
  5746. // String returns the string representation
  5747. func (s LimitExceededException) String() string {
  5748. return awsutil.Prettify(s)
  5749. }
  5750. // GoString returns the string representation
  5751. func (s LimitExceededException) GoString() string {
  5752. return s.String()
  5753. }
  5754. func newErrorLimitExceededException(v protocol.ResponseMetadata) error {
  5755. return &LimitExceededException{
  5756. respMetadata: v,
  5757. }
  5758. }
  5759. // Code returns the exception type name.
  5760. func (s LimitExceededException) Code() string {
  5761. return "LimitExceededException"
  5762. }
  5763. // Message returns the exception's message.
  5764. func (s LimitExceededException) Message() string {
  5765. if s.Message_ != nil {
  5766. return *s.Message_
  5767. }
  5768. return ""
  5769. }
  5770. // OrigErr always returns nil, satisfies awserr.Error interface.
  5771. func (s LimitExceededException) OrigErr() error {
  5772. return nil
  5773. }
  5774. func (s LimitExceededException) Error() string {
  5775. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5776. }
  5777. // Status code returns the HTTP status code for the request's response error.
  5778. func (s LimitExceededException) StatusCode() int {
  5779. return s.respMetadata.StatusCode
  5780. }
  5781. // RequestID returns the service's response RequestID for request.
  5782. func (s LimitExceededException) RequestID() string {
  5783. return s.respMetadata.RequestID
  5784. }
  5785. // An object representing a filter on a ListImages operation.
  5786. type ListImagesFilter struct {
  5787. _ struct{} `type:"structure"`
  5788. // The tag status with which to filter your ListImages results. You can filter
  5789. // results based on whether they are TAGGED or UNTAGGED.
  5790. TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"`
  5791. }
  5792. // String returns the string representation
  5793. func (s ListImagesFilter) String() string {
  5794. return awsutil.Prettify(s)
  5795. }
  5796. // GoString returns the string representation
  5797. func (s ListImagesFilter) GoString() string {
  5798. return s.String()
  5799. }
  5800. // SetTagStatus sets the TagStatus field's value.
  5801. func (s *ListImagesFilter) SetTagStatus(v string) *ListImagesFilter {
  5802. s.TagStatus = &v
  5803. return s
  5804. }
  5805. type ListImagesInput struct {
  5806. _ struct{} `type:"structure"`
  5807. // The filter key and value with which to filter your ListImages results.
  5808. Filter *ListImagesFilter `locationName:"filter" type:"structure"`
  5809. // The maximum number of image results returned by ListImages in paginated output.
  5810. // When this parameter is used, ListImages only returns maxResults results in
  5811. // a single page along with a nextToken response element. The remaining results
  5812. // of the initial request can be seen by sending another ListImages request
  5813. // with the returned nextToken value. This value can be between 1 and 1000.
  5814. // If this parameter is not used, then ListImages returns up to 100 results
  5815. // and a nextToken value, if applicable.
  5816. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  5817. // The nextToken value returned from a previous paginated ListImages request
  5818. // where maxResults was used and the results exceeded the value of that parameter.
  5819. // Pagination continues from the end of the previous results that returned the
  5820. // nextToken value. This value is null when there are no more results to return.
  5821. //
  5822. // This token should be treated as an opaque identifier that is only used to
  5823. // retrieve the next items in a list and not for other programmatic purposes.
  5824. NextToken *string `locationName:"nextToken" type:"string"`
  5825. // The AWS account ID associated with the registry that contains the repository
  5826. // in which to list images. If you do not specify a registry, the default registry
  5827. // is assumed.
  5828. RegistryId *string `locationName:"registryId" type:"string"`
  5829. // The repository with image IDs to be listed.
  5830. //
  5831. // RepositoryName is a required field
  5832. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  5833. }
  5834. // String returns the string representation
  5835. func (s ListImagesInput) String() string {
  5836. return awsutil.Prettify(s)
  5837. }
  5838. // GoString returns the string representation
  5839. func (s ListImagesInput) GoString() string {
  5840. return s.String()
  5841. }
  5842. // Validate inspects the fields of the type to determine if they are valid.
  5843. func (s *ListImagesInput) Validate() error {
  5844. invalidParams := request.ErrInvalidParams{Context: "ListImagesInput"}
  5845. if s.MaxResults != nil && *s.MaxResults < 1 {
  5846. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  5847. }
  5848. if s.RepositoryName == nil {
  5849. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  5850. }
  5851. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  5852. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  5853. }
  5854. if invalidParams.Len() > 0 {
  5855. return invalidParams
  5856. }
  5857. return nil
  5858. }
  5859. // SetFilter sets the Filter field's value.
  5860. func (s *ListImagesInput) SetFilter(v *ListImagesFilter) *ListImagesInput {
  5861. s.Filter = v
  5862. return s
  5863. }
  5864. // SetMaxResults sets the MaxResults field's value.
  5865. func (s *ListImagesInput) SetMaxResults(v int64) *ListImagesInput {
  5866. s.MaxResults = &v
  5867. return s
  5868. }
  5869. // SetNextToken sets the NextToken field's value.
  5870. func (s *ListImagesInput) SetNextToken(v string) *ListImagesInput {
  5871. s.NextToken = &v
  5872. return s
  5873. }
  5874. // SetRegistryId sets the RegistryId field's value.
  5875. func (s *ListImagesInput) SetRegistryId(v string) *ListImagesInput {
  5876. s.RegistryId = &v
  5877. return s
  5878. }
  5879. // SetRepositoryName sets the RepositoryName field's value.
  5880. func (s *ListImagesInput) SetRepositoryName(v string) *ListImagesInput {
  5881. s.RepositoryName = &v
  5882. return s
  5883. }
  5884. type ListImagesOutput struct {
  5885. _ struct{} `type:"structure"`
  5886. // The list of image IDs for the requested repository.
  5887. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
  5888. // The nextToken value to include in a future ListImages request. When the results
  5889. // of a ListImages request exceed maxResults, this value can be used to retrieve
  5890. // the next page of results. This value is null when there are no more results
  5891. // to return.
  5892. NextToken *string `locationName:"nextToken" type:"string"`
  5893. }
  5894. // String returns the string representation
  5895. func (s ListImagesOutput) String() string {
  5896. return awsutil.Prettify(s)
  5897. }
  5898. // GoString returns the string representation
  5899. func (s ListImagesOutput) GoString() string {
  5900. return s.String()
  5901. }
  5902. // SetImageIds sets the ImageIds field's value.
  5903. func (s *ListImagesOutput) SetImageIds(v []*ImageIdentifier) *ListImagesOutput {
  5904. s.ImageIds = v
  5905. return s
  5906. }
  5907. // SetNextToken sets the NextToken field's value.
  5908. func (s *ListImagesOutput) SetNextToken(v string) *ListImagesOutput {
  5909. s.NextToken = &v
  5910. return s
  5911. }
  5912. type ListTagsForResourceInput struct {
  5913. _ struct{} `type:"structure"`
  5914. // The Amazon Resource Name (ARN) that identifies the resource for which to
  5915. // list the tags. Currently, the only supported resource is an Amazon ECR repository.
  5916. //
  5917. // ResourceArn is a required field
  5918. ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"`
  5919. }
  5920. // String returns the string representation
  5921. func (s ListTagsForResourceInput) String() string {
  5922. return awsutil.Prettify(s)
  5923. }
  5924. // GoString returns the string representation
  5925. func (s ListTagsForResourceInput) GoString() string {
  5926. return s.String()
  5927. }
  5928. // Validate inspects the fields of the type to determine if they are valid.
  5929. func (s *ListTagsForResourceInput) Validate() error {
  5930. invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
  5931. if s.ResourceArn == nil {
  5932. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  5933. }
  5934. if invalidParams.Len() > 0 {
  5935. return invalidParams
  5936. }
  5937. return nil
  5938. }
  5939. // SetResourceArn sets the ResourceArn field's value.
  5940. func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput {
  5941. s.ResourceArn = &v
  5942. return s
  5943. }
  5944. type ListTagsForResourceOutput struct {
  5945. _ struct{} `type:"structure"`
  5946. // The tags for the resource.
  5947. Tags []*Tag `locationName:"tags" type:"list"`
  5948. }
  5949. // String returns the string representation
  5950. func (s ListTagsForResourceOutput) String() string {
  5951. return awsutil.Prettify(s)
  5952. }
  5953. // GoString returns the string representation
  5954. func (s ListTagsForResourceOutput) GoString() string {
  5955. return s.String()
  5956. }
  5957. // SetTags sets the Tags field's value.
  5958. func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput {
  5959. s.Tags = v
  5960. return s
  5961. }
  5962. type PutImageInput struct {
  5963. _ struct{} `type:"structure"`
  5964. // The image manifest corresponding to the image to be uploaded.
  5965. //
  5966. // ImageManifest is a required field
  5967. ImageManifest *string `locationName:"imageManifest" min:"1" type:"string" required:"true"`
  5968. // The tag to associate with the image. This parameter is required for images
  5969. // that use the Docker Image Manifest V2 Schema 2 or OCI formats.
  5970. ImageTag *string `locationName:"imageTag" min:"1" type:"string"`
  5971. // The AWS account ID associated with the registry that contains the repository
  5972. // in which to put the image. If you do not specify a registry, the default
  5973. // registry is assumed.
  5974. RegistryId *string `locationName:"registryId" type:"string"`
  5975. // The name of the repository in which to put the image.
  5976. //
  5977. // RepositoryName is a required field
  5978. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  5979. }
  5980. // String returns the string representation
  5981. func (s PutImageInput) String() string {
  5982. return awsutil.Prettify(s)
  5983. }
  5984. // GoString returns the string representation
  5985. func (s PutImageInput) GoString() string {
  5986. return s.String()
  5987. }
  5988. // Validate inspects the fields of the type to determine if they are valid.
  5989. func (s *PutImageInput) Validate() error {
  5990. invalidParams := request.ErrInvalidParams{Context: "PutImageInput"}
  5991. if s.ImageManifest == nil {
  5992. invalidParams.Add(request.NewErrParamRequired("ImageManifest"))
  5993. }
  5994. if s.ImageManifest != nil && len(*s.ImageManifest) < 1 {
  5995. invalidParams.Add(request.NewErrParamMinLen("ImageManifest", 1))
  5996. }
  5997. if s.ImageTag != nil && len(*s.ImageTag) < 1 {
  5998. invalidParams.Add(request.NewErrParamMinLen("ImageTag", 1))
  5999. }
  6000. if s.RepositoryName == nil {
  6001. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  6002. }
  6003. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  6004. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  6005. }
  6006. if invalidParams.Len() > 0 {
  6007. return invalidParams
  6008. }
  6009. return nil
  6010. }
  6011. // SetImageManifest sets the ImageManifest field's value.
  6012. func (s *PutImageInput) SetImageManifest(v string) *PutImageInput {
  6013. s.ImageManifest = &v
  6014. return s
  6015. }
  6016. // SetImageTag sets the ImageTag field's value.
  6017. func (s *PutImageInput) SetImageTag(v string) *PutImageInput {
  6018. s.ImageTag = &v
  6019. return s
  6020. }
  6021. // SetRegistryId sets the RegistryId field's value.
  6022. func (s *PutImageInput) SetRegistryId(v string) *PutImageInput {
  6023. s.RegistryId = &v
  6024. return s
  6025. }
  6026. // SetRepositoryName sets the RepositoryName field's value.
  6027. func (s *PutImageInput) SetRepositoryName(v string) *PutImageInput {
  6028. s.RepositoryName = &v
  6029. return s
  6030. }
  6031. type PutImageOutput struct {
  6032. _ struct{} `type:"structure"`
  6033. // Details of the image uploaded.
  6034. Image *Image `locationName:"image" type:"structure"`
  6035. }
  6036. // String returns the string representation
  6037. func (s PutImageOutput) String() string {
  6038. return awsutil.Prettify(s)
  6039. }
  6040. // GoString returns the string representation
  6041. func (s PutImageOutput) GoString() string {
  6042. return s.String()
  6043. }
  6044. // SetImage sets the Image field's value.
  6045. func (s *PutImageOutput) SetImage(v *Image) *PutImageOutput {
  6046. s.Image = v
  6047. return s
  6048. }
  6049. type PutImageScanningConfigurationInput struct {
  6050. _ struct{} `type:"structure"`
  6051. // The image scanning configuration for the repository. This setting determines
  6052. // whether images are scanned for known vulnerabilities after being pushed to
  6053. // the repository.
  6054. //
  6055. // ImageScanningConfiguration is a required field
  6056. ImageScanningConfiguration *ImageScanningConfiguration `locationName:"imageScanningConfiguration" type:"structure" required:"true"`
  6057. // The AWS account ID associated with the registry that contains the repository
  6058. // in which to update the image scanning configuration setting. If you do not
  6059. // specify a registry, the default registry is assumed.
  6060. RegistryId *string `locationName:"registryId" type:"string"`
  6061. // The name of the repository in which to update the image scanning configuration
  6062. // setting.
  6063. //
  6064. // RepositoryName is a required field
  6065. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  6066. }
  6067. // String returns the string representation
  6068. func (s PutImageScanningConfigurationInput) String() string {
  6069. return awsutil.Prettify(s)
  6070. }
  6071. // GoString returns the string representation
  6072. func (s PutImageScanningConfigurationInput) GoString() string {
  6073. return s.String()
  6074. }
  6075. // Validate inspects the fields of the type to determine if they are valid.
  6076. func (s *PutImageScanningConfigurationInput) Validate() error {
  6077. invalidParams := request.ErrInvalidParams{Context: "PutImageScanningConfigurationInput"}
  6078. if s.ImageScanningConfiguration == nil {
  6079. invalidParams.Add(request.NewErrParamRequired("ImageScanningConfiguration"))
  6080. }
  6081. if s.RepositoryName == nil {
  6082. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  6083. }
  6084. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  6085. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  6086. }
  6087. if invalidParams.Len() > 0 {
  6088. return invalidParams
  6089. }
  6090. return nil
  6091. }
  6092. // SetImageScanningConfiguration sets the ImageScanningConfiguration field's value.
  6093. func (s *PutImageScanningConfigurationInput) SetImageScanningConfiguration(v *ImageScanningConfiguration) *PutImageScanningConfigurationInput {
  6094. s.ImageScanningConfiguration = v
  6095. return s
  6096. }
  6097. // SetRegistryId sets the RegistryId field's value.
  6098. func (s *PutImageScanningConfigurationInput) SetRegistryId(v string) *PutImageScanningConfigurationInput {
  6099. s.RegistryId = &v
  6100. return s
  6101. }
  6102. // SetRepositoryName sets the RepositoryName field's value.
  6103. func (s *PutImageScanningConfigurationInput) SetRepositoryName(v string) *PutImageScanningConfigurationInput {
  6104. s.RepositoryName = &v
  6105. return s
  6106. }
  6107. type PutImageScanningConfigurationOutput struct {
  6108. _ struct{} `type:"structure"`
  6109. // The image scanning configuration setting for the repository.
  6110. ImageScanningConfiguration *ImageScanningConfiguration `locationName:"imageScanningConfiguration" type:"structure"`
  6111. // The registry ID associated with the request.
  6112. RegistryId *string `locationName:"registryId" type:"string"`
  6113. // The repository name associated with the request.
  6114. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  6115. }
  6116. // String returns the string representation
  6117. func (s PutImageScanningConfigurationOutput) String() string {
  6118. return awsutil.Prettify(s)
  6119. }
  6120. // GoString returns the string representation
  6121. func (s PutImageScanningConfigurationOutput) GoString() string {
  6122. return s.String()
  6123. }
  6124. // SetImageScanningConfiguration sets the ImageScanningConfiguration field's value.
  6125. func (s *PutImageScanningConfigurationOutput) SetImageScanningConfiguration(v *ImageScanningConfiguration) *PutImageScanningConfigurationOutput {
  6126. s.ImageScanningConfiguration = v
  6127. return s
  6128. }
  6129. // SetRegistryId sets the RegistryId field's value.
  6130. func (s *PutImageScanningConfigurationOutput) SetRegistryId(v string) *PutImageScanningConfigurationOutput {
  6131. s.RegistryId = &v
  6132. return s
  6133. }
  6134. // SetRepositoryName sets the RepositoryName field's value.
  6135. func (s *PutImageScanningConfigurationOutput) SetRepositoryName(v string) *PutImageScanningConfigurationOutput {
  6136. s.RepositoryName = &v
  6137. return s
  6138. }
  6139. type PutImageTagMutabilityInput struct {
  6140. _ struct{} `type:"structure"`
  6141. // The tag mutability setting for the repository. If MUTABLE is specified, image
  6142. // tags can be overwritten. If IMMUTABLE is specified, all image tags within
  6143. // the repository will be immutable which will prevent them from being overwritten.
  6144. //
  6145. // ImageTagMutability is a required field
  6146. ImageTagMutability *string `locationName:"imageTagMutability" type:"string" required:"true" enum:"ImageTagMutability"`
  6147. // The AWS account ID associated with the registry that contains the repository
  6148. // in which to update the image tag mutability settings. If you do not specify
  6149. // a registry, the default registry is assumed.
  6150. RegistryId *string `locationName:"registryId" type:"string"`
  6151. // The name of the repository in which to update the image tag mutability settings.
  6152. //
  6153. // RepositoryName is a required field
  6154. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  6155. }
  6156. // String returns the string representation
  6157. func (s PutImageTagMutabilityInput) String() string {
  6158. return awsutil.Prettify(s)
  6159. }
  6160. // GoString returns the string representation
  6161. func (s PutImageTagMutabilityInput) GoString() string {
  6162. return s.String()
  6163. }
  6164. // Validate inspects the fields of the type to determine if they are valid.
  6165. func (s *PutImageTagMutabilityInput) Validate() error {
  6166. invalidParams := request.ErrInvalidParams{Context: "PutImageTagMutabilityInput"}
  6167. if s.ImageTagMutability == nil {
  6168. invalidParams.Add(request.NewErrParamRequired("ImageTagMutability"))
  6169. }
  6170. if s.RepositoryName == nil {
  6171. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  6172. }
  6173. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  6174. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  6175. }
  6176. if invalidParams.Len() > 0 {
  6177. return invalidParams
  6178. }
  6179. return nil
  6180. }
  6181. // SetImageTagMutability sets the ImageTagMutability field's value.
  6182. func (s *PutImageTagMutabilityInput) SetImageTagMutability(v string) *PutImageTagMutabilityInput {
  6183. s.ImageTagMutability = &v
  6184. return s
  6185. }
  6186. // SetRegistryId sets the RegistryId field's value.
  6187. func (s *PutImageTagMutabilityInput) SetRegistryId(v string) *PutImageTagMutabilityInput {
  6188. s.RegistryId = &v
  6189. return s
  6190. }
  6191. // SetRepositoryName sets the RepositoryName field's value.
  6192. func (s *PutImageTagMutabilityInput) SetRepositoryName(v string) *PutImageTagMutabilityInput {
  6193. s.RepositoryName = &v
  6194. return s
  6195. }
  6196. type PutImageTagMutabilityOutput struct {
  6197. _ struct{} `type:"structure"`
  6198. // The image tag mutability setting for the repository.
  6199. ImageTagMutability *string `locationName:"imageTagMutability" type:"string" enum:"ImageTagMutability"`
  6200. // The registry ID associated with the request.
  6201. RegistryId *string `locationName:"registryId" type:"string"`
  6202. // The repository name associated with the request.
  6203. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  6204. }
  6205. // String returns the string representation
  6206. func (s PutImageTagMutabilityOutput) String() string {
  6207. return awsutil.Prettify(s)
  6208. }
  6209. // GoString returns the string representation
  6210. func (s PutImageTagMutabilityOutput) GoString() string {
  6211. return s.String()
  6212. }
  6213. // SetImageTagMutability sets the ImageTagMutability field's value.
  6214. func (s *PutImageTagMutabilityOutput) SetImageTagMutability(v string) *PutImageTagMutabilityOutput {
  6215. s.ImageTagMutability = &v
  6216. return s
  6217. }
  6218. // SetRegistryId sets the RegistryId field's value.
  6219. func (s *PutImageTagMutabilityOutput) SetRegistryId(v string) *PutImageTagMutabilityOutput {
  6220. s.RegistryId = &v
  6221. return s
  6222. }
  6223. // SetRepositoryName sets the RepositoryName field's value.
  6224. func (s *PutImageTagMutabilityOutput) SetRepositoryName(v string) *PutImageTagMutabilityOutput {
  6225. s.RepositoryName = &v
  6226. return s
  6227. }
  6228. type PutLifecyclePolicyInput struct {
  6229. _ struct{} `type:"structure"`
  6230. // The JSON repository policy text to apply to the repository.
  6231. //
  6232. // LifecyclePolicyText is a required field
  6233. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string" required:"true"`
  6234. // The AWS account ID associated with the registry that contains the repository.
  6235. // If you do not specify a registry, the default registry is assumed.
  6236. RegistryId *string `locationName:"registryId" type:"string"`
  6237. // The name of the repository to receive the policy.
  6238. //
  6239. // RepositoryName is a required field
  6240. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  6241. }
  6242. // String returns the string representation
  6243. func (s PutLifecyclePolicyInput) String() string {
  6244. return awsutil.Prettify(s)
  6245. }
  6246. // GoString returns the string representation
  6247. func (s PutLifecyclePolicyInput) GoString() string {
  6248. return s.String()
  6249. }
  6250. // Validate inspects the fields of the type to determine if they are valid.
  6251. func (s *PutLifecyclePolicyInput) Validate() error {
  6252. invalidParams := request.ErrInvalidParams{Context: "PutLifecyclePolicyInput"}
  6253. if s.LifecyclePolicyText == nil {
  6254. invalidParams.Add(request.NewErrParamRequired("LifecyclePolicyText"))
  6255. }
  6256. if s.LifecyclePolicyText != nil && len(*s.LifecyclePolicyText) < 100 {
  6257. invalidParams.Add(request.NewErrParamMinLen("LifecyclePolicyText", 100))
  6258. }
  6259. if s.RepositoryName == nil {
  6260. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  6261. }
  6262. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  6263. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  6264. }
  6265. if invalidParams.Len() > 0 {
  6266. return invalidParams
  6267. }
  6268. return nil
  6269. }
  6270. // SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
  6271. func (s *PutLifecyclePolicyInput) SetLifecyclePolicyText(v string) *PutLifecyclePolicyInput {
  6272. s.LifecyclePolicyText = &v
  6273. return s
  6274. }
  6275. // SetRegistryId sets the RegistryId field's value.
  6276. func (s *PutLifecyclePolicyInput) SetRegistryId(v string) *PutLifecyclePolicyInput {
  6277. s.RegistryId = &v
  6278. return s
  6279. }
  6280. // SetRepositoryName sets the RepositoryName field's value.
  6281. func (s *PutLifecyclePolicyInput) SetRepositoryName(v string) *PutLifecyclePolicyInput {
  6282. s.RepositoryName = &v
  6283. return s
  6284. }
  6285. type PutLifecyclePolicyOutput struct {
  6286. _ struct{} `type:"structure"`
  6287. // The JSON repository policy text.
  6288. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"`
  6289. // The registry ID associated with the request.
  6290. RegistryId *string `locationName:"registryId" type:"string"`
  6291. // The repository name associated with the request.
  6292. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  6293. }
  6294. // String returns the string representation
  6295. func (s PutLifecyclePolicyOutput) String() string {
  6296. return awsutil.Prettify(s)
  6297. }
  6298. // GoString returns the string representation
  6299. func (s PutLifecyclePolicyOutput) GoString() string {
  6300. return s.String()
  6301. }
  6302. // SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
  6303. func (s *PutLifecyclePolicyOutput) SetLifecyclePolicyText(v string) *PutLifecyclePolicyOutput {
  6304. s.LifecyclePolicyText = &v
  6305. return s
  6306. }
  6307. // SetRegistryId sets the RegistryId field's value.
  6308. func (s *PutLifecyclePolicyOutput) SetRegistryId(v string) *PutLifecyclePolicyOutput {
  6309. s.RegistryId = &v
  6310. return s
  6311. }
  6312. // SetRepositoryName sets the RepositoryName field's value.
  6313. func (s *PutLifecyclePolicyOutput) SetRepositoryName(v string) *PutLifecyclePolicyOutput {
  6314. s.RepositoryName = &v
  6315. return s
  6316. }
  6317. // An object representing a repository.
  6318. type Repository struct {
  6319. _ struct{} `type:"structure"`
  6320. // The date and time, in JavaScript date format, when the repository was created.
  6321. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"`
  6322. // The image scanning configuration for a repository.
  6323. ImageScanningConfiguration *ImageScanningConfiguration `locationName:"imageScanningConfiguration" type:"structure"`
  6324. // The tag mutability setting for the repository.
  6325. ImageTagMutability *string `locationName:"imageTagMutability" type:"string" enum:"ImageTagMutability"`
  6326. // The AWS account ID associated with the registry that contains the repository.
  6327. RegistryId *string `locationName:"registryId" type:"string"`
  6328. // The Amazon Resource Name (ARN) that identifies the repository. The ARN contains
  6329. // the arn:aws:ecr namespace, followed by the region of the repository, AWS
  6330. // account ID of the repository owner, repository namespace, and repository
  6331. // name. For example, arn:aws:ecr:region:012345678910:repository/test.
  6332. RepositoryArn *string `locationName:"repositoryArn" type:"string"`
  6333. // The name of the repository.
  6334. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  6335. // The URI for the repository. You can use this URI for Docker push or pull
  6336. // operations.
  6337. RepositoryUri *string `locationName:"repositoryUri" type:"string"`
  6338. }
  6339. // String returns the string representation
  6340. func (s Repository) String() string {
  6341. return awsutil.Prettify(s)
  6342. }
  6343. // GoString returns the string representation
  6344. func (s Repository) GoString() string {
  6345. return s.String()
  6346. }
  6347. // SetCreatedAt sets the CreatedAt field's value.
  6348. func (s *Repository) SetCreatedAt(v time.Time) *Repository {
  6349. s.CreatedAt = &v
  6350. return s
  6351. }
  6352. // SetImageScanningConfiguration sets the ImageScanningConfiguration field's value.
  6353. func (s *Repository) SetImageScanningConfiguration(v *ImageScanningConfiguration) *Repository {
  6354. s.ImageScanningConfiguration = v
  6355. return s
  6356. }
  6357. // SetImageTagMutability sets the ImageTagMutability field's value.
  6358. func (s *Repository) SetImageTagMutability(v string) *Repository {
  6359. s.ImageTagMutability = &v
  6360. return s
  6361. }
  6362. // SetRegistryId sets the RegistryId field's value.
  6363. func (s *Repository) SetRegistryId(v string) *Repository {
  6364. s.RegistryId = &v
  6365. return s
  6366. }
  6367. // SetRepositoryArn sets the RepositoryArn field's value.
  6368. func (s *Repository) SetRepositoryArn(v string) *Repository {
  6369. s.RepositoryArn = &v
  6370. return s
  6371. }
  6372. // SetRepositoryName sets the RepositoryName field's value.
  6373. func (s *Repository) SetRepositoryName(v string) *Repository {
  6374. s.RepositoryName = &v
  6375. return s
  6376. }
  6377. // SetRepositoryUri sets the RepositoryUri field's value.
  6378. func (s *Repository) SetRepositoryUri(v string) *Repository {
  6379. s.RepositoryUri = &v
  6380. return s
  6381. }
  6382. // The specified repository already exists in the specified registry.
  6383. type RepositoryAlreadyExistsException struct {
  6384. _ struct{} `type:"structure"`
  6385. respMetadata protocol.ResponseMetadata
  6386. // The error message associated with the exception.
  6387. Message_ *string `locationName:"message" type:"string"`
  6388. }
  6389. // String returns the string representation
  6390. func (s RepositoryAlreadyExistsException) String() string {
  6391. return awsutil.Prettify(s)
  6392. }
  6393. // GoString returns the string representation
  6394. func (s RepositoryAlreadyExistsException) GoString() string {
  6395. return s.String()
  6396. }
  6397. func newErrorRepositoryAlreadyExistsException(v protocol.ResponseMetadata) error {
  6398. return &RepositoryAlreadyExistsException{
  6399. respMetadata: v,
  6400. }
  6401. }
  6402. // Code returns the exception type name.
  6403. func (s RepositoryAlreadyExistsException) Code() string {
  6404. return "RepositoryAlreadyExistsException"
  6405. }
  6406. // Message returns the exception's message.
  6407. func (s RepositoryAlreadyExistsException) Message() string {
  6408. if s.Message_ != nil {
  6409. return *s.Message_
  6410. }
  6411. return ""
  6412. }
  6413. // OrigErr always returns nil, satisfies awserr.Error interface.
  6414. func (s RepositoryAlreadyExistsException) OrigErr() error {
  6415. return nil
  6416. }
  6417. func (s RepositoryAlreadyExistsException) Error() string {
  6418. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6419. }
  6420. // Status code returns the HTTP status code for the request's response error.
  6421. func (s RepositoryAlreadyExistsException) StatusCode() int {
  6422. return s.respMetadata.StatusCode
  6423. }
  6424. // RequestID returns the service's response RequestID for request.
  6425. func (s RepositoryAlreadyExistsException) RequestID() string {
  6426. return s.respMetadata.RequestID
  6427. }
  6428. // The specified repository contains images. To delete a repository that contains
  6429. // images, you must force the deletion with the force parameter.
  6430. type RepositoryNotEmptyException struct {
  6431. _ struct{} `type:"structure"`
  6432. respMetadata protocol.ResponseMetadata
  6433. // The error message associated with the exception.
  6434. Message_ *string `locationName:"message" type:"string"`
  6435. }
  6436. // String returns the string representation
  6437. func (s RepositoryNotEmptyException) String() string {
  6438. return awsutil.Prettify(s)
  6439. }
  6440. // GoString returns the string representation
  6441. func (s RepositoryNotEmptyException) GoString() string {
  6442. return s.String()
  6443. }
  6444. func newErrorRepositoryNotEmptyException(v protocol.ResponseMetadata) error {
  6445. return &RepositoryNotEmptyException{
  6446. respMetadata: v,
  6447. }
  6448. }
  6449. // Code returns the exception type name.
  6450. func (s RepositoryNotEmptyException) Code() string {
  6451. return "RepositoryNotEmptyException"
  6452. }
  6453. // Message returns the exception's message.
  6454. func (s RepositoryNotEmptyException) Message() string {
  6455. if s.Message_ != nil {
  6456. return *s.Message_
  6457. }
  6458. return ""
  6459. }
  6460. // OrigErr always returns nil, satisfies awserr.Error interface.
  6461. func (s RepositoryNotEmptyException) OrigErr() error {
  6462. return nil
  6463. }
  6464. func (s RepositoryNotEmptyException) Error() string {
  6465. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6466. }
  6467. // Status code returns the HTTP status code for the request's response error.
  6468. func (s RepositoryNotEmptyException) StatusCode() int {
  6469. return s.respMetadata.StatusCode
  6470. }
  6471. // RequestID returns the service's response RequestID for request.
  6472. func (s RepositoryNotEmptyException) RequestID() string {
  6473. return s.respMetadata.RequestID
  6474. }
  6475. // The specified repository could not be found. Check the spelling of the specified
  6476. // repository and ensure that you are performing operations on the correct registry.
  6477. type RepositoryNotFoundException struct {
  6478. _ struct{} `type:"structure"`
  6479. respMetadata protocol.ResponseMetadata
  6480. // The error message associated with the exception.
  6481. Message_ *string `locationName:"message" type:"string"`
  6482. }
  6483. // String returns the string representation
  6484. func (s RepositoryNotFoundException) String() string {
  6485. return awsutil.Prettify(s)
  6486. }
  6487. // GoString returns the string representation
  6488. func (s RepositoryNotFoundException) GoString() string {
  6489. return s.String()
  6490. }
  6491. func newErrorRepositoryNotFoundException(v protocol.ResponseMetadata) error {
  6492. return &RepositoryNotFoundException{
  6493. respMetadata: v,
  6494. }
  6495. }
  6496. // Code returns the exception type name.
  6497. func (s RepositoryNotFoundException) Code() string {
  6498. return "RepositoryNotFoundException"
  6499. }
  6500. // Message returns the exception's message.
  6501. func (s RepositoryNotFoundException) Message() string {
  6502. if s.Message_ != nil {
  6503. return *s.Message_
  6504. }
  6505. return ""
  6506. }
  6507. // OrigErr always returns nil, satisfies awserr.Error interface.
  6508. func (s RepositoryNotFoundException) OrigErr() error {
  6509. return nil
  6510. }
  6511. func (s RepositoryNotFoundException) Error() string {
  6512. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6513. }
  6514. // Status code returns the HTTP status code for the request's response error.
  6515. func (s RepositoryNotFoundException) StatusCode() int {
  6516. return s.respMetadata.StatusCode
  6517. }
  6518. // RequestID returns the service's response RequestID for request.
  6519. func (s RepositoryNotFoundException) RequestID() string {
  6520. return s.respMetadata.RequestID
  6521. }
  6522. // The specified repository and registry combination does not have an associated
  6523. // repository policy.
  6524. type RepositoryPolicyNotFoundException struct {
  6525. _ struct{} `type:"structure"`
  6526. respMetadata protocol.ResponseMetadata
  6527. // The error message associated with the exception.
  6528. Message_ *string `locationName:"message" type:"string"`
  6529. }
  6530. // String returns the string representation
  6531. func (s RepositoryPolicyNotFoundException) String() string {
  6532. return awsutil.Prettify(s)
  6533. }
  6534. // GoString returns the string representation
  6535. func (s RepositoryPolicyNotFoundException) GoString() string {
  6536. return s.String()
  6537. }
  6538. func newErrorRepositoryPolicyNotFoundException(v protocol.ResponseMetadata) error {
  6539. return &RepositoryPolicyNotFoundException{
  6540. respMetadata: v,
  6541. }
  6542. }
  6543. // Code returns the exception type name.
  6544. func (s RepositoryPolicyNotFoundException) Code() string {
  6545. return "RepositoryPolicyNotFoundException"
  6546. }
  6547. // Message returns the exception's message.
  6548. func (s RepositoryPolicyNotFoundException) Message() string {
  6549. if s.Message_ != nil {
  6550. return *s.Message_
  6551. }
  6552. return ""
  6553. }
  6554. // OrigErr always returns nil, satisfies awserr.Error interface.
  6555. func (s RepositoryPolicyNotFoundException) OrigErr() error {
  6556. return nil
  6557. }
  6558. func (s RepositoryPolicyNotFoundException) Error() string {
  6559. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6560. }
  6561. // Status code returns the HTTP status code for the request's response error.
  6562. func (s RepositoryPolicyNotFoundException) StatusCode() int {
  6563. return s.respMetadata.StatusCode
  6564. }
  6565. // RequestID returns the service's response RequestID for request.
  6566. func (s RepositoryPolicyNotFoundException) RequestID() string {
  6567. return s.respMetadata.RequestID
  6568. }
  6569. // The specified image scan could not be found. Ensure that image scanning is
  6570. // enabled on the repository and try again.
  6571. type ScanNotFoundException struct {
  6572. _ struct{} `type:"structure"`
  6573. respMetadata protocol.ResponseMetadata
  6574. Message_ *string `locationName:"message" type:"string"`
  6575. }
  6576. // String returns the string representation
  6577. func (s ScanNotFoundException) String() string {
  6578. return awsutil.Prettify(s)
  6579. }
  6580. // GoString returns the string representation
  6581. func (s ScanNotFoundException) GoString() string {
  6582. return s.String()
  6583. }
  6584. func newErrorScanNotFoundException(v protocol.ResponseMetadata) error {
  6585. return &ScanNotFoundException{
  6586. respMetadata: v,
  6587. }
  6588. }
  6589. // Code returns the exception type name.
  6590. func (s ScanNotFoundException) Code() string {
  6591. return "ScanNotFoundException"
  6592. }
  6593. // Message returns the exception's message.
  6594. func (s ScanNotFoundException) Message() string {
  6595. if s.Message_ != nil {
  6596. return *s.Message_
  6597. }
  6598. return ""
  6599. }
  6600. // OrigErr always returns nil, satisfies awserr.Error interface.
  6601. func (s ScanNotFoundException) OrigErr() error {
  6602. return nil
  6603. }
  6604. func (s ScanNotFoundException) Error() string {
  6605. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6606. }
  6607. // Status code returns the HTTP status code for the request's response error.
  6608. func (s ScanNotFoundException) StatusCode() int {
  6609. return s.respMetadata.StatusCode
  6610. }
  6611. // RequestID returns the service's response RequestID for request.
  6612. func (s ScanNotFoundException) RequestID() string {
  6613. return s.respMetadata.RequestID
  6614. }
  6615. // These errors are usually caused by a server-side issue.
  6616. type ServerException struct {
  6617. _ struct{} `type:"structure"`
  6618. respMetadata protocol.ResponseMetadata
  6619. // The error message associated with the exception.
  6620. Message_ *string `locationName:"message" type:"string"`
  6621. }
  6622. // String returns the string representation
  6623. func (s ServerException) String() string {
  6624. return awsutil.Prettify(s)
  6625. }
  6626. // GoString returns the string representation
  6627. func (s ServerException) GoString() string {
  6628. return s.String()
  6629. }
  6630. func newErrorServerException(v protocol.ResponseMetadata) error {
  6631. return &ServerException{
  6632. respMetadata: v,
  6633. }
  6634. }
  6635. // Code returns the exception type name.
  6636. func (s ServerException) Code() string {
  6637. return "ServerException"
  6638. }
  6639. // Message returns the exception's message.
  6640. func (s ServerException) Message() string {
  6641. if s.Message_ != nil {
  6642. return *s.Message_
  6643. }
  6644. return ""
  6645. }
  6646. // OrigErr always returns nil, satisfies awserr.Error interface.
  6647. func (s ServerException) OrigErr() error {
  6648. return nil
  6649. }
  6650. func (s ServerException) Error() string {
  6651. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6652. }
  6653. // Status code returns the HTTP status code for the request's response error.
  6654. func (s ServerException) StatusCode() int {
  6655. return s.respMetadata.StatusCode
  6656. }
  6657. // RequestID returns the service's response RequestID for request.
  6658. func (s ServerException) RequestID() string {
  6659. return s.respMetadata.RequestID
  6660. }
  6661. type SetRepositoryPolicyInput struct {
  6662. _ struct{} `type:"structure"`
  6663. // If the policy you are attempting to set on a repository policy would prevent
  6664. // you from setting another policy in the future, you must force the SetRepositoryPolicy
  6665. // operation. This is intended to prevent accidental repository lock outs.
  6666. Force *bool `locationName:"force" type:"boolean"`
  6667. // The JSON repository policy text to apply to the repository. For more information,
  6668. // see Amazon ECR Repository Policy Examples (https://docs.aws.amazon.com/AmazonECR/latest/userguide/RepositoryPolicyExamples.html)
  6669. // in the Amazon Elastic Container Registry User Guide.
  6670. //
  6671. // PolicyText is a required field
  6672. PolicyText *string `locationName:"policyText" type:"string" required:"true"`
  6673. // The AWS account ID associated with the registry that contains the repository.
  6674. // If you do not specify a registry, the default registry is assumed.
  6675. RegistryId *string `locationName:"registryId" type:"string"`
  6676. // The name of the repository to receive the policy.
  6677. //
  6678. // RepositoryName is a required field
  6679. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  6680. }
  6681. // String returns the string representation
  6682. func (s SetRepositoryPolicyInput) String() string {
  6683. return awsutil.Prettify(s)
  6684. }
  6685. // GoString returns the string representation
  6686. func (s SetRepositoryPolicyInput) GoString() string {
  6687. return s.String()
  6688. }
  6689. // Validate inspects the fields of the type to determine if they are valid.
  6690. func (s *SetRepositoryPolicyInput) Validate() error {
  6691. invalidParams := request.ErrInvalidParams{Context: "SetRepositoryPolicyInput"}
  6692. if s.PolicyText == nil {
  6693. invalidParams.Add(request.NewErrParamRequired("PolicyText"))
  6694. }
  6695. if s.RepositoryName == nil {
  6696. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  6697. }
  6698. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  6699. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  6700. }
  6701. if invalidParams.Len() > 0 {
  6702. return invalidParams
  6703. }
  6704. return nil
  6705. }
  6706. // SetForce sets the Force field's value.
  6707. func (s *SetRepositoryPolicyInput) SetForce(v bool) *SetRepositoryPolicyInput {
  6708. s.Force = &v
  6709. return s
  6710. }
  6711. // SetPolicyText sets the PolicyText field's value.
  6712. func (s *SetRepositoryPolicyInput) SetPolicyText(v string) *SetRepositoryPolicyInput {
  6713. s.PolicyText = &v
  6714. return s
  6715. }
  6716. // SetRegistryId sets the RegistryId field's value.
  6717. func (s *SetRepositoryPolicyInput) SetRegistryId(v string) *SetRepositoryPolicyInput {
  6718. s.RegistryId = &v
  6719. return s
  6720. }
  6721. // SetRepositoryName sets the RepositoryName field's value.
  6722. func (s *SetRepositoryPolicyInput) SetRepositoryName(v string) *SetRepositoryPolicyInput {
  6723. s.RepositoryName = &v
  6724. return s
  6725. }
  6726. type SetRepositoryPolicyOutput struct {
  6727. _ struct{} `type:"structure"`
  6728. // The JSON repository policy text applied to the repository.
  6729. PolicyText *string `locationName:"policyText" type:"string"`
  6730. // The registry ID associated with the request.
  6731. RegistryId *string `locationName:"registryId" type:"string"`
  6732. // The repository name associated with the request.
  6733. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  6734. }
  6735. // String returns the string representation
  6736. func (s SetRepositoryPolicyOutput) String() string {
  6737. return awsutil.Prettify(s)
  6738. }
  6739. // GoString returns the string representation
  6740. func (s SetRepositoryPolicyOutput) GoString() string {
  6741. return s.String()
  6742. }
  6743. // SetPolicyText sets the PolicyText field's value.
  6744. func (s *SetRepositoryPolicyOutput) SetPolicyText(v string) *SetRepositoryPolicyOutput {
  6745. s.PolicyText = &v
  6746. return s
  6747. }
  6748. // SetRegistryId sets the RegistryId field's value.
  6749. func (s *SetRepositoryPolicyOutput) SetRegistryId(v string) *SetRepositoryPolicyOutput {
  6750. s.RegistryId = &v
  6751. return s
  6752. }
  6753. // SetRepositoryName sets the RepositoryName field's value.
  6754. func (s *SetRepositoryPolicyOutput) SetRepositoryName(v string) *SetRepositoryPolicyOutput {
  6755. s.RepositoryName = &v
  6756. return s
  6757. }
  6758. type StartImageScanInput struct {
  6759. _ struct{} `type:"structure"`
  6760. // An object with identifying information for an Amazon ECR image.
  6761. //
  6762. // ImageId is a required field
  6763. ImageId *ImageIdentifier `locationName:"imageId" type:"structure" required:"true"`
  6764. // The AWS account ID associated with the registry that contains the repository
  6765. // in which to start an image scan request. If you do not specify a registry,
  6766. // the default registry is assumed.
  6767. RegistryId *string `locationName:"registryId" type:"string"`
  6768. // The name of the repository that contains the images to scan.
  6769. //
  6770. // RepositoryName is a required field
  6771. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  6772. }
  6773. // String returns the string representation
  6774. func (s StartImageScanInput) String() string {
  6775. return awsutil.Prettify(s)
  6776. }
  6777. // GoString returns the string representation
  6778. func (s StartImageScanInput) GoString() string {
  6779. return s.String()
  6780. }
  6781. // Validate inspects the fields of the type to determine if they are valid.
  6782. func (s *StartImageScanInput) Validate() error {
  6783. invalidParams := request.ErrInvalidParams{Context: "StartImageScanInput"}
  6784. if s.ImageId == nil {
  6785. invalidParams.Add(request.NewErrParamRequired("ImageId"))
  6786. }
  6787. if s.RepositoryName == nil {
  6788. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  6789. }
  6790. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  6791. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  6792. }
  6793. if s.ImageId != nil {
  6794. if err := s.ImageId.Validate(); err != nil {
  6795. invalidParams.AddNested("ImageId", err.(request.ErrInvalidParams))
  6796. }
  6797. }
  6798. if invalidParams.Len() > 0 {
  6799. return invalidParams
  6800. }
  6801. return nil
  6802. }
  6803. // SetImageId sets the ImageId field's value.
  6804. func (s *StartImageScanInput) SetImageId(v *ImageIdentifier) *StartImageScanInput {
  6805. s.ImageId = v
  6806. return s
  6807. }
  6808. // SetRegistryId sets the RegistryId field's value.
  6809. func (s *StartImageScanInput) SetRegistryId(v string) *StartImageScanInput {
  6810. s.RegistryId = &v
  6811. return s
  6812. }
  6813. // SetRepositoryName sets the RepositoryName field's value.
  6814. func (s *StartImageScanInput) SetRepositoryName(v string) *StartImageScanInput {
  6815. s.RepositoryName = &v
  6816. return s
  6817. }
  6818. type StartImageScanOutput struct {
  6819. _ struct{} `type:"structure"`
  6820. // An object with identifying information for an Amazon ECR image.
  6821. ImageId *ImageIdentifier `locationName:"imageId" type:"structure"`
  6822. // The current state of the scan.
  6823. ImageScanStatus *ImageScanStatus `locationName:"imageScanStatus" type:"structure"`
  6824. // The registry ID associated with the request.
  6825. RegistryId *string `locationName:"registryId" type:"string"`
  6826. // The repository name associated with the request.
  6827. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  6828. }
  6829. // String returns the string representation
  6830. func (s StartImageScanOutput) String() string {
  6831. return awsutil.Prettify(s)
  6832. }
  6833. // GoString returns the string representation
  6834. func (s StartImageScanOutput) GoString() string {
  6835. return s.String()
  6836. }
  6837. // SetImageId sets the ImageId field's value.
  6838. func (s *StartImageScanOutput) SetImageId(v *ImageIdentifier) *StartImageScanOutput {
  6839. s.ImageId = v
  6840. return s
  6841. }
  6842. // SetImageScanStatus sets the ImageScanStatus field's value.
  6843. func (s *StartImageScanOutput) SetImageScanStatus(v *ImageScanStatus) *StartImageScanOutput {
  6844. s.ImageScanStatus = v
  6845. return s
  6846. }
  6847. // SetRegistryId sets the RegistryId field's value.
  6848. func (s *StartImageScanOutput) SetRegistryId(v string) *StartImageScanOutput {
  6849. s.RegistryId = &v
  6850. return s
  6851. }
  6852. // SetRepositoryName sets the RepositoryName field's value.
  6853. func (s *StartImageScanOutput) SetRepositoryName(v string) *StartImageScanOutput {
  6854. s.RepositoryName = &v
  6855. return s
  6856. }
  6857. type StartLifecyclePolicyPreviewInput struct {
  6858. _ struct{} `type:"structure"`
  6859. // The policy to be evaluated against. If you do not specify a policy, the current
  6860. // policy for the repository is used.
  6861. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"`
  6862. // The AWS account ID associated with the registry that contains the repository.
  6863. // If you do not specify a registry, the default registry is assumed.
  6864. RegistryId *string `locationName:"registryId" type:"string"`
  6865. // The name of the repository to be evaluated.
  6866. //
  6867. // RepositoryName is a required field
  6868. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  6869. }
  6870. // String returns the string representation
  6871. func (s StartLifecyclePolicyPreviewInput) String() string {
  6872. return awsutil.Prettify(s)
  6873. }
  6874. // GoString returns the string representation
  6875. func (s StartLifecyclePolicyPreviewInput) GoString() string {
  6876. return s.String()
  6877. }
  6878. // Validate inspects the fields of the type to determine if they are valid.
  6879. func (s *StartLifecyclePolicyPreviewInput) Validate() error {
  6880. invalidParams := request.ErrInvalidParams{Context: "StartLifecyclePolicyPreviewInput"}
  6881. if s.LifecyclePolicyText != nil && len(*s.LifecyclePolicyText) < 100 {
  6882. invalidParams.Add(request.NewErrParamMinLen("LifecyclePolicyText", 100))
  6883. }
  6884. if s.RepositoryName == nil {
  6885. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  6886. }
  6887. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  6888. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  6889. }
  6890. if invalidParams.Len() > 0 {
  6891. return invalidParams
  6892. }
  6893. return nil
  6894. }
  6895. // SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
  6896. func (s *StartLifecyclePolicyPreviewInput) SetLifecyclePolicyText(v string) *StartLifecyclePolicyPreviewInput {
  6897. s.LifecyclePolicyText = &v
  6898. return s
  6899. }
  6900. // SetRegistryId sets the RegistryId field's value.
  6901. func (s *StartLifecyclePolicyPreviewInput) SetRegistryId(v string) *StartLifecyclePolicyPreviewInput {
  6902. s.RegistryId = &v
  6903. return s
  6904. }
  6905. // SetRepositoryName sets the RepositoryName field's value.
  6906. func (s *StartLifecyclePolicyPreviewInput) SetRepositoryName(v string) *StartLifecyclePolicyPreviewInput {
  6907. s.RepositoryName = &v
  6908. return s
  6909. }
  6910. type StartLifecyclePolicyPreviewOutput struct {
  6911. _ struct{} `type:"structure"`
  6912. // The JSON repository policy text.
  6913. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"`
  6914. // The registry ID associated with the request.
  6915. RegistryId *string `locationName:"registryId" type:"string"`
  6916. // The repository name associated with the request.
  6917. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  6918. // The status of the lifecycle policy preview request.
  6919. Status *string `locationName:"status" type:"string" enum:"LifecyclePolicyPreviewStatus"`
  6920. }
  6921. // String returns the string representation
  6922. func (s StartLifecyclePolicyPreviewOutput) String() string {
  6923. return awsutil.Prettify(s)
  6924. }
  6925. // GoString returns the string representation
  6926. func (s StartLifecyclePolicyPreviewOutput) GoString() string {
  6927. return s.String()
  6928. }
  6929. // SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
  6930. func (s *StartLifecyclePolicyPreviewOutput) SetLifecyclePolicyText(v string) *StartLifecyclePolicyPreviewOutput {
  6931. s.LifecyclePolicyText = &v
  6932. return s
  6933. }
  6934. // SetRegistryId sets the RegistryId field's value.
  6935. func (s *StartLifecyclePolicyPreviewOutput) SetRegistryId(v string) *StartLifecyclePolicyPreviewOutput {
  6936. s.RegistryId = &v
  6937. return s
  6938. }
  6939. // SetRepositoryName sets the RepositoryName field's value.
  6940. func (s *StartLifecyclePolicyPreviewOutput) SetRepositoryName(v string) *StartLifecyclePolicyPreviewOutput {
  6941. s.RepositoryName = &v
  6942. return s
  6943. }
  6944. // SetStatus sets the Status field's value.
  6945. func (s *StartLifecyclePolicyPreviewOutput) SetStatus(v string) *StartLifecyclePolicyPreviewOutput {
  6946. s.Status = &v
  6947. return s
  6948. }
  6949. // The metadata that you apply to a resource to help you categorize and organize
  6950. // them. Each tag consists of a key and an optional value, both of which you
  6951. // define. Tag keys can have a maximum character length of 128 characters, and
  6952. // tag values can have a maximum length of 256 characters.
  6953. type Tag struct {
  6954. _ struct{} `type:"structure"`
  6955. // One part of a key-value pair that make up a tag. A key is a general label
  6956. // that acts like a category for more specific tag values.
  6957. Key *string `type:"string"`
  6958. // The optional part of a key-value pair that make up a tag. A value acts as
  6959. // a descriptor within a tag category (key).
  6960. Value *string `type:"string"`
  6961. }
  6962. // String returns the string representation
  6963. func (s Tag) String() string {
  6964. return awsutil.Prettify(s)
  6965. }
  6966. // GoString returns the string representation
  6967. func (s Tag) GoString() string {
  6968. return s.String()
  6969. }
  6970. // SetKey sets the Key field's value.
  6971. func (s *Tag) SetKey(v string) *Tag {
  6972. s.Key = &v
  6973. return s
  6974. }
  6975. // SetValue sets the Value field's value.
  6976. func (s *Tag) SetValue(v string) *Tag {
  6977. s.Value = &v
  6978. return s
  6979. }
  6980. type TagResourceInput struct {
  6981. _ struct{} `type:"structure"`
  6982. // The Amazon Resource Name (ARN) of the the resource to which to add tags.
  6983. // Currently, the only supported resource is an Amazon ECR repository.
  6984. //
  6985. // ResourceArn is a required field
  6986. ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"`
  6987. // The tags to add to the resource. A tag is an array of key-value pairs. Tag
  6988. // keys can have a maximum character length of 128 characters, and tag values
  6989. // can have a maximum length of 256 characters.
  6990. //
  6991. // Tags is a required field
  6992. Tags []*Tag `locationName:"tags" type:"list" required:"true"`
  6993. }
  6994. // String returns the string representation
  6995. func (s TagResourceInput) String() string {
  6996. return awsutil.Prettify(s)
  6997. }
  6998. // GoString returns the string representation
  6999. func (s TagResourceInput) GoString() string {
  7000. return s.String()
  7001. }
  7002. // Validate inspects the fields of the type to determine if they are valid.
  7003. func (s *TagResourceInput) Validate() error {
  7004. invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  7005. if s.ResourceArn == nil {
  7006. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  7007. }
  7008. if s.Tags == nil {
  7009. invalidParams.Add(request.NewErrParamRequired("Tags"))
  7010. }
  7011. if invalidParams.Len() > 0 {
  7012. return invalidParams
  7013. }
  7014. return nil
  7015. }
  7016. // SetResourceArn sets the ResourceArn field's value.
  7017. func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput {
  7018. s.ResourceArn = &v
  7019. return s
  7020. }
  7021. // SetTags sets the Tags field's value.
  7022. func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
  7023. s.Tags = v
  7024. return s
  7025. }
  7026. type TagResourceOutput struct {
  7027. _ struct{} `type:"structure"`
  7028. }
  7029. // String returns the string representation
  7030. func (s TagResourceOutput) String() string {
  7031. return awsutil.Prettify(s)
  7032. }
  7033. // GoString returns the string representation
  7034. func (s TagResourceOutput) GoString() string {
  7035. return s.String()
  7036. }
  7037. // The list of tags on the repository is over the limit. The maximum number
  7038. // of tags that can be applied to a repository is 50.
  7039. type TooManyTagsException struct {
  7040. _ struct{} `type:"structure"`
  7041. respMetadata protocol.ResponseMetadata
  7042. Message_ *string `locationName:"message" type:"string"`
  7043. }
  7044. // String returns the string representation
  7045. func (s TooManyTagsException) String() string {
  7046. return awsutil.Prettify(s)
  7047. }
  7048. // GoString returns the string representation
  7049. func (s TooManyTagsException) GoString() string {
  7050. return s.String()
  7051. }
  7052. func newErrorTooManyTagsException(v protocol.ResponseMetadata) error {
  7053. return &TooManyTagsException{
  7054. respMetadata: v,
  7055. }
  7056. }
  7057. // Code returns the exception type name.
  7058. func (s TooManyTagsException) Code() string {
  7059. return "TooManyTagsException"
  7060. }
  7061. // Message returns the exception's message.
  7062. func (s TooManyTagsException) Message() string {
  7063. if s.Message_ != nil {
  7064. return *s.Message_
  7065. }
  7066. return ""
  7067. }
  7068. // OrigErr always returns nil, satisfies awserr.Error interface.
  7069. func (s TooManyTagsException) OrigErr() error {
  7070. return nil
  7071. }
  7072. func (s TooManyTagsException) Error() string {
  7073. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7074. }
  7075. // Status code returns the HTTP status code for the request's response error.
  7076. func (s TooManyTagsException) StatusCode() int {
  7077. return s.respMetadata.StatusCode
  7078. }
  7079. // RequestID returns the service's response RequestID for request.
  7080. func (s TooManyTagsException) RequestID() string {
  7081. return s.respMetadata.RequestID
  7082. }
  7083. type UntagResourceInput struct {
  7084. _ struct{} `type:"structure"`
  7085. // The Amazon Resource Name (ARN) of the resource from which to remove tags.
  7086. // Currently, the only supported resource is an Amazon ECR repository.
  7087. //
  7088. // ResourceArn is a required field
  7089. ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"`
  7090. // The keys of the tags to be removed.
  7091. //
  7092. // TagKeys is a required field
  7093. TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"`
  7094. }
  7095. // String returns the string representation
  7096. func (s UntagResourceInput) String() string {
  7097. return awsutil.Prettify(s)
  7098. }
  7099. // GoString returns the string representation
  7100. func (s UntagResourceInput) GoString() string {
  7101. return s.String()
  7102. }
  7103. // Validate inspects the fields of the type to determine if they are valid.
  7104. func (s *UntagResourceInput) Validate() error {
  7105. invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  7106. if s.ResourceArn == nil {
  7107. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  7108. }
  7109. if s.TagKeys == nil {
  7110. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  7111. }
  7112. if invalidParams.Len() > 0 {
  7113. return invalidParams
  7114. }
  7115. return nil
  7116. }
  7117. // SetResourceArn sets the ResourceArn field's value.
  7118. func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput {
  7119. s.ResourceArn = &v
  7120. return s
  7121. }
  7122. // SetTagKeys sets the TagKeys field's value.
  7123. func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
  7124. s.TagKeys = v
  7125. return s
  7126. }
  7127. type UntagResourceOutput struct {
  7128. _ struct{} `type:"structure"`
  7129. }
  7130. // String returns the string representation
  7131. func (s UntagResourceOutput) String() string {
  7132. return awsutil.Prettify(s)
  7133. }
  7134. // GoString returns the string representation
  7135. func (s UntagResourceOutput) GoString() string {
  7136. return s.String()
  7137. }
  7138. type UploadLayerPartInput struct {
  7139. _ struct{} `type:"structure"`
  7140. // The base64-encoded layer part payload.
  7141. //
  7142. // LayerPartBlob is automatically base64 encoded/decoded by the SDK.
  7143. //
  7144. // LayerPartBlob is a required field
  7145. LayerPartBlob []byte `locationName:"layerPartBlob" type:"blob" required:"true"`
  7146. // The integer value of the first byte of the layer part.
  7147. //
  7148. // PartFirstByte is a required field
  7149. PartFirstByte *int64 `locationName:"partFirstByte" type:"long" required:"true"`
  7150. // The integer value of the last byte of the layer part.
  7151. //
  7152. // PartLastByte is a required field
  7153. PartLastByte *int64 `locationName:"partLastByte" type:"long" required:"true"`
  7154. // The AWS account ID associated with the registry to which you are uploading
  7155. // layer parts. If you do not specify a registry, the default registry is assumed.
  7156. RegistryId *string `locationName:"registryId" type:"string"`
  7157. // The name of the repository to which you are uploading layer parts.
  7158. //
  7159. // RepositoryName is a required field
  7160. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  7161. // The upload ID from a previous InitiateLayerUpload operation to associate
  7162. // with the layer part upload.
  7163. //
  7164. // UploadId is a required field
  7165. UploadId *string `locationName:"uploadId" type:"string" required:"true"`
  7166. }
  7167. // String returns the string representation
  7168. func (s UploadLayerPartInput) String() string {
  7169. return awsutil.Prettify(s)
  7170. }
  7171. // GoString returns the string representation
  7172. func (s UploadLayerPartInput) GoString() string {
  7173. return s.String()
  7174. }
  7175. // Validate inspects the fields of the type to determine if they are valid.
  7176. func (s *UploadLayerPartInput) Validate() error {
  7177. invalidParams := request.ErrInvalidParams{Context: "UploadLayerPartInput"}
  7178. if s.LayerPartBlob == nil {
  7179. invalidParams.Add(request.NewErrParamRequired("LayerPartBlob"))
  7180. }
  7181. if s.PartFirstByte == nil {
  7182. invalidParams.Add(request.NewErrParamRequired("PartFirstByte"))
  7183. }
  7184. if s.PartLastByte == nil {
  7185. invalidParams.Add(request.NewErrParamRequired("PartLastByte"))
  7186. }
  7187. if s.RepositoryName == nil {
  7188. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  7189. }
  7190. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  7191. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  7192. }
  7193. if s.UploadId == nil {
  7194. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  7195. }
  7196. if invalidParams.Len() > 0 {
  7197. return invalidParams
  7198. }
  7199. return nil
  7200. }
  7201. // SetLayerPartBlob sets the LayerPartBlob field's value.
  7202. func (s *UploadLayerPartInput) SetLayerPartBlob(v []byte) *UploadLayerPartInput {
  7203. s.LayerPartBlob = v
  7204. return s
  7205. }
  7206. // SetPartFirstByte sets the PartFirstByte field's value.
  7207. func (s *UploadLayerPartInput) SetPartFirstByte(v int64) *UploadLayerPartInput {
  7208. s.PartFirstByte = &v
  7209. return s
  7210. }
  7211. // SetPartLastByte sets the PartLastByte field's value.
  7212. func (s *UploadLayerPartInput) SetPartLastByte(v int64) *UploadLayerPartInput {
  7213. s.PartLastByte = &v
  7214. return s
  7215. }
  7216. // SetRegistryId sets the RegistryId field's value.
  7217. func (s *UploadLayerPartInput) SetRegistryId(v string) *UploadLayerPartInput {
  7218. s.RegistryId = &v
  7219. return s
  7220. }
  7221. // SetRepositoryName sets the RepositoryName field's value.
  7222. func (s *UploadLayerPartInput) SetRepositoryName(v string) *UploadLayerPartInput {
  7223. s.RepositoryName = &v
  7224. return s
  7225. }
  7226. // SetUploadId sets the UploadId field's value.
  7227. func (s *UploadLayerPartInput) SetUploadId(v string) *UploadLayerPartInput {
  7228. s.UploadId = &v
  7229. return s
  7230. }
  7231. type UploadLayerPartOutput struct {
  7232. _ struct{} `type:"structure"`
  7233. // The integer value of the last byte received in the request.
  7234. LastByteReceived *int64 `locationName:"lastByteReceived" type:"long"`
  7235. // The registry ID associated with the request.
  7236. RegistryId *string `locationName:"registryId" type:"string"`
  7237. // The repository name associated with the request.
  7238. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  7239. // The upload ID associated with the request.
  7240. UploadId *string `locationName:"uploadId" type:"string"`
  7241. }
  7242. // String returns the string representation
  7243. func (s UploadLayerPartOutput) String() string {
  7244. return awsutil.Prettify(s)
  7245. }
  7246. // GoString returns the string representation
  7247. func (s UploadLayerPartOutput) GoString() string {
  7248. return s.String()
  7249. }
  7250. // SetLastByteReceived sets the LastByteReceived field's value.
  7251. func (s *UploadLayerPartOutput) SetLastByteReceived(v int64) *UploadLayerPartOutput {
  7252. s.LastByteReceived = &v
  7253. return s
  7254. }
  7255. // SetRegistryId sets the RegistryId field's value.
  7256. func (s *UploadLayerPartOutput) SetRegistryId(v string) *UploadLayerPartOutput {
  7257. s.RegistryId = &v
  7258. return s
  7259. }
  7260. // SetRepositoryName sets the RepositoryName field's value.
  7261. func (s *UploadLayerPartOutput) SetRepositoryName(v string) *UploadLayerPartOutput {
  7262. s.RepositoryName = &v
  7263. return s
  7264. }
  7265. // SetUploadId sets the UploadId field's value.
  7266. func (s *UploadLayerPartOutput) SetUploadId(v string) *UploadLayerPartOutput {
  7267. s.UploadId = &v
  7268. return s
  7269. }
  7270. // The upload could not be found, or the specified upload id is not valid for
  7271. // this repository.
  7272. type UploadNotFoundException struct {
  7273. _ struct{} `type:"structure"`
  7274. respMetadata protocol.ResponseMetadata
  7275. // The error message associated with the exception.
  7276. Message_ *string `locationName:"message" type:"string"`
  7277. }
  7278. // String returns the string representation
  7279. func (s UploadNotFoundException) String() string {
  7280. return awsutil.Prettify(s)
  7281. }
  7282. // GoString returns the string representation
  7283. func (s UploadNotFoundException) GoString() string {
  7284. return s.String()
  7285. }
  7286. func newErrorUploadNotFoundException(v protocol.ResponseMetadata) error {
  7287. return &UploadNotFoundException{
  7288. respMetadata: v,
  7289. }
  7290. }
  7291. // Code returns the exception type name.
  7292. func (s UploadNotFoundException) Code() string {
  7293. return "UploadNotFoundException"
  7294. }
  7295. // Message returns the exception's message.
  7296. func (s UploadNotFoundException) Message() string {
  7297. if s.Message_ != nil {
  7298. return *s.Message_
  7299. }
  7300. return ""
  7301. }
  7302. // OrigErr always returns nil, satisfies awserr.Error interface.
  7303. func (s UploadNotFoundException) OrigErr() error {
  7304. return nil
  7305. }
  7306. func (s UploadNotFoundException) Error() string {
  7307. return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7308. }
  7309. // Status code returns the HTTP status code for the request's response error.
  7310. func (s UploadNotFoundException) StatusCode() int {
  7311. return s.respMetadata.StatusCode
  7312. }
  7313. // RequestID returns the service's response RequestID for request.
  7314. func (s UploadNotFoundException) RequestID() string {
  7315. return s.respMetadata.RequestID
  7316. }
  7317. const (
  7318. // FindingSeverityInformational is a FindingSeverity enum value
  7319. FindingSeverityInformational = "INFORMATIONAL"
  7320. // FindingSeverityLow is a FindingSeverity enum value
  7321. FindingSeverityLow = "LOW"
  7322. // FindingSeverityMedium is a FindingSeverity enum value
  7323. FindingSeverityMedium = "MEDIUM"
  7324. // FindingSeverityHigh is a FindingSeverity enum value
  7325. FindingSeverityHigh = "HIGH"
  7326. // FindingSeverityCritical is a FindingSeverity enum value
  7327. FindingSeverityCritical = "CRITICAL"
  7328. // FindingSeverityUndefined is a FindingSeverity enum value
  7329. FindingSeverityUndefined = "UNDEFINED"
  7330. )
  7331. const (
  7332. // ImageActionTypeExpire is a ImageActionType enum value
  7333. ImageActionTypeExpire = "EXPIRE"
  7334. )
  7335. const (
  7336. // ImageFailureCodeInvalidImageDigest is a ImageFailureCode enum value
  7337. ImageFailureCodeInvalidImageDigest = "InvalidImageDigest"
  7338. // ImageFailureCodeInvalidImageTag is a ImageFailureCode enum value
  7339. ImageFailureCodeInvalidImageTag = "InvalidImageTag"
  7340. // ImageFailureCodeImageTagDoesNotMatchDigest is a ImageFailureCode enum value
  7341. ImageFailureCodeImageTagDoesNotMatchDigest = "ImageTagDoesNotMatchDigest"
  7342. // ImageFailureCodeImageNotFound is a ImageFailureCode enum value
  7343. ImageFailureCodeImageNotFound = "ImageNotFound"
  7344. // ImageFailureCodeMissingDigestAndTag is a ImageFailureCode enum value
  7345. ImageFailureCodeMissingDigestAndTag = "MissingDigestAndTag"
  7346. )
  7347. const (
  7348. // ImageTagMutabilityMutable is a ImageTagMutability enum value
  7349. ImageTagMutabilityMutable = "MUTABLE"
  7350. // ImageTagMutabilityImmutable is a ImageTagMutability enum value
  7351. ImageTagMutabilityImmutable = "IMMUTABLE"
  7352. )
  7353. const (
  7354. // LayerAvailabilityAvailable is a LayerAvailability enum value
  7355. LayerAvailabilityAvailable = "AVAILABLE"
  7356. // LayerAvailabilityUnavailable is a LayerAvailability enum value
  7357. LayerAvailabilityUnavailable = "UNAVAILABLE"
  7358. )
  7359. const (
  7360. // LayerFailureCodeInvalidLayerDigest is a LayerFailureCode enum value
  7361. LayerFailureCodeInvalidLayerDigest = "InvalidLayerDigest"
  7362. // LayerFailureCodeMissingLayerDigest is a LayerFailureCode enum value
  7363. LayerFailureCodeMissingLayerDigest = "MissingLayerDigest"
  7364. )
  7365. const (
  7366. // LifecyclePolicyPreviewStatusInProgress is a LifecyclePolicyPreviewStatus enum value
  7367. LifecyclePolicyPreviewStatusInProgress = "IN_PROGRESS"
  7368. // LifecyclePolicyPreviewStatusComplete is a LifecyclePolicyPreviewStatus enum value
  7369. LifecyclePolicyPreviewStatusComplete = "COMPLETE"
  7370. // LifecyclePolicyPreviewStatusExpired is a LifecyclePolicyPreviewStatus enum value
  7371. LifecyclePolicyPreviewStatusExpired = "EXPIRED"
  7372. // LifecyclePolicyPreviewStatusFailed is a LifecyclePolicyPreviewStatus enum value
  7373. LifecyclePolicyPreviewStatusFailed = "FAILED"
  7374. )
  7375. const (
  7376. // ScanStatusInProgress is a ScanStatus enum value
  7377. ScanStatusInProgress = "IN_PROGRESS"
  7378. // ScanStatusComplete is a ScanStatus enum value
  7379. ScanStatusComplete = "COMPLETE"
  7380. // ScanStatusFailed is a ScanStatus enum value
  7381. ScanStatusFailed = "FAILED"
  7382. )
  7383. const (
  7384. // TagStatusTagged is a TagStatus enum value
  7385. TagStatusTagged = "TAGGED"
  7386. // TagStatusUntagged is a TagStatus enum value
  7387. TagStatusUntagged = "UNTAGGED"
  7388. // TagStatusAny is a TagStatus enum value
  7389. TagStatusAny = "ANY"
  7390. )