api.go 355 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package s3 provides a client for Amazon Simple Storage Service.
  3. package s3
  4. import (
  5. "fmt"
  6. "io"
  7. "time"
  8. "github.com/aws/aws-sdk-go/aws/awsutil"
  9. "github.com/aws/aws-sdk-go/aws/request"
  10. "github.com/aws/aws-sdk-go/private/protocol"
  11. "github.com/aws/aws-sdk-go/private/protocol/restxml"
  12. )
  13. const opAbortMultipartUpload = "AbortMultipartUpload"
  14. // AbortMultipartUploadRequest generates a "aws/request.Request" representing the
  15. // client's request for the AbortMultipartUpload operation. The "output" return
  16. // value can be used to capture response data after the request's "Send" method
  17. // is called.
  18. //
  19. // See AbortMultipartUpload for usage and error information.
  20. //
  21. // Creating a request object using this method should be used when you want to inject
  22. // custom logic into the request's lifecycle using a custom handler, or if you want to
  23. // access properties on the request object before or after sending the request. If
  24. // you just want the service response, call the AbortMultipartUpload method directly
  25. // instead.
  26. //
  27. // Note: You must call the "Send" method on the returned request object in order
  28. // to execute the request.
  29. //
  30. // // Example sending a request using the AbortMultipartUploadRequest method.
  31. // req, resp := client.AbortMultipartUploadRequest(params)
  32. //
  33. // err := req.Send()
  34. // if err == nil { // resp is now filled
  35. // fmt.Println(resp)
  36. // }
  37. //
  38. func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
  39. op := &request.Operation{
  40. Name: opAbortMultipartUpload,
  41. HTTPMethod: "DELETE",
  42. HTTPPath: "/{Bucket}/{Key+}",
  43. }
  44. if input == nil {
  45. input = &AbortMultipartUploadInput{}
  46. }
  47. req = c.newRequest(op, input, output)
  48. output = &AbortMultipartUploadOutput{}
  49. req.Data = output
  50. return
  51. }
  52. // AbortMultipartUpload API operation for Amazon Simple Storage Service.
  53. //
  54. // Aborts a multipart upload.
  55. //
  56. // To verify that all parts have been removed, so you don't get charged for
  57. // the part storage, you should call the List Parts operation and ensure the
  58. // parts list is empty.
  59. //
  60. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  61. // with awserr.Error's Code and Message methods to get detailed information about
  62. // the error.
  63. //
  64. // See the AWS API reference guide for Amazon Simple Storage Service's
  65. // API operation AbortMultipartUpload for usage and error information.
  66. //
  67. // Returned Error Codes:
  68. // * NoSuchUpload
  69. // The specified multipart upload does not exist.
  70. //
  71. func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
  72. req, out := c.AbortMultipartUploadRequest(input)
  73. err := req.Send()
  74. return out, err
  75. }
  76. const opCompleteMultipartUpload = "CompleteMultipartUpload"
  77. // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
  78. // client's request for the CompleteMultipartUpload operation. The "output" return
  79. // value can be used to capture response data after the request's "Send" method
  80. // is called.
  81. //
  82. // See CompleteMultipartUpload for usage and error information.
  83. //
  84. // Creating a request object using this method should be used when you want to inject
  85. // custom logic into the request's lifecycle using a custom handler, or if you want to
  86. // access properties on the request object before or after sending the request. If
  87. // you just want the service response, call the CompleteMultipartUpload method directly
  88. // instead.
  89. //
  90. // Note: You must call the "Send" method on the returned request object in order
  91. // to execute the request.
  92. //
  93. // // Example sending a request using the CompleteMultipartUploadRequest method.
  94. // req, resp := client.CompleteMultipartUploadRequest(params)
  95. //
  96. // err := req.Send()
  97. // if err == nil { // resp is now filled
  98. // fmt.Println(resp)
  99. // }
  100. //
  101. func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) {
  102. op := &request.Operation{
  103. Name: opCompleteMultipartUpload,
  104. HTTPMethod: "POST",
  105. HTTPPath: "/{Bucket}/{Key+}",
  106. }
  107. if input == nil {
  108. input = &CompleteMultipartUploadInput{}
  109. }
  110. req = c.newRequest(op, input, output)
  111. output = &CompleteMultipartUploadOutput{}
  112. req.Data = output
  113. return
  114. }
  115. // CompleteMultipartUpload API operation for Amazon Simple Storage Service.
  116. //
  117. // Completes a multipart upload by assembling previously uploaded parts.
  118. //
  119. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  120. // with awserr.Error's Code and Message methods to get detailed information about
  121. // the error.
  122. //
  123. // See the AWS API reference guide for Amazon Simple Storage Service's
  124. // API operation CompleteMultipartUpload for usage and error information.
  125. func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
  126. req, out := c.CompleteMultipartUploadRequest(input)
  127. err := req.Send()
  128. return out, err
  129. }
  130. const opCopyObject = "CopyObject"
  131. // CopyObjectRequest generates a "aws/request.Request" representing the
  132. // client's request for the CopyObject operation. The "output" return
  133. // value can be used to capture response data after the request's "Send" method
  134. // is called.
  135. //
  136. // See CopyObject for usage and error information.
  137. //
  138. // Creating a request object using this method should be used when you want to inject
  139. // custom logic into the request's lifecycle using a custom handler, or if you want to
  140. // access properties on the request object before or after sending the request. If
  141. // you just want the service response, call the CopyObject method directly
  142. // instead.
  143. //
  144. // Note: You must call the "Send" method on the returned request object in order
  145. // to execute the request.
  146. //
  147. // // Example sending a request using the CopyObjectRequest method.
  148. // req, resp := client.CopyObjectRequest(params)
  149. //
  150. // err := req.Send()
  151. // if err == nil { // resp is now filled
  152. // fmt.Println(resp)
  153. // }
  154. //
  155. func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) {
  156. op := &request.Operation{
  157. Name: opCopyObject,
  158. HTTPMethod: "PUT",
  159. HTTPPath: "/{Bucket}/{Key+}",
  160. }
  161. if input == nil {
  162. input = &CopyObjectInput{}
  163. }
  164. req = c.newRequest(op, input, output)
  165. output = &CopyObjectOutput{}
  166. req.Data = output
  167. return
  168. }
  169. // CopyObject API operation for Amazon Simple Storage Service.
  170. //
  171. // Creates a copy of an object that is already stored in Amazon S3.
  172. //
  173. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  174. // with awserr.Error's Code and Message methods to get detailed information about
  175. // the error.
  176. //
  177. // See the AWS API reference guide for Amazon Simple Storage Service's
  178. // API operation CopyObject for usage and error information.
  179. //
  180. // Returned Error Codes:
  181. // * ObjectNotInActiveTierError
  182. // The source object of the COPY operation is not in the active tier and is
  183. // only stored in Amazon Glacier.
  184. //
  185. func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
  186. req, out := c.CopyObjectRequest(input)
  187. err := req.Send()
  188. return out, err
  189. }
  190. const opCreateBucket = "CreateBucket"
  191. // CreateBucketRequest generates a "aws/request.Request" representing the
  192. // client's request for the CreateBucket operation. The "output" return
  193. // value can be used to capture response data after the request's "Send" method
  194. // is called.
  195. //
  196. // See CreateBucket for usage and error information.
  197. //
  198. // Creating a request object using this method should be used when you want to inject
  199. // custom logic into the request's lifecycle using a custom handler, or if you want to
  200. // access properties on the request object before or after sending the request. If
  201. // you just want the service response, call the CreateBucket method directly
  202. // instead.
  203. //
  204. // Note: You must call the "Send" method on the returned request object in order
  205. // to execute the request.
  206. //
  207. // // Example sending a request using the CreateBucketRequest method.
  208. // req, resp := client.CreateBucketRequest(params)
  209. //
  210. // err := req.Send()
  211. // if err == nil { // resp is now filled
  212. // fmt.Println(resp)
  213. // }
  214. //
  215. func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
  216. op := &request.Operation{
  217. Name: opCreateBucket,
  218. HTTPMethod: "PUT",
  219. HTTPPath: "/{Bucket}",
  220. }
  221. if input == nil {
  222. input = &CreateBucketInput{}
  223. }
  224. req = c.newRequest(op, input, output)
  225. output = &CreateBucketOutput{}
  226. req.Data = output
  227. return
  228. }
  229. // CreateBucket API operation for Amazon Simple Storage Service.
  230. //
  231. // Creates a new bucket.
  232. //
  233. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  234. // with awserr.Error's Code and Message methods to get detailed information about
  235. // the error.
  236. //
  237. // See the AWS API reference guide for Amazon Simple Storage Service's
  238. // API operation CreateBucket for usage and error information.
  239. //
  240. // Returned Error Codes:
  241. // * BucketAlreadyExists
  242. // The requested bucket name is not available. The bucket namespace is shared
  243. // by all users of the system. Please select a different name and try again.
  244. //
  245. // * BucketAlreadyOwnedByYou
  246. //
  247. func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
  248. req, out := c.CreateBucketRequest(input)
  249. err := req.Send()
  250. return out, err
  251. }
  252. const opCreateMultipartUpload = "CreateMultipartUpload"
  253. // CreateMultipartUploadRequest generates a "aws/request.Request" representing the
  254. // client's request for the CreateMultipartUpload operation. The "output" return
  255. // value can be used to capture response data after the request's "Send" method
  256. // is called.
  257. //
  258. // See CreateMultipartUpload for usage and error information.
  259. //
  260. // Creating a request object using this method should be used when you want to inject
  261. // custom logic into the request's lifecycle using a custom handler, or if you want to
  262. // access properties on the request object before or after sending the request. If
  263. // you just want the service response, call the CreateMultipartUpload method directly
  264. // instead.
  265. //
  266. // Note: You must call the "Send" method on the returned request object in order
  267. // to execute the request.
  268. //
  269. // // Example sending a request using the CreateMultipartUploadRequest method.
  270. // req, resp := client.CreateMultipartUploadRequest(params)
  271. //
  272. // err := req.Send()
  273. // if err == nil { // resp is now filled
  274. // fmt.Println(resp)
  275. // }
  276. //
  277. func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) {
  278. op := &request.Operation{
  279. Name: opCreateMultipartUpload,
  280. HTTPMethod: "POST",
  281. HTTPPath: "/{Bucket}/{Key+}?uploads",
  282. }
  283. if input == nil {
  284. input = &CreateMultipartUploadInput{}
  285. }
  286. req = c.newRequest(op, input, output)
  287. output = &CreateMultipartUploadOutput{}
  288. req.Data = output
  289. return
  290. }
  291. // CreateMultipartUpload API operation for Amazon Simple Storage Service.
  292. //
  293. // Initiates a multipart upload and returns an upload ID.
  294. //
  295. // Note: After you initiate multipart upload and upload one or more parts, you
  296. // must either complete or abort multipart upload in order to stop getting charged
  297. // for storage of the uploaded parts. Only after you either complete or abort
  298. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  299. // you for the parts storage.
  300. //
  301. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  302. // with awserr.Error's Code and Message methods to get detailed information about
  303. // the error.
  304. //
  305. // See the AWS API reference guide for Amazon Simple Storage Service's
  306. // API operation CreateMultipartUpload for usage and error information.
  307. func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
  308. req, out := c.CreateMultipartUploadRequest(input)
  309. err := req.Send()
  310. return out, err
  311. }
  312. const opDeleteBucket = "DeleteBucket"
  313. // DeleteBucketRequest generates a "aws/request.Request" representing the
  314. // client's request for the DeleteBucket operation. The "output" return
  315. // value can be used to capture response data after the request's "Send" method
  316. // is called.
  317. //
  318. // See DeleteBucket for usage and error information.
  319. //
  320. // Creating a request object using this method should be used when you want to inject
  321. // custom logic into the request's lifecycle using a custom handler, or if you want to
  322. // access properties on the request object before or after sending the request. If
  323. // you just want the service response, call the DeleteBucket method directly
  324. // instead.
  325. //
  326. // Note: You must call the "Send" method on the returned request object in order
  327. // to execute the request.
  328. //
  329. // // Example sending a request using the DeleteBucketRequest method.
  330. // req, resp := client.DeleteBucketRequest(params)
  331. //
  332. // err := req.Send()
  333. // if err == nil { // resp is now filled
  334. // fmt.Println(resp)
  335. // }
  336. //
  337. func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
  338. op := &request.Operation{
  339. Name: opDeleteBucket,
  340. HTTPMethod: "DELETE",
  341. HTTPPath: "/{Bucket}",
  342. }
  343. if input == nil {
  344. input = &DeleteBucketInput{}
  345. }
  346. req = c.newRequest(op, input, output)
  347. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  348. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  349. output = &DeleteBucketOutput{}
  350. req.Data = output
  351. return
  352. }
  353. // DeleteBucket API operation for Amazon Simple Storage Service.
  354. //
  355. // Deletes the bucket. All objects (including all object versions and Delete
  356. // Markers) in the bucket must be deleted before the bucket itself can be deleted.
  357. //
  358. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  359. // with awserr.Error's Code and Message methods to get detailed information about
  360. // the error.
  361. //
  362. // See the AWS API reference guide for Amazon Simple Storage Service's
  363. // API operation DeleteBucket for usage and error information.
  364. func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
  365. req, out := c.DeleteBucketRequest(input)
  366. err := req.Send()
  367. return out, err
  368. }
  369. const opDeleteBucketCors = "DeleteBucketCors"
  370. // DeleteBucketCorsRequest generates a "aws/request.Request" representing the
  371. // client's request for the DeleteBucketCors operation. The "output" return
  372. // value can be used to capture response data after the request's "Send" method
  373. // is called.
  374. //
  375. // See DeleteBucketCors for usage and error information.
  376. //
  377. // Creating a request object using this method should be used when you want to inject
  378. // custom logic into the request's lifecycle using a custom handler, or if you want to
  379. // access properties on the request object before or after sending the request. If
  380. // you just want the service response, call the DeleteBucketCors method directly
  381. // instead.
  382. //
  383. // Note: You must call the "Send" method on the returned request object in order
  384. // to execute the request.
  385. //
  386. // // Example sending a request using the DeleteBucketCorsRequest method.
  387. // req, resp := client.DeleteBucketCorsRequest(params)
  388. //
  389. // err := req.Send()
  390. // if err == nil { // resp is now filled
  391. // fmt.Println(resp)
  392. // }
  393. //
  394. func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
  395. op := &request.Operation{
  396. Name: opDeleteBucketCors,
  397. HTTPMethod: "DELETE",
  398. HTTPPath: "/{Bucket}?cors",
  399. }
  400. if input == nil {
  401. input = &DeleteBucketCorsInput{}
  402. }
  403. req = c.newRequest(op, input, output)
  404. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  405. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  406. output = &DeleteBucketCorsOutput{}
  407. req.Data = output
  408. return
  409. }
  410. // DeleteBucketCors API operation for Amazon Simple Storage Service.
  411. //
  412. // Deletes the cors configuration information set for the bucket.
  413. //
  414. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  415. // with awserr.Error's Code and Message methods to get detailed information about
  416. // the error.
  417. //
  418. // See the AWS API reference guide for Amazon Simple Storage Service's
  419. // API operation DeleteBucketCors for usage and error information.
  420. func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
  421. req, out := c.DeleteBucketCorsRequest(input)
  422. err := req.Send()
  423. return out, err
  424. }
  425. const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
  426. // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
  427. // client's request for the DeleteBucketLifecycle operation. The "output" return
  428. // value can be used to capture response data after the request's "Send" method
  429. // is called.
  430. //
  431. // See DeleteBucketLifecycle for usage and error information.
  432. //
  433. // Creating a request object using this method should be used when you want to inject
  434. // custom logic into the request's lifecycle using a custom handler, or if you want to
  435. // access properties on the request object before or after sending the request. If
  436. // you just want the service response, call the DeleteBucketLifecycle method directly
  437. // instead.
  438. //
  439. // Note: You must call the "Send" method on the returned request object in order
  440. // to execute the request.
  441. //
  442. // // Example sending a request using the DeleteBucketLifecycleRequest method.
  443. // req, resp := client.DeleteBucketLifecycleRequest(params)
  444. //
  445. // err := req.Send()
  446. // if err == nil { // resp is now filled
  447. // fmt.Println(resp)
  448. // }
  449. //
  450. func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
  451. op := &request.Operation{
  452. Name: opDeleteBucketLifecycle,
  453. HTTPMethod: "DELETE",
  454. HTTPPath: "/{Bucket}?lifecycle",
  455. }
  456. if input == nil {
  457. input = &DeleteBucketLifecycleInput{}
  458. }
  459. req = c.newRequest(op, input, output)
  460. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  461. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  462. output = &DeleteBucketLifecycleOutput{}
  463. req.Data = output
  464. return
  465. }
  466. // DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
  467. //
  468. // Deletes the lifecycle configuration from the bucket.
  469. //
  470. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  471. // with awserr.Error's Code and Message methods to get detailed information about
  472. // the error.
  473. //
  474. // See the AWS API reference guide for Amazon Simple Storage Service's
  475. // API operation DeleteBucketLifecycle for usage and error information.
  476. func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
  477. req, out := c.DeleteBucketLifecycleRequest(input)
  478. err := req.Send()
  479. return out, err
  480. }
  481. const opDeleteBucketPolicy = "DeleteBucketPolicy"
  482. // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
  483. // client's request for the DeleteBucketPolicy operation. The "output" return
  484. // value can be used to capture response data after the request's "Send" method
  485. // is called.
  486. //
  487. // See DeleteBucketPolicy for usage and error information.
  488. //
  489. // Creating a request object using this method should be used when you want to inject
  490. // custom logic into the request's lifecycle using a custom handler, or if you want to
  491. // access properties on the request object before or after sending the request. If
  492. // you just want the service response, call the DeleteBucketPolicy method directly
  493. // instead.
  494. //
  495. // Note: You must call the "Send" method on the returned request object in order
  496. // to execute the request.
  497. //
  498. // // Example sending a request using the DeleteBucketPolicyRequest method.
  499. // req, resp := client.DeleteBucketPolicyRequest(params)
  500. //
  501. // err := req.Send()
  502. // if err == nil { // resp is now filled
  503. // fmt.Println(resp)
  504. // }
  505. //
  506. func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
  507. op := &request.Operation{
  508. Name: opDeleteBucketPolicy,
  509. HTTPMethod: "DELETE",
  510. HTTPPath: "/{Bucket}?policy",
  511. }
  512. if input == nil {
  513. input = &DeleteBucketPolicyInput{}
  514. }
  515. req = c.newRequest(op, input, output)
  516. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  517. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  518. output = &DeleteBucketPolicyOutput{}
  519. req.Data = output
  520. return
  521. }
  522. // DeleteBucketPolicy API operation for Amazon Simple Storage Service.
  523. //
  524. // Deletes the policy from the bucket.
  525. //
  526. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  527. // with awserr.Error's Code and Message methods to get detailed information about
  528. // the error.
  529. //
  530. // See the AWS API reference guide for Amazon Simple Storage Service's
  531. // API operation DeleteBucketPolicy for usage and error information.
  532. func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
  533. req, out := c.DeleteBucketPolicyRequest(input)
  534. err := req.Send()
  535. return out, err
  536. }
  537. const opDeleteBucketReplication = "DeleteBucketReplication"
  538. // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
  539. // client's request for the DeleteBucketReplication operation. The "output" return
  540. // value can be used to capture response data after the request's "Send" method
  541. // is called.
  542. //
  543. // See DeleteBucketReplication for usage and error information.
  544. //
  545. // Creating a request object using this method should be used when you want to inject
  546. // custom logic into the request's lifecycle using a custom handler, or if you want to
  547. // access properties on the request object before or after sending the request. If
  548. // you just want the service response, call the DeleteBucketReplication method directly
  549. // instead.
  550. //
  551. // Note: You must call the "Send" method on the returned request object in order
  552. // to execute the request.
  553. //
  554. // // Example sending a request using the DeleteBucketReplicationRequest method.
  555. // req, resp := client.DeleteBucketReplicationRequest(params)
  556. //
  557. // err := req.Send()
  558. // if err == nil { // resp is now filled
  559. // fmt.Println(resp)
  560. // }
  561. //
  562. func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
  563. op := &request.Operation{
  564. Name: opDeleteBucketReplication,
  565. HTTPMethod: "DELETE",
  566. HTTPPath: "/{Bucket}?replication",
  567. }
  568. if input == nil {
  569. input = &DeleteBucketReplicationInput{}
  570. }
  571. req = c.newRequest(op, input, output)
  572. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  573. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  574. output = &DeleteBucketReplicationOutput{}
  575. req.Data = output
  576. return
  577. }
  578. // DeleteBucketReplication API operation for Amazon Simple Storage Service.
  579. //
  580. // Deletes the replication configuration from the bucket.
  581. //
  582. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  583. // with awserr.Error's Code and Message methods to get detailed information about
  584. // the error.
  585. //
  586. // See the AWS API reference guide for Amazon Simple Storage Service's
  587. // API operation DeleteBucketReplication for usage and error information.
  588. func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
  589. req, out := c.DeleteBucketReplicationRequest(input)
  590. err := req.Send()
  591. return out, err
  592. }
  593. const opDeleteBucketTagging = "DeleteBucketTagging"
  594. // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
  595. // client's request for the DeleteBucketTagging operation. The "output" return
  596. // value can be used to capture response data after the request's "Send" method
  597. // is called.
  598. //
  599. // See DeleteBucketTagging for usage and error information.
  600. //
  601. // Creating a request object using this method should be used when you want to inject
  602. // custom logic into the request's lifecycle using a custom handler, or if you want to
  603. // access properties on the request object before or after sending the request. If
  604. // you just want the service response, call the DeleteBucketTagging method directly
  605. // instead.
  606. //
  607. // Note: You must call the "Send" method on the returned request object in order
  608. // to execute the request.
  609. //
  610. // // Example sending a request using the DeleteBucketTaggingRequest method.
  611. // req, resp := client.DeleteBucketTaggingRequest(params)
  612. //
  613. // err := req.Send()
  614. // if err == nil { // resp is now filled
  615. // fmt.Println(resp)
  616. // }
  617. //
  618. func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
  619. op := &request.Operation{
  620. Name: opDeleteBucketTagging,
  621. HTTPMethod: "DELETE",
  622. HTTPPath: "/{Bucket}?tagging",
  623. }
  624. if input == nil {
  625. input = &DeleteBucketTaggingInput{}
  626. }
  627. req = c.newRequest(op, input, output)
  628. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  629. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  630. output = &DeleteBucketTaggingOutput{}
  631. req.Data = output
  632. return
  633. }
  634. // DeleteBucketTagging API operation for Amazon Simple Storage Service.
  635. //
  636. // Deletes the tags from the bucket.
  637. //
  638. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  639. // with awserr.Error's Code and Message methods to get detailed information about
  640. // the error.
  641. //
  642. // See the AWS API reference guide for Amazon Simple Storage Service's
  643. // API operation DeleteBucketTagging for usage and error information.
  644. func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
  645. req, out := c.DeleteBucketTaggingRequest(input)
  646. err := req.Send()
  647. return out, err
  648. }
  649. const opDeleteBucketWebsite = "DeleteBucketWebsite"
  650. // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
  651. // client's request for the DeleteBucketWebsite operation. The "output" return
  652. // value can be used to capture response data after the request's "Send" method
  653. // is called.
  654. //
  655. // See DeleteBucketWebsite for usage and error information.
  656. //
  657. // Creating a request object using this method should be used when you want to inject
  658. // custom logic into the request's lifecycle using a custom handler, or if you want to
  659. // access properties on the request object before or after sending the request. If
  660. // you just want the service response, call the DeleteBucketWebsite method directly
  661. // instead.
  662. //
  663. // Note: You must call the "Send" method on the returned request object in order
  664. // to execute the request.
  665. //
  666. // // Example sending a request using the DeleteBucketWebsiteRequest method.
  667. // req, resp := client.DeleteBucketWebsiteRequest(params)
  668. //
  669. // err := req.Send()
  670. // if err == nil { // resp is now filled
  671. // fmt.Println(resp)
  672. // }
  673. //
  674. func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
  675. op := &request.Operation{
  676. Name: opDeleteBucketWebsite,
  677. HTTPMethod: "DELETE",
  678. HTTPPath: "/{Bucket}?website",
  679. }
  680. if input == nil {
  681. input = &DeleteBucketWebsiteInput{}
  682. }
  683. req = c.newRequest(op, input, output)
  684. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  685. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  686. output = &DeleteBucketWebsiteOutput{}
  687. req.Data = output
  688. return
  689. }
  690. // DeleteBucketWebsite API operation for Amazon Simple Storage Service.
  691. //
  692. // This operation removes the website configuration from the bucket.
  693. //
  694. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  695. // with awserr.Error's Code and Message methods to get detailed information about
  696. // the error.
  697. //
  698. // See the AWS API reference guide for Amazon Simple Storage Service's
  699. // API operation DeleteBucketWebsite for usage and error information.
  700. func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
  701. req, out := c.DeleteBucketWebsiteRequest(input)
  702. err := req.Send()
  703. return out, err
  704. }
  705. const opDeleteObject = "DeleteObject"
  706. // DeleteObjectRequest generates a "aws/request.Request" representing the
  707. // client's request for the DeleteObject operation. The "output" return
  708. // value can be used to capture response data after the request's "Send" method
  709. // is called.
  710. //
  711. // See DeleteObject for usage and error information.
  712. //
  713. // Creating a request object using this method should be used when you want to inject
  714. // custom logic into the request's lifecycle using a custom handler, or if you want to
  715. // access properties on the request object before or after sending the request. If
  716. // you just want the service response, call the DeleteObject method directly
  717. // instead.
  718. //
  719. // Note: You must call the "Send" method on the returned request object in order
  720. // to execute the request.
  721. //
  722. // // Example sending a request using the DeleteObjectRequest method.
  723. // req, resp := client.DeleteObjectRequest(params)
  724. //
  725. // err := req.Send()
  726. // if err == nil { // resp is now filled
  727. // fmt.Println(resp)
  728. // }
  729. //
  730. func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
  731. op := &request.Operation{
  732. Name: opDeleteObject,
  733. HTTPMethod: "DELETE",
  734. HTTPPath: "/{Bucket}/{Key+}",
  735. }
  736. if input == nil {
  737. input = &DeleteObjectInput{}
  738. }
  739. req = c.newRequest(op, input, output)
  740. output = &DeleteObjectOutput{}
  741. req.Data = output
  742. return
  743. }
  744. // DeleteObject API operation for Amazon Simple Storage Service.
  745. //
  746. // Removes the null version (if there is one) of an object and inserts a delete
  747. // marker, which becomes the latest version of the object. If there isn't a
  748. // null version, Amazon S3 does not remove any objects.
  749. //
  750. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  751. // with awserr.Error's Code and Message methods to get detailed information about
  752. // the error.
  753. //
  754. // See the AWS API reference guide for Amazon Simple Storage Service's
  755. // API operation DeleteObject for usage and error information.
  756. func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
  757. req, out := c.DeleteObjectRequest(input)
  758. err := req.Send()
  759. return out, err
  760. }
  761. const opDeleteObjects = "DeleteObjects"
  762. // DeleteObjectsRequest generates a "aws/request.Request" representing the
  763. // client's request for the DeleteObjects operation. The "output" return
  764. // value can be used to capture response data after the request's "Send" method
  765. // is called.
  766. //
  767. // See DeleteObjects for usage and error information.
  768. //
  769. // Creating a request object using this method should be used when you want to inject
  770. // custom logic into the request's lifecycle using a custom handler, or if you want to
  771. // access properties on the request object before or after sending the request. If
  772. // you just want the service response, call the DeleteObjects method directly
  773. // instead.
  774. //
  775. // Note: You must call the "Send" method on the returned request object in order
  776. // to execute the request.
  777. //
  778. // // Example sending a request using the DeleteObjectsRequest method.
  779. // req, resp := client.DeleteObjectsRequest(params)
  780. //
  781. // err := req.Send()
  782. // if err == nil { // resp is now filled
  783. // fmt.Println(resp)
  784. // }
  785. //
  786. func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
  787. op := &request.Operation{
  788. Name: opDeleteObjects,
  789. HTTPMethod: "POST",
  790. HTTPPath: "/{Bucket}?delete",
  791. }
  792. if input == nil {
  793. input = &DeleteObjectsInput{}
  794. }
  795. req = c.newRequest(op, input, output)
  796. output = &DeleteObjectsOutput{}
  797. req.Data = output
  798. return
  799. }
  800. // DeleteObjects API operation for Amazon Simple Storage Service.
  801. //
  802. // This operation enables you to delete multiple objects from a bucket using
  803. // a single HTTP request. You may specify up to 1000 keys.
  804. //
  805. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  806. // with awserr.Error's Code and Message methods to get detailed information about
  807. // the error.
  808. //
  809. // See the AWS API reference guide for Amazon Simple Storage Service's
  810. // API operation DeleteObjects for usage and error information.
  811. func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
  812. req, out := c.DeleteObjectsRequest(input)
  813. err := req.Send()
  814. return out, err
  815. }
  816. const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
  817. // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  818. // client's request for the GetBucketAccelerateConfiguration operation. The "output" return
  819. // value can be used to capture response data after the request's "Send" method
  820. // is called.
  821. //
  822. // See GetBucketAccelerateConfiguration for usage and error information.
  823. //
  824. // Creating a request object using this method should be used when you want to inject
  825. // custom logic into the request's lifecycle using a custom handler, or if you want to
  826. // access properties on the request object before or after sending the request. If
  827. // you just want the service response, call the GetBucketAccelerateConfiguration method directly
  828. // instead.
  829. //
  830. // Note: You must call the "Send" method on the returned request object in order
  831. // to execute the request.
  832. //
  833. // // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
  834. // req, resp := client.GetBucketAccelerateConfigurationRequest(params)
  835. //
  836. // err := req.Send()
  837. // if err == nil { // resp is now filled
  838. // fmt.Println(resp)
  839. // }
  840. //
  841. func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) {
  842. op := &request.Operation{
  843. Name: opGetBucketAccelerateConfiguration,
  844. HTTPMethod: "GET",
  845. HTTPPath: "/{Bucket}?accelerate",
  846. }
  847. if input == nil {
  848. input = &GetBucketAccelerateConfigurationInput{}
  849. }
  850. req = c.newRequest(op, input, output)
  851. output = &GetBucketAccelerateConfigurationOutput{}
  852. req.Data = output
  853. return
  854. }
  855. // GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  856. //
  857. // Returns the accelerate configuration of a bucket.
  858. //
  859. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  860. // with awserr.Error's Code and Message methods to get detailed information about
  861. // the error.
  862. //
  863. // See the AWS API reference guide for Amazon Simple Storage Service's
  864. // API operation GetBucketAccelerateConfiguration for usage and error information.
  865. func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
  866. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  867. err := req.Send()
  868. return out, err
  869. }
  870. const opGetBucketAcl = "GetBucketAcl"
  871. // GetBucketAclRequest generates a "aws/request.Request" representing the
  872. // client's request for the GetBucketAcl operation. The "output" return
  873. // value can be used to capture response data after the request's "Send" method
  874. // is called.
  875. //
  876. // See GetBucketAcl for usage and error information.
  877. //
  878. // Creating a request object using this method should be used when you want to inject
  879. // custom logic into the request's lifecycle using a custom handler, or if you want to
  880. // access properties on the request object before or after sending the request. If
  881. // you just want the service response, call the GetBucketAcl method directly
  882. // instead.
  883. //
  884. // Note: You must call the "Send" method on the returned request object in order
  885. // to execute the request.
  886. //
  887. // // Example sending a request using the GetBucketAclRequest method.
  888. // req, resp := client.GetBucketAclRequest(params)
  889. //
  890. // err := req.Send()
  891. // if err == nil { // resp is now filled
  892. // fmt.Println(resp)
  893. // }
  894. //
  895. func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
  896. op := &request.Operation{
  897. Name: opGetBucketAcl,
  898. HTTPMethod: "GET",
  899. HTTPPath: "/{Bucket}?acl",
  900. }
  901. if input == nil {
  902. input = &GetBucketAclInput{}
  903. }
  904. req = c.newRequest(op, input, output)
  905. output = &GetBucketAclOutput{}
  906. req.Data = output
  907. return
  908. }
  909. // GetBucketAcl API operation for Amazon Simple Storage Service.
  910. //
  911. // Gets the access control policy for the bucket.
  912. //
  913. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  914. // with awserr.Error's Code and Message methods to get detailed information about
  915. // the error.
  916. //
  917. // See the AWS API reference guide for Amazon Simple Storage Service's
  918. // API operation GetBucketAcl for usage and error information.
  919. func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
  920. req, out := c.GetBucketAclRequest(input)
  921. err := req.Send()
  922. return out, err
  923. }
  924. const opGetBucketCors = "GetBucketCors"
  925. // GetBucketCorsRequest generates a "aws/request.Request" representing the
  926. // client's request for the GetBucketCors operation. The "output" return
  927. // value can be used to capture response data after the request's "Send" method
  928. // is called.
  929. //
  930. // See GetBucketCors for usage and error information.
  931. //
  932. // Creating a request object using this method should be used when you want to inject
  933. // custom logic into the request's lifecycle using a custom handler, or if you want to
  934. // access properties on the request object before or after sending the request. If
  935. // you just want the service response, call the GetBucketCors method directly
  936. // instead.
  937. //
  938. // Note: You must call the "Send" method on the returned request object in order
  939. // to execute the request.
  940. //
  941. // // Example sending a request using the GetBucketCorsRequest method.
  942. // req, resp := client.GetBucketCorsRequest(params)
  943. //
  944. // err := req.Send()
  945. // if err == nil { // resp is now filled
  946. // fmt.Println(resp)
  947. // }
  948. //
  949. func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
  950. op := &request.Operation{
  951. Name: opGetBucketCors,
  952. HTTPMethod: "GET",
  953. HTTPPath: "/{Bucket}?cors",
  954. }
  955. if input == nil {
  956. input = &GetBucketCorsInput{}
  957. }
  958. req = c.newRequest(op, input, output)
  959. output = &GetBucketCorsOutput{}
  960. req.Data = output
  961. return
  962. }
  963. // GetBucketCors API operation for Amazon Simple Storage Service.
  964. //
  965. // Returns the cors configuration for the bucket.
  966. //
  967. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  968. // with awserr.Error's Code and Message methods to get detailed information about
  969. // the error.
  970. //
  971. // See the AWS API reference guide for Amazon Simple Storage Service's
  972. // API operation GetBucketCors for usage and error information.
  973. func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
  974. req, out := c.GetBucketCorsRequest(input)
  975. err := req.Send()
  976. return out, err
  977. }
  978. const opGetBucketLifecycle = "GetBucketLifecycle"
  979. // GetBucketLifecycleRequest generates a "aws/request.Request" representing the
  980. // client's request for the GetBucketLifecycle operation. The "output" return
  981. // value can be used to capture response data after the request's "Send" method
  982. // is called.
  983. //
  984. // See GetBucketLifecycle for usage and error information.
  985. //
  986. // Creating a request object using this method should be used when you want to inject
  987. // custom logic into the request's lifecycle using a custom handler, or if you want to
  988. // access properties on the request object before or after sending the request. If
  989. // you just want the service response, call the GetBucketLifecycle method directly
  990. // instead.
  991. //
  992. // Note: You must call the "Send" method on the returned request object in order
  993. // to execute the request.
  994. //
  995. // // Example sending a request using the GetBucketLifecycleRequest method.
  996. // req, resp := client.GetBucketLifecycleRequest(params)
  997. //
  998. // err := req.Send()
  999. // if err == nil { // resp is now filled
  1000. // fmt.Println(resp)
  1001. // }
  1002. //
  1003. func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
  1004. if c.Client.Config.Logger != nil {
  1005. c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
  1006. }
  1007. op := &request.Operation{
  1008. Name: opGetBucketLifecycle,
  1009. HTTPMethod: "GET",
  1010. HTTPPath: "/{Bucket}?lifecycle",
  1011. }
  1012. if input == nil {
  1013. input = &GetBucketLifecycleInput{}
  1014. }
  1015. req = c.newRequest(op, input, output)
  1016. output = &GetBucketLifecycleOutput{}
  1017. req.Data = output
  1018. return
  1019. }
  1020. // GetBucketLifecycle API operation for Amazon Simple Storage Service.
  1021. //
  1022. // Deprecated, see the GetBucketLifecycleConfiguration operation.
  1023. //
  1024. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1025. // with awserr.Error's Code and Message methods to get detailed information about
  1026. // the error.
  1027. //
  1028. // See the AWS API reference guide for Amazon Simple Storage Service's
  1029. // API operation GetBucketLifecycle for usage and error information.
  1030. func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
  1031. req, out := c.GetBucketLifecycleRequest(input)
  1032. err := req.Send()
  1033. return out, err
  1034. }
  1035. const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
  1036. // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  1037. // client's request for the GetBucketLifecycleConfiguration operation. The "output" return
  1038. // value can be used to capture response data after the request's "Send" method
  1039. // is called.
  1040. //
  1041. // See GetBucketLifecycleConfiguration for usage and error information.
  1042. //
  1043. // Creating a request object using this method should be used when you want to inject
  1044. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1045. // access properties on the request object before or after sending the request. If
  1046. // you just want the service response, call the GetBucketLifecycleConfiguration method directly
  1047. // instead.
  1048. //
  1049. // Note: You must call the "Send" method on the returned request object in order
  1050. // to execute the request.
  1051. //
  1052. // // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
  1053. // req, resp := client.GetBucketLifecycleConfigurationRequest(params)
  1054. //
  1055. // err := req.Send()
  1056. // if err == nil { // resp is now filled
  1057. // fmt.Println(resp)
  1058. // }
  1059. //
  1060. func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
  1061. op := &request.Operation{
  1062. Name: opGetBucketLifecycleConfiguration,
  1063. HTTPMethod: "GET",
  1064. HTTPPath: "/{Bucket}?lifecycle",
  1065. }
  1066. if input == nil {
  1067. input = &GetBucketLifecycleConfigurationInput{}
  1068. }
  1069. req = c.newRequest(op, input, output)
  1070. output = &GetBucketLifecycleConfigurationOutput{}
  1071. req.Data = output
  1072. return
  1073. }
  1074. // GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  1075. //
  1076. // Returns the lifecycle configuration information set on the bucket.
  1077. //
  1078. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1079. // with awserr.Error's Code and Message methods to get detailed information about
  1080. // the error.
  1081. //
  1082. // See the AWS API reference guide for Amazon Simple Storage Service's
  1083. // API operation GetBucketLifecycleConfiguration for usage and error information.
  1084. func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
  1085. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1086. err := req.Send()
  1087. return out, err
  1088. }
  1089. const opGetBucketLocation = "GetBucketLocation"
  1090. // GetBucketLocationRequest generates a "aws/request.Request" representing the
  1091. // client's request for the GetBucketLocation operation. The "output" return
  1092. // value can be used to capture response data after the request's "Send" method
  1093. // is called.
  1094. //
  1095. // See GetBucketLocation for usage and error information.
  1096. //
  1097. // Creating a request object using this method should be used when you want to inject
  1098. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1099. // access properties on the request object before or after sending the request. If
  1100. // you just want the service response, call the GetBucketLocation method directly
  1101. // instead.
  1102. //
  1103. // Note: You must call the "Send" method on the returned request object in order
  1104. // to execute the request.
  1105. //
  1106. // // Example sending a request using the GetBucketLocationRequest method.
  1107. // req, resp := client.GetBucketLocationRequest(params)
  1108. //
  1109. // err := req.Send()
  1110. // if err == nil { // resp is now filled
  1111. // fmt.Println(resp)
  1112. // }
  1113. //
  1114. func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
  1115. op := &request.Operation{
  1116. Name: opGetBucketLocation,
  1117. HTTPMethod: "GET",
  1118. HTTPPath: "/{Bucket}?location",
  1119. }
  1120. if input == nil {
  1121. input = &GetBucketLocationInput{}
  1122. }
  1123. req = c.newRequest(op, input, output)
  1124. output = &GetBucketLocationOutput{}
  1125. req.Data = output
  1126. return
  1127. }
  1128. // GetBucketLocation API operation for Amazon Simple Storage Service.
  1129. //
  1130. // Returns the region the bucket resides in.
  1131. //
  1132. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1133. // with awserr.Error's Code and Message methods to get detailed information about
  1134. // the error.
  1135. //
  1136. // See the AWS API reference guide for Amazon Simple Storage Service's
  1137. // API operation GetBucketLocation for usage and error information.
  1138. func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
  1139. req, out := c.GetBucketLocationRequest(input)
  1140. err := req.Send()
  1141. return out, err
  1142. }
  1143. const opGetBucketLogging = "GetBucketLogging"
  1144. // GetBucketLoggingRequest generates a "aws/request.Request" representing the
  1145. // client's request for the GetBucketLogging operation. The "output" return
  1146. // value can be used to capture response data after the request's "Send" method
  1147. // is called.
  1148. //
  1149. // See GetBucketLogging for usage and error information.
  1150. //
  1151. // Creating a request object using this method should be used when you want to inject
  1152. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1153. // access properties on the request object before or after sending the request. If
  1154. // you just want the service response, call the GetBucketLogging method directly
  1155. // instead.
  1156. //
  1157. // Note: You must call the "Send" method on the returned request object in order
  1158. // to execute the request.
  1159. //
  1160. // // Example sending a request using the GetBucketLoggingRequest method.
  1161. // req, resp := client.GetBucketLoggingRequest(params)
  1162. //
  1163. // err := req.Send()
  1164. // if err == nil { // resp is now filled
  1165. // fmt.Println(resp)
  1166. // }
  1167. //
  1168. func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
  1169. op := &request.Operation{
  1170. Name: opGetBucketLogging,
  1171. HTTPMethod: "GET",
  1172. HTTPPath: "/{Bucket}?logging",
  1173. }
  1174. if input == nil {
  1175. input = &GetBucketLoggingInput{}
  1176. }
  1177. req = c.newRequest(op, input, output)
  1178. output = &GetBucketLoggingOutput{}
  1179. req.Data = output
  1180. return
  1181. }
  1182. // GetBucketLogging API operation for Amazon Simple Storage Service.
  1183. //
  1184. // Returns the logging status of a bucket and the permissions users have to
  1185. // view and modify that status. To use GET, you must be the bucket owner.
  1186. //
  1187. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1188. // with awserr.Error's Code and Message methods to get detailed information about
  1189. // the error.
  1190. //
  1191. // See the AWS API reference guide for Amazon Simple Storage Service's
  1192. // API operation GetBucketLogging for usage and error information.
  1193. func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
  1194. req, out := c.GetBucketLoggingRequest(input)
  1195. err := req.Send()
  1196. return out, err
  1197. }
  1198. const opGetBucketNotification = "GetBucketNotification"
  1199. // GetBucketNotificationRequest generates a "aws/request.Request" representing the
  1200. // client's request for the GetBucketNotification operation. The "output" return
  1201. // value can be used to capture response data after the request's "Send" method
  1202. // is called.
  1203. //
  1204. // See GetBucketNotification for usage and error information.
  1205. //
  1206. // Creating a request object using this method should be used when you want to inject
  1207. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1208. // access properties on the request object before or after sending the request. If
  1209. // you just want the service response, call the GetBucketNotification method directly
  1210. // instead.
  1211. //
  1212. // Note: You must call the "Send" method on the returned request object in order
  1213. // to execute the request.
  1214. //
  1215. // // Example sending a request using the GetBucketNotificationRequest method.
  1216. // req, resp := client.GetBucketNotificationRequest(params)
  1217. //
  1218. // err := req.Send()
  1219. // if err == nil { // resp is now filled
  1220. // fmt.Println(resp)
  1221. // }
  1222. //
  1223. func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
  1224. if c.Client.Config.Logger != nil {
  1225. c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
  1226. }
  1227. op := &request.Operation{
  1228. Name: opGetBucketNotification,
  1229. HTTPMethod: "GET",
  1230. HTTPPath: "/{Bucket}?notification",
  1231. }
  1232. if input == nil {
  1233. input = &GetBucketNotificationConfigurationRequest{}
  1234. }
  1235. req = c.newRequest(op, input, output)
  1236. output = &NotificationConfigurationDeprecated{}
  1237. req.Data = output
  1238. return
  1239. }
  1240. // GetBucketNotification API operation for Amazon Simple Storage Service.
  1241. //
  1242. // Deprecated, see the GetBucketNotificationConfiguration operation.
  1243. //
  1244. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1245. // with awserr.Error's Code and Message methods to get detailed information about
  1246. // the error.
  1247. //
  1248. // See the AWS API reference guide for Amazon Simple Storage Service's
  1249. // API operation GetBucketNotification for usage and error information.
  1250. func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
  1251. req, out := c.GetBucketNotificationRequest(input)
  1252. err := req.Send()
  1253. return out, err
  1254. }
  1255. const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
  1256. // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  1257. // client's request for the GetBucketNotificationConfiguration operation. The "output" return
  1258. // value can be used to capture response data after the request's "Send" method
  1259. // is called.
  1260. //
  1261. // See GetBucketNotificationConfiguration for usage and error information.
  1262. //
  1263. // Creating a request object using this method should be used when you want to inject
  1264. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1265. // access properties on the request object before or after sending the request. If
  1266. // you just want the service response, call the GetBucketNotificationConfiguration method directly
  1267. // instead.
  1268. //
  1269. // Note: You must call the "Send" method on the returned request object in order
  1270. // to execute the request.
  1271. //
  1272. // // Example sending a request using the GetBucketNotificationConfigurationRequest method.
  1273. // req, resp := client.GetBucketNotificationConfigurationRequest(params)
  1274. //
  1275. // err := req.Send()
  1276. // if err == nil { // resp is now filled
  1277. // fmt.Println(resp)
  1278. // }
  1279. //
  1280. func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
  1281. op := &request.Operation{
  1282. Name: opGetBucketNotificationConfiguration,
  1283. HTTPMethod: "GET",
  1284. HTTPPath: "/{Bucket}?notification",
  1285. }
  1286. if input == nil {
  1287. input = &GetBucketNotificationConfigurationRequest{}
  1288. }
  1289. req = c.newRequest(op, input, output)
  1290. output = &NotificationConfiguration{}
  1291. req.Data = output
  1292. return
  1293. }
  1294. // GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  1295. //
  1296. // Returns the notification configuration of a bucket.
  1297. //
  1298. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1299. // with awserr.Error's Code and Message methods to get detailed information about
  1300. // the error.
  1301. //
  1302. // See the AWS API reference guide for Amazon Simple Storage Service's
  1303. // API operation GetBucketNotificationConfiguration for usage and error information.
  1304. func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
  1305. req, out := c.GetBucketNotificationConfigurationRequest(input)
  1306. err := req.Send()
  1307. return out, err
  1308. }
  1309. const opGetBucketPolicy = "GetBucketPolicy"
  1310. // GetBucketPolicyRequest generates a "aws/request.Request" representing the
  1311. // client's request for the GetBucketPolicy operation. The "output" return
  1312. // value can be used to capture response data after the request's "Send" method
  1313. // is called.
  1314. //
  1315. // See GetBucketPolicy for usage and error information.
  1316. //
  1317. // Creating a request object using this method should be used when you want to inject
  1318. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1319. // access properties on the request object before or after sending the request. If
  1320. // you just want the service response, call the GetBucketPolicy method directly
  1321. // instead.
  1322. //
  1323. // Note: You must call the "Send" method on the returned request object in order
  1324. // to execute the request.
  1325. //
  1326. // // Example sending a request using the GetBucketPolicyRequest method.
  1327. // req, resp := client.GetBucketPolicyRequest(params)
  1328. //
  1329. // err := req.Send()
  1330. // if err == nil { // resp is now filled
  1331. // fmt.Println(resp)
  1332. // }
  1333. //
  1334. func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
  1335. op := &request.Operation{
  1336. Name: opGetBucketPolicy,
  1337. HTTPMethod: "GET",
  1338. HTTPPath: "/{Bucket}?policy",
  1339. }
  1340. if input == nil {
  1341. input = &GetBucketPolicyInput{}
  1342. }
  1343. req = c.newRequest(op, input, output)
  1344. output = &GetBucketPolicyOutput{}
  1345. req.Data = output
  1346. return
  1347. }
  1348. // GetBucketPolicy API operation for Amazon Simple Storage Service.
  1349. //
  1350. // Returns the policy of a specified bucket.
  1351. //
  1352. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1353. // with awserr.Error's Code and Message methods to get detailed information about
  1354. // the error.
  1355. //
  1356. // See the AWS API reference guide for Amazon Simple Storage Service's
  1357. // API operation GetBucketPolicy for usage and error information.
  1358. func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
  1359. req, out := c.GetBucketPolicyRequest(input)
  1360. err := req.Send()
  1361. return out, err
  1362. }
  1363. const opGetBucketReplication = "GetBucketReplication"
  1364. // GetBucketReplicationRequest generates a "aws/request.Request" representing the
  1365. // client's request for the GetBucketReplication operation. The "output" return
  1366. // value can be used to capture response data after the request's "Send" method
  1367. // is called.
  1368. //
  1369. // See GetBucketReplication for usage and error information.
  1370. //
  1371. // Creating a request object using this method should be used when you want to inject
  1372. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1373. // access properties on the request object before or after sending the request. If
  1374. // you just want the service response, call the GetBucketReplication method directly
  1375. // instead.
  1376. //
  1377. // Note: You must call the "Send" method on the returned request object in order
  1378. // to execute the request.
  1379. //
  1380. // // Example sending a request using the GetBucketReplicationRequest method.
  1381. // req, resp := client.GetBucketReplicationRequest(params)
  1382. //
  1383. // err := req.Send()
  1384. // if err == nil { // resp is now filled
  1385. // fmt.Println(resp)
  1386. // }
  1387. //
  1388. func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
  1389. op := &request.Operation{
  1390. Name: opGetBucketReplication,
  1391. HTTPMethod: "GET",
  1392. HTTPPath: "/{Bucket}?replication",
  1393. }
  1394. if input == nil {
  1395. input = &GetBucketReplicationInput{}
  1396. }
  1397. req = c.newRequest(op, input, output)
  1398. output = &GetBucketReplicationOutput{}
  1399. req.Data = output
  1400. return
  1401. }
  1402. // GetBucketReplication API operation for Amazon Simple Storage Service.
  1403. //
  1404. // Returns the replication configuration of a bucket.
  1405. //
  1406. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1407. // with awserr.Error's Code and Message methods to get detailed information about
  1408. // the error.
  1409. //
  1410. // See the AWS API reference guide for Amazon Simple Storage Service's
  1411. // API operation GetBucketReplication for usage and error information.
  1412. func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
  1413. req, out := c.GetBucketReplicationRequest(input)
  1414. err := req.Send()
  1415. return out, err
  1416. }
  1417. const opGetBucketRequestPayment = "GetBucketRequestPayment"
  1418. // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  1419. // client's request for the GetBucketRequestPayment operation. The "output" return
  1420. // value can be used to capture response data after the request's "Send" method
  1421. // is called.
  1422. //
  1423. // See GetBucketRequestPayment for usage and error information.
  1424. //
  1425. // Creating a request object using this method should be used when you want to inject
  1426. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1427. // access properties on the request object before or after sending the request. If
  1428. // you just want the service response, call the GetBucketRequestPayment method directly
  1429. // instead.
  1430. //
  1431. // Note: You must call the "Send" method on the returned request object in order
  1432. // to execute the request.
  1433. //
  1434. // // Example sending a request using the GetBucketRequestPaymentRequest method.
  1435. // req, resp := client.GetBucketRequestPaymentRequest(params)
  1436. //
  1437. // err := req.Send()
  1438. // if err == nil { // resp is now filled
  1439. // fmt.Println(resp)
  1440. // }
  1441. //
  1442. func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
  1443. op := &request.Operation{
  1444. Name: opGetBucketRequestPayment,
  1445. HTTPMethod: "GET",
  1446. HTTPPath: "/{Bucket}?requestPayment",
  1447. }
  1448. if input == nil {
  1449. input = &GetBucketRequestPaymentInput{}
  1450. }
  1451. req = c.newRequest(op, input, output)
  1452. output = &GetBucketRequestPaymentOutput{}
  1453. req.Data = output
  1454. return
  1455. }
  1456. // GetBucketRequestPayment API operation for Amazon Simple Storage Service.
  1457. //
  1458. // Returns the request payment configuration of a bucket.
  1459. //
  1460. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1461. // with awserr.Error's Code and Message methods to get detailed information about
  1462. // the error.
  1463. //
  1464. // See the AWS API reference guide for Amazon Simple Storage Service's
  1465. // API operation GetBucketRequestPayment for usage and error information.
  1466. func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
  1467. req, out := c.GetBucketRequestPaymentRequest(input)
  1468. err := req.Send()
  1469. return out, err
  1470. }
  1471. const opGetBucketTagging = "GetBucketTagging"
  1472. // GetBucketTaggingRequest generates a "aws/request.Request" representing the
  1473. // client's request for the GetBucketTagging operation. The "output" return
  1474. // value can be used to capture response data after the request's "Send" method
  1475. // is called.
  1476. //
  1477. // See GetBucketTagging for usage and error information.
  1478. //
  1479. // Creating a request object using this method should be used when you want to inject
  1480. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1481. // access properties on the request object before or after sending the request. If
  1482. // you just want the service response, call the GetBucketTagging method directly
  1483. // instead.
  1484. //
  1485. // Note: You must call the "Send" method on the returned request object in order
  1486. // to execute the request.
  1487. //
  1488. // // Example sending a request using the GetBucketTaggingRequest method.
  1489. // req, resp := client.GetBucketTaggingRequest(params)
  1490. //
  1491. // err := req.Send()
  1492. // if err == nil { // resp is now filled
  1493. // fmt.Println(resp)
  1494. // }
  1495. //
  1496. func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
  1497. op := &request.Operation{
  1498. Name: opGetBucketTagging,
  1499. HTTPMethod: "GET",
  1500. HTTPPath: "/{Bucket}?tagging",
  1501. }
  1502. if input == nil {
  1503. input = &GetBucketTaggingInput{}
  1504. }
  1505. req = c.newRequest(op, input, output)
  1506. output = &GetBucketTaggingOutput{}
  1507. req.Data = output
  1508. return
  1509. }
  1510. // GetBucketTagging API operation for Amazon Simple Storage Service.
  1511. //
  1512. // Returns the tag set associated with the bucket.
  1513. //
  1514. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1515. // with awserr.Error's Code and Message methods to get detailed information about
  1516. // the error.
  1517. //
  1518. // See the AWS API reference guide for Amazon Simple Storage Service's
  1519. // API operation GetBucketTagging for usage and error information.
  1520. func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
  1521. req, out := c.GetBucketTaggingRequest(input)
  1522. err := req.Send()
  1523. return out, err
  1524. }
  1525. const opGetBucketVersioning = "GetBucketVersioning"
  1526. // GetBucketVersioningRequest generates a "aws/request.Request" representing the
  1527. // client's request for the GetBucketVersioning operation. The "output" return
  1528. // value can be used to capture response data after the request's "Send" method
  1529. // is called.
  1530. //
  1531. // See GetBucketVersioning for usage and error information.
  1532. //
  1533. // Creating a request object using this method should be used when you want to inject
  1534. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1535. // access properties on the request object before or after sending the request. If
  1536. // you just want the service response, call the GetBucketVersioning method directly
  1537. // instead.
  1538. //
  1539. // Note: You must call the "Send" method on the returned request object in order
  1540. // to execute the request.
  1541. //
  1542. // // Example sending a request using the GetBucketVersioningRequest method.
  1543. // req, resp := client.GetBucketVersioningRequest(params)
  1544. //
  1545. // err := req.Send()
  1546. // if err == nil { // resp is now filled
  1547. // fmt.Println(resp)
  1548. // }
  1549. //
  1550. func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
  1551. op := &request.Operation{
  1552. Name: opGetBucketVersioning,
  1553. HTTPMethod: "GET",
  1554. HTTPPath: "/{Bucket}?versioning",
  1555. }
  1556. if input == nil {
  1557. input = &GetBucketVersioningInput{}
  1558. }
  1559. req = c.newRequest(op, input, output)
  1560. output = &GetBucketVersioningOutput{}
  1561. req.Data = output
  1562. return
  1563. }
  1564. // GetBucketVersioning API operation for Amazon Simple Storage Service.
  1565. //
  1566. // Returns the versioning state of a bucket.
  1567. //
  1568. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1569. // with awserr.Error's Code and Message methods to get detailed information about
  1570. // the error.
  1571. //
  1572. // See the AWS API reference guide for Amazon Simple Storage Service's
  1573. // API operation GetBucketVersioning for usage and error information.
  1574. func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
  1575. req, out := c.GetBucketVersioningRequest(input)
  1576. err := req.Send()
  1577. return out, err
  1578. }
  1579. const opGetBucketWebsite = "GetBucketWebsite"
  1580. // GetBucketWebsiteRequest generates a "aws/request.Request" representing the
  1581. // client's request for the GetBucketWebsite operation. The "output" return
  1582. // value can be used to capture response data after the request's "Send" method
  1583. // is called.
  1584. //
  1585. // See GetBucketWebsite for usage and error information.
  1586. //
  1587. // Creating a request object using this method should be used when you want to inject
  1588. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1589. // access properties on the request object before or after sending the request. If
  1590. // you just want the service response, call the GetBucketWebsite method directly
  1591. // instead.
  1592. //
  1593. // Note: You must call the "Send" method on the returned request object in order
  1594. // to execute the request.
  1595. //
  1596. // // Example sending a request using the GetBucketWebsiteRequest method.
  1597. // req, resp := client.GetBucketWebsiteRequest(params)
  1598. //
  1599. // err := req.Send()
  1600. // if err == nil { // resp is now filled
  1601. // fmt.Println(resp)
  1602. // }
  1603. //
  1604. func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
  1605. op := &request.Operation{
  1606. Name: opGetBucketWebsite,
  1607. HTTPMethod: "GET",
  1608. HTTPPath: "/{Bucket}?website",
  1609. }
  1610. if input == nil {
  1611. input = &GetBucketWebsiteInput{}
  1612. }
  1613. req = c.newRequest(op, input, output)
  1614. output = &GetBucketWebsiteOutput{}
  1615. req.Data = output
  1616. return
  1617. }
  1618. // GetBucketWebsite API operation for Amazon Simple Storage Service.
  1619. //
  1620. // Returns the website configuration for a bucket.
  1621. //
  1622. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1623. // with awserr.Error's Code and Message methods to get detailed information about
  1624. // the error.
  1625. //
  1626. // See the AWS API reference guide for Amazon Simple Storage Service's
  1627. // API operation GetBucketWebsite for usage and error information.
  1628. func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
  1629. req, out := c.GetBucketWebsiteRequest(input)
  1630. err := req.Send()
  1631. return out, err
  1632. }
  1633. const opGetObject = "GetObject"
  1634. // GetObjectRequest generates a "aws/request.Request" representing the
  1635. // client's request for the GetObject operation. The "output" return
  1636. // value can be used to capture response data after the request's "Send" method
  1637. // is called.
  1638. //
  1639. // See GetObject for usage and error information.
  1640. //
  1641. // Creating a request object using this method should be used when you want to inject
  1642. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1643. // access properties on the request object before or after sending the request. If
  1644. // you just want the service response, call the GetObject method directly
  1645. // instead.
  1646. //
  1647. // Note: You must call the "Send" method on the returned request object in order
  1648. // to execute the request.
  1649. //
  1650. // // Example sending a request using the GetObjectRequest method.
  1651. // req, resp := client.GetObjectRequest(params)
  1652. //
  1653. // err := req.Send()
  1654. // if err == nil { // resp is now filled
  1655. // fmt.Println(resp)
  1656. // }
  1657. //
  1658. func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
  1659. op := &request.Operation{
  1660. Name: opGetObject,
  1661. HTTPMethod: "GET",
  1662. HTTPPath: "/{Bucket}/{Key+}",
  1663. }
  1664. if input == nil {
  1665. input = &GetObjectInput{}
  1666. }
  1667. req = c.newRequest(op, input, output)
  1668. output = &GetObjectOutput{}
  1669. req.Data = output
  1670. return
  1671. }
  1672. // GetObject API operation for Amazon Simple Storage Service.
  1673. //
  1674. // Retrieves objects from Amazon S3.
  1675. //
  1676. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1677. // with awserr.Error's Code and Message methods to get detailed information about
  1678. // the error.
  1679. //
  1680. // See the AWS API reference guide for Amazon Simple Storage Service's
  1681. // API operation GetObject for usage and error information.
  1682. //
  1683. // Returned Error Codes:
  1684. // * NoSuchKey
  1685. // The specified key does not exist.
  1686. //
  1687. func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
  1688. req, out := c.GetObjectRequest(input)
  1689. err := req.Send()
  1690. return out, err
  1691. }
  1692. const opGetObjectAcl = "GetObjectAcl"
  1693. // GetObjectAclRequest generates a "aws/request.Request" representing the
  1694. // client's request for the GetObjectAcl operation. The "output" return
  1695. // value can be used to capture response data after the request's "Send" method
  1696. // is called.
  1697. //
  1698. // See GetObjectAcl for usage and error information.
  1699. //
  1700. // Creating a request object using this method should be used when you want to inject
  1701. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1702. // access properties on the request object before or after sending the request. If
  1703. // you just want the service response, call the GetObjectAcl method directly
  1704. // instead.
  1705. //
  1706. // Note: You must call the "Send" method on the returned request object in order
  1707. // to execute the request.
  1708. //
  1709. // // Example sending a request using the GetObjectAclRequest method.
  1710. // req, resp := client.GetObjectAclRequest(params)
  1711. //
  1712. // err := req.Send()
  1713. // if err == nil { // resp is now filled
  1714. // fmt.Println(resp)
  1715. // }
  1716. //
  1717. func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
  1718. op := &request.Operation{
  1719. Name: opGetObjectAcl,
  1720. HTTPMethod: "GET",
  1721. HTTPPath: "/{Bucket}/{Key+}?acl",
  1722. }
  1723. if input == nil {
  1724. input = &GetObjectAclInput{}
  1725. }
  1726. req = c.newRequest(op, input, output)
  1727. output = &GetObjectAclOutput{}
  1728. req.Data = output
  1729. return
  1730. }
  1731. // GetObjectAcl API operation for Amazon Simple Storage Service.
  1732. //
  1733. // Returns the access control list (ACL) of an object.
  1734. //
  1735. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1736. // with awserr.Error's Code and Message methods to get detailed information about
  1737. // the error.
  1738. //
  1739. // See the AWS API reference guide for Amazon Simple Storage Service's
  1740. // API operation GetObjectAcl for usage and error information.
  1741. //
  1742. // Returned Error Codes:
  1743. // * NoSuchKey
  1744. // The specified key does not exist.
  1745. //
  1746. func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
  1747. req, out := c.GetObjectAclRequest(input)
  1748. err := req.Send()
  1749. return out, err
  1750. }
  1751. const opGetObjectTorrent = "GetObjectTorrent"
  1752. // GetObjectTorrentRequest generates a "aws/request.Request" representing the
  1753. // client's request for the GetObjectTorrent operation. The "output" return
  1754. // value can be used to capture response data after the request's "Send" method
  1755. // is called.
  1756. //
  1757. // See GetObjectTorrent for usage and error information.
  1758. //
  1759. // Creating a request object using this method should be used when you want to inject
  1760. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1761. // access properties on the request object before or after sending the request. If
  1762. // you just want the service response, call the GetObjectTorrent method directly
  1763. // instead.
  1764. //
  1765. // Note: You must call the "Send" method on the returned request object in order
  1766. // to execute the request.
  1767. //
  1768. // // Example sending a request using the GetObjectTorrentRequest method.
  1769. // req, resp := client.GetObjectTorrentRequest(params)
  1770. //
  1771. // err := req.Send()
  1772. // if err == nil { // resp is now filled
  1773. // fmt.Println(resp)
  1774. // }
  1775. //
  1776. func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
  1777. op := &request.Operation{
  1778. Name: opGetObjectTorrent,
  1779. HTTPMethod: "GET",
  1780. HTTPPath: "/{Bucket}/{Key+}?torrent",
  1781. }
  1782. if input == nil {
  1783. input = &GetObjectTorrentInput{}
  1784. }
  1785. req = c.newRequest(op, input, output)
  1786. output = &GetObjectTorrentOutput{}
  1787. req.Data = output
  1788. return
  1789. }
  1790. // GetObjectTorrent API operation for Amazon Simple Storage Service.
  1791. //
  1792. // Return torrent files from a bucket.
  1793. //
  1794. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1795. // with awserr.Error's Code and Message methods to get detailed information about
  1796. // the error.
  1797. //
  1798. // See the AWS API reference guide for Amazon Simple Storage Service's
  1799. // API operation GetObjectTorrent for usage and error information.
  1800. func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
  1801. req, out := c.GetObjectTorrentRequest(input)
  1802. err := req.Send()
  1803. return out, err
  1804. }
  1805. const opHeadBucket = "HeadBucket"
  1806. // HeadBucketRequest generates a "aws/request.Request" representing the
  1807. // client's request for the HeadBucket operation. The "output" return
  1808. // value can be used to capture response data after the request's "Send" method
  1809. // is called.
  1810. //
  1811. // See HeadBucket for usage and error information.
  1812. //
  1813. // Creating a request object using this method should be used when you want to inject
  1814. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1815. // access properties on the request object before or after sending the request. If
  1816. // you just want the service response, call the HeadBucket method directly
  1817. // instead.
  1818. //
  1819. // Note: You must call the "Send" method on the returned request object in order
  1820. // to execute the request.
  1821. //
  1822. // // Example sending a request using the HeadBucketRequest method.
  1823. // req, resp := client.HeadBucketRequest(params)
  1824. //
  1825. // err := req.Send()
  1826. // if err == nil { // resp is now filled
  1827. // fmt.Println(resp)
  1828. // }
  1829. //
  1830. func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
  1831. op := &request.Operation{
  1832. Name: opHeadBucket,
  1833. HTTPMethod: "HEAD",
  1834. HTTPPath: "/{Bucket}",
  1835. }
  1836. if input == nil {
  1837. input = &HeadBucketInput{}
  1838. }
  1839. req = c.newRequest(op, input, output)
  1840. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1841. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1842. output = &HeadBucketOutput{}
  1843. req.Data = output
  1844. return
  1845. }
  1846. // HeadBucket API operation for Amazon Simple Storage Service.
  1847. //
  1848. // This operation is useful to determine if a bucket exists and you have permission
  1849. // to access it.
  1850. //
  1851. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1852. // with awserr.Error's Code and Message methods to get detailed information about
  1853. // the error.
  1854. //
  1855. // See the AWS API reference guide for Amazon Simple Storage Service's
  1856. // API operation HeadBucket for usage and error information.
  1857. //
  1858. // Returned Error Codes:
  1859. // * NoSuchBucket
  1860. // The specified bucket does not exist.
  1861. //
  1862. func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
  1863. req, out := c.HeadBucketRequest(input)
  1864. err := req.Send()
  1865. return out, err
  1866. }
  1867. const opHeadObject = "HeadObject"
  1868. // HeadObjectRequest generates a "aws/request.Request" representing the
  1869. // client's request for the HeadObject operation. The "output" return
  1870. // value can be used to capture response data after the request's "Send" method
  1871. // is called.
  1872. //
  1873. // See HeadObject for usage and error information.
  1874. //
  1875. // Creating a request object using this method should be used when you want to inject
  1876. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1877. // access properties on the request object before or after sending the request. If
  1878. // you just want the service response, call the HeadObject method directly
  1879. // instead.
  1880. //
  1881. // Note: You must call the "Send" method on the returned request object in order
  1882. // to execute the request.
  1883. //
  1884. // // Example sending a request using the HeadObjectRequest method.
  1885. // req, resp := client.HeadObjectRequest(params)
  1886. //
  1887. // err := req.Send()
  1888. // if err == nil { // resp is now filled
  1889. // fmt.Println(resp)
  1890. // }
  1891. //
  1892. func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
  1893. op := &request.Operation{
  1894. Name: opHeadObject,
  1895. HTTPMethod: "HEAD",
  1896. HTTPPath: "/{Bucket}/{Key+}",
  1897. }
  1898. if input == nil {
  1899. input = &HeadObjectInput{}
  1900. }
  1901. req = c.newRequest(op, input, output)
  1902. output = &HeadObjectOutput{}
  1903. req.Data = output
  1904. return
  1905. }
  1906. // HeadObject API operation for Amazon Simple Storage Service.
  1907. //
  1908. // The HEAD operation retrieves metadata from an object without returning the
  1909. // object itself. This operation is useful if you're only interested in an object's
  1910. // metadata. To use HEAD, you must have READ access to the object.
  1911. //
  1912. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1913. // with awserr.Error's Code and Message methods to get detailed information about
  1914. // the error.
  1915. //
  1916. // See the AWS API reference guide for Amazon Simple Storage Service's
  1917. // API operation HeadObject for usage and error information.
  1918. //
  1919. // Returned Error Codes:
  1920. // * NoSuchKey
  1921. // The specified key does not exist.
  1922. //
  1923. func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
  1924. req, out := c.HeadObjectRequest(input)
  1925. err := req.Send()
  1926. return out, err
  1927. }
  1928. const opListBuckets = "ListBuckets"
  1929. // ListBucketsRequest generates a "aws/request.Request" representing the
  1930. // client's request for the ListBuckets operation. The "output" return
  1931. // value can be used to capture response data after the request's "Send" method
  1932. // is called.
  1933. //
  1934. // See ListBuckets for usage and error information.
  1935. //
  1936. // Creating a request object using this method should be used when you want to inject
  1937. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1938. // access properties on the request object before or after sending the request. If
  1939. // you just want the service response, call the ListBuckets method directly
  1940. // instead.
  1941. //
  1942. // Note: You must call the "Send" method on the returned request object in order
  1943. // to execute the request.
  1944. //
  1945. // // Example sending a request using the ListBucketsRequest method.
  1946. // req, resp := client.ListBucketsRequest(params)
  1947. //
  1948. // err := req.Send()
  1949. // if err == nil { // resp is now filled
  1950. // fmt.Println(resp)
  1951. // }
  1952. //
  1953. func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
  1954. op := &request.Operation{
  1955. Name: opListBuckets,
  1956. HTTPMethod: "GET",
  1957. HTTPPath: "/",
  1958. }
  1959. if input == nil {
  1960. input = &ListBucketsInput{}
  1961. }
  1962. req = c.newRequest(op, input, output)
  1963. output = &ListBucketsOutput{}
  1964. req.Data = output
  1965. return
  1966. }
  1967. // ListBuckets API operation for Amazon Simple Storage Service.
  1968. //
  1969. // Returns a list of all buckets owned by the authenticated sender of the request.
  1970. //
  1971. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1972. // with awserr.Error's Code and Message methods to get detailed information about
  1973. // the error.
  1974. //
  1975. // See the AWS API reference guide for Amazon Simple Storage Service's
  1976. // API operation ListBuckets for usage and error information.
  1977. func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
  1978. req, out := c.ListBucketsRequest(input)
  1979. err := req.Send()
  1980. return out, err
  1981. }
  1982. const opListMultipartUploads = "ListMultipartUploads"
  1983. // ListMultipartUploadsRequest generates a "aws/request.Request" representing the
  1984. // client's request for the ListMultipartUploads operation. The "output" return
  1985. // value can be used to capture response data after the request's "Send" method
  1986. // is called.
  1987. //
  1988. // See ListMultipartUploads for usage and error information.
  1989. //
  1990. // Creating a request object using this method should be used when you want to inject
  1991. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1992. // access properties on the request object before or after sending the request. If
  1993. // you just want the service response, call the ListMultipartUploads method directly
  1994. // instead.
  1995. //
  1996. // Note: You must call the "Send" method on the returned request object in order
  1997. // to execute the request.
  1998. //
  1999. // // Example sending a request using the ListMultipartUploadsRequest method.
  2000. // req, resp := client.ListMultipartUploadsRequest(params)
  2001. //
  2002. // err := req.Send()
  2003. // if err == nil { // resp is now filled
  2004. // fmt.Println(resp)
  2005. // }
  2006. //
  2007. func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
  2008. op := &request.Operation{
  2009. Name: opListMultipartUploads,
  2010. HTTPMethod: "GET",
  2011. HTTPPath: "/{Bucket}?uploads",
  2012. Paginator: &request.Paginator{
  2013. InputTokens: []string{"KeyMarker", "UploadIdMarker"},
  2014. OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
  2015. LimitToken: "MaxUploads",
  2016. TruncationToken: "IsTruncated",
  2017. },
  2018. }
  2019. if input == nil {
  2020. input = &ListMultipartUploadsInput{}
  2021. }
  2022. req = c.newRequest(op, input, output)
  2023. output = &ListMultipartUploadsOutput{}
  2024. req.Data = output
  2025. return
  2026. }
  2027. // ListMultipartUploads API operation for Amazon Simple Storage Service.
  2028. //
  2029. // This operation lists in-progress multipart uploads.
  2030. //
  2031. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2032. // with awserr.Error's Code and Message methods to get detailed information about
  2033. // the error.
  2034. //
  2035. // See the AWS API reference guide for Amazon Simple Storage Service's
  2036. // API operation ListMultipartUploads for usage and error information.
  2037. func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
  2038. req, out := c.ListMultipartUploadsRequest(input)
  2039. err := req.Send()
  2040. return out, err
  2041. }
  2042. // ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
  2043. // calling the "fn" function with the response data for each page. To stop
  2044. // iterating, return false from the fn function.
  2045. //
  2046. // See ListMultipartUploads method for more information on how to use this operation.
  2047. //
  2048. // Note: This operation can generate multiple requests to a service.
  2049. //
  2050. // // Example iterating over at most 3 pages of a ListMultipartUploads operation.
  2051. // pageNum := 0
  2052. // err := client.ListMultipartUploadsPages(params,
  2053. // func(page *ListMultipartUploadsOutput, lastPage bool) bool {
  2054. // pageNum++
  2055. // fmt.Println(page)
  2056. // return pageNum <= 3
  2057. // })
  2058. //
  2059. func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(p *ListMultipartUploadsOutput, lastPage bool) (shouldContinue bool)) error {
  2060. page, _ := c.ListMultipartUploadsRequest(input)
  2061. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2062. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2063. return fn(p.(*ListMultipartUploadsOutput), lastPage)
  2064. })
  2065. }
  2066. const opListObjectVersions = "ListObjectVersions"
  2067. // ListObjectVersionsRequest generates a "aws/request.Request" representing the
  2068. // client's request for the ListObjectVersions operation. The "output" return
  2069. // value can be used to capture response data after the request's "Send" method
  2070. // is called.
  2071. //
  2072. // See ListObjectVersions for usage and error information.
  2073. //
  2074. // Creating a request object using this method should be used when you want to inject
  2075. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2076. // access properties on the request object before or after sending the request. If
  2077. // you just want the service response, call the ListObjectVersions method directly
  2078. // instead.
  2079. //
  2080. // Note: You must call the "Send" method on the returned request object in order
  2081. // to execute the request.
  2082. //
  2083. // // Example sending a request using the ListObjectVersionsRequest method.
  2084. // req, resp := client.ListObjectVersionsRequest(params)
  2085. //
  2086. // err := req.Send()
  2087. // if err == nil { // resp is now filled
  2088. // fmt.Println(resp)
  2089. // }
  2090. //
  2091. func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) {
  2092. op := &request.Operation{
  2093. Name: opListObjectVersions,
  2094. HTTPMethod: "GET",
  2095. HTTPPath: "/{Bucket}?versions",
  2096. Paginator: &request.Paginator{
  2097. InputTokens: []string{"KeyMarker", "VersionIdMarker"},
  2098. OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"},
  2099. LimitToken: "MaxKeys",
  2100. TruncationToken: "IsTruncated",
  2101. },
  2102. }
  2103. if input == nil {
  2104. input = &ListObjectVersionsInput{}
  2105. }
  2106. req = c.newRequest(op, input, output)
  2107. output = &ListObjectVersionsOutput{}
  2108. req.Data = output
  2109. return
  2110. }
  2111. // ListObjectVersions API operation for Amazon Simple Storage Service.
  2112. //
  2113. // Returns metadata about all of the versions of objects in a bucket.
  2114. //
  2115. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2116. // with awserr.Error's Code and Message methods to get detailed information about
  2117. // the error.
  2118. //
  2119. // See the AWS API reference guide for Amazon Simple Storage Service's
  2120. // API operation ListObjectVersions for usage and error information.
  2121. func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
  2122. req, out := c.ListObjectVersionsRequest(input)
  2123. err := req.Send()
  2124. return out, err
  2125. }
  2126. // ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
  2127. // calling the "fn" function with the response data for each page. To stop
  2128. // iterating, return false from the fn function.
  2129. //
  2130. // See ListObjectVersions method for more information on how to use this operation.
  2131. //
  2132. // Note: This operation can generate multiple requests to a service.
  2133. //
  2134. // // Example iterating over at most 3 pages of a ListObjectVersions operation.
  2135. // pageNum := 0
  2136. // err := client.ListObjectVersionsPages(params,
  2137. // func(page *ListObjectVersionsOutput, lastPage bool) bool {
  2138. // pageNum++
  2139. // fmt.Println(page)
  2140. // return pageNum <= 3
  2141. // })
  2142. //
  2143. func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(p *ListObjectVersionsOutput, lastPage bool) (shouldContinue bool)) error {
  2144. page, _ := c.ListObjectVersionsRequest(input)
  2145. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2146. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2147. return fn(p.(*ListObjectVersionsOutput), lastPage)
  2148. })
  2149. }
  2150. const opListObjects = "ListObjects"
  2151. // ListObjectsRequest generates a "aws/request.Request" representing the
  2152. // client's request for the ListObjects operation. The "output" return
  2153. // value can be used to capture response data after the request's "Send" method
  2154. // is called.
  2155. //
  2156. // See ListObjects for usage and error information.
  2157. //
  2158. // Creating a request object using this method should be used when you want to inject
  2159. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2160. // access properties on the request object before or after sending the request. If
  2161. // you just want the service response, call the ListObjects method directly
  2162. // instead.
  2163. //
  2164. // Note: You must call the "Send" method on the returned request object in order
  2165. // to execute the request.
  2166. //
  2167. // // Example sending a request using the ListObjectsRequest method.
  2168. // req, resp := client.ListObjectsRequest(params)
  2169. //
  2170. // err := req.Send()
  2171. // if err == nil { // resp is now filled
  2172. // fmt.Println(resp)
  2173. // }
  2174. //
  2175. func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) {
  2176. op := &request.Operation{
  2177. Name: opListObjects,
  2178. HTTPMethod: "GET",
  2179. HTTPPath: "/{Bucket}",
  2180. Paginator: &request.Paginator{
  2181. InputTokens: []string{"Marker"},
  2182. OutputTokens: []string{"NextMarker || Contents[-1].Key"},
  2183. LimitToken: "MaxKeys",
  2184. TruncationToken: "IsTruncated",
  2185. },
  2186. }
  2187. if input == nil {
  2188. input = &ListObjectsInput{}
  2189. }
  2190. req = c.newRequest(op, input, output)
  2191. output = &ListObjectsOutput{}
  2192. req.Data = output
  2193. return
  2194. }
  2195. // ListObjects API operation for Amazon Simple Storage Service.
  2196. //
  2197. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  2198. // the request parameters as selection criteria to return a subset of the objects
  2199. // in a bucket.
  2200. //
  2201. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2202. // with awserr.Error's Code and Message methods to get detailed information about
  2203. // the error.
  2204. //
  2205. // See the AWS API reference guide for Amazon Simple Storage Service's
  2206. // API operation ListObjects for usage and error information.
  2207. //
  2208. // Returned Error Codes:
  2209. // * NoSuchBucket
  2210. // The specified bucket does not exist.
  2211. //
  2212. func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
  2213. req, out := c.ListObjectsRequest(input)
  2214. err := req.Send()
  2215. return out, err
  2216. }
  2217. // ListObjectsPages iterates over the pages of a ListObjects operation,
  2218. // calling the "fn" function with the response data for each page. To stop
  2219. // iterating, return false from the fn function.
  2220. //
  2221. // See ListObjects method for more information on how to use this operation.
  2222. //
  2223. // Note: This operation can generate multiple requests to a service.
  2224. //
  2225. // // Example iterating over at most 3 pages of a ListObjects operation.
  2226. // pageNum := 0
  2227. // err := client.ListObjectsPages(params,
  2228. // func(page *ListObjectsOutput, lastPage bool) bool {
  2229. // pageNum++
  2230. // fmt.Println(page)
  2231. // return pageNum <= 3
  2232. // })
  2233. //
  2234. func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(p *ListObjectsOutput, lastPage bool) (shouldContinue bool)) error {
  2235. page, _ := c.ListObjectsRequest(input)
  2236. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2237. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2238. return fn(p.(*ListObjectsOutput), lastPage)
  2239. })
  2240. }
  2241. const opListObjectsV2 = "ListObjectsV2"
  2242. // ListObjectsV2Request generates a "aws/request.Request" representing the
  2243. // client's request for the ListObjectsV2 operation. The "output" return
  2244. // value can be used to capture response data after the request's "Send" method
  2245. // is called.
  2246. //
  2247. // See ListObjectsV2 for usage and error information.
  2248. //
  2249. // Creating a request object using this method should be used when you want to inject
  2250. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2251. // access properties on the request object before or after sending the request. If
  2252. // you just want the service response, call the ListObjectsV2 method directly
  2253. // instead.
  2254. //
  2255. // Note: You must call the "Send" method on the returned request object in order
  2256. // to execute the request.
  2257. //
  2258. // // Example sending a request using the ListObjectsV2Request method.
  2259. // req, resp := client.ListObjectsV2Request(params)
  2260. //
  2261. // err := req.Send()
  2262. // if err == nil { // resp is now filled
  2263. // fmt.Println(resp)
  2264. // }
  2265. //
  2266. func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) {
  2267. op := &request.Operation{
  2268. Name: opListObjectsV2,
  2269. HTTPMethod: "GET",
  2270. HTTPPath: "/{Bucket}?list-type=2",
  2271. Paginator: &request.Paginator{
  2272. InputTokens: []string{"ContinuationToken"},
  2273. OutputTokens: []string{"NextContinuationToken"},
  2274. LimitToken: "MaxKeys",
  2275. TruncationToken: "",
  2276. },
  2277. }
  2278. if input == nil {
  2279. input = &ListObjectsV2Input{}
  2280. }
  2281. req = c.newRequest(op, input, output)
  2282. output = &ListObjectsV2Output{}
  2283. req.Data = output
  2284. return
  2285. }
  2286. // ListObjectsV2 API operation for Amazon Simple Storage Service.
  2287. //
  2288. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  2289. // the request parameters as selection criteria to return a subset of the objects
  2290. // in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend
  2291. // you use this revised API for new application development.
  2292. //
  2293. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2294. // with awserr.Error's Code and Message methods to get detailed information about
  2295. // the error.
  2296. //
  2297. // See the AWS API reference guide for Amazon Simple Storage Service's
  2298. // API operation ListObjectsV2 for usage and error information.
  2299. //
  2300. // Returned Error Codes:
  2301. // * NoSuchBucket
  2302. // The specified bucket does not exist.
  2303. //
  2304. func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
  2305. req, out := c.ListObjectsV2Request(input)
  2306. err := req.Send()
  2307. return out, err
  2308. }
  2309. // ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
  2310. // calling the "fn" function with the response data for each page. To stop
  2311. // iterating, return false from the fn function.
  2312. //
  2313. // See ListObjectsV2 method for more information on how to use this operation.
  2314. //
  2315. // Note: This operation can generate multiple requests to a service.
  2316. //
  2317. // // Example iterating over at most 3 pages of a ListObjectsV2 operation.
  2318. // pageNum := 0
  2319. // err := client.ListObjectsV2Pages(params,
  2320. // func(page *ListObjectsV2Output, lastPage bool) bool {
  2321. // pageNum++
  2322. // fmt.Println(page)
  2323. // return pageNum <= 3
  2324. // })
  2325. //
  2326. func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(p *ListObjectsV2Output, lastPage bool) (shouldContinue bool)) error {
  2327. page, _ := c.ListObjectsV2Request(input)
  2328. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2329. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2330. return fn(p.(*ListObjectsV2Output), lastPage)
  2331. })
  2332. }
  2333. const opListParts = "ListParts"
  2334. // ListPartsRequest generates a "aws/request.Request" representing the
  2335. // client's request for the ListParts operation. The "output" return
  2336. // value can be used to capture response data after the request's "Send" method
  2337. // is called.
  2338. //
  2339. // See ListParts for usage and error information.
  2340. //
  2341. // Creating a request object using this method should be used when you want to inject
  2342. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2343. // access properties on the request object before or after sending the request. If
  2344. // you just want the service response, call the ListParts method directly
  2345. // instead.
  2346. //
  2347. // Note: You must call the "Send" method on the returned request object in order
  2348. // to execute the request.
  2349. //
  2350. // // Example sending a request using the ListPartsRequest method.
  2351. // req, resp := client.ListPartsRequest(params)
  2352. //
  2353. // err := req.Send()
  2354. // if err == nil { // resp is now filled
  2355. // fmt.Println(resp)
  2356. // }
  2357. //
  2358. func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
  2359. op := &request.Operation{
  2360. Name: opListParts,
  2361. HTTPMethod: "GET",
  2362. HTTPPath: "/{Bucket}/{Key+}",
  2363. Paginator: &request.Paginator{
  2364. InputTokens: []string{"PartNumberMarker"},
  2365. OutputTokens: []string{"NextPartNumberMarker"},
  2366. LimitToken: "MaxParts",
  2367. TruncationToken: "IsTruncated",
  2368. },
  2369. }
  2370. if input == nil {
  2371. input = &ListPartsInput{}
  2372. }
  2373. req = c.newRequest(op, input, output)
  2374. output = &ListPartsOutput{}
  2375. req.Data = output
  2376. return
  2377. }
  2378. // ListParts API operation for Amazon Simple Storage Service.
  2379. //
  2380. // Lists the parts that have been uploaded for a specific multipart upload.
  2381. //
  2382. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2383. // with awserr.Error's Code and Message methods to get detailed information about
  2384. // the error.
  2385. //
  2386. // See the AWS API reference guide for Amazon Simple Storage Service's
  2387. // API operation ListParts for usage and error information.
  2388. func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
  2389. req, out := c.ListPartsRequest(input)
  2390. err := req.Send()
  2391. return out, err
  2392. }
  2393. // ListPartsPages iterates over the pages of a ListParts operation,
  2394. // calling the "fn" function with the response data for each page. To stop
  2395. // iterating, return false from the fn function.
  2396. //
  2397. // See ListParts method for more information on how to use this operation.
  2398. //
  2399. // Note: This operation can generate multiple requests to a service.
  2400. //
  2401. // // Example iterating over at most 3 pages of a ListParts operation.
  2402. // pageNum := 0
  2403. // err := client.ListPartsPages(params,
  2404. // func(page *ListPartsOutput, lastPage bool) bool {
  2405. // pageNum++
  2406. // fmt.Println(page)
  2407. // return pageNum <= 3
  2408. // })
  2409. //
  2410. func (c *S3) ListPartsPages(input *ListPartsInput, fn func(p *ListPartsOutput, lastPage bool) (shouldContinue bool)) error {
  2411. page, _ := c.ListPartsRequest(input)
  2412. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2413. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2414. return fn(p.(*ListPartsOutput), lastPage)
  2415. })
  2416. }
  2417. const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
  2418. // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  2419. // client's request for the PutBucketAccelerateConfiguration operation. The "output" return
  2420. // value can be used to capture response data after the request's "Send" method
  2421. // is called.
  2422. //
  2423. // See PutBucketAccelerateConfiguration for usage and error information.
  2424. //
  2425. // Creating a request object using this method should be used when you want to inject
  2426. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2427. // access properties on the request object before or after sending the request. If
  2428. // you just want the service response, call the PutBucketAccelerateConfiguration method directly
  2429. // instead.
  2430. //
  2431. // Note: You must call the "Send" method on the returned request object in order
  2432. // to execute the request.
  2433. //
  2434. // // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
  2435. // req, resp := client.PutBucketAccelerateConfigurationRequest(params)
  2436. //
  2437. // err := req.Send()
  2438. // if err == nil { // resp is now filled
  2439. // fmt.Println(resp)
  2440. // }
  2441. //
  2442. func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) {
  2443. op := &request.Operation{
  2444. Name: opPutBucketAccelerateConfiguration,
  2445. HTTPMethod: "PUT",
  2446. HTTPPath: "/{Bucket}?accelerate",
  2447. }
  2448. if input == nil {
  2449. input = &PutBucketAccelerateConfigurationInput{}
  2450. }
  2451. req = c.newRequest(op, input, output)
  2452. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2453. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2454. output = &PutBucketAccelerateConfigurationOutput{}
  2455. req.Data = output
  2456. return
  2457. }
  2458. // PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  2459. //
  2460. // Sets the accelerate configuration of an existing bucket.
  2461. //
  2462. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2463. // with awserr.Error's Code and Message methods to get detailed information about
  2464. // the error.
  2465. //
  2466. // See the AWS API reference guide for Amazon Simple Storage Service's
  2467. // API operation PutBucketAccelerateConfiguration for usage and error information.
  2468. func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
  2469. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  2470. err := req.Send()
  2471. return out, err
  2472. }
  2473. const opPutBucketAcl = "PutBucketAcl"
  2474. // PutBucketAclRequest generates a "aws/request.Request" representing the
  2475. // client's request for the PutBucketAcl operation. The "output" return
  2476. // value can be used to capture response data after the request's "Send" method
  2477. // is called.
  2478. //
  2479. // See PutBucketAcl for usage and error information.
  2480. //
  2481. // Creating a request object using this method should be used when you want to inject
  2482. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2483. // access properties on the request object before or after sending the request. If
  2484. // you just want the service response, call the PutBucketAcl method directly
  2485. // instead.
  2486. //
  2487. // Note: You must call the "Send" method on the returned request object in order
  2488. // to execute the request.
  2489. //
  2490. // // Example sending a request using the PutBucketAclRequest method.
  2491. // req, resp := client.PutBucketAclRequest(params)
  2492. //
  2493. // err := req.Send()
  2494. // if err == nil { // resp is now filled
  2495. // fmt.Println(resp)
  2496. // }
  2497. //
  2498. func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) {
  2499. op := &request.Operation{
  2500. Name: opPutBucketAcl,
  2501. HTTPMethod: "PUT",
  2502. HTTPPath: "/{Bucket}?acl",
  2503. }
  2504. if input == nil {
  2505. input = &PutBucketAclInput{}
  2506. }
  2507. req = c.newRequest(op, input, output)
  2508. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2509. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2510. output = &PutBucketAclOutput{}
  2511. req.Data = output
  2512. return
  2513. }
  2514. // PutBucketAcl API operation for Amazon Simple Storage Service.
  2515. //
  2516. // Sets the permissions on a bucket using access control lists (ACL).
  2517. //
  2518. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2519. // with awserr.Error's Code and Message methods to get detailed information about
  2520. // the error.
  2521. //
  2522. // See the AWS API reference guide for Amazon Simple Storage Service's
  2523. // API operation PutBucketAcl for usage and error information.
  2524. func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
  2525. req, out := c.PutBucketAclRequest(input)
  2526. err := req.Send()
  2527. return out, err
  2528. }
  2529. const opPutBucketCors = "PutBucketCors"
  2530. // PutBucketCorsRequest generates a "aws/request.Request" representing the
  2531. // client's request for the PutBucketCors operation. The "output" return
  2532. // value can be used to capture response data after the request's "Send" method
  2533. // is called.
  2534. //
  2535. // See PutBucketCors for usage and error information.
  2536. //
  2537. // Creating a request object using this method should be used when you want to inject
  2538. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2539. // access properties on the request object before or after sending the request. If
  2540. // you just want the service response, call the PutBucketCors method directly
  2541. // instead.
  2542. //
  2543. // Note: You must call the "Send" method on the returned request object in order
  2544. // to execute the request.
  2545. //
  2546. // // Example sending a request using the PutBucketCorsRequest method.
  2547. // req, resp := client.PutBucketCorsRequest(params)
  2548. //
  2549. // err := req.Send()
  2550. // if err == nil { // resp is now filled
  2551. // fmt.Println(resp)
  2552. // }
  2553. //
  2554. func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) {
  2555. op := &request.Operation{
  2556. Name: opPutBucketCors,
  2557. HTTPMethod: "PUT",
  2558. HTTPPath: "/{Bucket}?cors",
  2559. }
  2560. if input == nil {
  2561. input = &PutBucketCorsInput{}
  2562. }
  2563. req = c.newRequest(op, input, output)
  2564. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2565. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2566. output = &PutBucketCorsOutput{}
  2567. req.Data = output
  2568. return
  2569. }
  2570. // PutBucketCors API operation for Amazon Simple Storage Service.
  2571. //
  2572. // Sets the cors configuration for a bucket.
  2573. //
  2574. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2575. // with awserr.Error's Code and Message methods to get detailed information about
  2576. // the error.
  2577. //
  2578. // See the AWS API reference guide for Amazon Simple Storage Service's
  2579. // API operation PutBucketCors for usage and error information.
  2580. func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
  2581. req, out := c.PutBucketCorsRequest(input)
  2582. err := req.Send()
  2583. return out, err
  2584. }
  2585. const opPutBucketLifecycle = "PutBucketLifecycle"
  2586. // PutBucketLifecycleRequest generates a "aws/request.Request" representing the
  2587. // client's request for the PutBucketLifecycle operation. The "output" return
  2588. // value can be used to capture response data after the request's "Send" method
  2589. // is called.
  2590. //
  2591. // See PutBucketLifecycle for usage and error information.
  2592. //
  2593. // Creating a request object using this method should be used when you want to inject
  2594. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2595. // access properties on the request object before or after sending the request. If
  2596. // you just want the service response, call the PutBucketLifecycle method directly
  2597. // instead.
  2598. //
  2599. // Note: You must call the "Send" method on the returned request object in order
  2600. // to execute the request.
  2601. //
  2602. // // Example sending a request using the PutBucketLifecycleRequest method.
  2603. // req, resp := client.PutBucketLifecycleRequest(params)
  2604. //
  2605. // err := req.Send()
  2606. // if err == nil { // resp is now filled
  2607. // fmt.Println(resp)
  2608. // }
  2609. //
  2610. func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
  2611. if c.Client.Config.Logger != nil {
  2612. c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
  2613. }
  2614. op := &request.Operation{
  2615. Name: opPutBucketLifecycle,
  2616. HTTPMethod: "PUT",
  2617. HTTPPath: "/{Bucket}?lifecycle",
  2618. }
  2619. if input == nil {
  2620. input = &PutBucketLifecycleInput{}
  2621. }
  2622. req = c.newRequest(op, input, output)
  2623. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2624. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2625. output = &PutBucketLifecycleOutput{}
  2626. req.Data = output
  2627. return
  2628. }
  2629. // PutBucketLifecycle API operation for Amazon Simple Storage Service.
  2630. //
  2631. // Deprecated, see the PutBucketLifecycleConfiguration operation.
  2632. //
  2633. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2634. // with awserr.Error's Code and Message methods to get detailed information about
  2635. // the error.
  2636. //
  2637. // See the AWS API reference guide for Amazon Simple Storage Service's
  2638. // API operation PutBucketLifecycle for usage and error information.
  2639. func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
  2640. req, out := c.PutBucketLifecycleRequest(input)
  2641. err := req.Send()
  2642. return out, err
  2643. }
  2644. const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
  2645. // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  2646. // client's request for the PutBucketLifecycleConfiguration operation. The "output" return
  2647. // value can be used to capture response data after the request's "Send" method
  2648. // is called.
  2649. //
  2650. // See PutBucketLifecycleConfiguration for usage and error information.
  2651. //
  2652. // Creating a request object using this method should be used when you want to inject
  2653. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2654. // access properties on the request object before or after sending the request. If
  2655. // you just want the service response, call the PutBucketLifecycleConfiguration method directly
  2656. // instead.
  2657. //
  2658. // Note: You must call the "Send" method on the returned request object in order
  2659. // to execute the request.
  2660. //
  2661. // // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
  2662. // req, resp := client.PutBucketLifecycleConfigurationRequest(params)
  2663. //
  2664. // err := req.Send()
  2665. // if err == nil { // resp is now filled
  2666. // fmt.Println(resp)
  2667. // }
  2668. //
  2669. func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) {
  2670. op := &request.Operation{
  2671. Name: opPutBucketLifecycleConfiguration,
  2672. HTTPMethod: "PUT",
  2673. HTTPPath: "/{Bucket}?lifecycle",
  2674. }
  2675. if input == nil {
  2676. input = &PutBucketLifecycleConfigurationInput{}
  2677. }
  2678. req = c.newRequest(op, input, output)
  2679. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2680. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2681. output = &PutBucketLifecycleConfigurationOutput{}
  2682. req.Data = output
  2683. return
  2684. }
  2685. // PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  2686. //
  2687. // Sets lifecycle configuration for your bucket. If a lifecycle configuration
  2688. // exists, it replaces it.
  2689. //
  2690. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2691. // with awserr.Error's Code and Message methods to get detailed information about
  2692. // the error.
  2693. //
  2694. // See the AWS API reference guide for Amazon Simple Storage Service's
  2695. // API operation PutBucketLifecycleConfiguration for usage and error information.
  2696. func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
  2697. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  2698. err := req.Send()
  2699. return out, err
  2700. }
  2701. const opPutBucketLogging = "PutBucketLogging"
  2702. // PutBucketLoggingRequest generates a "aws/request.Request" representing the
  2703. // client's request for the PutBucketLogging operation. The "output" return
  2704. // value can be used to capture response data after the request's "Send" method
  2705. // is called.
  2706. //
  2707. // See PutBucketLogging for usage and error information.
  2708. //
  2709. // Creating a request object using this method should be used when you want to inject
  2710. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2711. // access properties on the request object before or after sending the request. If
  2712. // you just want the service response, call the PutBucketLogging method directly
  2713. // instead.
  2714. //
  2715. // Note: You must call the "Send" method on the returned request object in order
  2716. // to execute the request.
  2717. //
  2718. // // Example sending a request using the PutBucketLoggingRequest method.
  2719. // req, resp := client.PutBucketLoggingRequest(params)
  2720. //
  2721. // err := req.Send()
  2722. // if err == nil { // resp is now filled
  2723. // fmt.Println(resp)
  2724. // }
  2725. //
  2726. func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) {
  2727. op := &request.Operation{
  2728. Name: opPutBucketLogging,
  2729. HTTPMethod: "PUT",
  2730. HTTPPath: "/{Bucket}?logging",
  2731. }
  2732. if input == nil {
  2733. input = &PutBucketLoggingInput{}
  2734. }
  2735. req = c.newRequest(op, input, output)
  2736. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2737. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2738. output = &PutBucketLoggingOutput{}
  2739. req.Data = output
  2740. return
  2741. }
  2742. // PutBucketLogging API operation for Amazon Simple Storage Service.
  2743. //
  2744. // Set the logging parameters for a bucket and to specify permissions for who
  2745. // can view and modify the logging parameters. To set the logging status of
  2746. // a bucket, you must be the bucket owner.
  2747. //
  2748. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2749. // with awserr.Error's Code and Message methods to get detailed information about
  2750. // the error.
  2751. //
  2752. // See the AWS API reference guide for Amazon Simple Storage Service's
  2753. // API operation PutBucketLogging for usage and error information.
  2754. func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
  2755. req, out := c.PutBucketLoggingRequest(input)
  2756. err := req.Send()
  2757. return out, err
  2758. }
  2759. const opPutBucketNotification = "PutBucketNotification"
  2760. // PutBucketNotificationRequest generates a "aws/request.Request" representing the
  2761. // client's request for the PutBucketNotification operation. The "output" return
  2762. // value can be used to capture response data after the request's "Send" method
  2763. // is called.
  2764. //
  2765. // See PutBucketNotification for usage and error information.
  2766. //
  2767. // Creating a request object using this method should be used when you want to inject
  2768. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2769. // access properties on the request object before or after sending the request. If
  2770. // you just want the service response, call the PutBucketNotification method directly
  2771. // instead.
  2772. //
  2773. // Note: You must call the "Send" method on the returned request object in order
  2774. // to execute the request.
  2775. //
  2776. // // Example sending a request using the PutBucketNotificationRequest method.
  2777. // req, resp := client.PutBucketNotificationRequest(params)
  2778. //
  2779. // err := req.Send()
  2780. // if err == nil { // resp is now filled
  2781. // fmt.Println(resp)
  2782. // }
  2783. //
  2784. func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
  2785. if c.Client.Config.Logger != nil {
  2786. c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
  2787. }
  2788. op := &request.Operation{
  2789. Name: opPutBucketNotification,
  2790. HTTPMethod: "PUT",
  2791. HTTPPath: "/{Bucket}?notification",
  2792. }
  2793. if input == nil {
  2794. input = &PutBucketNotificationInput{}
  2795. }
  2796. req = c.newRequest(op, input, output)
  2797. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2798. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2799. output = &PutBucketNotificationOutput{}
  2800. req.Data = output
  2801. return
  2802. }
  2803. // PutBucketNotification API operation for Amazon Simple Storage Service.
  2804. //
  2805. // Deprecated, see the PutBucketNotificationConfiguraiton operation.
  2806. //
  2807. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2808. // with awserr.Error's Code and Message methods to get detailed information about
  2809. // the error.
  2810. //
  2811. // See the AWS API reference guide for Amazon Simple Storage Service's
  2812. // API operation PutBucketNotification for usage and error information.
  2813. func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
  2814. req, out := c.PutBucketNotificationRequest(input)
  2815. err := req.Send()
  2816. return out, err
  2817. }
  2818. const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
  2819. // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  2820. // client's request for the PutBucketNotificationConfiguration operation. The "output" return
  2821. // value can be used to capture response data after the request's "Send" method
  2822. // is called.
  2823. //
  2824. // See PutBucketNotificationConfiguration for usage and error information.
  2825. //
  2826. // Creating a request object using this method should be used when you want to inject
  2827. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2828. // access properties on the request object before or after sending the request. If
  2829. // you just want the service response, call the PutBucketNotificationConfiguration method directly
  2830. // instead.
  2831. //
  2832. // Note: You must call the "Send" method on the returned request object in order
  2833. // to execute the request.
  2834. //
  2835. // // Example sending a request using the PutBucketNotificationConfigurationRequest method.
  2836. // req, resp := client.PutBucketNotificationConfigurationRequest(params)
  2837. //
  2838. // err := req.Send()
  2839. // if err == nil { // resp is now filled
  2840. // fmt.Println(resp)
  2841. // }
  2842. //
  2843. func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) {
  2844. op := &request.Operation{
  2845. Name: opPutBucketNotificationConfiguration,
  2846. HTTPMethod: "PUT",
  2847. HTTPPath: "/{Bucket}?notification",
  2848. }
  2849. if input == nil {
  2850. input = &PutBucketNotificationConfigurationInput{}
  2851. }
  2852. req = c.newRequest(op, input, output)
  2853. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2854. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2855. output = &PutBucketNotificationConfigurationOutput{}
  2856. req.Data = output
  2857. return
  2858. }
  2859. // PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  2860. //
  2861. // Enables notifications of specified events for a bucket.
  2862. //
  2863. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2864. // with awserr.Error's Code and Message methods to get detailed information about
  2865. // the error.
  2866. //
  2867. // See the AWS API reference guide for Amazon Simple Storage Service's
  2868. // API operation PutBucketNotificationConfiguration for usage and error information.
  2869. func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
  2870. req, out := c.PutBucketNotificationConfigurationRequest(input)
  2871. err := req.Send()
  2872. return out, err
  2873. }
  2874. const opPutBucketPolicy = "PutBucketPolicy"
  2875. // PutBucketPolicyRequest generates a "aws/request.Request" representing the
  2876. // client's request for the PutBucketPolicy operation. The "output" return
  2877. // value can be used to capture response data after the request's "Send" method
  2878. // is called.
  2879. //
  2880. // See PutBucketPolicy for usage and error information.
  2881. //
  2882. // Creating a request object using this method should be used when you want to inject
  2883. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2884. // access properties on the request object before or after sending the request. If
  2885. // you just want the service response, call the PutBucketPolicy method directly
  2886. // instead.
  2887. //
  2888. // Note: You must call the "Send" method on the returned request object in order
  2889. // to execute the request.
  2890. //
  2891. // // Example sending a request using the PutBucketPolicyRequest method.
  2892. // req, resp := client.PutBucketPolicyRequest(params)
  2893. //
  2894. // err := req.Send()
  2895. // if err == nil { // resp is now filled
  2896. // fmt.Println(resp)
  2897. // }
  2898. //
  2899. func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) {
  2900. op := &request.Operation{
  2901. Name: opPutBucketPolicy,
  2902. HTTPMethod: "PUT",
  2903. HTTPPath: "/{Bucket}?policy",
  2904. }
  2905. if input == nil {
  2906. input = &PutBucketPolicyInput{}
  2907. }
  2908. req = c.newRequest(op, input, output)
  2909. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2910. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2911. output = &PutBucketPolicyOutput{}
  2912. req.Data = output
  2913. return
  2914. }
  2915. // PutBucketPolicy API operation for Amazon Simple Storage Service.
  2916. //
  2917. // Replaces a policy on a bucket. If the bucket already has a policy, the one
  2918. // in this request completely replaces it.
  2919. //
  2920. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2921. // with awserr.Error's Code and Message methods to get detailed information about
  2922. // the error.
  2923. //
  2924. // See the AWS API reference guide for Amazon Simple Storage Service's
  2925. // API operation PutBucketPolicy for usage and error information.
  2926. func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
  2927. req, out := c.PutBucketPolicyRequest(input)
  2928. err := req.Send()
  2929. return out, err
  2930. }
  2931. const opPutBucketReplication = "PutBucketReplication"
  2932. // PutBucketReplicationRequest generates a "aws/request.Request" representing the
  2933. // client's request for the PutBucketReplication operation. The "output" return
  2934. // value can be used to capture response data after the request's "Send" method
  2935. // is called.
  2936. //
  2937. // See PutBucketReplication for usage and error information.
  2938. //
  2939. // Creating a request object using this method should be used when you want to inject
  2940. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2941. // access properties on the request object before or after sending the request. If
  2942. // you just want the service response, call the PutBucketReplication method directly
  2943. // instead.
  2944. //
  2945. // Note: You must call the "Send" method on the returned request object in order
  2946. // to execute the request.
  2947. //
  2948. // // Example sending a request using the PutBucketReplicationRequest method.
  2949. // req, resp := client.PutBucketReplicationRequest(params)
  2950. //
  2951. // err := req.Send()
  2952. // if err == nil { // resp is now filled
  2953. // fmt.Println(resp)
  2954. // }
  2955. //
  2956. func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) {
  2957. op := &request.Operation{
  2958. Name: opPutBucketReplication,
  2959. HTTPMethod: "PUT",
  2960. HTTPPath: "/{Bucket}?replication",
  2961. }
  2962. if input == nil {
  2963. input = &PutBucketReplicationInput{}
  2964. }
  2965. req = c.newRequest(op, input, output)
  2966. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2967. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2968. output = &PutBucketReplicationOutput{}
  2969. req.Data = output
  2970. return
  2971. }
  2972. // PutBucketReplication API operation for Amazon Simple Storage Service.
  2973. //
  2974. // Creates a new replication configuration (or replaces an existing one, if
  2975. // present).
  2976. //
  2977. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2978. // with awserr.Error's Code and Message methods to get detailed information about
  2979. // the error.
  2980. //
  2981. // See the AWS API reference guide for Amazon Simple Storage Service's
  2982. // API operation PutBucketReplication for usage and error information.
  2983. func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
  2984. req, out := c.PutBucketReplicationRequest(input)
  2985. err := req.Send()
  2986. return out, err
  2987. }
  2988. const opPutBucketRequestPayment = "PutBucketRequestPayment"
  2989. // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  2990. // client's request for the PutBucketRequestPayment operation. The "output" return
  2991. // value can be used to capture response data after the request's "Send" method
  2992. // is called.
  2993. //
  2994. // See PutBucketRequestPayment for usage and error information.
  2995. //
  2996. // Creating a request object using this method should be used when you want to inject
  2997. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2998. // access properties on the request object before or after sending the request. If
  2999. // you just want the service response, call the PutBucketRequestPayment method directly
  3000. // instead.
  3001. //
  3002. // Note: You must call the "Send" method on the returned request object in order
  3003. // to execute the request.
  3004. //
  3005. // // Example sending a request using the PutBucketRequestPaymentRequest method.
  3006. // req, resp := client.PutBucketRequestPaymentRequest(params)
  3007. //
  3008. // err := req.Send()
  3009. // if err == nil { // resp is now filled
  3010. // fmt.Println(resp)
  3011. // }
  3012. //
  3013. func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) {
  3014. op := &request.Operation{
  3015. Name: opPutBucketRequestPayment,
  3016. HTTPMethod: "PUT",
  3017. HTTPPath: "/{Bucket}?requestPayment",
  3018. }
  3019. if input == nil {
  3020. input = &PutBucketRequestPaymentInput{}
  3021. }
  3022. req = c.newRequest(op, input, output)
  3023. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  3024. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3025. output = &PutBucketRequestPaymentOutput{}
  3026. req.Data = output
  3027. return
  3028. }
  3029. // PutBucketRequestPayment API operation for Amazon Simple Storage Service.
  3030. //
  3031. // Sets the request payment configuration for a bucket. By default, the bucket
  3032. // owner pays for downloads from the bucket. This configuration parameter enables
  3033. // the bucket owner (only) to specify that the person requesting the download
  3034. // will be charged for the download. Documentation on requester pays buckets
  3035. // can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
  3036. //
  3037. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3038. // with awserr.Error's Code and Message methods to get detailed information about
  3039. // the error.
  3040. //
  3041. // See the AWS API reference guide for Amazon Simple Storage Service's
  3042. // API operation PutBucketRequestPayment for usage and error information.
  3043. func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
  3044. req, out := c.PutBucketRequestPaymentRequest(input)
  3045. err := req.Send()
  3046. return out, err
  3047. }
  3048. const opPutBucketTagging = "PutBucketTagging"
  3049. // PutBucketTaggingRequest generates a "aws/request.Request" representing the
  3050. // client's request for the PutBucketTagging operation. The "output" return
  3051. // value can be used to capture response data after the request's "Send" method
  3052. // is called.
  3053. //
  3054. // See PutBucketTagging for usage and error information.
  3055. //
  3056. // Creating a request object using this method should be used when you want to inject
  3057. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3058. // access properties on the request object before or after sending the request. If
  3059. // you just want the service response, call the PutBucketTagging method directly
  3060. // instead.
  3061. //
  3062. // Note: You must call the "Send" method on the returned request object in order
  3063. // to execute the request.
  3064. //
  3065. // // Example sending a request using the PutBucketTaggingRequest method.
  3066. // req, resp := client.PutBucketTaggingRequest(params)
  3067. //
  3068. // err := req.Send()
  3069. // if err == nil { // resp is now filled
  3070. // fmt.Println(resp)
  3071. // }
  3072. //
  3073. func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) {
  3074. op := &request.Operation{
  3075. Name: opPutBucketTagging,
  3076. HTTPMethod: "PUT",
  3077. HTTPPath: "/{Bucket}?tagging",
  3078. }
  3079. if input == nil {
  3080. input = &PutBucketTaggingInput{}
  3081. }
  3082. req = c.newRequest(op, input, output)
  3083. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  3084. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3085. output = &PutBucketTaggingOutput{}
  3086. req.Data = output
  3087. return
  3088. }
  3089. // PutBucketTagging API operation for Amazon Simple Storage Service.
  3090. //
  3091. // Sets the tags for a bucket.
  3092. //
  3093. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3094. // with awserr.Error's Code and Message methods to get detailed information about
  3095. // the error.
  3096. //
  3097. // See the AWS API reference guide for Amazon Simple Storage Service's
  3098. // API operation PutBucketTagging for usage and error information.
  3099. func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
  3100. req, out := c.PutBucketTaggingRequest(input)
  3101. err := req.Send()
  3102. return out, err
  3103. }
  3104. const opPutBucketVersioning = "PutBucketVersioning"
  3105. // PutBucketVersioningRequest generates a "aws/request.Request" representing the
  3106. // client's request for the PutBucketVersioning operation. The "output" return
  3107. // value can be used to capture response data after the request's "Send" method
  3108. // is called.
  3109. //
  3110. // See PutBucketVersioning for usage and error information.
  3111. //
  3112. // Creating a request object using this method should be used when you want to inject
  3113. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3114. // access properties on the request object before or after sending the request. If
  3115. // you just want the service response, call the PutBucketVersioning method directly
  3116. // instead.
  3117. //
  3118. // Note: You must call the "Send" method on the returned request object in order
  3119. // to execute the request.
  3120. //
  3121. // // Example sending a request using the PutBucketVersioningRequest method.
  3122. // req, resp := client.PutBucketVersioningRequest(params)
  3123. //
  3124. // err := req.Send()
  3125. // if err == nil { // resp is now filled
  3126. // fmt.Println(resp)
  3127. // }
  3128. //
  3129. func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) {
  3130. op := &request.Operation{
  3131. Name: opPutBucketVersioning,
  3132. HTTPMethod: "PUT",
  3133. HTTPPath: "/{Bucket}?versioning",
  3134. }
  3135. if input == nil {
  3136. input = &PutBucketVersioningInput{}
  3137. }
  3138. req = c.newRequest(op, input, output)
  3139. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  3140. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3141. output = &PutBucketVersioningOutput{}
  3142. req.Data = output
  3143. return
  3144. }
  3145. // PutBucketVersioning API operation for Amazon Simple Storage Service.
  3146. //
  3147. // Sets the versioning state of an existing bucket. To set the versioning state,
  3148. // you must be the bucket owner.
  3149. //
  3150. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3151. // with awserr.Error's Code and Message methods to get detailed information about
  3152. // the error.
  3153. //
  3154. // See the AWS API reference guide for Amazon Simple Storage Service's
  3155. // API operation PutBucketVersioning for usage and error information.
  3156. func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
  3157. req, out := c.PutBucketVersioningRequest(input)
  3158. err := req.Send()
  3159. return out, err
  3160. }
  3161. const opPutBucketWebsite = "PutBucketWebsite"
  3162. // PutBucketWebsiteRequest generates a "aws/request.Request" representing the
  3163. // client's request for the PutBucketWebsite operation. The "output" return
  3164. // value can be used to capture response data after the request's "Send" method
  3165. // is called.
  3166. //
  3167. // See PutBucketWebsite for usage and error information.
  3168. //
  3169. // Creating a request object using this method should be used when you want to inject
  3170. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3171. // access properties on the request object before or after sending the request. If
  3172. // you just want the service response, call the PutBucketWebsite method directly
  3173. // instead.
  3174. //
  3175. // Note: You must call the "Send" method on the returned request object in order
  3176. // to execute the request.
  3177. //
  3178. // // Example sending a request using the PutBucketWebsiteRequest method.
  3179. // req, resp := client.PutBucketWebsiteRequest(params)
  3180. //
  3181. // err := req.Send()
  3182. // if err == nil { // resp is now filled
  3183. // fmt.Println(resp)
  3184. // }
  3185. //
  3186. func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) {
  3187. op := &request.Operation{
  3188. Name: opPutBucketWebsite,
  3189. HTTPMethod: "PUT",
  3190. HTTPPath: "/{Bucket}?website",
  3191. }
  3192. if input == nil {
  3193. input = &PutBucketWebsiteInput{}
  3194. }
  3195. req = c.newRequest(op, input, output)
  3196. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  3197. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3198. output = &PutBucketWebsiteOutput{}
  3199. req.Data = output
  3200. return
  3201. }
  3202. // PutBucketWebsite API operation for Amazon Simple Storage Service.
  3203. //
  3204. // Set the website configuration for a bucket.
  3205. //
  3206. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3207. // with awserr.Error's Code and Message methods to get detailed information about
  3208. // the error.
  3209. //
  3210. // See the AWS API reference guide for Amazon Simple Storage Service's
  3211. // API operation PutBucketWebsite for usage and error information.
  3212. func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
  3213. req, out := c.PutBucketWebsiteRequest(input)
  3214. err := req.Send()
  3215. return out, err
  3216. }
  3217. const opPutObject = "PutObject"
  3218. // PutObjectRequest generates a "aws/request.Request" representing the
  3219. // client's request for the PutObject operation. The "output" return
  3220. // value can be used to capture response data after the request's "Send" method
  3221. // is called.
  3222. //
  3223. // See PutObject for usage and error information.
  3224. //
  3225. // Creating a request object using this method should be used when you want to inject
  3226. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3227. // access properties on the request object before or after sending the request. If
  3228. // you just want the service response, call the PutObject method directly
  3229. // instead.
  3230. //
  3231. // Note: You must call the "Send" method on the returned request object in order
  3232. // to execute the request.
  3233. //
  3234. // // Example sending a request using the PutObjectRequest method.
  3235. // req, resp := client.PutObjectRequest(params)
  3236. //
  3237. // err := req.Send()
  3238. // if err == nil { // resp is now filled
  3239. // fmt.Println(resp)
  3240. // }
  3241. //
  3242. func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
  3243. op := &request.Operation{
  3244. Name: opPutObject,
  3245. HTTPMethod: "PUT",
  3246. HTTPPath: "/{Bucket}/{Key+}",
  3247. }
  3248. if input == nil {
  3249. input = &PutObjectInput{}
  3250. }
  3251. req = c.newRequest(op, input, output)
  3252. output = &PutObjectOutput{}
  3253. req.Data = output
  3254. return
  3255. }
  3256. // PutObject API operation for Amazon Simple Storage Service.
  3257. //
  3258. // Adds an object to a bucket.
  3259. //
  3260. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3261. // with awserr.Error's Code and Message methods to get detailed information about
  3262. // the error.
  3263. //
  3264. // See the AWS API reference guide for Amazon Simple Storage Service's
  3265. // API operation PutObject for usage and error information.
  3266. func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
  3267. req, out := c.PutObjectRequest(input)
  3268. err := req.Send()
  3269. return out, err
  3270. }
  3271. const opPutObjectAcl = "PutObjectAcl"
  3272. // PutObjectAclRequest generates a "aws/request.Request" representing the
  3273. // client's request for the PutObjectAcl operation. The "output" return
  3274. // value can be used to capture response data after the request's "Send" method
  3275. // is called.
  3276. //
  3277. // See PutObjectAcl for usage and error information.
  3278. //
  3279. // Creating a request object using this method should be used when you want to inject
  3280. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3281. // access properties on the request object before or after sending the request. If
  3282. // you just want the service response, call the PutObjectAcl method directly
  3283. // instead.
  3284. //
  3285. // Note: You must call the "Send" method on the returned request object in order
  3286. // to execute the request.
  3287. //
  3288. // // Example sending a request using the PutObjectAclRequest method.
  3289. // req, resp := client.PutObjectAclRequest(params)
  3290. //
  3291. // err := req.Send()
  3292. // if err == nil { // resp is now filled
  3293. // fmt.Println(resp)
  3294. // }
  3295. //
  3296. func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) {
  3297. op := &request.Operation{
  3298. Name: opPutObjectAcl,
  3299. HTTPMethod: "PUT",
  3300. HTTPPath: "/{Bucket}/{Key+}?acl",
  3301. }
  3302. if input == nil {
  3303. input = &PutObjectAclInput{}
  3304. }
  3305. req = c.newRequest(op, input, output)
  3306. output = &PutObjectAclOutput{}
  3307. req.Data = output
  3308. return
  3309. }
  3310. // PutObjectAcl API operation for Amazon Simple Storage Service.
  3311. //
  3312. // uses the acl subresource to set the access control list (ACL) permissions
  3313. // for an object that already exists in a bucket
  3314. //
  3315. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3316. // with awserr.Error's Code and Message methods to get detailed information about
  3317. // the error.
  3318. //
  3319. // See the AWS API reference guide for Amazon Simple Storage Service's
  3320. // API operation PutObjectAcl for usage and error information.
  3321. //
  3322. // Returned Error Codes:
  3323. // * NoSuchKey
  3324. // The specified key does not exist.
  3325. //
  3326. func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
  3327. req, out := c.PutObjectAclRequest(input)
  3328. err := req.Send()
  3329. return out, err
  3330. }
  3331. const opRestoreObject = "RestoreObject"
  3332. // RestoreObjectRequest generates a "aws/request.Request" representing the
  3333. // client's request for the RestoreObject operation. The "output" return
  3334. // value can be used to capture response data after the request's "Send" method
  3335. // is called.
  3336. //
  3337. // See RestoreObject for usage and error information.
  3338. //
  3339. // Creating a request object using this method should be used when you want to inject
  3340. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3341. // access properties on the request object before or after sending the request. If
  3342. // you just want the service response, call the RestoreObject method directly
  3343. // instead.
  3344. //
  3345. // Note: You must call the "Send" method on the returned request object in order
  3346. // to execute the request.
  3347. //
  3348. // // Example sending a request using the RestoreObjectRequest method.
  3349. // req, resp := client.RestoreObjectRequest(params)
  3350. //
  3351. // err := req.Send()
  3352. // if err == nil { // resp is now filled
  3353. // fmt.Println(resp)
  3354. // }
  3355. //
  3356. func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) {
  3357. op := &request.Operation{
  3358. Name: opRestoreObject,
  3359. HTTPMethod: "POST",
  3360. HTTPPath: "/{Bucket}/{Key+}?restore",
  3361. }
  3362. if input == nil {
  3363. input = &RestoreObjectInput{}
  3364. }
  3365. req = c.newRequest(op, input, output)
  3366. output = &RestoreObjectOutput{}
  3367. req.Data = output
  3368. return
  3369. }
  3370. // RestoreObject API operation for Amazon Simple Storage Service.
  3371. //
  3372. // Restores an archived copy of an object back into Amazon S3
  3373. //
  3374. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3375. // with awserr.Error's Code and Message methods to get detailed information about
  3376. // the error.
  3377. //
  3378. // See the AWS API reference guide for Amazon Simple Storage Service's
  3379. // API operation RestoreObject for usage and error information.
  3380. //
  3381. // Returned Error Codes:
  3382. // * ObjectAlreadyInActiveTierError
  3383. // This operation is not allowed against this storage tier
  3384. //
  3385. func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
  3386. req, out := c.RestoreObjectRequest(input)
  3387. err := req.Send()
  3388. return out, err
  3389. }
  3390. const opUploadPart = "UploadPart"
  3391. // UploadPartRequest generates a "aws/request.Request" representing the
  3392. // client's request for the UploadPart operation. The "output" return
  3393. // value can be used to capture response data after the request's "Send" method
  3394. // is called.
  3395. //
  3396. // See UploadPart for usage and error information.
  3397. //
  3398. // Creating a request object using this method should be used when you want to inject
  3399. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3400. // access properties on the request object before or after sending the request. If
  3401. // you just want the service response, call the UploadPart method directly
  3402. // instead.
  3403. //
  3404. // Note: You must call the "Send" method on the returned request object in order
  3405. // to execute the request.
  3406. //
  3407. // // Example sending a request using the UploadPartRequest method.
  3408. // req, resp := client.UploadPartRequest(params)
  3409. //
  3410. // err := req.Send()
  3411. // if err == nil { // resp is now filled
  3412. // fmt.Println(resp)
  3413. // }
  3414. //
  3415. func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) {
  3416. op := &request.Operation{
  3417. Name: opUploadPart,
  3418. HTTPMethod: "PUT",
  3419. HTTPPath: "/{Bucket}/{Key+}",
  3420. }
  3421. if input == nil {
  3422. input = &UploadPartInput{}
  3423. }
  3424. req = c.newRequest(op, input, output)
  3425. output = &UploadPartOutput{}
  3426. req.Data = output
  3427. return
  3428. }
  3429. // UploadPart API operation for Amazon Simple Storage Service.
  3430. //
  3431. // Uploads a part in a multipart upload.
  3432. //
  3433. // Note: After you initiate multipart upload and upload one or more parts, you
  3434. // must either complete or abort multipart upload in order to stop getting charged
  3435. // for storage of the uploaded parts. Only after you either complete or abort
  3436. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  3437. // you for the parts storage.
  3438. //
  3439. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3440. // with awserr.Error's Code and Message methods to get detailed information about
  3441. // the error.
  3442. //
  3443. // See the AWS API reference guide for Amazon Simple Storage Service's
  3444. // API operation UploadPart for usage and error information.
  3445. func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
  3446. req, out := c.UploadPartRequest(input)
  3447. err := req.Send()
  3448. return out, err
  3449. }
  3450. const opUploadPartCopy = "UploadPartCopy"
  3451. // UploadPartCopyRequest generates a "aws/request.Request" representing the
  3452. // client's request for the UploadPartCopy operation. The "output" return
  3453. // value can be used to capture response data after the request's "Send" method
  3454. // is called.
  3455. //
  3456. // See UploadPartCopy for usage and error information.
  3457. //
  3458. // Creating a request object using this method should be used when you want to inject
  3459. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3460. // access properties on the request object before or after sending the request. If
  3461. // you just want the service response, call the UploadPartCopy method directly
  3462. // instead.
  3463. //
  3464. // Note: You must call the "Send" method on the returned request object in order
  3465. // to execute the request.
  3466. //
  3467. // // Example sending a request using the UploadPartCopyRequest method.
  3468. // req, resp := client.UploadPartCopyRequest(params)
  3469. //
  3470. // err := req.Send()
  3471. // if err == nil { // resp is now filled
  3472. // fmt.Println(resp)
  3473. // }
  3474. //
  3475. func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) {
  3476. op := &request.Operation{
  3477. Name: opUploadPartCopy,
  3478. HTTPMethod: "PUT",
  3479. HTTPPath: "/{Bucket}/{Key+}",
  3480. }
  3481. if input == nil {
  3482. input = &UploadPartCopyInput{}
  3483. }
  3484. req = c.newRequest(op, input, output)
  3485. output = &UploadPartCopyOutput{}
  3486. req.Data = output
  3487. return
  3488. }
  3489. // UploadPartCopy API operation for Amazon Simple Storage Service.
  3490. //
  3491. // Uploads a part by copying data from an existing object as data source.
  3492. //
  3493. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3494. // with awserr.Error's Code and Message methods to get detailed information about
  3495. // the error.
  3496. //
  3497. // See the AWS API reference guide for Amazon Simple Storage Service's
  3498. // API operation UploadPartCopy for usage and error information.
  3499. func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
  3500. req, out := c.UploadPartCopyRequest(input)
  3501. err := req.Send()
  3502. return out, err
  3503. }
  3504. // Specifies the days since the initiation of an Incomplete Multipart Upload
  3505. // that Lifecycle will wait before permanently removing all parts of the upload.
  3506. type AbortIncompleteMultipartUpload struct {
  3507. _ struct{} `type:"structure"`
  3508. // Indicates the number of days that must pass since initiation for Lifecycle
  3509. // to abort an Incomplete Multipart Upload.
  3510. DaysAfterInitiation *int64 `type:"integer"`
  3511. }
  3512. // String returns the string representation
  3513. func (s AbortIncompleteMultipartUpload) String() string {
  3514. return awsutil.Prettify(s)
  3515. }
  3516. // GoString returns the string representation
  3517. func (s AbortIncompleteMultipartUpload) GoString() string {
  3518. return s.String()
  3519. }
  3520. type AbortMultipartUploadInput struct {
  3521. _ struct{} `type:"structure"`
  3522. // Bucket is a required field
  3523. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3524. // Key is a required field
  3525. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  3526. // Confirms that the requester knows that she or he will be charged for the
  3527. // request. Bucket owners need not specify this parameter in their requests.
  3528. // Documentation on downloading objects from requester pays buckets can be found
  3529. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  3530. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  3531. // UploadId is a required field
  3532. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  3533. }
  3534. // String returns the string representation
  3535. func (s AbortMultipartUploadInput) String() string {
  3536. return awsutil.Prettify(s)
  3537. }
  3538. // GoString returns the string representation
  3539. func (s AbortMultipartUploadInput) GoString() string {
  3540. return s.String()
  3541. }
  3542. // Validate inspects the fields of the type to determine if they are valid.
  3543. func (s *AbortMultipartUploadInput) Validate() error {
  3544. invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"}
  3545. if s.Bucket == nil {
  3546. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  3547. }
  3548. if s.Key == nil {
  3549. invalidParams.Add(request.NewErrParamRequired("Key"))
  3550. }
  3551. if s.Key != nil && len(*s.Key) < 1 {
  3552. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  3553. }
  3554. if s.UploadId == nil {
  3555. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  3556. }
  3557. if invalidParams.Len() > 0 {
  3558. return invalidParams
  3559. }
  3560. return nil
  3561. }
  3562. type AbortMultipartUploadOutput struct {
  3563. _ struct{} `type:"structure"`
  3564. // If present, indicates that the requester was successfully charged for the
  3565. // request.
  3566. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  3567. }
  3568. // String returns the string representation
  3569. func (s AbortMultipartUploadOutput) String() string {
  3570. return awsutil.Prettify(s)
  3571. }
  3572. // GoString returns the string representation
  3573. func (s AbortMultipartUploadOutput) GoString() string {
  3574. return s.String()
  3575. }
  3576. type AccelerateConfiguration struct {
  3577. _ struct{} `type:"structure"`
  3578. // The accelerate configuration of the bucket.
  3579. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  3580. }
  3581. // String returns the string representation
  3582. func (s AccelerateConfiguration) String() string {
  3583. return awsutil.Prettify(s)
  3584. }
  3585. // GoString returns the string representation
  3586. func (s AccelerateConfiguration) GoString() string {
  3587. return s.String()
  3588. }
  3589. type AccessControlPolicy struct {
  3590. _ struct{} `type:"structure"`
  3591. // A list of grants.
  3592. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  3593. Owner *Owner `type:"structure"`
  3594. }
  3595. // String returns the string representation
  3596. func (s AccessControlPolicy) String() string {
  3597. return awsutil.Prettify(s)
  3598. }
  3599. // GoString returns the string representation
  3600. func (s AccessControlPolicy) GoString() string {
  3601. return s.String()
  3602. }
  3603. // Validate inspects the fields of the type to determine if they are valid.
  3604. func (s *AccessControlPolicy) Validate() error {
  3605. invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"}
  3606. if s.Grants != nil {
  3607. for i, v := range s.Grants {
  3608. if v == nil {
  3609. continue
  3610. }
  3611. if err := v.Validate(); err != nil {
  3612. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams))
  3613. }
  3614. }
  3615. }
  3616. if invalidParams.Len() > 0 {
  3617. return invalidParams
  3618. }
  3619. return nil
  3620. }
  3621. type Bucket struct {
  3622. _ struct{} `type:"structure"`
  3623. // Date the bucket was created.
  3624. CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  3625. // The name of the bucket.
  3626. Name *string `type:"string"`
  3627. }
  3628. // String returns the string representation
  3629. func (s Bucket) String() string {
  3630. return awsutil.Prettify(s)
  3631. }
  3632. // GoString returns the string representation
  3633. func (s Bucket) GoString() string {
  3634. return s.String()
  3635. }
  3636. type BucketLifecycleConfiguration struct {
  3637. _ struct{} `type:"structure"`
  3638. // Rules is a required field
  3639. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  3640. }
  3641. // String returns the string representation
  3642. func (s BucketLifecycleConfiguration) String() string {
  3643. return awsutil.Prettify(s)
  3644. }
  3645. // GoString returns the string representation
  3646. func (s BucketLifecycleConfiguration) GoString() string {
  3647. return s.String()
  3648. }
  3649. // Validate inspects the fields of the type to determine if they are valid.
  3650. func (s *BucketLifecycleConfiguration) Validate() error {
  3651. invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"}
  3652. if s.Rules == nil {
  3653. invalidParams.Add(request.NewErrParamRequired("Rules"))
  3654. }
  3655. if s.Rules != nil {
  3656. for i, v := range s.Rules {
  3657. if v == nil {
  3658. continue
  3659. }
  3660. if err := v.Validate(); err != nil {
  3661. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  3662. }
  3663. }
  3664. }
  3665. if invalidParams.Len() > 0 {
  3666. return invalidParams
  3667. }
  3668. return nil
  3669. }
  3670. type BucketLoggingStatus struct {
  3671. _ struct{} `type:"structure"`
  3672. LoggingEnabled *LoggingEnabled `type:"structure"`
  3673. }
  3674. // String returns the string representation
  3675. func (s BucketLoggingStatus) String() string {
  3676. return awsutil.Prettify(s)
  3677. }
  3678. // GoString returns the string representation
  3679. func (s BucketLoggingStatus) GoString() string {
  3680. return s.String()
  3681. }
  3682. // Validate inspects the fields of the type to determine if they are valid.
  3683. func (s *BucketLoggingStatus) Validate() error {
  3684. invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"}
  3685. if s.LoggingEnabled != nil {
  3686. if err := s.LoggingEnabled.Validate(); err != nil {
  3687. invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams))
  3688. }
  3689. }
  3690. if invalidParams.Len() > 0 {
  3691. return invalidParams
  3692. }
  3693. return nil
  3694. }
  3695. type CORSConfiguration struct {
  3696. _ struct{} `type:"structure"`
  3697. // CORSRules is a required field
  3698. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
  3699. }
  3700. // String returns the string representation
  3701. func (s CORSConfiguration) String() string {
  3702. return awsutil.Prettify(s)
  3703. }
  3704. // GoString returns the string representation
  3705. func (s CORSConfiguration) GoString() string {
  3706. return s.String()
  3707. }
  3708. // Validate inspects the fields of the type to determine if they are valid.
  3709. func (s *CORSConfiguration) Validate() error {
  3710. invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"}
  3711. if s.CORSRules == nil {
  3712. invalidParams.Add(request.NewErrParamRequired("CORSRules"))
  3713. }
  3714. if s.CORSRules != nil {
  3715. for i, v := range s.CORSRules {
  3716. if v == nil {
  3717. continue
  3718. }
  3719. if err := v.Validate(); err != nil {
  3720. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams))
  3721. }
  3722. }
  3723. }
  3724. if invalidParams.Len() > 0 {
  3725. return invalidParams
  3726. }
  3727. return nil
  3728. }
  3729. type CORSRule struct {
  3730. _ struct{} `type:"structure"`
  3731. // Specifies which headers are allowed in a pre-flight OPTIONS request.
  3732. AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`
  3733. // Identifies HTTP methods that the domain/origin specified in the rule is allowed
  3734. // to execute.
  3735. //
  3736. // AllowedMethods is a required field
  3737. AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"`
  3738. // One or more origins you want customers to be able to access the bucket from.
  3739. //
  3740. // AllowedOrigins is a required field
  3741. AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"`
  3742. // One or more headers in the response that you want customers to be able to
  3743. // access from their applications (for example, from a JavaScript XMLHttpRequest
  3744. // object).
  3745. ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"`
  3746. // The time in seconds that your browser is to cache the preflight response
  3747. // for the specified resource.
  3748. MaxAgeSeconds *int64 `type:"integer"`
  3749. }
  3750. // String returns the string representation
  3751. func (s CORSRule) String() string {
  3752. return awsutil.Prettify(s)
  3753. }
  3754. // GoString returns the string representation
  3755. func (s CORSRule) GoString() string {
  3756. return s.String()
  3757. }
  3758. // Validate inspects the fields of the type to determine if they are valid.
  3759. func (s *CORSRule) Validate() error {
  3760. invalidParams := request.ErrInvalidParams{Context: "CORSRule"}
  3761. if s.AllowedMethods == nil {
  3762. invalidParams.Add(request.NewErrParamRequired("AllowedMethods"))
  3763. }
  3764. if s.AllowedOrigins == nil {
  3765. invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
  3766. }
  3767. if invalidParams.Len() > 0 {
  3768. return invalidParams
  3769. }
  3770. return nil
  3771. }
  3772. type CloudFunctionConfiguration struct {
  3773. _ struct{} `type:"structure"`
  3774. CloudFunction *string `type:"string"`
  3775. // Bucket event for which to send notifications.
  3776. Event *string `deprecated:"true" type:"string" enum:"Event"`
  3777. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  3778. // Optional unique identifier for configurations in a notification configuration.
  3779. // If you don't provide one, Amazon S3 will assign an ID.
  3780. Id *string `type:"string"`
  3781. InvocationRole *string `type:"string"`
  3782. }
  3783. // String returns the string representation
  3784. func (s CloudFunctionConfiguration) String() string {
  3785. return awsutil.Prettify(s)
  3786. }
  3787. // GoString returns the string representation
  3788. func (s CloudFunctionConfiguration) GoString() string {
  3789. return s.String()
  3790. }
  3791. type CommonPrefix struct {
  3792. _ struct{} `type:"structure"`
  3793. Prefix *string `type:"string"`
  3794. }
  3795. // String returns the string representation
  3796. func (s CommonPrefix) String() string {
  3797. return awsutil.Prettify(s)
  3798. }
  3799. // GoString returns the string representation
  3800. func (s CommonPrefix) GoString() string {
  3801. return s.String()
  3802. }
  3803. type CompleteMultipartUploadInput struct {
  3804. _ struct{} `type:"structure" payload:"MultipartUpload"`
  3805. // Bucket is a required field
  3806. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3807. // Key is a required field
  3808. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  3809. MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure"`
  3810. // Confirms that the requester knows that she or he will be charged for the
  3811. // request. Bucket owners need not specify this parameter in their requests.
  3812. // Documentation on downloading objects from requester pays buckets can be found
  3813. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  3814. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  3815. // UploadId is a required field
  3816. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  3817. }
  3818. // String returns the string representation
  3819. func (s CompleteMultipartUploadInput) String() string {
  3820. return awsutil.Prettify(s)
  3821. }
  3822. // GoString returns the string representation
  3823. func (s CompleteMultipartUploadInput) GoString() string {
  3824. return s.String()
  3825. }
  3826. // Validate inspects the fields of the type to determine if they are valid.
  3827. func (s *CompleteMultipartUploadInput) Validate() error {
  3828. invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"}
  3829. if s.Bucket == nil {
  3830. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  3831. }
  3832. if s.Key == nil {
  3833. invalidParams.Add(request.NewErrParamRequired("Key"))
  3834. }
  3835. if s.Key != nil && len(*s.Key) < 1 {
  3836. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  3837. }
  3838. if s.UploadId == nil {
  3839. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  3840. }
  3841. if invalidParams.Len() > 0 {
  3842. return invalidParams
  3843. }
  3844. return nil
  3845. }
  3846. type CompleteMultipartUploadOutput struct {
  3847. _ struct{} `type:"structure"`
  3848. Bucket *string `type:"string"`
  3849. // Entity tag of the object.
  3850. ETag *string `type:"string"`
  3851. // If the object expiration is configured, this will contain the expiration
  3852. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  3853. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  3854. Key *string `min:"1" type:"string"`
  3855. Location *string `type:"string"`
  3856. // If present, indicates that the requester was successfully charged for the
  3857. // request.
  3858. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  3859. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  3860. // encryption key that was used for the object.
  3861. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  3862. // The Server-side encryption algorithm used when storing this object in S3
  3863. // (e.g., AES256, aws:kms).
  3864. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  3865. // Version of the object.
  3866. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  3867. }
  3868. // String returns the string representation
  3869. func (s CompleteMultipartUploadOutput) String() string {
  3870. return awsutil.Prettify(s)
  3871. }
  3872. // GoString returns the string representation
  3873. func (s CompleteMultipartUploadOutput) GoString() string {
  3874. return s.String()
  3875. }
  3876. type CompletedMultipartUpload struct {
  3877. _ struct{} `type:"structure"`
  3878. Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
  3879. }
  3880. // String returns the string representation
  3881. func (s CompletedMultipartUpload) String() string {
  3882. return awsutil.Prettify(s)
  3883. }
  3884. // GoString returns the string representation
  3885. func (s CompletedMultipartUpload) GoString() string {
  3886. return s.String()
  3887. }
  3888. type CompletedPart struct {
  3889. _ struct{} `type:"structure"`
  3890. // Entity tag returned when the part was uploaded.
  3891. ETag *string `type:"string"`
  3892. // Part number that identifies the part. This is a positive integer between
  3893. // 1 and 10,000.
  3894. PartNumber *int64 `type:"integer"`
  3895. }
  3896. // String returns the string representation
  3897. func (s CompletedPart) String() string {
  3898. return awsutil.Prettify(s)
  3899. }
  3900. // GoString returns the string representation
  3901. func (s CompletedPart) GoString() string {
  3902. return s.String()
  3903. }
  3904. type Condition struct {
  3905. _ struct{} `type:"structure"`
  3906. // The HTTP error code when the redirect is applied. In the event of an error,
  3907. // if the error code equals this value, then the specified redirect is applied.
  3908. // Required when parent element Condition is specified and sibling KeyPrefixEquals
  3909. // is not specified. If both are specified, then both must be true for the redirect
  3910. // to be applied.
  3911. HttpErrorCodeReturnedEquals *string `type:"string"`
  3912. // The object key name prefix when the redirect is applied. For example, to
  3913. // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
  3914. // To redirect request for all pages with the prefix docs/, the key prefix will
  3915. // be /docs, which identifies all objects in the docs/ folder. Required when
  3916. // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
  3917. // is not specified. If both conditions are specified, both must be true for
  3918. // the redirect to be applied.
  3919. KeyPrefixEquals *string `type:"string"`
  3920. }
  3921. // String returns the string representation
  3922. func (s Condition) String() string {
  3923. return awsutil.Prettify(s)
  3924. }
  3925. // GoString returns the string representation
  3926. func (s Condition) GoString() string {
  3927. return s.String()
  3928. }
  3929. type CopyObjectInput struct {
  3930. _ struct{} `type:"structure"`
  3931. // The canned ACL to apply to the object.
  3932. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  3933. // Bucket is a required field
  3934. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3935. // Specifies caching behavior along the request/reply chain.
  3936. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  3937. // Specifies presentational information for the object.
  3938. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  3939. // Specifies what content encodings have been applied to the object and thus
  3940. // what decoding mechanisms must be applied to obtain the media-type referenced
  3941. // by the Content-Type header field.
  3942. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  3943. // The language the content is in.
  3944. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  3945. // A standard MIME type describing the format of the object data.
  3946. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3947. // The name of the source bucket and key name of the source object, separated
  3948. // by a slash (/). Must be URL-encoded.
  3949. //
  3950. // CopySource is a required field
  3951. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  3952. // Copies the object if its entity tag (ETag) matches the specified tag.
  3953. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  3954. // Copies the object if it has been modified since the specified time.
  3955. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"`
  3956. // Copies the object if its entity tag (ETag) is different than the specified
  3957. // ETag.
  3958. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  3959. // Copies the object if it hasn't been modified since the specified time.
  3960. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"`
  3961. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  3962. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  3963. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  3964. // the source object. The encryption key provided in this header must be one
  3965. // that was used when the source object was created.
  3966. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  3967. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  3968. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  3969. // key was transmitted without error.
  3970. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  3971. // The date and time at which the object is no longer cacheable.
  3972. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  3973. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  3974. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  3975. // Allows grantee to read the object data and its metadata.
  3976. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  3977. // Allows grantee to read the object ACL.
  3978. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  3979. // Allows grantee to write the ACL for the applicable object.
  3980. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  3981. // Key is a required field
  3982. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  3983. // A map of metadata to store with the object in S3.
  3984. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  3985. // Specifies whether the metadata is copied from the source object or replaced
  3986. // with metadata provided in the request.
  3987. MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`
  3988. // Confirms that the requester knows that she or he will be charged for the
  3989. // request. Bucket owners need not specify this parameter in their requests.
  3990. // Documentation on downloading objects from requester pays buckets can be found
  3991. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  3992. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  3993. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  3994. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  3995. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  3996. // data. This value is used to store the object and then it is discarded; Amazon
  3997. // does not store the encryption key. The key must be appropriate for use with
  3998. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  3999. // header.
  4000. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  4001. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  4002. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  4003. // key was transmitted without error.
  4004. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  4005. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  4006. // requests for an object protected by AWS KMS will fail if not made via SSL
  4007. // or using SigV4. Documentation on configuring any of the officially supported
  4008. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  4009. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  4010. // The Server-side encryption algorithm used when storing this object in S3
  4011. // (e.g., AES256, aws:kms).
  4012. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  4013. // The type of storage to use for the object. Defaults to 'STANDARD'.
  4014. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  4015. // If the bucket is configured as a website, redirects requests for this object
  4016. // to another object in the same bucket or to an external URL. Amazon S3 stores
  4017. // the value of this header in the object metadata.
  4018. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  4019. }
  4020. // String returns the string representation
  4021. func (s CopyObjectInput) String() string {
  4022. return awsutil.Prettify(s)
  4023. }
  4024. // GoString returns the string representation
  4025. func (s CopyObjectInput) GoString() string {
  4026. return s.String()
  4027. }
  4028. // Validate inspects the fields of the type to determine if they are valid.
  4029. func (s *CopyObjectInput) Validate() error {
  4030. invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"}
  4031. if s.Bucket == nil {
  4032. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4033. }
  4034. if s.CopySource == nil {
  4035. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  4036. }
  4037. if s.Key == nil {
  4038. invalidParams.Add(request.NewErrParamRequired("Key"))
  4039. }
  4040. if s.Key != nil && len(*s.Key) < 1 {
  4041. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  4042. }
  4043. if invalidParams.Len() > 0 {
  4044. return invalidParams
  4045. }
  4046. return nil
  4047. }
  4048. type CopyObjectOutput struct {
  4049. _ struct{} `type:"structure" payload:"CopyObjectResult"`
  4050. CopyObjectResult *CopyObjectResult `type:"structure"`
  4051. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  4052. // If the object expiration is configured, the response includes this header.
  4053. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  4054. // If present, indicates that the requester was successfully charged for the
  4055. // request.
  4056. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  4057. // If server-side encryption with a customer-provided encryption key was requested,
  4058. // the response will include this header confirming the encryption algorithm
  4059. // used.
  4060. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  4061. // If server-side encryption with a customer-provided encryption key was requested,
  4062. // the response will include this header to provide round trip message integrity
  4063. // verification of the customer-provided encryption key.
  4064. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  4065. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  4066. // encryption key that was used for the object.
  4067. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  4068. // The Server-side encryption algorithm used when storing this object in S3
  4069. // (e.g., AES256, aws:kms).
  4070. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  4071. // Version ID of the newly created copy.
  4072. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  4073. }
  4074. // String returns the string representation
  4075. func (s CopyObjectOutput) String() string {
  4076. return awsutil.Prettify(s)
  4077. }
  4078. // GoString returns the string representation
  4079. func (s CopyObjectOutput) GoString() string {
  4080. return s.String()
  4081. }
  4082. type CopyObjectResult struct {
  4083. _ struct{} `type:"structure"`
  4084. ETag *string `type:"string"`
  4085. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  4086. }
  4087. // String returns the string representation
  4088. func (s CopyObjectResult) String() string {
  4089. return awsutil.Prettify(s)
  4090. }
  4091. // GoString returns the string representation
  4092. func (s CopyObjectResult) GoString() string {
  4093. return s.String()
  4094. }
  4095. type CopyPartResult struct {
  4096. _ struct{} `type:"structure"`
  4097. // Entity tag of the object.
  4098. ETag *string `type:"string"`
  4099. // Date and time at which the object was uploaded.
  4100. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  4101. }
  4102. // String returns the string representation
  4103. func (s CopyPartResult) String() string {
  4104. return awsutil.Prettify(s)
  4105. }
  4106. // GoString returns the string representation
  4107. func (s CopyPartResult) GoString() string {
  4108. return s.String()
  4109. }
  4110. type CreateBucketConfiguration struct {
  4111. _ struct{} `type:"structure"`
  4112. // Specifies the region where the bucket will be created. If you don't specify
  4113. // a region, the bucket will be created in US Standard.
  4114. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  4115. }
  4116. // String returns the string representation
  4117. func (s CreateBucketConfiguration) String() string {
  4118. return awsutil.Prettify(s)
  4119. }
  4120. // GoString returns the string representation
  4121. func (s CreateBucketConfiguration) GoString() string {
  4122. return s.String()
  4123. }
  4124. type CreateBucketInput struct {
  4125. _ struct{} `type:"structure" payload:"CreateBucketConfiguration"`
  4126. // The canned ACL to apply to the bucket.
  4127. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  4128. // Bucket is a required field
  4129. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4130. CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure"`
  4131. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  4132. // bucket.
  4133. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  4134. // Allows grantee to list the objects in the bucket.
  4135. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  4136. // Allows grantee to read the bucket ACL.
  4137. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  4138. // Allows grantee to create, overwrite, and delete any object in the bucket.
  4139. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  4140. // Allows grantee to write the ACL for the applicable bucket.
  4141. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  4142. }
  4143. // String returns the string representation
  4144. func (s CreateBucketInput) String() string {
  4145. return awsutil.Prettify(s)
  4146. }
  4147. // GoString returns the string representation
  4148. func (s CreateBucketInput) GoString() string {
  4149. return s.String()
  4150. }
  4151. // Validate inspects the fields of the type to determine if they are valid.
  4152. func (s *CreateBucketInput) Validate() error {
  4153. invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"}
  4154. if s.Bucket == nil {
  4155. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4156. }
  4157. if invalidParams.Len() > 0 {
  4158. return invalidParams
  4159. }
  4160. return nil
  4161. }
  4162. type CreateBucketOutput struct {
  4163. _ struct{} `type:"structure"`
  4164. Location *string `location:"header" locationName:"Location" type:"string"`
  4165. }
  4166. // String returns the string representation
  4167. func (s CreateBucketOutput) String() string {
  4168. return awsutil.Prettify(s)
  4169. }
  4170. // GoString returns the string representation
  4171. func (s CreateBucketOutput) GoString() string {
  4172. return s.String()
  4173. }
  4174. type CreateMultipartUploadInput struct {
  4175. _ struct{} `type:"structure"`
  4176. // The canned ACL to apply to the object.
  4177. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  4178. // Bucket is a required field
  4179. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4180. // Specifies caching behavior along the request/reply chain.
  4181. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  4182. // Specifies presentational information for the object.
  4183. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  4184. // Specifies what content encodings have been applied to the object and thus
  4185. // what decoding mechanisms must be applied to obtain the media-type referenced
  4186. // by the Content-Type header field.
  4187. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  4188. // The language the content is in.
  4189. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  4190. // A standard MIME type describing the format of the object data.
  4191. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  4192. // The date and time at which the object is no longer cacheable.
  4193. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  4194. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  4195. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  4196. // Allows grantee to read the object data and its metadata.
  4197. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  4198. // Allows grantee to read the object ACL.
  4199. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  4200. // Allows grantee to write the ACL for the applicable object.
  4201. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  4202. // Key is a required field
  4203. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  4204. // A map of metadata to store with the object in S3.
  4205. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  4206. // Confirms that the requester knows that she or he will be charged for the
  4207. // request. Bucket owners need not specify this parameter in their requests.
  4208. // Documentation on downloading objects from requester pays buckets can be found
  4209. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  4210. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  4211. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  4212. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  4213. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  4214. // data. This value is used to store the object and then it is discarded; Amazon
  4215. // does not store the encryption key. The key must be appropriate for use with
  4216. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  4217. // header.
  4218. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  4219. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  4220. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  4221. // key was transmitted without error.
  4222. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  4223. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  4224. // requests for an object protected by AWS KMS will fail if not made via SSL
  4225. // or using SigV4. Documentation on configuring any of the officially supported
  4226. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  4227. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  4228. // The Server-side encryption algorithm used when storing this object in S3
  4229. // (e.g., AES256, aws:kms).
  4230. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  4231. // The type of storage to use for the object. Defaults to 'STANDARD'.
  4232. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  4233. // If the bucket is configured as a website, redirects requests for this object
  4234. // to another object in the same bucket or to an external URL. Amazon S3 stores
  4235. // the value of this header in the object metadata.
  4236. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  4237. }
  4238. // String returns the string representation
  4239. func (s CreateMultipartUploadInput) String() string {
  4240. return awsutil.Prettify(s)
  4241. }
  4242. // GoString returns the string representation
  4243. func (s CreateMultipartUploadInput) GoString() string {
  4244. return s.String()
  4245. }
  4246. // Validate inspects the fields of the type to determine if they are valid.
  4247. func (s *CreateMultipartUploadInput) Validate() error {
  4248. invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"}
  4249. if s.Bucket == nil {
  4250. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4251. }
  4252. if s.Key == nil {
  4253. invalidParams.Add(request.NewErrParamRequired("Key"))
  4254. }
  4255. if s.Key != nil && len(*s.Key) < 1 {
  4256. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  4257. }
  4258. if invalidParams.Len() > 0 {
  4259. return invalidParams
  4260. }
  4261. return nil
  4262. }
  4263. type CreateMultipartUploadOutput struct {
  4264. _ struct{} `type:"structure"`
  4265. // Date when multipart upload will become eligible for abort operation by lifecycle.
  4266. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"`
  4267. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  4268. // operation.
  4269. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  4270. // Name of the bucket to which the multipart upload was initiated.
  4271. Bucket *string `locationName:"Bucket" type:"string"`
  4272. // Object key for which the multipart upload was initiated.
  4273. Key *string `min:"1" type:"string"`
  4274. // If present, indicates that the requester was successfully charged for the
  4275. // request.
  4276. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  4277. // If server-side encryption with a customer-provided encryption key was requested,
  4278. // the response will include this header confirming the encryption algorithm
  4279. // used.
  4280. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  4281. // If server-side encryption with a customer-provided encryption key was requested,
  4282. // the response will include this header to provide round trip message integrity
  4283. // verification of the customer-provided encryption key.
  4284. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  4285. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  4286. // encryption key that was used for the object.
  4287. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  4288. // The Server-side encryption algorithm used when storing this object in S3
  4289. // (e.g., AES256, aws:kms).
  4290. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  4291. // ID for the initiated multipart upload.
  4292. UploadId *string `type:"string"`
  4293. }
  4294. // String returns the string representation
  4295. func (s CreateMultipartUploadOutput) String() string {
  4296. return awsutil.Prettify(s)
  4297. }
  4298. // GoString returns the string representation
  4299. func (s CreateMultipartUploadOutput) GoString() string {
  4300. return s.String()
  4301. }
  4302. type Delete struct {
  4303. _ struct{} `type:"structure"`
  4304. // Objects is a required field
  4305. Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
  4306. // Element to enable quiet mode for the request. When you add this element,
  4307. // you must set its value to true.
  4308. Quiet *bool `type:"boolean"`
  4309. }
  4310. // String returns the string representation
  4311. func (s Delete) String() string {
  4312. return awsutil.Prettify(s)
  4313. }
  4314. // GoString returns the string representation
  4315. func (s Delete) GoString() string {
  4316. return s.String()
  4317. }
  4318. // Validate inspects the fields of the type to determine if they are valid.
  4319. func (s *Delete) Validate() error {
  4320. invalidParams := request.ErrInvalidParams{Context: "Delete"}
  4321. if s.Objects == nil {
  4322. invalidParams.Add(request.NewErrParamRequired("Objects"))
  4323. }
  4324. if s.Objects != nil {
  4325. for i, v := range s.Objects {
  4326. if v == nil {
  4327. continue
  4328. }
  4329. if err := v.Validate(); err != nil {
  4330. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams))
  4331. }
  4332. }
  4333. }
  4334. if invalidParams.Len() > 0 {
  4335. return invalidParams
  4336. }
  4337. return nil
  4338. }
  4339. type DeleteBucketCorsInput struct {
  4340. _ struct{} `type:"structure"`
  4341. // Bucket is a required field
  4342. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4343. }
  4344. // String returns the string representation
  4345. func (s DeleteBucketCorsInput) String() string {
  4346. return awsutil.Prettify(s)
  4347. }
  4348. // GoString returns the string representation
  4349. func (s DeleteBucketCorsInput) GoString() string {
  4350. return s.String()
  4351. }
  4352. // Validate inspects the fields of the type to determine if they are valid.
  4353. func (s *DeleteBucketCorsInput) Validate() error {
  4354. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"}
  4355. if s.Bucket == nil {
  4356. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4357. }
  4358. if invalidParams.Len() > 0 {
  4359. return invalidParams
  4360. }
  4361. return nil
  4362. }
  4363. type DeleteBucketCorsOutput struct {
  4364. _ struct{} `type:"structure"`
  4365. }
  4366. // String returns the string representation
  4367. func (s DeleteBucketCorsOutput) String() string {
  4368. return awsutil.Prettify(s)
  4369. }
  4370. // GoString returns the string representation
  4371. func (s DeleteBucketCorsOutput) GoString() string {
  4372. return s.String()
  4373. }
  4374. type DeleteBucketInput struct {
  4375. _ struct{} `type:"structure"`
  4376. // Bucket is a required field
  4377. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4378. }
  4379. // String returns the string representation
  4380. func (s DeleteBucketInput) String() string {
  4381. return awsutil.Prettify(s)
  4382. }
  4383. // GoString returns the string representation
  4384. func (s DeleteBucketInput) GoString() string {
  4385. return s.String()
  4386. }
  4387. // Validate inspects the fields of the type to determine if they are valid.
  4388. func (s *DeleteBucketInput) Validate() error {
  4389. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"}
  4390. if s.Bucket == nil {
  4391. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4392. }
  4393. if invalidParams.Len() > 0 {
  4394. return invalidParams
  4395. }
  4396. return nil
  4397. }
  4398. type DeleteBucketLifecycleInput struct {
  4399. _ struct{} `type:"structure"`
  4400. // Bucket is a required field
  4401. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4402. }
  4403. // String returns the string representation
  4404. func (s DeleteBucketLifecycleInput) String() string {
  4405. return awsutil.Prettify(s)
  4406. }
  4407. // GoString returns the string representation
  4408. func (s DeleteBucketLifecycleInput) GoString() string {
  4409. return s.String()
  4410. }
  4411. // Validate inspects the fields of the type to determine if they are valid.
  4412. func (s *DeleteBucketLifecycleInput) Validate() error {
  4413. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"}
  4414. if s.Bucket == nil {
  4415. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4416. }
  4417. if invalidParams.Len() > 0 {
  4418. return invalidParams
  4419. }
  4420. return nil
  4421. }
  4422. type DeleteBucketLifecycleOutput struct {
  4423. _ struct{} `type:"structure"`
  4424. }
  4425. // String returns the string representation
  4426. func (s DeleteBucketLifecycleOutput) String() string {
  4427. return awsutil.Prettify(s)
  4428. }
  4429. // GoString returns the string representation
  4430. func (s DeleteBucketLifecycleOutput) GoString() string {
  4431. return s.String()
  4432. }
  4433. type DeleteBucketOutput struct {
  4434. _ struct{} `type:"structure"`
  4435. }
  4436. // String returns the string representation
  4437. func (s DeleteBucketOutput) String() string {
  4438. return awsutil.Prettify(s)
  4439. }
  4440. // GoString returns the string representation
  4441. func (s DeleteBucketOutput) GoString() string {
  4442. return s.String()
  4443. }
  4444. type DeleteBucketPolicyInput struct {
  4445. _ struct{} `type:"structure"`
  4446. // Bucket is a required field
  4447. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4448. }
  4449. // String returns the string representation
  4450. func (s DeleteBucketPolicyInput) String() string {
  4451. return awsutil.Prettify(s)
  4452. }
  4453. // GoString returns the string representation
  4454. func (s DeleteBucketPolicyInput) GoString() string {
  4455. return s.String()
  4456. }
  4457. // Validate inspects the fields of the type to determine if they are valid.
  4458. func (s *DeleteBucketPolicyInput) Validate() error {
  4459. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"}
  4460. if s.Bucket == nil {
  4461. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4462. }
  4463. if invalidParams.Len() > 0 {
  4464. return invalidParams
  4465. }
  4466. return nil
  4467. }
  4468. type DeleteBucketPolicyOutput struct {
  4469. _ struct{} `type:"structure"`
  4470. }
  4471. // String returns the string representation
  4472. func (s DeleteBucketPolicyOutput) String() string {
  4473. return awsutil.Prettify(s)
  4474. }
  4475. // GoString returns the string representation
  4476. func (s DeleteBucketPolicyOutput) GoString() string {
  4477. return s.String()
  4478. }
  4479. type DeleteBucketReplicationInput struct {
  4480. _ struct{} `type:"structure"`
  4481. // Bucket is a required field
  4482. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4483. }
  4484. // String returns the string representation
  4485. func (s DeleteBucketReplicationInput) String() string {
  4486. return awsutil.Prettify(s)
  4487. }
  4488. // GoString returns the string representation
  4489. func (s DeleteBucketReplicationInput) GoString() string {
  4490. return s.String()
  4491. }
  4492. // Validate inspects the fields of the type to determine if they are valid.
  4493. func (s *DeleteBucketReplicationInput) Validate() error {
  4494. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"}
  4495. if s.Bucket == nil {
  4496. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4497. }
  4498. if invalidParams.Len() > 0 {
  4499. return invalidParams
  4500. }
  4501. return nil
  4502. }
  4503. type DeleteBucketReplicationOutput struct {
  4504. _ struct{} `type:"structure"`
  4505. }
  4506. // String returns the string representation
  4507. func (s DeleteBucketReplicationOutput) String() string {
  4508. return awsutil.Prettify(s)
  4509. }
  4510. // GoString returns the string representation
  4511. func (s DeleteBucketReplicationOutput) GoString() string {
  4512. return s.String()
  4513. }
  4514. type DeleteBucketTaggingInput struct {
  4515. _ struct{} `type:"structure"`
  4516. // Bucket is a required field
  4517. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4518. }
  4519. // String returns the string representation
  4520. func (s DeleteBucketTaggingInput) String() string {
  4521. return awsutil.Prettify(s)
  4522. }
  4523. // GoString returns the string representation
  4524. func (s DeleteBucketTaggingInput) GoString() string {
  4525. return s.String()
  4526. }
  4527. // Validate inspects the fields of the type to determine if they are valid.
  4528. func (s *DeleteBucketTaggingInput) Validate() error {
  4529. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"}
  4530. if s.Bucket == nil {
  4531. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4532. }
  4533. if invalidParams.Len() > 0 {
  4534. return invalidParams
  4535. }
  4536. return nil
  4537. }
  4538. type DeleteBucketTaggingOutput struct {
  4539. _ struct{} `type:"structure"`
  4540. }
  4541. // String returns the string representation
  4542. func (s DeleteBucketTaggingOutput) String() string {
  4543. return awsutil.Prettify(s)
  4544. }
  4545. // GoString returns the string representation
  4546. func (s DeleteBucketTaggingOutput) GoString() string {
  4547. return s.String()
  4548. }
  4549. type DeleteBucketWebsiteInput struct {
  4550. _ struct{} `type:"structure"`
  4551. // Bucket is a required field
  4552. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4553. }
  4554. // String returns the string representation
  4555. func (s DeleteBucketWebsiteInput) String() string {
  4556. return awsutil.Prettify(s)
  4557. }
  4558. // GoString returns the string representation
  4559. func (s DeleteBucketWebsiteInput) GoString() string {
  4560. return s.String()
  4561. }
  4562. // Validate inspects the fields of the type to determine if they are valid.
  4563. func (s *DeleteBucketWebsiteInput) Validate() error {
  4564. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"}
  4565. if s.Bucket == nil {
  4566. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4567. }
  4568. if invalidParams.Len() > 0 {
  4569. return invalidParams
  4570. }
  4571. return nil
  4572. }
  4573. type DeleteBucketWebsiteOutput struct {
  4574. _ struct{} `type:"structure"`
  4575. }
  4576. // String returns the string representation
  4577. func (s DeleteBucketWebsiteOutput) String() string {
  4578. return awsutil.Prettify(s)
  4579. }
  4580. // GoString returns the string representation
  4581. func (s DeleteBucketWebsiteOutput) GoString() string {
  4582. return s.String()
  4583. }
  4584. type DeleteMarkerEntry struct {
  4585. _ struct{} `type:"structure"`
  4586. // Specifies whether the object is (true) or is not (false) the latest version
  4587. // of an object.
  4588. IsLatest *bool `type:"boolean"`
  4589. // The object key.
  4590. Key *string `min:"1" type:"string"`
  4591. // Date and time the object was last modified.
  4592. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  4593. Owner *Owner `type:"structure"`
  4594. // Version ID of an object.
  4595. VersionId *string `type:"string"`
  4596. }
  4597. // String returns the string representation
  4598. func (s DeleteMarkerEntry) String() string {
  4599. return awsutil.Prettify(s)
  4600. }
  4601. // GoString returns the string representation
  4602. func (s DeleteMarkerEntry) GoString() string {
  4603. return s.String()
  4604. }
  4605. type DeleteObjectInput struct {
  4606. _ struct{} `type:"structure"`
  4607. // Bucket is a required field
  4608. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4609. // Key is a required field
  4610. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  4611. // The concatenation of the authentication device's serial number, a space,
  4612. // and the value that is displayed on your authentication device.
  4613. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  4614. // Confirms that the requester knows that she or he will be charged for the
  4615. // request. Bucket owners need not specify this parameter in their requests.
  4616. // Documentation on downloading objects from requester pays buckets can be found
  4617. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  4618. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  4619. // VersionId used to reference a specific version of the object.
  4620. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  4621. }
  4622. // String returns the string representation
  4623. func (s DeleteObjectInput) String() string {
  4624. return awsutil.Prettify(s)
  4625. }
  4626. // GoString returns the string representation
  4627. func (s DeleteObjectInput) GoString() string {
  4628. return s.String()
  4629. }
  4630. // Validate inspects the fields of the type to determine if they are valid.
  4631. func (s *DeleteObjectInput) Validate() error {
  4632. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
  4633. if s.Bucket == nil {
  4634. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4635. }
  4636. if s.Key == nil {
  4637. invalidParams.Add(request.NewErrParamRequired("Key"))
  4638. }
  4639. if s.Key != nil && len(*s.Key) < 1 {
  4640. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  4641. }
  4642. if invalidParams.Len() > 0 {
  4643. return invalidParams
  4644. }
  4645. return nil
  4646. }
  4647. type DeleteObjectOutput struct {
  4648. _ struct{} `type:"structure"`
  4649. // Specifies whether the versioned object that was permanently deleted was (true)
  4650. // or was not (false) a delete marker.
  4651. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  4652. // If present, indicates that the requester was successfully charged for the
  4653. // request.
  4654. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  4655. // Returns the version ID of the delete marker created as a result of the DELETE
  4656. // operation.
  4657. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  4658. }
  4659. // String returns the string representation
  4660. func (s DeleteObjectOutput) String() string {
  4661. return awsutil.Prettify(s)
  4662. }
  4663. // GoString returns the string representation
  4664. func (s DeleteObjectOutput) GoString() string {
  4665. return s.String()
  4666. }
  4667. type DeleteObjectsInput struct {
  4668. _ struct{} `type:"structure" payload:"Delete"`
  4669. // Bucket is a required field
  4670. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4671. // Delete is a required field
  4672. Delete *Delete `locationName:"Delete" type:"structure" required:"true"`
  4673. // The concatenation of the authentication device's serial number, a space,
  4674. // and the value that is displayed on your authentication device.
  4675. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  4676. // Confirms that the requester knows that she or he will be charged for the
  4677. // request. Bucket owners need not specify this parameter in their requests.
  4678. // Documentation on downloading objects from requester pays buckets can be found
  4679. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  4680. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  4681. }
  4682. // String returns the string representation
  4683. func (s DeleteObjectsInput) String() string {
  4684. return awsutil.Prettify(s)
  4685. }
  4686. // GoString returns the string representation
  4687. func (s DeleteObjectsInput) GoString() string {
  4688. return s.String()
  4689. }
  4690. // Validate inspects the fields of the type to determine if they are valid.
  4691. func (s *DeleteObjectsInput) Validate() error {
  4692. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"}
  4693. if s.Bucket == nil {
  4694. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4695. }
  4696. if s.Delete == nil {
  4697. invalidParams.Add(request.NewErrParamRequired("Delete"))
  4698. }
  4699. if s.Delete != nil {
  4700. if err := s.Delete.Validate(); err != nil {
  4701. invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
  4702. }
  4703. }
  4704. if invalidParams.Len() > 0 {
  4705. return invalidParams
  4706. }
  4707. return nil
  4708. }
  4709. type DeleteObjectsOutput struct {
  4710. _ struct{} `type:"structure"`
  4711. Deleted []*DeletedObject `type:"list" flattened:"true"`
  4712. Errors []*Error `locationName:"Error" type:"list" flattened:"true"`
  4713. // If present, indicates that the requester was successfully charged for the
  4714. // request.
  4715. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  4716. }
  4717. // String returns the string representation
  4718. func (s DeleteObjectsOutput) String() string {
  4719. return awsutil.Prettify(s)
  4720. }
  4721. // GoString returns the string representation
  4722. func (s DeleteObjectsOutput) GoString() string {
  4723. return s.String()
  4724. }
  4725. type DeletedObject struct {
  4726. _ struct{} `type:"structure"`
  4727. DeleteMarker *bool `type:"boolean"`
  4728. DeleteMarkerVersionId *string `type:"string"`
  4729. Key *string `min:"1" type:"string"`
  4730. VersionId *string `type:"string"`
  4731. }
  4732. // String returns the string representation
  4733. func (s DeletedObject) String() string {
  4734. return awsutil.Prettify(s)
  4735. }
  4736. // GoString returns the string representation
  4737. func (s DeletedObject) GoString() string {
  4738. return s.String()
  4739. }
  4740. type Destination struct {
  4741. _ struct{} `type:"structure"`
  4742. // Amazon resource name (ARN) of the bucket where you want Amazon S3 to store
  4743. // replicas of the object identified by the rule.
  4744. //
  4745. // Bucket is a required field
  4746. Bucket *string `type:"string" required:"true"`
  4747. // The class of storage used to store the object.
  4748. StorageClass *string `type:"string" enum:"StorageClass"`
  4749. }
  4750. // String returns the string representation
  4751. func (s Destination) String() string {
  4752. return awsutil.Prettify(s)
  4753. }
  4754. // GoString returns the string representation
  4755. func (s Destination) GoString() string {
  4756. return s.String()
  4757. }
  4758. // Validate inspects the fields of the type to determine if they are valid.
  4759. func (s *Destination) Validate() error {
  4760. invalidParams := request.ErrInvalidParams{Context: "Destination"}
  4761. if s.Bucket == nil {
  4762. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4763. }
  4764. if invalidParams.Len() > 0 {
  4765. return invalidParams
  4766. }
  4767. return nil
  4768. }
  4769. type Error struct {
  4770. _ struct{} `type:"structure"`
  4771. Code *string `type:"string"`
  4772. Key *string `min:"1" type:"string"`
  4773. Message *string `type:"string"`
  4774. VersionId *string `type:"string"`
  4775. }
  4776. // String returns the string representation
  4777. func (s Error) String() string {
  4778. return awsutil.Prettify(s)
  4779. }
  4780. // GoString returns the string representation
  4781. func (s Error) GoString() string {
  4782. return s.String()
  4783. }
  4784. type ErrorDocument struct {
  4785. _ struct{} `type:"structure"`
  4786. // The object key name to use when a 4XX class error occurs.
  4787. //
  4788. // Key is a required field
  4789. Key *string `min:"1" type:"string" required:"true"`
  4790. }
  4791. // String returns the string representation
  4792. func (s ErrorDocument) String() string {
  4793. return awsutil.Prettify(s)
  4794. }
  4795. // GoString returns the string representation
  4796. func (s ErrorDocument) GoString() string {
  4797. return s.String()
  4798. }
  4799. // Validate inspects the fields of the type to determine if they are valid.
  4800. func (s *ErrorDocument) Validate() error {
  4801. invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"}
  4802. if s.Key == nil {
  4803. invalidParams.Add(request.NewErrParamRequired("Key"))
  4804. }
  4805. if s.Key != nil && len(*s.Key) < 1 {
  4806. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  4807. }
  4808. if invalidParams.Len() > 0 {
  4809. return invalidParams
  4810. }
  4811. return nil
  4812. }
  4813. // Container for key value pair that defines the criteria for the filter rule.
  4814. type FilterRule struct {
  4815. _ struct{} `type:"structure"`
  4816. // Object key name prefix or suffix identifying one or more objects to which
  4817. // the filtering rule applies. Maximum prefix length can be up to 1,024 characters.
  4818. // Overlapping prefixes and suffixes are not supported. For more information,
  4819. // go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  4820. Name *string `type:"string" enum:"FilterRuleName"`
  4821. Value *string `type:"string"`
  4822. }
  4823. // String returns the string representation
  4824. func (s FilterRule) String() string {
  4825. return awsutil.Prettify(s)
  4826. }
  4827. // GoString returns the string representation
  4828. func (s FilterRule) GoString() string {
  4829. return s.String()
  4830. }
  4831. type GetBucketAccelerateConfigurationInput struct {
  4832. _ struct{} `type:"structure"`
  4833. // Name of the bucket for which the accelerate configuration is retrieved.
  4834. //
  4835. // Bucket is a required field
  4836. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4837. }
  4838. // String returns the string representation
  4839. func (s GetBucketAccelerateConfigurationInput) String() string {
  4840. return awsutil.Prettify(s)
  4841. }
  4842. // GoString returns the string representation
  4843. func (s GetBucketAccelerateConfigurationInput) GoString() string {
  4844. return s.String()
  4845. }
  4846. // Validate inspects the fields of the type to determine if they are valid.
  4847. func (s *GetBucketAccelerateConfigurationInput) Validate() error {
  4848. invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"}
  4849. if s.Bucket == nil {
  4850. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4851. }
  4852. if invalidParams.Len() > 0 {
  4853. return invalidParams
  4854. }
  4855. return nil
  4856. }
  4857. type GetBucketAccelerateConfigurationOutput struct {
  4858. _ struct{} `type:"structure"`
  4859. // The accelerate configuration of the bucket.
  4860. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  4861. }
  4862. // String returns the string representation
  4863. func (s GetBucketAccelerateConfigurationOutput) String() string {
  4864. return awsutil.Prettify(s)
  4865. }
  4866. // GoString returns the string representation
  4867. func (s GetBucketAccelerateConfigurationOutput) GoString() string {
  4868. return s.String()
  4869. }
  4870. type GetBucketAclInput struct {
  4871. _ struct{} `type:"structure"`
  4872. // Bucket is a required field
  4873. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4874. }
  4875. // String returns the string representation
  4876. func (s GetBucketAclInput) String() string {
  4877. return awsutil.Prettify(s)
  4878. }
  4879. // GoString returns the string representation
  4880. func (s GetBucketAclInput) GoString() string {
  4881. return s.String()
  4882. }
  4883. // Validate inspects the fields of the type to determine if they are valid.
  4884. func (s *GetBucketAclInput) Validate() error {
  4885. invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"}
  4886. if s.Bucket == nil {
  4887. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4888. }
  4889. if invalidParams.Len() > 0 {
  4890. return invalidParams
  4891. }
  4892. return nil
  4893. }
  4894. type GetBucketAclOutput struct {
  4895. _ struct{} `type:"structure"`
  4896. // A list of grants.
  4897. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  4898. Owner *Owner `type:"structure"`
  4899. }
  4900. // String returns the string representation
  4901. func (s GetBucketAclOutput) String() string {
  4902. return awsutil.Prettify(s)
  4903. }
  4904. // GoString returns the string representation
  4905. func (s GetBucketAclOutput) GoString() string {
  4906. return s.String()
  4907. }
  4908. type GetBucketCorsInput struct {
  4909. _ struct{} `type:"structure"`
  4910. // Bucket is a required field
  4911. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4912. }
  4913. // String returns the string representation
  4914. func (s GetBucketCorsInput) String() string {
  4915. return awsutil.Prettify(s)
  4916. }
  4917. // GoString returns the string representation
  4918. func (s GetBucketCorsInput) GoString() string {
  4919. return s.String()
  4920. }
  4921. // Validate inspects the fields of the type to determine if they are valid.
  4922. func (s *GetBucketCorsInput) Validate() error {
  4923. invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"}
  4924. if s.Bucket == nil {
  4925. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4926. }
  4927. if invalidParams.Len() > 0 {
  4928. return invalidParams
  4929. }
  4930. return nil
  4931. }
  4932. type GetBucketCorsOutput struct {
  4933. _ struct{} `type:"structure"`
  4934. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
  4935. }
  4936. // String returns the string representation
  4937. func (s GetBucketCorsOutput) String() string {
  4938. return awsutil.Prettify(s)
  4939. }
  4940. // GoString returns the string representation
  4941. func (s GetBucketCorsOutput) GoString() string {
  4942. return s.String()
  4943. }
  4944. type GetBucketLifecycleConfigurationInput struct {
  4945. _ struct{} `type:"structure"`
  4946. // Bucket is a required field
  4947. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4948. }
  4949. // String returns the string representation
  4950. func (s GetBucketLifecycleConfigurationInput) String() string {
  4951. return awsutil.Prettify(s)
  4952. }
  4953. // GoString returns the string representation
  4954. func (s GetBucketLifecycleConfigurationInput) GoString() string {
  4955. return s.String()
  4956. }
  4957. // Validate inspects the fields of the type to determine if they are valid.
  4958. func (s *GetBucketLifecycleConfigurationInput) Validate() error {
  4959. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"}
  4960. if s.Bucket == nil {
  4961. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4962. }
  4963. if invalidParams.Len() > 0 {
  4964. return invalidParams
  4965. }
  4966. return nil
  4967. }
  4968. type GetBucketLifecycleConfigurationOutput struct {
  4969. _ struct{} `type:"structure"`
  4970. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
  4971. }
  4972. // String returns the string representation
  4973. func (s GetBucketLifecycleConfigurationOutput) String() string {
  4974. return awsutil.Prettify(s)
  4975. }
  4976. // GoString returns the string representation
  4977. func (s GetBucketLifecycleConfigurationOutput) GoString() string {
  4978. return s.String()
  4979. }
  4980. type GetBucketLifecycleInput struct {
  4981. _ struct{} `type:"structure"`
  4982. // Bucket is a required field
  4983. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4984. }
  4985. // String returns the string representation
  4986. func (s GetBucketLifecycleInput) String() string {
  4987. return awsutil.Prettify(s)
  4988. }
  4989. // GoString returns the string representation
  4990. func (s GetBucketLifecycleInput) GoString() string {
  4991. return s.String()
  4992. }
  4993. // Validate inspects the fields of the type to determine if they are valid.
  4994. func (s *GetBucketLifecycleInput) Validate() error {
  4995. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"}
  4996. if s.Bucket == nil {
  4997. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4998. }
  4999. if invalidParams.Len() > 0 {
  5000. return invalidParams
  5001. }
  5002. return nil
  5003. }
  5004. type GetBucketLifecycleOutput struct {
  5005. _ struct{} `type:"structure"`
  5006. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"`
  5007. }
  5008. // String returns the string representation
  5009. func (s GetBucketLifecycleOutput) String() string {
  5010. return awsutil.Prettify(s)
  5011. }
  5012. // GoString returns the string representation
  5013. func (s GetBucketLifecycleOutput) GoString() string {
  5014. return s.String()
  5015. }
  5016. type GetBucketLocationInput struct {
  5017. _ struct{} `type:"structure"`
  5018. // Bucket is a required field
  5019. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5020. }
  5021. // String returns the string representation
  5022. func (s GetBucketLocationInput) String() string {
  5023. return awsutil.Prettify(s)
  5024. }
  5025. // GoString returns the string representation
  5026. func (s GetBucketLocationInput) GoString() string {
  5027. return s.String()
  5028. }
  5029. // Validate inspects the fields of the type to determine if they are valid.
  5030. func (s *GetBucketLocationInput) Validate() error {
  5031. invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"}
  5032. if s.Bucket == nil {
  5033. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5034. }
  5035. if invalidParams.Len() > 0 {
  5036. return invalidParams
  5037. }
  5038. return nil
  5039. }
  5040. type GetBucketLocationOutput struct {
  5041. _ struct{} `type:"structure"`
  5042. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  5043. }
  5044. // String returns the string representation
  5045. func (s GetBucketLocationOutput) String() string {
  5046. return awsutil.Prettify(s)
  5047. }
  5048. // GoString returns the string representation
  5049. func (s GetBucketLocationOutput) GoString() string {
  5050. return s.String()
  5051. }
  5052. type GetBucketLoggingInput struct {
  5053. _ struct{} `type:"structure"`
  5054. // Bucket is a required field
  5055. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5056. }
  5057. // String returns the string representation
  5058. func (s GetBucketLoggingInput) String() string {
  5059. return awsutil.Prettify(s)
  5060. }
  5061. // GoString returns the string representation
  5062. func (s GetBucketLoggingInput) GoString() string {
  5063. return s.String()
  5064. }
  5065. // Validate inspects the fields of the type to determine if they are valid.
  5066. func (s *GetBucketLoggingInput) Validate() error {
  5067. invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"}
  5068. if s.Bucket == nil {
  5069. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5070. }
  5071. if invalidParams.Len() > 0 {
  5072. return invalidParams
  5073. }
  5074. return nil
  5075. }
  5076. type GetBucketLoggingOutput struct {
  5077. _ struct{} `type:"structure"`
  5078. LoggingEnabled *LoggingEnabled `type:"structure"`
  5079. }
  5080. // String returns the string representation
  5081. func (s GetBucketLoggingOutput) String() string {
  5082. return awsutil.Prettify(s)
  5083. }
  5084. // GoString returns the string representation
  5085. func (s GetBucketLoggingOutput) GoString() string {
  5086. return s.String()
  5087. }
  5088. type GetBucketNotificationConfigurationRequest struct {
  5089. _ struct{} `type:"structure"`
  5090. // Name of the bucket to get the notification configuration for.
  5091. //
  5092. // Bucket is a required field
  5093. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5094. }
  5095. // String returns the string representation
  5096. func (s GetBucketNotificationConfigurationRequest) String() string {
  5097. return awsutil.Prettify(s)
  5098. }
  5099. // GoString returns the string representation
  5100. func (s GetBucketNotificationConfigurationRequest) GoString() string {
  5101. return s.String()
  5102. }
  5103. // Validate inspects the fields of the type to determine if they are valid.
  5104. func (s *GetBucketNotificationConfigurationRequest) Validate() error {
  5105. invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"}
  5106. if s.Bucket == nil {
  5107. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5108. }
  5109. if invalidParams.Len() > 0 {
  5110. return invalidParams
  5111. }
  5112. return nil
  5113. }
  5114. type GetBucketPolicyInput struct {
  5115. _ struct{} `type:"structure"`
  5116. // Bucket is a required field
  5117. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5118. }
  5119. // String returns the string representation
  5120. func (s GetBucketPolicyInput) String() string {
  5121. return awsutil.Prettify(s)
  5122. }
  5123. // GoString returns the string representation
  5124. func (s GetBucketPolicyInput) GoString() string {
  5125. return s.String()
  5126. }
  5127. // Validate inspects the fields of the type to determine if they are valid.
  5128. func (s *GetBucketPolicyInput) Validate() error {
  5129. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"}
  5130. if s.Bucket == nil {
  5131. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5132. }
  5133. if invalidParams.Len() > 0 {
  5134. return invalidParams
  5135. }
  5136. return nil
  5137. }
  5138. type GetBucketPolicyOutput struct {
  5139. _ struct{} `type:"structure" payload:"Policy"`
  5140. // The bucket policy as a JSON document.
  5141. Policy *string `type:"string"`
  5142. }
  5143. // String returns the string representation
  5144. func (s GetBucketPolicyOutput) String() string {
  5145. return awsutil.Prettify(s)
  5146. }
  5147. // GoString returns the string representation
  5148. func (s GetBucketPolicyOutput) GoString() string {
  5149. return s.String()
  5150. }
  5151. type GetBucketReplicationInput struct {
  5152. _ struct{} `type:"structure"`
  5153. // Bucket is a required field
  5154. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5155. }
  5156. // String returns the string representation
  5157. func (s GetBucketReplicationInput) String() string {
  5158. return awsutil.Prettify(s)
  5159. }
  5160. // GoString returns the string representation
  5161. func (s GetBucketReplicationInput) GoString() string {
  5162. return s.String()
  5163. }
  5164. // Validate inspects the fields of the type to determine if they are valid.
  5165. func (s *GetBucketReplicationInput) Validate() error {
  5166. invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"}
  5167. if s.Bucket == nil {
  5168. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5169. }
  5170. if invalidParams.Len() > 0 {
  5171. return invalidParams
  5172. }
  5173. return nil
  5174. }
  5175. type GetBucketReplicationOutput struct {
  5176. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  5177. // Container for replication rules. You can add as many as 1,000 rules. Total
  5178. // replication configuration size can be up to 2 MB.
  5179. ReplicationConfiguration *ReplicationConfiguration `type:"structure"`
  5180. }
  5181. // String returns the string representation
  5182. func (s GetBucketReplicationOutput) String() string {
  5183. return awsutil.Prettify(s)
  5184. }
  5185. // GoString returns the string representation
  5186. func (s GetBucketReplicationOutput) GoString() string {
  5187. return s.String()
  5188. }
  5189. type GetBucketRequestPaymentInput struct {
  5190. _ struct{} `type:"structure"`
  5191. // Bucket is a required field
  5192. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5193. }
  5194. // String returns the string representation
  5195. func (s GetBucketRequestPaymentInput) String() string {
  5196. return awsutil.Prettify(s)
  5197. }
  5198. // GoString returns the string representation
  5199. func (s GetBucketRequestPaymentInput) GoString() string {
  5200. return s.String()
  5201. }
  5202. // Validate inspects the fields of the type to determine if they are valid.
  5203. func (s *GetBucketRequestPaymentInput) Validate() error {
  5204. invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"}
  5205. if s.Bucket == nil {
  5206. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5207. }
  5208. if invalidParams.Len() > 0 {
  5209. return invalidParams
  5210. }
  5211. return nil
  5212. }
  5213. type GetBucketRequestPaymentOutput struct {
  5214. _ struct{} `type:"structure"`
  5215. // Specifies who pays for the download and request fees.
  5216. Payer *string `type:"string" enum:"Payer"`
  5217. }
  5218. // String returns the string representation
  5219. func (s GetBucketRequestPaymentOutput) String() string {
  5220. return awsutil.Prettify(s)
  5221. }
  5222. // GoString returns the string representation
  5223. func (s GetBucketRequestPaymentOutput) GoString() string {
  5224. return s.String()
  5225. }
  5226. type GetBucketTaggingInput struct {
  5227. _ struct{} `type:"structure"`
  5228. // Bucket is a required field
  5229. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5230. }
  5231. // String returns the string representation
  5232. func (s GetBucketTaggingInput) String() string {
  5233. return awsutil.Prettify(s)
  5234. }
  5235. // GoString returns the string representation
  5236. func (s GetBucketTaggingInput) GoString() string {
  5237. return s.String()
  5238. }
  5239. // Validate inspects the fields of the type to determine if they are valid.
  5240. func (s *GetBucketTaggingInput) Validate() error {
  5241. invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"}
  5242. if s.Bucket == nil {
  5243. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5244. }
  5245. if invalidParams.Len() > 0 {
  5246. return invalidParams
  5247. }
  5248. return nil
  5249. }
  5250. type GetBucketTaggingOutput struct {
  5251. _ struct{} `type:"structure"`
  5252. // TagSet is a required field
  5253. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  5254. }
  5255. // String returns the string representation
  5256. func (s GetBucketTaggingOutput) String() string {
  5257. return awsutil.Prettify(s)
  5258. }
  5259. // GoString returns the string representation
  5260. func (s GetBucketTaggingOutput) GoString() string {
  5261. return s.String()
  5262. }
  5263. type GetBucketVersioningInput struct {
  5264. _ struct{} `type:"structure"`
  5265. // Bucket is a required field
  5266. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5267. }
  5268. // String returns the string representation
  5269. func (s GetBucketVersioningInput) String() string {
  5270. return awsutil.Prettify(s)
  5271. }
  5272. // GoString returns the string representation
  5273. func (s GetBucketVersioningInput) GoString() string {
  5274. return s.String()
  5275. }
  5276. // Validate inspects the fields of the type to determine if they are valid.
  5277. func (s *GetBucketVersioningInput) Validate() error {
  5278. invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"}
  5279. if s.Bucket == nil {
  5280. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5281. }
  5282. if invalidParams.Len() > 0 {
  5283. return invalidParams
  5284. }
  5285. return nil
  5286. }
  5287. type GetBucketVersioningOutput struct {
  5288. _ struct{} `type:"structure"`
  5289. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  5290. // This element is only returned if the bucket has been configured with MFA
  5291. // delete. If the bucket has never been so configured, this element is not returned.
  5292. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"`
  5293. // The versioning state of the bucket.
  5294. Status *string `type:"string" enum:"BucketVersioningStatus"`
  5295. }
  5296. // String returns the string representation
  5297. func (s GetBucketVersioningOutput) String() string {
  5298. return awsutil.Prettify(s)
  5299. }
  5300. // GoString returns the string representation
  5301. func (s GetBucketVersioningOutput) GoString() string {
  5302. return s.String()
  5303. }
  5304. type GetBucketWebsiteInput struct {
  5305. _ struct{} `type:"structure"`
  5306. // Bucket is a required field
  5307. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5308. }
  5309. // String returns the string representation
  5310. func (s GetBucketWebsiteInput) String() string {
  5311. return awsutil.Prettify(s)
  5312. }
  5313. // GoString returns the string representation
  5314. func (s GetBucketWebsiteInput) GoString() string {
  5315. return s.String()
  5316. }
  5317. // Validate inspects the fields of the type to determine if they are valid.
  5318. func (s *GetBucketWebsiteInput) Validate() error {
  5319. invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"}
  5320. if s.Bucket == nil {
  5321. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5322. }
  5323. if invalidParams.Len() > 0 {
  5324. return invalidParams
  5325. }
  5326. return nil
  5327. }
  5328. type GetBucketWebsiteOutput struct {
  5329. _ struct{} `type:"structure"`
  5330. ErrorDocument *ErrorDocument `type:"structure"`
  5331. IndexDocument *IndexDocument `type:"structure"`
  5332. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  5333. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  5334. }
  5335. // String returns the string representation
  5336. func (s GetBucketWebsiteOutput) String() string {
  5337. return awsutil.Prettify(s)
  5338. }
  5339. // GoString returns the string representation
  5340. func (s GetBucketWebsiteOutput) GoString() string {
  5341. return s.String()
  5342. }
  5343. type GetObjectAclInput struct {
  5344. _ struct{} `type:"structure"`
  5345. // Bucket is a required field
  5346. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5347. // Key is a required field
  5348. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  5349. // Confirms that the requester knows that she or he will be charged for the
  5350. // request. Bucket owners need not specify this parameter in their requests.
  5351. // Documentation on downloading objects from requester pays buckets can be found
  5352. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  5353. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  5354. // VersionId used to reference a specific version of the object.
  5355. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  5356. }
  5357. // String returns the string representation
  5358. func (s GetObjectAclInput) String() string {
  5359. return awsutil.Prettify(s)
  5360. }
  5361. // GoString returns the string representation
  5362. func (s GetObjectAclInput) GoString() string {
  5363. return s.String()
  5364. }
  5365. // Validate inspects the fields of the type to determine if they are valid.
  5366. func (s *GetObjectAclInput) Validate() error {
  5367. invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"}
  5368. if s.Bucket == nil {
  5369. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5370. }
  5371. if s.Key == nil {
  5372. invalidParams.Add(request.NewErrParamRequired("Key"))
  5373. }
  5374. if s.Key != nil && len(*s.Key) < 1 {
  5375. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  5376. }
  5377. if invalidParams.Len() > 0 {
  5378. return invalidParams
  5379. }
  5380. return nil
  5381. }
  5382. type GetObjectAclOutput struct {
  5383. _ struct{} `type:"structure"`
  5384. // A list of grants.
  5385. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  5386. Owner *Owner `type:"structure"`
  5387. // If present, indicates that the requester was successfully charged for the
  5388. // request.
  5389. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  5390. }
  5391. // String returns the string representation
  5392. func (s GetObjectAclOutput) String() string {
  5393. return awsutil.Prettify(s)
  5394. }
  5395. // GoString returns the string representation
  5396. func (s GetObjectAclOutput) GoString() string {
  5397. return s.String()
  5398. }
  5399. type GetObjectInput struct {
  5400. _ struct{} `type:"structure"`
  5401. // Bucket is a required field
  5402. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5403. // Return the object only if its entity tag (ETag) is the same as the one specified,
  5404. // otherwise return a 412 (precondition failed).
  5405. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  5406. // Return the object only if it has been modified since the specified time,
  5407. // otherwise return a 304 (not modified).
  5408. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"`
  5409. // Return the object only if its entity tag (ETag) is different from the one
  5410. // specified, otherwise return a 304 (not modified).
  5411. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  5412. // Return the object only if it has not been modified since the specified time,
  5413. // otherwise return a 412 (precondition failed).
  5414. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"`
  5415. // Key is a required field
  5416. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  5417. // Part number of the object being read. This is a positive integer between
  5418. // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified.
  5419. // Useful for downloading just a part of an object.
  5420. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  5421. // Downloads the specified range bytes of an object. For more information about
  5422. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  5423. Range *string `location:"header" locationName:"Range" type:"string"`
  5424. // Confirms that the requester knows that she or he will be charged for the
  5425. // request. Bucket owners need not specify this parameter in their requests.
  5426. // Documentation on downloading objects from requester pays buckets can be found
  5427. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  5428. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  5429. // Sets the Cache-Control header of the response.
  5430. ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
  5431. // Sets the Content-Disposition header of the response
  5432. ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
  5433. // Sets the Content-Encoding header of the response.
  5434. ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
  5435. // Sets the Content-Language header of the response.
  5436. ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
  5437. // Sets the Content-Type header of the response.
  5438. ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
  5439. // Sets the Expires header of the response.
  5440. ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"iso8601"`
  5441. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  5442. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  5443. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  5444. // data. This value is used to store the object and then it is discarded; Amazon
  5445. // does not store the encryption key. The key must be appropriate for use with
  5446. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  5447. // header.
  5448. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  5449. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  5450. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  5451. // key was transmitted without error.
  5452. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  5453. // VersionId used to reference a specific version of the object.
  5454. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  5455. }
  5456. // String returns the string representation
  5457. func (s GetObjectInput) String() string {
  5458. return awsutil.Prettify(s)
  5459. }
  5460. // GoString returns the string representation
  5461. func (s GetObjectInput) GoString() string {
  5462. return s.String()
  5463. }
  5464. // Validate inspects the fields of the type to determine if they are valid.
  5465. func (s *GetObjectInput) Validate() error {
  5466. invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"}
  5467. if s.Bucket == nil {
  5468. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5469. }
  5470. if s.Key == nil {
  5471. invalidParams.Add(request.NewErrParamRequired("Key"))
  5472. }
  5473. if s.Key != nil && len(*s.Key) < 1 {
  5474. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  5475. }
  5476. if invalidParams.Len() > 0 {
  5477. return invalidParams
  5478. }
  5479. return nil
  5480. }
  5481. type GetObjectOutput struct {
  5482. _ struct{} `type:"structure" payload:"Body"`
  5483. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  5484. // Object data.
  5485. Body io.ReadCloser `type:"blob"`
  5486. // Specifies caching behavior along the request/reply chain.
  5487. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  5488. // Specifies presentational information for the object.
  5489. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  5490. // Specifies what content encodings have been applied to the object and thus
  5491. // what decoding mechanisms must be applied to obtain the media-type referenced
  5492. // by the Content-Type header field.
  5493. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  5494. // The language the content is in.
  5495. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  5496. // Size of the body in bytes.
  5497. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  5498. // The portion of the object returned in the response.
  5499. ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
  5500. // A standard MIME type describing the format of the object data.
  5501. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  5502. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  5503. // Marker. If false, this response header does not appear in the response.
  5504. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  5505. // An ETag is an opaque identifier assigned by a web server to a specific version
  5506. // of a resource found at a URL
  5507. ETag *string `location:"header" locationName:"ETag" type:"string"`
  5508. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  5509. // includes this header. It includes the expiry-date and rule-id key value pairs
  5510. // providing object expiration information. The value of the rule-id is URL
  5511. // encoded.
  5512. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  5513. // The date and time at which the object is no longer cacheable.
  5514. Expires *string `location:"header" locationName:"Expires" type:"string"`
  5515. // Last modified date of the object
  5516. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
  5517. // A map of metadata to store with the object in S3.
  5518. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  5519. // This is set to the number of metadata entries not returned in x-amz-meta
  5520. // headers. This can happen if you create metadata using an API like SOAP that
  5521. // supports more flexible metadata than the REST API. For example, using SOAP,
  5522. // you can create metadata whose values are not legal HTTP headers.
  5523. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  5524. // The count of parts this object has.
  5525. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  5526. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  5527. // If present, indicates that the requester was successfully charged for the
  5528. // request.
  5529. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  5530. // Provides information about object restoration operation and expiration time
  5531. // of the restored object copy.
  5532. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  5533. // If server-side encryption with a customer-provided encryption key was requested,
  5534. // the response will include this header confirming the encryption algorithm
  5535. // used.
  5536. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  5537. // If server-side encryption with a customer-provided encryption key was requested,
  5538. // the response will include this header to provide round trip message integrity
  5539. // verification of the customer-provided encryption key.
  5540. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  5541. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  5542. // encryption key that was used for the object.
  5543. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  5544. // The Server-side encryption algorithm used when storing this object in S3
  5545. // (e.g., AES256, aws:kms).
  5546. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  5547. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  5548. // Version of the object.
  5549. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  5550. // If the bucket is configured as a website, redirects requests for this object
  5551. // to another object in the same bucket or to an external URL. Amazon S3 stores
  5552. // the value of this header in the object metadata.
  5553. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  5554. }
  5555. // String returns the string representation
  5556. func (s GetObjectOutput) String() string {
  5557. return awsutil.Prettify(s)
  5558. }
  5559. // GoString returns the string representation
  5560. func (s GetObjectOutput) GoString() string {
  5561. return s.String()
  5562. }
  5563. type GetObjectTorrentInput struct {
  5564. _ struct{} `type:"structure"`
  5565. // Bucket is a required field
  5566. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5567. // Key is a required field
  5568. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  5569. // Confirms that the requester knows that she or he will be charged for the
  5570. // request. Bucket owners need not specify this parameter in their requests.
  5571. // Documentation on downloading objects from requester pays buckets can be found
  5572. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  5573. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  5574. }
  5575. // String returns the string representation
  5576. func (s GetObjectTorrentInput) String() string {
  5577. return awsutil.Prettify(s)
  5578. }
  5579. // GoString returns the string representation
  5580. func (s GetObjectTorrentInput) GoString() string {
  5581. return s.String()
  5582. }
  5583. // Validate inspects the fields of the type to determine if they are valid.
  5584. func (s *GetObjectTorrentInput) Validate() error {
  5585. invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"}
  5586. if s.Bucket == nil {
  5587. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5588. }
  5589. if s.Key == nil {
  5590. invalidParams.Add(request.NewErrParamRequired("Key"))
  5591. }
  5592. if s.Key != nil && len(*s.Key) < 1 {
  5593. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  5594. }
  5595. if invalidParams.Len() > 0 {
  5596. return invalidParams
  5597. }
  5598. return nil
  5599. }
  5600. type GetObjectTorrentOutput struct {
  5601. _ struct{} `type:"structure" payload:"Body"`
  5602. Body io.ReadCloser `type:"blob"`
  5603. // If present, indicates that the requester was successfully charged for the
  5604. // request.
  5605. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  5606. }
  5607. // String returns the string representation
  5608. func (s GetObjectTorrentOutput) String() string {
  5609. return awsutil.Prettify(s)
  5610. }
  5611. // GoString returns the string representation
  5612. func (s GetObjectTorrentOutput) GoString() string {
  5613. return s.String()
  5614. }
  5615. type Grant struct {
  5616. _ struct{} `type:"structure"`
  5617. Grantee *Grantee `type:"structure"`
  5618. // Specifies the permission given to the grantee.
  5619. Permission *string `type:"string" enum:"Permission"`
  5620. }
  5621. // String returns the string representation
  5622. func (s Grant) String() string {
  5623. return awsutil.Prettify(s)
  5624. }
  5625. // GoString returns the string representation
  5626. func (s Grant) GoString() string {
  5627. return s.String()
  5628. }
  5629. // Validate inspects the fields of the type to determine if they are valid.
  5630. func (s *Grant) Validate() error {
  5631. invalidParams := request.ErrInvalidParams{Context: "Grant"}
  5632. if s.Grantee != nil {
  5633. if err := s.Grantee.Validate(); err != nil {
  5634. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  5635. }
  5636. }
  5637. if invalidParams.Len() > 0 {
  5638. return invalidParams
  5639. }
  5640. return nil
  5641. }
  5642. type Grantee struct {
  5643. _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  5644. // Screen name of the grantee.
  5645. DisplayName *string `type:"string"`
  5646. // Email address of the grantee.
  5647. EmailAddress *string `type:"string"`
  5648. // The canonical user ID of the grantee.
  5649. ID *string `type:"string"`
  5650. // Type of grantee
  5651. //
  5652. // Type is a required field
  5653. Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`
  5654. // URI of the grantee group.
  5655. URI *string `type:"string"`
  5656. }
  5657. // String returns the string representation
  5658. func (s Grantee) String() string {
  5659. return awsutil.Prettify(s)
  5660. }
  5661. // GoString returns the string representation
  5662. func (s Grantee) GoString() string {
  5663. return s.String()
  5664. }
  5665. // Validate inspects the fields of the type to determine if they are valid.
  5666. func (s *Grantee) Validate() error {
  5667. invalidParams := request.ErrInvalidParams{Context: "Grantee"}
  5668. if s.Type == nil {
  5669. invalidParams.Add(request.NewErrParamRequired("Type"))
  5670. }
  5671. if invalidParams.Len() > 0 {
  5672. return invalidParams
  5673. }
  5674. return nil
  5675. }
  5676. type HeadBucketInput struct {
  5677. _ struct{} `type:"structure"`
  5678. // Bucket is a required field
  5679. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5680. }
  5681. // String returns the string representation
  5682. func (s HeadBucketInput) String() string {
  5683. return awsutil.Prettify(s)
  5684. }
  5685. // GoString returns the string representation
  5686. func (s HeadBucketInput) GoString() string {
  5687. return s.String()
  5688. }
  5689. // Validate inspects the fields of the type to determine if they are valid.
  5690. func (s *HeadBucketInput) Validate() error {
  5691. invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"}
  5692. if s.Bucket == nil {
  5693. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5694. }
  5695. if invalidParams.Len() > 0 {
  5696. return invalidParams
  5697. }
  5698. return nil
  5699. }
  5700. type HeadBucketOutput struct {
  5701. _ struct{} `type:"structure"`
  5702. }
  5703. // String returns the string representation
  5704. func (s HeadBucketOutput) String() string {
  5705. return awsutil.Prettify(s)
  5706. }
  5707. // GoString returns the string representation
  5708. func (s HeadBucketOutput) GoString() string {
  5709. return s.String()
  5710. }
  5711. type HeadObjectInput struct {
  5712. _ struct{} `type:"structure"`
  5713. // Bucket is a required field
  5714. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5715. // Return the object only if its entity tag (ETag) is the same as the one specified,
  5716. // otherwise return a 412 (precondition failed).
  5717. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  5718. // Return the object only if it has been modified since the specified time,
  5719. // otherwise return a 304 (not modified).
  5720. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"`
  5721. // Return the object only if its entity tag (ETag) is different from the one
  5722. // specified, otherwise return a 304 (not modified).
  5723. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  5724. // Return the object only if it has not been modified since the specified time,
  5725. // otherwise return a 412 (precondition failed).
  5726. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"`
  5727. // Key is a required field
  5728. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  5729. // Part number of the object being read. This is a positive integer between
  5730. // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
  5731. // Useful querying about the size of the part and the number of parts in this
  5732. // object.
  5733. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  5734. // Downloads the specified range bytes of an object. For more information about
  5735. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  5736. Range *string `location:"header" locationName:"Range" type:"string"`
  5737. // Confirms that the requester knows that she or he will be charged for the
  5738. // request. Bucket owners need not specify this parameter in their requests.
  5739. // Documentation on downloading objects from requester pays buckets can be found
  5740. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  5741. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  5742. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  5743. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  5744. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  5745. // data. This value is used to store the object and then it is discarded; Amazon
  5746. // does not store the encryption key. The key must be appropriate for use with
  5747. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  5748. // header.
  5749. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  5750. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  5751. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  5752. // key was transmitted without error.
  5753. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  5754. // VersionId used to reference a specific version of the object.
  5755. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  5756. }
  5757. // String returns the string representation
  5758. func (s HeadObjectInput) String() string {
  5759. return awsutil.Prettify(s)
  5760. }
  5761. // GoString returns the string representation
  5762. func (s HeadObjectInput) GoString() string {
  5763. return s.String()
  5764. }
  5765. // Validate inspects the fields of the type to determine if they are valid.
  5766. func (s *HeadObjectInput) Validate() error {
  5767. invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"}
  5768. if s.Bucket == nil {
  5769. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5770. }
  5771. if s.Key == nil {
  5772. invalidParams.Add(request.NewErrParamRequired("Key"))
  5773. }
  5774. if s.Key != nil && len(*s.Key) < 1 {
  5775. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  5776. }
  5777. if invalidParams.Len() > 0 {
  5778. return invalidParams
  5779. }
  5780. return nil
  5781. }
  5782. type HeadObjectOutput struct {
  5783. _ struct{} `type:"structure"`
  5784. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  5785. // Specifies caching behavior along the request/reply chain.
  5786. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  5787. // Specifies presentational information for the object.
  5788. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  5789. // Specifies what content encodings have been applied to the object and thus
  5790. // what decoding mechanisms must be applied to obtain the media-type referenced
  5791. // by the Content-Type header field.
  5792. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  5793. // The language the content is in.
  5794. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  5795. // Size of the body in bytes.
  5796. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  5797. // A standard MIME type describing the format of the object data.
  5798. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  5799. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  5800. // Marker. If false, this response header does not appear in the response.
  5801. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  5802. // An ETag is an opaque identifier assigned by a web server to a specific version
  5803. // of a resource found at a URL
  5804. ETag *string `location:"header" locationName:"ETag" type:"string"`
  5805. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  5806. // includes this header. It includes the expiry-date and rule-id key value pairs
  5807. // providing object expiration information. The value of the rule-id is URL
  5808. // encoded.
  5809. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  5810. // The date and time at which the object is no longer cacheable.
  5811. Expires *string `location:"header" locationName:"Expires" type:"string"`
  5812. // Last modified date of the object
  5813. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
  5814. // A map of metadata to store with the object in S3.
  5815. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  5816. // This is set to the number of metadata entries not returned in x-amz-meta
  5817. // headers. This can happen if you create metadata using an API like SOAP that
  5818. // supports more flexible metadata than the REST API. For example, using SOAP,
  5819. // you can create metadata whose values are not legal HTTP headers.
  5820. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  5821. // The count of parts this object has.
  5822. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  5823. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  5824. // If present, indicates that the requester was successfully charged for the
  5825. // request.
  5826. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  5827. // Provides information about object restoration operation and expiration time
  5828. // of the restored object copy.
  5829. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  5830. // If server-side encryption with a customer-provided encryption key was requested,
  5831. // the response will include this header confirming the encryption algorithm
  5832. // used.
  5833. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  5834. // If server-side encryption with a customer-provided encryption key was requested,
  5835. // the response will include this header to provide round trip message integrity
  5836. // verification of the customer-provided encryption key.
  5837. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  5838. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  5839. // encryption key that was used for the object.
  5840. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  5841. // The Server-side encryption algorithm used when storing this object in S3
  5842. // (e.g., AES256, aws:kms).
  5843. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  5844. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  5845. // Version of the object.
  5846. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  5847. // If the bucket is configured as a website, redirects requests for this object
  5848. // to another object in the same bucket or to an external URL. Amazon S3 stores
  5849. // the value of this header in the object metadata.
  5850. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  5851. }
  5852. // String returns the string representation
  5853. func (s HeadObjectOutput) String() string {
  5854. return awsutil.Prettify(s)
  5855. }
  5856. // GoString returns the string representation
  5857. func (s HeadObjectOutput) GoString() string {
  5858. return s.String()
  5859. }
  5860. type IndexDocument struct {
  5861. _ struct{} `type:"structure"`
  5862. // A suffix that is appended to a request that is for a directory on the website
  5863. // endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/
  5864. // the data that is returned will be for the object with the key name images/index.html)
  5865. // The suffix must not be empty and must not include a slash character.
  5866. //
  5867. // Suffix is a required field
  5868. Suffix *string `type:"string" required:"true"`
  5869. }
  5870. // String returns the string representation
  5871. func (s IndexDocument) String() string {
  5872. return awsutil.Prettify(s)
  5873. }
  5874. // GoString returns the string representation
  5875. func (s IndexDocument) GoString() string {
  5876. return s.String()
  5877. }
  5878. // Validate inspects the fields of the type to determine if they are valid.
  5879. func (s *IndexDocument) Validate() error {
  5880. invalidParams := request.ErrInvalidParams{Context: "IndexDocument"}
  5881. if s.Suffix == nil {
  5882. invalidParams.Add(request.NewErrParamRequired("Suffix"))
  5883. }
  5884. if invalidParams.Len() > 0 {
  5885. return invalidParams
  5886. }
  5887. return nil
  5888. }
  5889. type Initiator struct {
  5890. _ struct{} `type:"structure"`
  5891. // Name of the Principal.
  5892. DisplayName *string `type:"string"`
  5893. // If the principal is an AWS account, it provides the Canonical User ID. If
  5894. // the principal is an IAM User, it provides a user ARN value.
  5895. ID *string `type:"string"`
  5896. }
  5897. // String returns the string representation
  5898. func (s Initiator) String() string {
  5899. return awsutil.Prettify(s)
  5900. }
  5901. // GoString returns the string representation
  5902. func (s Initiator) GoString() string {
  5903. return s.String()
  5904. }
  5905. // Container for object key name prefix and suffix filtering rules.
  5906. type KeyFilter struct {
  5907. _ struct{} `type:"structure"`
  5908. // A list of containers for key value pair that defines the criteria for the
  5909. // filter rule.
  5910. FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"`
  5911. }
  5912. // String returns the string representation
  5913. func (s KeyFilter) String() string {
  5914. return awsutil.Prettify(s)
  5915. }
  5916. // GoString returns the string representation
  5917. func (s KeyFilter) GoString() string {
  5918. return s.String()
  5919. }
  5920. // Container for specifying the AWS Lambda notification configuration.
  5921. type LambdaFunctionConfiguration struct {
  5922. _ struct{} `type:"structure"`
  5923. // Events is a required field
  5924. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  5925. // Container for object key name filtering rules. For information about key
  5926. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  5927. Filter *NotificationConfigurationFilter `type:"structure"`
  5928. // Optional unique identifier for configurations in a notification configuration.
  5929. // If you don't provide one, Amazon S3 will assign an ID.
  5930. Id *string `type:"string"`
  5931. // Lambda cloud function ARN that Amazon S3 can invoke when it detects events
  5932. // of the specified type.
  5933. //
  5934. // LambdaFunctionArn is a required field
  5935. LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"`
  5936. }
  5937. // String returns the string representation
  5938. func (s LambdaFunctionConfiguration) String() string {
  5939. return awsutil.Prettify(s)
  5940. }
  5941. // GoString returns the string representation
  5942. func (s LambdaFunctionConfiguration) GoString() string {
  5943. return s.String()
  5944. }
  5945. // Validate inspects the fields of the type to determine if they are valid.
  5946. func (s *LambdaFunctionConfiguration) Validate() error {
  5947. invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"}
  5948. if s.Events == nil {
  5949. invalidParams.Add(request.NewErrParamRequired("Events"))
  5950. }
  5951. if s.LambdaFunctionArn == nil {
  5952. invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn"))
  5953. }
  5954. if invalidParams.Len() > 0 {
  5955. return invalidParams
  5956. }
  5957. return nil
  5958. }
  5959. type LifecycleConfiguration struct {
  5960. _ struct{} `type:"structure"`
  5961. // Rules is a required field
  5962. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  5963. }
  5964. // String returns the string representation
  5965. func (s LifecycleConfiguration) String() string {
  5966. return awsutil.Prettify(s)
  5967. }
  5968. // GoString returns the string representation
  5969. func (s LifecycleConfiguration) GoString() string {
  5970. return s.String()
  5971. }
  5972. // Validate inspects the fields of the type to determine if they are valid.
  5973. func (s *LifecycleConfiguration) Validate() error {
  5974. invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"}
  5975. if s.Rules == nil {
  5976. invalidParams.Add(request.NewErrParamRequired("Rules"))
  5977. }
  5978. if s.Rules != nil {
  5979. for i, v := range s.Rules {
  5980. if v == nil {
  5981. continue
  5982. }
  5983. if err := v.Validate(); err != nil {
  5984. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  5985. }
  5986. }
  5987. }
  5988. if invalidParams.Len() > 0 {
  5989. return invalidParams
  5990. }
  5991. return nil
  5992. }
  5993. type LifecycleExpiration struct {
  5994. _ struct{} `type:"structure"`
  5995. // Indicates at what date the object is to be moved or deleted. Should be in
  5996. // GMT ISO 8601 Format.
  5997. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  5998. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  5999. // The value must be a non-zero positive integer.
  6000. Days *int64 `type:"integer"`
  6001. // Indicates whether Amazon S3 will remove a delete marker with no noncurrent
  6002. // versions. If set to true, the delete marker will be expired; if set to false
  6003. // the policy takes no action. This cannot be specified with Days or Date in
  6004. // a Lifecycle Expiration Policy.
  6005. ExpiredObjectDeleteMarker *bool `type:"boolean"`
  6006. }
  6007. // String returns the string representation
  6008. func (s LifecycleExpiration) String() string {
  6009. return awsutil.Prettify(s)
  6010. }
  6011. // GoString returns the string representation
  6012. func (s LifecycleExpiration) GoString() string {
  6013. return s.String()
  6014. }
  6015. type LifecycleRule struct {
  6016. _ struct{} `type:"structure"`
  6017. // Specifies the days since the initiation of an Incomplete Multipart Upload
  6018. // that Lifecycle will wait before permanently removing all parts of the upload.
  6019. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  6020. Expiration *LifecycleExpiration `type:"structure"`
  6021. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  6022. ID *string `type:"string"`
  6023. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  6024. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  6025. // configuration action on a bucket that has versioning enabled (or suspended)
  6026. // to request that Amazon S3 delete noncurrent object versions at a specific
  6027. // period in the object's lifetime.
  6028. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  6029. NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"`
  6030. // Prefix identifying one or more objects to which the rule applies.
  6031. //
  6032. // Prefix is a required field
  6033. Prefix *string `type:"string" required:"true"`
  6034. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  6035. // is not currently being applied.
  6036. //
  6037. // Status is a required field
  6038. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  6039. Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"`
  6040. }
  6041. // String returns the string representation
  6042. func (s LifecycleRule) String() string {
  6043. return awsutil.Prettify(s)
  6044. }
  6045. // GoString returns the string representation
  6046. func (s LifecycleRule) GoString() string {
  6047. return s.String()
  6048. }
  6049. // Validate inspects the fields of the type to determine if they are valid.
  6050. func (s *LifecycleRule) Validate() error {
  6051. invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"}
  6052. if s.Prefix == nil {
  6053. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  6054. }
  6055. if s.Status == nil {
  6056. invalidParams.Add(request.NewErrParamRequired("Status"))
  6057. }
  6058. if invalidParams.Len() > 0 {
  6059. return invalidParams
  6060. }
  6061. return nil
  6062. }
  6063. type ListBucketsInput struct {
  6064. _ struct{} `type:"structure"`
  6065. }
  6066. // String returns the string representation
  6067. func (s ListBucketsInput) String() string {
  6068. return awsutil.Prettify(s)
  6069. }
  6070. // GoString returns the string representation
  6071. func (s ListBucketsInput) GoString() string {
  6072. return s.String()
  6073. }
  6074. type ListBucketsOutput struct {
  6075. _ struct{} `type:"structure"`
  6076. Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
  6077. Owner *Owner `type:"structure"`
  6078. }
  6079. // String returns the string representation
  6080. func (s ListBucketsOutput) String() string {
  6081. return awsutil.Prettify(s)
  6082. }
  6083. // GoString returns the string representation
  6084. func (s ListBucketsOutput) GoString() string {
  6085. return s.String()
  6086. }
  6087. type ListMultipartUploadsInput struct {
  6088. _ struct{} `type:"structure"`
  6089. // Bucket is a required field
  6090. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6091. // Character you use to group keys.
  6092. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  6093. // Requests Amazon S3 to encode the object keys in the response and specifies
  6094. // the encoding method to use. An object key may contain any Unicode character;
  6095. // however, XML 1.0 parser cannot parse some characters, such as characters
  6096. // with an ASCII value from 0 to 10. For characters that are not supported in
  6097. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  6098. // keys in the response.
  6099. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  6100. // Together with upload-id-marker, this parameter specifies the multipart upload
  6101. // after which listing should begin.
  6102. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  6103. // Sets the maximum number of multipart uploads, from 1 to 1,000, to return
  6104. // in the response body. 1,000 is the maximum number of uploads that can be
  6105. // returned in a response.
  6106. MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
  6107. // Lists in-progress uploads only for those keys that begin with the specified
  6108. // prefix.
  6109. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  6110. // Together with key-marker, specifies the multipart upload after which listing
  6111. // should begin. If key-marker is not specified, the upload-id-marker parameter
  6112. // is ignored.
  6113. UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
  6114. }
  6115. // String returns the string representation
  6116. func (s ListMultipartUploadsInput) String() string {
  6117. return awsutil.Prettify(s)
  6118. }
  6119. // GoString returns the string representation
  6120. func (s ListMultipartUploadsInput) GoString() string {
  6121. return s.String()
  6122. }
  6123. // Validate inspects the fields of the type to determine if they are valid.
  6124. func (s *ListMultipartUploadsInput) Validate() error {
  6125. invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"}
  6126. if s.Bucket == nil {
  6127. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6128. }
  6129. if invalidParams.Len() > 0 {
  6130. return invalidParams
  6131. }
  6132. return nil
  6133. }
  6134. type ListMultipartUploadsOutput struct {
  6135. _ struct{} `type:"structure"`
  6136. // Name of the bucket to which the multipart upload was initiated.
  6137. Bucket *string `type:"string"`
  6138. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  6139. Delimiter *string `type:"string"`
  6140. // Encoding type used by Amazon S3 to encode object keys in the response.
  6141. EncodingType *string `type:"string" enum:"EncodingType"`
  6142. // Indicates whether the returned list of multipart uploads is truncated. A
  6143. // value of true indicates that the list was truncated. The list can be truncated
  6144. // if the number of multipart uploads exceeds the limit allowed or specified
  6145. // by max uploads.
  6146. IsTruncated *bool `type:"boolean"`
  6147. // The key at or after which the listing began.
  6148. KeyMarker *string `type:"string"`
  6149. // Maximum number of multipart uploads that could have been included in the
  6150. // response.
  6151. MaxUploads *int64 `type:"integer"`
  6152. // When a list is truncated, this element specifies the value that should be
  6153. // used for the key-marker request parameter in a subsequent request.
  6154. NextKeyMarker *string `type:"string"`
  6155. // When a list is truncated, this element specifies the value that should be
  6156. // used for the upload-id-marker request parameter in a subsequent request.
  6157. NextUploadIdMarker *string `type:"string"`
  6158. // When a prefix is provided in the request, this field contains the specified
  6159. // prefix. The result contains only keys starting with the specified prefix.
  6160. Prefix *string `type:"string"`
  6161. // Upload ID after which listing began.
  6162. UploadIdMarker *string `type:"string"`
  6163. Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
  6164. }
  6165. // String returns the string representation
  6166. func (s ListMultipartUploadsOutput) String() string {
  6167. return awsutil.Prettify(s)
  6168. }
  6169. // GoString returns the string representation
  6170. func (s ListMultipartUploadsOutput) GoString() string {
  6171. return s.String()
  6172. }
  6173. type ListObjectVersionsInput struct {
  6174. _ struct{} `type:"structure"`
  6175. // Bucket is a required field
  6176. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6177. // A delimiter is a character you use to group keys.
  6178. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  6179. // Requests Amazon S3 to encode the object keys in the response and specifies
  6180. // the encoding method to use. An object key may contain any Unicode character;
  6181. // however, XML 1.0 parser cannot parse some characters, such as characters
  6182. // with an ASCII value from 0 to 10. For characters that are not supported in
  6183. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  6184. // keys in the response.
  6185. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  6186. // Specifies the key to start with when listing objects in a bucket.
  6187. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  6188. // Sets the maximum number of keys returned in the response. The response might
  6189. // contain fewer keys but will never contain more.
  6190. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  6191. // Limits the response to keys that begin with the specified prefix.
  6192. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  6193. // Specifies the object version you want to start listing from.
  6194. VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"`
  6195. }
  6196. // String returns the string representation
  6197. func (s ListObjectVersionsInput) String() string {
  6198. return awsutil.Prettify(s)
  6199. }
  6200. // GoString returns the string representation
  6201. func (s ListObjectVersionsInput) GoString() string {
  6202. return s.String()
  6203. }
  6204. // Validate inspects the fields of the type to determine if they are valid.
  6205. func (s *ListObjectVersionsInput) Validate() error {
  6206. invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"}
  6207. if s.Bucket == nil {
  6208. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6209. }
  6210. if invalidParams.Len() > 0 {
  6211. return invalidParams
  6212. }
  6213. return nil
  6214. }
  6215. type ListObjectVersionsOutput struct {
  6216. _ struct{} `type:"structure"`
  6217. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  6218. DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"`
  6219. Delimiter *string `type:"string"`
  6220. // Encoding type used by Amazon S3 to encode object keys in the response.
  6221. EncodingType *string `type:"string" enum:"EncodingType"`
  6222. // A flag that indicates whether or not Amazon S3 returned all of the results
  6223. // that satisfied the search criteria. If your results were truncated, you can
  6224. // make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
  6225. // response parameters as a starting place in another request to return the
  6226. // rest of the results.
  6227. IsTruncated *bool `type:"boolean"`
  6228. // Marks the last Key returned in a truncated response.
  6229. KeyMarker *string `type:"string"`
  6230. MaxKeys *int64 `type:"integer"`
  6231. Name *string `type:"string"`
  6232. // Use this value for the key marker request parameter in a subsequent request.
  6233. NextKeyMarker *string `type:"string"`
  6234. // Use this value for the next version id marker parameter in a subsequent request.
  6235. NextVersionIdMarker *string `type:"string"`
  6236. Prefix *string `type:"string"`
  6237. VersionIdMarker *string `type:"string"`
  6238. Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"`
  6239. }
  6240. // String returns the string representation
  6241. func (s ListObjectVersionsOutput) String() string {
  6242. return awsutil.Prettify(s)
  6243. }
  6244. // GoString returns the string representation
  6245. func (s ListObjectVersionsOutput) GoString() string {
  6246. return s.String()
  6247. }
  6248. type ListObjectsInput struct {
  6249. _ struct{} `type:"structure"`
  6250. // Bucket is a required field
  6251. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6252. // A delimiter is a character you use to group keys.
  6253. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  6254. // Requests Amazon S3 to encode the object keys in the response and specifies
  6255. // the encoding method to use. An object key may contain any Unicode character;
  6256. // however, XML 1.0 parser cannot parse some characters, such as characters
  6257. // with an ASCII value from 0 to 10. For characters that are not supported in
  6258. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  6259. // keys in the response.
  6260. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  6261. // Specifies the key to start with when listing objects in a bucket.
  6262. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  6263. // Sets the maximum number of keys returned in the response. The response might
  6264. // contain fewer keys but will never contain more.
  6265. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  6266. // Limits the response to keys that begin with the specified prefix.
  6267. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  6268. // Confirms that the requester knows that she or he will be charged for the
  6269. // list objects request. Bucket owners need not specify this parameter in their
  6270. // requests.
  6271. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6272. }
  6273. // String returns the string representation
  6274. func (s ListObjectsInput) String() string {
  6275. return awsutil.Prettify(s)
  6276. }
  6277. // GoString returns the string representation
  6278. func (s ListObjectsInput) GoString() string {
  6279. return s.String()
  6280. }
  6281. // Validate inspects the fields of the type to determine if they are valid.
  6282. func (s *ListObjectsInput) Validate() error {
  6283. invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"}
  6284. if s.Bucket == nil {
  6285. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6286. }
  6287. if invalidParams.Len() > 0 {
  6288. return invalidParams
  6289. }
  6290. return nil
  6291. }
  6292. type ListObjectsOutput struct {
  6293. _ struct{} `type:"structure"`
  6294. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  6295. Contents []*Object `type:"list" flattened:"true"`
  6296. Delimiter *string `type:"string"`
  6297. // Encoding type used by Amazon S3 to encode object keys in the response.
  6298. EncodingType *string `type:"string" enum:"EncodingType"`
  6299. // A flag that indicates whether or not Amazon S3 returned all of the results
  6300. // that satisfied the search criteria.
  6301. IsTruncated *bool `type:"boolean"`
  6302. Marker *string `type:"string"`
  6303. MaxKeys *int64 `type:"integer"`
  6304. Name *string `type:"string"`
  6305. // When response is truncated (the IsTruncated element value in the response
  6306. // is true), you can use the key name in this field as marker in the subsequent
  6307. // request to get next set of objects. Amazon S3 lists objects in alphabetical
  6308. // order Note: This element is returned only if you have delimiter request parameter
  6309. // specified. If response does not include the NextMaker and it is truncated,
  6310. // you can use the value of the last Key in the response as the marker in the
  6311. // subsequent request to get the next set of object keys.
  6312. NextMarker *string `type:"string"`
  6313. Prefix *string `type:"string"`
  6314. }
  6315. // String returns the string representation
  6316. func (s ListObjectsOutput) String() string {
  6317. return awsutil.Prettify(s)
  6318. }
  6319. // GoString returns the string representation
  6320. func (s ListObjectsOutput) GoString() string {
  6321. return s.String()
  6322. }
  6323. type ListObjectsV2Input struct {
  6324. _ struct{} `type:"structure"`
  6325. // Name of the bucket to list.
  6326. //
  6327. // Bucket is a required field
  6328. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6329. // ContinuationToken indicates Amazon S3 that the list is being continued on
  6330. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  6331. // key
  6332. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  6333. // A delimiter is a character you use to group keys.
  6334. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  6335. // Encoding type used by Amazon S3 to encode object keys in the response.
  6336. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  6337. // The owner field is not present in listV2 by default, if you want to return
  6338. // owner field with each key in the result then set the fetch owner field to
  6339. // true
  6340. FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`
  6341. // Sets the maximum number of keys returned in the response. The response might
  6342. // contain fewer keys but will never contain more.
  6343. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  6344. // Limits the response to keys that begin with the specified prefix.
  6345. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  6346. // Confirms that the requester knows that she or he will be charged for the
  6347. // list objects request in V2 style. Bucket owners need not specify this parameter
  6348. // in their requests.
  6349. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6350. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  6351. // listing after this specified key. StartAfter can be any key in the bucket
  6352. StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
  6353. }
  6354. // String returns the string representation
  6355. func (s ListObjectsV2Input) String() string {
  6356. return awsutil.Prettify(s)
  6357. }
  6358. // GoString returns the string representation
  6359. func (s ListObjectsV2Input) GoString() string {
  6360. return s.String()
  6361. }
  6362. // Validate inspects the fields of the type to determine if they are valid.
  6363. func (s *ListObjectsV2Input) Validate() error {
  6364. invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"}
  6365. if s.Bucket == nil {
  6366. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6367. }
  6368. if invalidParams.Len() > 0 {
  6369. return invalidParams
  6370. }
  6371. return nil
  6372. }
  6373. type ListObjectsV2Output struct {
  6374. _ struct{} `type:"structure"`
  6375. // CommonPrefixes contains all (if there are any) keys between Prefix and the
  6376. // next occurrence of the string specified by delimiter
  6377. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  6378. // Metadata about each object returned.
  6379. Contents []*Object `type:"list" flattened:"true"`
  6380. // ContinuationToken indicates Amazon S3 that the list is being continued on
  6381. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  6382. // key
  6383. ContinuationToken *string `type:"string"`
  6384. // A delimiter is a character you use to group keys.
  6385. Delimiter *string `type:"string"`
  6386. // Encoding type used by Amazon S3 to encode object keys in the response.
  6387. EncodingType *string `type:"string" enum:"EncodingType"`
  6388. // A flag that indicates whether or not Amazon S3 returned all of the results
  6389. // that satisfied the search criteria.
  6390. IsTruncated *bool `type:"boolean"`
  6391. // KeyCount is the number of keys returned with this request. KeyCount will
  6392. // always be less than equals to MaxKeys field. Say you ask for 50 keys, your
  6393. // result will include less than equals 50 keys
  6394. KeyCount *int64 `type:"integer"`
  6395. // Sets the maximum number of keys returned in the response. The response might
  6396. // contain fewer keys but will never contain more.
  6397. MaxKeys *int64 `type:"integer"`
  6398. // Name of the bucket to list.
  6399. Name *string `type:"string"`
  6400. // NextContinuationToken is sent when isTruncated is true which means there
  6401. // are more keys in the bucket that can be listed. The next list requests to
  6402. // Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken
  6403. // is obfuscated and is not a real key
  6404. NextContinuationToken *string `type:"string"`
  6405. // Limits the response to keys that begin with the specified prefix.
  6406. Prefix *string `type:"string"`
  6407. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  6408. // listing after this specified key. StartAfter can be any key in the bucket
  6409. StartAfter *string `type:"string"`
  6410. }
  6411. // String returns the string representation
  6412. func (s ListObjectsV2Output) String() string {
  6413. return awsutil.Prettify(s)
  6414. }
  6415. // GoString returns the string representation
  6416. func (s ListObjectsV2Output) GoString() string {
  6417. return s.String()
  6418. }
  6419. type ListPartsInput struct {
  6420. _ struct{} `type:"structure"`
  6421. // Bucket is a required field
  6422. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6423. // Key is a required field
  6424. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6425. // Sets the maximum number of parts to return.
  6426. MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`
  6427. // Specifies the part after which listing should begin. Only parts with higher
  6428. // part numbers will be listed.
  6429. PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
  6430. // Confirms that the requester knows that she or he will be charged for the
  6431. // request. Bucket owners need not specify this parameter in their requests.
  6432. // Documentation on downloading objects from requester pays buckets can be found
  6433. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6434. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6435. // Upload ID identifying the multipart upload whose parts are being listed.
  6436. //
  6437. // UploadId is a required field
  6438. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  6439. }
  6440. // String returns the string representation
  6441. func (s ListPartsInput) String() string {
  6442. return awsutil.Prettify(s)
  6443. }
  6444. // GoString returns the string representation
  6445. func (s ListPartsInput) GoString() string {
  6446. return s.String()
  6447. }
  6448. // Validate inspects the fields of the type to determine if they are valid.
  6449. func (s *ListPartsInput) Validate() error {
  6450. invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"}
  6451. if s.Bucket == nil {
  6452. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6453. }
  6454. if s.Key == nil {
  6455. invalidParams.Add(request.NewErrParamRequired("Key"))
  6456. }
  6457. if s.Key != nil && len(*s.Key) < 1 {
  6458. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6459. }
  6460. if s.UploadId == nil {
  6461. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  6462. }
  6463. if invalidParams.Len() > 0 {
  6464. return invalidParams
  6465. }
  6466. return nil
  6467. }
  6468. type ListPartsOutput struct {
  6469. _ struct{} `type:"structure"`
  6470. // Date when multipart upload will become eligible for abort operation by lifecycle.
  6471. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"`
  6472. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  6473. // operation.
  6474. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  6475. // Name of the bucket to which the multipart upload was initiated.
  6476. Bucket *string `type:"string"`
  6477. // Identifies who initiated the multipart upload.
  6478. Initiator *Initiator `type:"structure"`
  6479. // Indicates whether the returned list of parts is truncated.
  6480. IsTruncated *bool `type:"boolean"`
  6481. // Object key for which the multipart upload was initiated.
  6482. Key *string `min:"1" type:"string"`
  6483. // Maximum number of parts that were allowed in the response.
  6484. MaxParts *int64 `type:"integer"`
  6485. // When a list is truncated, this element specifies the last part in the list,
  6486. // as well as the value to use for the part-number-marker request parameter
  6487. // in a subsequent request.
  6488. NextPartNumberMarker *int64 `type:"integer"`
  6489. Owner *Owner `type:"structure"`
  6490. // Part number after which listing begins.
  6491. PartNumberMarker *int64 `type:"integer"`
  6492. Parts []*Part `locationName:"Part" type:"list" flattened:"true"`
  6493. // If present, indicates that the requester was successfully charged for the
  6494. // request.
  6495. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  6496. // The class of storage used to store the object.
  6497. StorageClass *string `type:"string" enum:"StorageClass"`
  6498. // Upload ID identifying the multipart upload whose parts are being listed.
  6499. UploadId *string `type:"string"`
  6500. }
  6501. // String returns the string representation
  6502. func (s ListPartsOutput) String() string {
  6503. return awsutil.Prettify(s)
  6504. }
  6505. // GoString returns the string representation
  6506. func (s ListPartsOutput) GoString() string {
  6507. return s.String()
  6508. }
  6509. type LoggingEnabled struct {
  6510. _ struct{} `type:"structure"`
  6511. // Specifies the bucket where you want Amazon S3 to store server access logs.
  6512. // You can have your logs delivered to any bucket that you own, including the
  6513. // same bucket that is being logged. You can also configure multiple buckets
  6514. // to deliver their logs to the same target bucket. In this case you should
  6515. // choose a different TargetPrefix for each source bucket so that the delivered
  6516. // log files can be distinguished by key.
  6517. TargetBucket *string `type:"string"`
  6518. TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
  6519. // This element lets you specify a prefix for the keys that the log files will
  6520. // be stored under.
  6521. TargetPrefix *string `type:"string"`
  6522. }
  6523. // String returns the string representation
  6524. func (s LoggingEnabled) String() string {
  6525. return awsutil.Prettify(s)
  6526. }
  6527. // GoString returns the string representation
  6528. func (s LoggingEnabled) GoString() string {
  6529. return s.String()
  6530. }
  6531. // Validate inspects the fields of the type to determine if they are valid.
  6532. func (s *LoggingEnabled) Validate() error {
  6533. invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"}
  6534. if s.TargetGrants != nil {
  6535. for i, v := range s.TargetGrants {
  6536. if v == nil {
  6537. continue
  6538. }
  6539. if err := v.Validate(); err != nil {
  6540. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams))
  6541. }
  6542. }
  6543. }
  6544. if invalidParams.Len() > 0 {
  6545. return invalidParams
  6546. }
  6547. return nil
  6548. }
  6549. type MultipartUpload struct {
  6550. _ struct{} `type:"structure"`
  6551. // Date and time at which the multipart upload was initiated.
  6552. Initiated *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  6553. // Identifies who initiated the multipart upload.
  6554. Initiator *Initiator `type:"structure"`
  6555. // Key of the object for which the multipart upload was initiated.
  6556. Key *string `min:"1" type:"string"`
  6557. Owner *Owner `type:"structure"`
  6558. // The class of storage used to store the object.
  6559. StorageClass *string `type:"string" enum:"StorageClass"`
  6560. // Upload ID that identifies the multipart upload.
  6561. UploadId *string `type:"string"`
  6562. }
  6563. // String returns the string representation
  6564. func (s MultipartUpload) String() string {
  6565. return awsutil.Prettify(s)
  6566. }
  6567. // GoString returns the string representation
  6568. func (s MultipartUpload) GoString() string {
  6569. return s.String()
  6570. }
  6571. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  6572. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  6573. // configuration action on a bucket that has versioning enabled (or suspended)
  6574. // to request that Amazon S3 delete noncurrent object versions at a specific
  6575. // period in the object's lifetime.
  6576. type NoncurrentVersionExpiration struct {
  6577. _ struct{} `type:"structure"`
  6578. // Specifies the number of days an object is noncurrent before Amazon S3 can
  6579. // perform the associated action. For information about the noncurrent days
  6580. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  6581. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
  6582. NoncurrentDays *int64 `type:"integer"`
  6583. }
  6584. // String returns the string representation
  6585. func (s NoncurrentVersionExpiration) String() string {
  6586. return awsutil.Prettify(s)
  6587. }
  6588. // GoString returns the string representation
  6589. func (s NoncurrentVersionExpiration) GoString() string {
  6590. return s.String()
  6591. }
  6592. // Container for the transition rule that describes when noncurrent objects
  6593. // transition to the STANDARD_IA or GLACIER storage class. If your bucket is
  6594. // versioning-enabled (or versioning is suspended), you can set this action
  6595. // to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA
  6596. // or GLACIER storage class at a specific period in the object's lifetime.
  6597. type NoncurrentVersionTransition struct {
  6598. _ struct{} `type:"structure"`
  6599. // Specifies the number of days an object is noncurrent before Amazon S3 can
  6600. // perform the associated action. For information about the noncurrent days
  6601. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  6602. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
  6603. NoncurrentDays *int64 `type:"integer"`
  6604. // The class of storage used to store the object.
  6605. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  6606. }
  6607. // String returns the string representation
  6608. func (s NoncurrentVersionTransition) String() string {
  6609. return awsutil.Prettify(s)
  6610. }
  6611. // GoString returns the string representation
  6612. func (s NoncurrentVersionTransition) GoString() string {
  6613. return s.String()
  6614. }
  6615. // Container for specifying the notification configuration of the bucket. If
  6616. // this element is empty, notifications are turned off on the bucket.
  6617. type NotificationConfiguration struct {
  6618. _ struct{} `type:"structure"`
  6619. LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
  6620. QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"`
  6621. TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"`
  6622. }
  6623. // String returns the string representation
  6624. func (s NotificationConfiguration) String() string {
  6625. return awsutil.Prettify(s)
  6626. }
  6627. // GoString returns the string representation
  6628. func (s NotificationConfiguration) GoString() string {
  6629. return s.String()
  6630. }
  6631. // Validate inspects the fields of the type to determine if they are valid.
  6632. func (s *NotificationConfiguration) Validate() error {
  6633. invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"}
  6634. if s.LambdaFunctionConfigurations != nil {
  6635. for i, v := range s.LambdaFunctionConfigurations {
  6636. if v == nil {
  6637. continue
  6638. }
  6639. if err := v.Validate(); err != nil {
  6640. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams))
  6641. }
  6642. }
  6643. }
  6644. if s.QueueConfigurations != nil {
  6645. for i, v := range s.QueueConfigurations {
  6646. if v == nil {
  6647. continue
  6648. }
  6649. if err := v.Validate(); err != nil {
  6650. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams))
  6651. }
  6652. }
  6653. }
  6654. if s.TopicConfigurations != nil {
  6655. for i, v := range s.TopicConfigurations {
  6656. if v == nil {
  6657. continue
  6658. }
  6659. if err := v.Validate(); err != nil {
  6660. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams))
  6661. }
  6662. }
  6663. }
  6664. if invalidParams.Len() > 0 {
  6665. return invalidParams
  6666. }
  6667. return nil
  6668. }
  6669. type NotificationConfigurationDeprecated struct {
  6670. _ struct{} `type:"structure"`
  6671. CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
  6672. QueueConfiguration *QueueConfigurationDeprecated `type:"structure"`
  6673. TopicConfiguration *TopicConfigurationDeprecated `type:"structure"`
  6674. }
  6675. // String returns the string representation
  6676. func (s NotificationConfigurationDeprecated) String() string {
  6677. return awsutil.Prettify(s)
  6678. }
  6679. // GoString returns the string representation
  6680. func (s NotificationConfigurationDeprecated) GoString() string {
  6681. return s.String()
  6682. }
  6683. // Container for object key name filtering rules. For information about key
  6684. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  6685. type NotificationConfigurationFilter struct {
  6686. _ struct{} `type:"structure"`
  6687. // Container for object key name prefix and suffix filtering rules.
  6688. Key *KeyFilter `locationName:"S3Key" type:"structure"`
  6689. }
  6690. // String returns the string representation
  6691. func (s NotificationConfigurationFilter) String() string {
  6692. return awsutil.Prettify(s)
  6693. }
  6694. // GoString returns the string representation
  6695. func (s NotificationConfigurationFilter) GoString() string {
  6696. return s.String()
  6697. }
  6698. type Object struct {
  6699. _ struct{} `type:"structure"`
  6700. ETag *string `type:"string"`
  6701. Key *string `min:"1" type:"string"`
  6702. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  6703. Owner *Owner `type:"structure"`
  6704. Size *int64 `type:"integer"`
  6705. // The class of storage used to store the object.
  6706. StorageClass *string `type:"string" enum:"ObjectStorageClass"`
  6707. }
  6708. // String returns the string representation
  6709. func (s Object) String() string {
  6710. return awsutil.Prettify(s)
  6711. }
  6712. // GoString returns the string representation
  6713. func (s Object) GoString() string {
  6714. return s.String()
  6715. }
  6716. type ObjectIdentifier struct {
  6717. _ struct{} `type:"structure"`
  6718. // Key name of the object to delete.
  6719. //
  6720. // Key is a required field
  6721. Key *string `min:"1" type:"string" required:"true"`
  6722. // VersionId for the specific version of the object to delete.
  6723. VersionId *string `type:"string"`
  6724. }
  6725. // String returns the string representation
  6726. func (s ObjectIdentifier) String() string {
  6727. return awsutil.Prettify(s)
  6728. }
  6729. // GoString returns the string representation
  6730. func (s ObjectIdentifier) GoString() string {
  6731. return s.String()
  6732. }
  6733. // Validate inspects the fields of the type to determine if they are valid.
  6734. func (s *ObjectIdentifier) Validate() error {
  6735. invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"}
  6736. if s.Key == nil {
  6737. invalidParams.Add(request.NewErrParamRequired("Key"))
  6738. }
  6739. if s.Key != nil && len(*s.Key) < 1 {
  6740. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6741. }
  6742. if invalidParams.Len() > 0 {
  6743. return invalidParams
  6744. }
  6745. return nil
  6746. }
  6747. type ObjectVersion struct {
  6748. _ struct{} `type:"structure"`
  6749. ETag *string `type:"string"`
  6750. // Specifies whether the object is (true) or is not (false) the latest version
  6751. // of an object.
  6752. IsLatest *bool `type:"boolean"`
  6753. // The object key.
  6754. Key *string `min:"1" type:"string"`
  6755. // Date and time the object was last modified.
  6756. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  6757. Owner *Owner `type:"structure"`
  6758. // Size in bytes of the object.
  6759. Size *int64 `type:"integer"`
  6760. // The class of storage used to store the object.
  6761. StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"`
  6762. // Version ID of an object.
  6763. VersionId *string `type:"string"`
  6764. }
  6765. // String returns the string representation
  6766. func (s ObjectVersion) String() string {
  6767. return awsutil.Prettify(s)
  6768. }
  6769. // GoString returns the string representation
  6770. func (s ObjectVersion) GoString() string {
  6771. return s.String()
  6772. }
  6773. type Owner struct {
  6774. _ struct{} `type:"structure"`
  6775. DisplayName *string `type:"string"`
  6776. ID *string `type:"string"`
  6777. }
  6778. // String returns the string representation
  6779. func (s Owner) String() string {
  6780. return awsutil.Prettify(s)
  6781. }
  6782. // GoString returns the string representation
  6783. func (s Owner) GoString() string {
  6784. return s.String()
  6785. }
  6786. type Part struct {
  6787. _ struct{} `type:"structure"`
  6788. // Entity tag returned when the part was uploaded.
  6789. ETag *string `type:"string"`
  6790. // Date and time at which the part was uploaded.
  6791. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  6792. // Part number identifying the part. This is a positive integer between 1 and
  6793. // 10,000.
  6794. PartNumber *int64 `type:"integer"`
  6795. // Size of the uploaded part data.
  6796. Size *int64 `type:"integer"`
  6797. }
  6798. // String returns the string representation
  6799. func (s Part) String() string {
  6800. return awsutil.Prettify(s)
  6801. }
  6802. // GoString returns the string representation
  6803. func (s Part) GoString() string {
  6804. return s.String()
  6805. }
  6806. type PutBucketAccelerateConfigurationInput struct {
  6807. _ struct{} `type:"structure" payload:"AccelerateConfiguration"`
  6808. // Specifies the Accelerate Configuration you want to set for the bucket.
  6809. //
  6810. // AccelerateConfiguration is a required field
  6811. AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true"`
  6812. // Name of the bucket for which the accelerate configuration is set.
  6813. //
  6814. // Bucket is a required field
  6815. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6816. }
  6817. // String returns the string representation
  6818. func (s PutBucketAccelerateConfigurationInput) String() string {
  6819. return awsutil.Prettify(s)
  6820. }
  6821. // GoString returns the string representation
  6822. func (s PutBucketAccelerateConfigurationInput) GoString() string {
  6823. return s.String()
  6824. }
  6825. // Validate inspects the fields of the type to determine if they are valid.
  6826. func (s *PutBucketAccelerateConfigurationInput) Validate() error {
  6827. invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"}
  6828. if s.AccelerateConfiguration == nil {
  6829. invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration"))
  6830. }
  6831. if s.Bucket == nil {
  6832. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6833. }
  6834. if invalidParams.Len() > 0 {
  6835. return invalidParams
  6836. }
  6837. return nil
  6838. }
  6839. type PutBucketAccelerateConfigurationOutput struct {
  6840. _ struct{} `type:"structure"`
  6841. }
  6842. // String returns the string representation
  6843. func (s PutBucketAccelerateConfigurationOutput) String() string {
  6844. return awsutil.Prettify(s)
  6845. }
  6846. // GoString returns the string representation
  6847. func (s PutBucketAccelerateConfigurationOutput) GoString() string {
  6848. return s.String()
  6849. }
  6850. type PutBucketAclInput struct {
  6851. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  6852. // The canned ACL to apply to the bucket.
  6853. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  6854. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"`
  6855. // Bucket is a required field
  6856. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6857. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  6858. // bucket.
  6859. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  6860. // Allows grantee to list the objects in the bucket.
  6861. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  6862. // Allows grantee to read the bucket ACL.
  6863. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  6864. // Allows grantee to create, overwrite, and delete any object in the bucket.
  6865. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  6866. // Allows grantee to write the ACL for the applicable bucket.
  6867. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  6868. }
  6869. // String returns the string representation
  6870. func (s PutBucketAclInput) String() string {
  6871. return awsutil.Prettify(s)
  6872. }
  6873. // GoString returns the string representation
  6874. func (s PutBucketAclInput) GoString() string {
  6875. return s.String()
  6876. }
  6877. // Validate inspects the fields of the type to determine if they are valid.
  6878. func (s *PutBucketAclInput) Validate() error {
  6879. invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"}
  6880. if s.Bucket == nil {
  6881. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6882. }
  6883. if s.AccessControlPolicy != nil {
  6884. if err := s.AccessControlPolicy.Validate(); err != nil {
  6885. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  6886. }
  6887. }
  6888. if invalidParams.Len() > 0 {
  6889. return invalidParams
  6890. }
  6891. return nil
  6892. }
  6893. type PutBucketAclOutput struct {
  6894. _ struct{} `type:"structure"`
  6895. }
  6896. // String returns the string representation
  6897. func (s PutBucketAclOutput) String() string {
  6898. return awsutil.Prettify(s)
  6899. }
  6900. // GoString returns the string representation
  6901. func (s PutBucketAclOutput) GoString() string {
  6902. return s.String()
  6903. }
  6904. type PutBucketCorsInput struct {
  6905. _ struct{} `type:"structure" payload:"CORSConfiguration"`
  6906. // Bucket is a required field
  6907. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6908. // CORSConfiguration is a required field
  6909. CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true"`
  6910. }
  6911. // String returns the string representation
  6912. func (s PutBucketCorsInput) String() string {
  6913. return awsutil.Prettify(s)
  6914. }
  6915. // GoString returns the string representation
  6916. func (s PutBucketCorsInput) GoString() string {
  6917. return s.String()
  6918. }
  6919. // Validate inspects the fields of the type to determine if they are valid.
  6920. func (s *PutBucketCorsInput) Validate() error {
  6921. invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"}
  6922. if s.Bucket == nil {
  6923. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6924. }
  6925. if s.CORSConfiguration == nil {
  6926. invalidParams.Add(request.NewErrParamRequired("CORSConfiguration"))
  6927. }
  6928. if s.CORSConfiguration != nil {
  6929. if err := s.CORSConfiguration.Validate(); err != nil {
  6930. invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams))
  6931. }
  6932. }
  6933. if invalidParams.Len() > 0 {
  6934. return invalidParams
  6935. }
  6936. return nil
  6937. }
  6938. type PutBucketCorsOutput struct {
  6939. _ struct{} `type:"structure"`
  6940. }
  6941. // String returns the string representation
  6942. func (s PutBucketCorsOutput) String() string {
  6943. return awsutil.Prettify(s)
  6944. }
  6945. // GoString returns the string representation
  6946. func (s PutBucketCorsOutput) GoString() string {
  6947. return s.String()
  6948. }
  6949. type PutBucketLifecycleConfigurationInput struct {
  6950. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  6951. // Bucket is a required field
  6952. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6953. LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure"`
  6954. }
  6955. // String returns the string representation
  6956. func (s PutBucketLifecycleConfigurationInput) String() string {
  6957. return awsutil.Prettify(s)
  6958. }
  6959. // GoString returns the string representation
  6960. func (s PutBucketLifecycleConfigurationInput) GoString() string {
  6961. return s.String()
  6962. }
  6963. // Validate inspects the fields of the type to determine if they are valid.
  6964. func (s *PutBucketLifecycleConfigurationInput) Validate() error {
  6965. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"}
  6966. if s.Bucket == nil {
  6967. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6968. }
  6969. if s.LifecycleConfiguration != nil {
  6970. if err := s.LifecycleConfiguration.Validate(); err != nil {
  6971. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  6972. }
  6973. }
  6974. if invalidParams.Len() > 0 {
  6975. return invalidParams
  6976. }
  6977. return nil
  6978. }
  6979. type PutBucketLifecycleConfigurationOutput struct {
  6980. _ struct{} `type:"structure"`
  6981. }
  6982. // String returns the string representation
  6983. func (s PutBucketLifecycleConfigurationOutput) String() string {
  6984. return awsutil.Prettify(s)
  6985. }
  6986. // GoString returns the string representation
  6987. func (s PutBucketLifecycleConfigurationOutput) GoString() string {
  6988. return s.String()
  6989. }
  6990. type PutBucketLifecycleInput struct {
  6991. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  6992. // Bucket is a required field
  6993. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6994. LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure"`
  6995. }
  6996. // String returns the string representation
  6997. func (s PutBucketLifecycleInput) String() string {
  6998. return awsutil.Prettify(s)
  6999. }
  7000. // GoString returns the string representation
  7001. func (s PutBucketLifecycleInput) GoString() string {
  7002. return s.String()
  7003. }
  7004. // Validate inspects the fields of the type to determine if they are valid.
  7005. func (s *PutBucketLifecycleInput) Validate() error {
  7006. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"}
  7007. if s.Bucket == nil {
  7008. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7009. }
  7010. if s.LifecycleConfiguration != nil {
  7011. if err := s.LifecycleConfiguration.Validate(); err != nil {
  7012. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  7013. }
  7014. }
  7015. if invalidParams.Len() > 0 {
  7016. return invalidParams
  7017. }
  7018. return nil
  7019. }
  7020. type PutBucketLifecycleOutput struct {
  7021. _ struct{} `type:"structure"`
  7022. }
  7023. // String returns the string representation
  7024. func (s PutBucketLifecycleOutput) String() string {
  7025. return awsutil.Prettify(s)
  7026. }
  7027. // GoString returns the string representation
  7028. func (s PutBucketLifecycleOutput) GoString() string {
  7029. return s.String()
  7030. }
  7031. type PutBucketLoggingInput struct {
  7032. _ struct{} `type:"structure" payload:"BucketLoggingStatus"`
  7033. // Bucket is a required field
  7034. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7035. // BucketLoggingStatus is a required field
  7036. BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true"`
  7037. }
  7038. // String returns the string representation
  7039. func (s PutBucketLoggingInput) String() string {
  7040. return awsutil.Prettify(s)
  7041. }
  7042. // GoString returns the string representation
  7043. func (s PutBucketLoggingInput) GoString() string {
  7044. return s.String()
  7045. }
  7046. // Validate inspects the fields of the type to determine if they are valid.
  7047. func (s *PutBucketLoggingInput) Validate() error {
  7048. invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"}
  7049. if s.Bucket == nil {
  7050. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7051. }
  7052. if s.BucketLoggingStatus == nil {
  7053. invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus"))
  7054. }
  7055. if s.BucketLoggingStatus != nil {
  7056. if err := s.BucketLoggingStatus.Validate(); err != nil {
  7057. invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams))
  7058. }
  7059. }
  7060. if invalidParams.Len() > 0 {
  7061. return invalidParams
  7062. }
  7063. return nil
  7064. }
  7065. type PutBucketLoggingOutput struct {
  7066. _ struct{} `type:"structure"`
  7067. }
  7068. // String returns the string representation
  7069. func (s PutBucketLoggingOutput) String() string {
  7070. return awsutil.Prettify(s)
  7071. }
  7072. // GoString returns the string representation
  7073. func (s PutBucketLoggingOutput) GoString() string {
  7074. return s.String()
  7075. }
  7076. type PutBucketNotificationConfigurationInput struct {
  7077. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  7078. // Bucket is a required field
  7079. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7080. // Container for specifying the notification configuration of the bucket. If
  7081. // this element is empty, notifications are turned off on the bucket.
  7082. //
  7083. // NotificationConfiguration is a required field
  7084. NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true"`
  7085. }
  7086. // String returns the string representation
  7087. func (s PutBucketNotificationConfigurationInput) String() string {
  7088. return awsutil.Prettify(s)
  7089. }
  7090. // GoString returns the string representation
  7091. func (s PutBucketNotificationConfigurationInput) GoString() string {
  7092. return s.String()
  7093. }
  7094. // Validate inspects the fields of the type to determine if they are valid.
  7095. func (s *PutBucketNotificationConfigurationInput) Validate() error {
  7096. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"}
  7097. if s.Bucket == nil {
  7098. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7099. }
  7100. if s.NotificationConfiguration == nil {
  7101. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  7102. }
  7103. if s.NotificationConfiguration != nil {
  7104. if err := s.NotificationConfiguration.Validate(); err != nil {
  7105. invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams))
  7106. }
  7107. }
  7108. if invalidParams.Len() > 0 {
  7109. return invalidParams
  7110. }
  7111. return nil
  7112. }
  7113. type PutBucketNotificationConfigurationOutput struct {
  7114. _ struct{} `type:"structure"`
  7115. }
  7116. // String returns the string representation
  7117. func (s PutBucketNotificationConfigurationOutput) String() string {
  7118. return awsutil.Prettify(s)
  7119. }
  7120. // GoString returns the string representation
  7121. func (s PutBucketNotificationConfigurationOutput) GoString() string {
  7122. return s.String()
  7123. }
  7124. type PutBucketNotificationInput struct {
  7125. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  7126. // Bucket is a required field
  7127. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7128. // NotificationConfiguration is a required field
  7129. NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true"`
  7130. }
  7131. // String returns the string representation
  7132. func (s PutBucketNotificationInput) String() string {
  7133. return awsutil.Prettify(s)
  7134. }
  7135. // GoString returns the string representation
  7136. func (s PutBucketNotificationInput) GoString() string {
  7137. return s.String()
  7138. }
  7139. // Validate inspects the fields of the type to determine if they are valid.
  7140. func (s *PutBucketNotificationInput) Validate() error {
  7141. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"}
  7142. if s.Bucket == nil {
  7143. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7144. }
  7145. if s.NotificationConfiguration == nil {
  7146. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  7147. }
  7148. if invalidParams.Len() > 0 {
  7149. return invalidParams
  7150. }
  7151. return nil
  7152. }
  7153. type PutBucketNotificationOutput struct {
  7154. _ struct{} `type:"structure"`
  7155. }
  7156. // String returns the string representation
  7157. func (s PutBucketNotificationOutput) String() string {
  7158. return awsutil.Prettify(s)
  7159. }
  7160. // GoString returns the string representation
  7161. func (s PutBucketNotificationOutput) GoString() string {
  7162. return s.String()
  7163. }
  7164. type PutBucketPolicyInput struct {
  7165. _ struct{} `type:"structure" payload:"Policy"`
  7166. // Bucket is a required field
  7167. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7168. // The bucket policy as a JSON document.
  7169. //
  7170. // Policy is a required field
  7171. Policy *string `type:"string" required:"true"`
  7172. }
  7173. // String returns the string representation
  7174. func (s PutBucketPolicyInput) String() string {
  7175. return awsutil.Prettify(s)
  7176. }
  7177. // GoString returns the string representation
  7178. func (s PutBucketPolicyInput) GoString() string {
  7179. return s.String()
  7180. }
  7181. // Validate inspects the fields of the type to determine if they are valid.
  7182. func (s *PutBucketPolicyInput) Validate() error {
  7183. invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"}
  7184. if s.Bucket == nil {
  7185. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7186. }
  7187. if s.Policy == nil {
  7188. invalidParams.Add(request.NewErrParamRequired("Policy"))
  7189. }
  7190. if invalidParams.Len() > 0 {
  7191. return invalidParams
  7192. }
  7193. return nil
  7194. }
  7195. type PutBucketPolicyOutput struct {
  7196. _ struct{} `type:"structure"`
  7197. }
  7198. // String returns the string representation
  7199. func (s PutBucketPolicyOutput) String() string {
  7200. return awsutil.Prettify(s)
  7201. }
  7202. // GoString returns the string representation
  7203. func (s PutBucketPolicyOutput) GoString() string {
  7204. return s.String()
  7205. }
  7206. type PutBucketReplicationInput struct {
  7207. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  7208. // Bucket is a required field
  7209. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7210. // Container for replication rules. You can add as many as 1,000 rules. Total
  7211. // replication configuration size can be up to 2 MB.
  7212. //
  7213. // ReplicationConfiguration is a required field
  7214. ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true"`
  7215. }
  7216. // String returns the string representation
  7217. func (s PutBucketReplicationInput) String() string {
  7218. return awsutil.Prettify(s)
  7219. }
  7220. // GoString returns the string representation
  7221. func (s PutBucketReplicationInput) GoString() string {
  7222. return s.String()
  7223. }
  7224. // Validate inspects the fields of the type to determine if they are valid.
  7225. func (s *PutBucketReplicationInput) Validate() error {
  7226. invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"}
  7227. if s.Bucket == nil {
  7228. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7229. }
  7230. if s.ReplicationConfiguration == nil {
  7231. invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration"))
  7232. }
  7233. if s.ReplicationConfiguration != nil {
  7234. if err := s.ReplicationConfiguration.Validate(); err != nil {
  7235. invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams))
  7236. }
  7237. }
  7238. if invalidParams.Len() > 0 {
  7239. return invalidParams
  7240. }
  7241. return nil
  7242. }
  7243. type PutBucketReplicationOutput struct {
  7244. _ struct{} `type:"structure"`
  7245. }
  7246. // String returns the string representation
  7247. func (s PutBucketReplicationOutput) String() string {
  7248. return awsutil.Prettify(s)
  7249. }
  7250. // GoString returns the string representation
  7251. func (s PutBucketReplicationOutput) GoString() string {
  7252. return s.String()
  7253. }
  7254. type PutBucketRequestPaymentInput struct {
  7255. _ struct{} `type:"structure" payload:"RequestPaymentConfiguration"`
  7256. // Bucket is a required field
  7257. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7258. // RequestPaymentConfiguration is a required field
  7259. RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true"`
  7260. }
  7261. // String returns the string representation
  7262. func (s PutBucketRequestPaymentInput) String() string {
  7263. return awsutil.Prettify(s)
  7264. }
  7265. // GoString returns the string representation
  7266. func (s PutBucketRequestPaymentInput) GoString() string {
  7267. return s.String()
  7268. }
  7269. // Validate inspects the fields of the type to determine if they are valid.
  7270. func (s *PutBucketRequestPaymentInput) Validate() error {
  7271. invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"}
  7272. if s.Bucket == nil {
  7273. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7274. }
  7275. if s.RequestPaymentConfiguration == nil {
  7276. invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration"))
  7277. }
  7278. if s.RequestPaymentConfiguration != nil {
  7279. if err := s.RequestPaymentConfiguration.Validate(); err != nil {
  7280. invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams))
  7281. }
  7282. }
  7283. if invalidParams.Len() > 0 {
  7284. return invalidParams
  7285. }
  7286. return nil
  7287. }
  7288. type PutBucketRequestPaymentOutput struct {
  7289. _ struct{} `type:"structure"`
  7290. }
  7291. // String returns the string representation
  7292. func (s PutBucketRequestPaymentOutput) String() string {
  7293. return awsutil.Prettify(s)
  7294. }
  7295. // GoString returns the string representation
  7296. func (s PutBucketRequestPaymentOutput) GoString() string {
  7297. return s.String()
  7298. }
  7299. type PutBucketTaggingInput struct {
  7300. _ struct{} `type:"structure" payload:"Tagging"`
  7301. // Bucket is a required field
  7302. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7303. // Tagging is a required field
  7304. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true"`
  7305. }
  7306. // String returns the string representation
  7307. func (s PutBucketTaggingInput) String() string {
  7308. return awsutil.Prettify(s)
  7309. }
  7310. // GoString returns the string representation
  7311. func (s PutBucketTaggingInput) GoString() string {
  7312. return s.String()
  7313. }
  7314. // Validate inspects the fields of the type to determine if they are valid.
  7315. func (s *PutBucketTaggingInput) Validate() error {
  7316. invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"}
  7317. if s.Bucket == nil {
  7318. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7319. }
  7320. if s.Tagging == nil {
  7321. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  7322. }
  7323. if s.Tagging != nil {
  7324. if err := s.Tagging.Validate(); err != nil {
  7325. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  7326. }
  7327. }
  7328. if invalidParams.Len() > 0 {
  7329. return invalidParams
  7330. }
  7331. return nil
  7332. }
  7333. type PutBucketTaggingOutput struct {
  7334. _ struct{} `type:"structure"`
  7335. }
  7336. // String returns the string representation
  7337. func (s PutBucketTaggingOutput) String() string {
  7338. return awsutil.Prettify(s)
  7339. }
  7340. // GoString returns the string representation
  7341. func (s PutBucketTaggingOutput) GoString() string {
  7342. return s.String()
  7343. }
  7344. type PutBucketVersioningInput struct {
  7345. _ struct{} `type:"structure" payload:"VersioningConfiguration"`
  7346. // Bucket is a required field
  7347. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7348. // The concatenation of the authentication device's serial number, a space,
  7349. // and the value that is displayed on your authentication device.
  7350. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  7351. // VersioningConfiguration is a required field
  7352. VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true"`
  7353. }
  7354. // String returns the string representation
  7355. func (s PutBucketVersioningInput) String() string {
  7356. return awsutil.Prettify(s)
  7357. }
  7358. // GoString returns the string representation
  7359. func (s PutBucketVersioningInput) GoString() string {
  7360. return s.String()
  7361. }
  7362. // Validate inspects the fields of the type to determine if they are valid.
  7363. func (s *PutBucketVersioningInput) Validate() error {
  7364. invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"}
  7365. if s.Bucket == nil {
  7366. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7367. }
  7368. if s.VersioningConfiguration == nil {
  7369. invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration"))
  7370. }
  7371. if invalidParams.Len() > 0 {
  7372. return invalidParams
  7373. }
  7374. return nil
  7375. }
  7376. type PutBucketVersioningOutput struct {
  7377. _ struct{} `type:"structure"`
  7378. }
  7379. // String returns the string representation
  7380. func (s PutBucketVersioningOutput) String() string {
  7381. return awsutil.Prettify(s)
  7382. }
  7383. // GoString returns the string representation
  7384. func (s PutBucketVersioningOutput) GoString() string {
  7385. return s.String()
  7386. }
  7387. type PutBucketWebsiteInput struct {
  7388. _ struct{} `type:"structure" payload:"WebsiteConfiguration"`
  7389. // Bucket is a required field
  7390. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7391. // WebsiteConfiguration is a required field
  7392. WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true"`
  7393. }
  7394. // String returns the string representation
  7395. func (s PutBucketWebsiteInput) String() string {
  7396. return awsutil.Prettify(s)
  7397. }
  7398. // GoString returns the string representation
  7399. func (s PutBucketWebsiteInput) GoString() string {
  7400. return s.String()
  7401. }
  7402. // Validate inspects the fields of the type to determine if they are valid.
  7403. func (s *PutBucketWebsiteInput) Validate() error {
  7404. invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"}
  7405. if s.Bucket == nil {
  7406. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7407. }
  7408. if s.WebsiteConfiguration == nil {
  7409. invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration"))
  7410. }
  7411. if s.WebsiteConfiguration != nil {
  7412. if err := s.WebsiteConfiguration.Validate(); err != nil {
  7413. invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams))
  7414. }
  7415. }
  7416. if invalidParams.Len() > 0 {
  7417. return invalidParams
  7418. }
  7419. return nil
  7420. }
  7421. type PutBucketWebsiteOutput struct {
  7422. _ struct{} `type:"structure"`
  7423. }
  7424. // String returns the string representation
  7425. func (s PutBucketWebsiteOutput) String() string {
  7426. return awsutil.Prettify(s)
  7427. }
  7428. // GoString returns the string representation
  7429. func (s PutBucketWebsiteOutput) GoString() string {
  7430. return s.String()
  7431. }
  7432. type PutObjectAclInput struct {
  7433. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  7434. // The canned ACL to apply to the object.
  7435. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  7436. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"`
  7437. // Bucket is a required field
  7438. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7439. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  7440. // bucket.
  7441. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  7442. // Allows grantee to list the objects in the bucket.
  7443. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  7444. // Allows grantee to read the bucket ACL.
  7445. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  7446. // Allows grantee to create, overwrite, and delete any object in the bucket.
  7447. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  7448. // Allows grantee to write the ACL for the applicable bucket.
  7449. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  7450. // Key is a required field
  7451. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7452. // Confirms that the requester knows that she or he will be charged for the
  7453. // request. Bucket owners need not specify this parameter in their requests.
  7454. // Documentation on downloading objects from requester pays buckets can be found
  7455. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7456. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7457. // VersionId used to reference a specific version of the object.
  7458. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  7459. }
  7460. // String returns the string representation
  7461. func (s PutObjectAclInput) String() string {
  7462. return awsutil.Prettify(s)
  7463. }
  7464. // GoString returns the string representation
  7465. func (s PutObjectAclInput) GoString() string {
  7466. return s.String()
  7467. }
  7468. // Validate inspects the fields of the type to determine if they are valid.
  7469. func (s *PutObjectAclInput) Validate() error {
  7470. invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"}
  7471. if s.Bucket == nil {
  7472. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7473. }
  7474. if s.Key == nil {
  7475. invalidParams.Add(request.NewErrParamRequired("Key"))
  7476. }
  7477. if s.Key != nil && len(*s.Key) < 1 {
  7478. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7479. }
  7480. if s.AccessControlPolicy != nil {
  7481. if err := s.AccessControlPolicy.Validate(); err != nil {
  7482. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  7483. }
  7484. }
  7485. if invalidParams.Len() > 0 {
  7486. return invalidParams
  7487. }
  7488. return nil
  7489. }
  7490. type PutObjectAclOutput struct {
  7491. _ struct{} `type:"structure"`
  7492. // If present, indicates that the requester was successfully charged for the
  7493. // request.
  7494. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7495. }
  7496. // String returns the string representation
  7497. func (s PutObjectAclOutput) String() string {
  7498. return awsutil.Prettify(s)
  7499. }
  7500. // GoString returns the string representation
  7501. func (s PutObjectAclOutput) GoString() string {
  7502. return s.String()
  7503. }
  7504. type PutObjectInput struct {
  7505. _ struct{} `type:"structure" payload:"Body"`
  7506. // The canned ACL to apply to the object.
  7507. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  7508. // Object data.
  7509. Body io.ReadSeeker `type:"blob"`
  7510. // Name of the bucket to which the PUT operation was initiated.
  7511. //
  7512. // Bucket is a required field
  7513. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7514. // Specifies caching behavior along the request/reply chain.
  7515. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  7516. // Specifies presentational information for the object.
  7517. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  7518. // Specifies what content encodings have been applied to the object and thus
  7519. // what decoding mechanisms must be applied to obtain the media-type referenced
  7520. // by the Content-Type header field.
  7521. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  7522. // The language the content is in.
  7523. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  7524. // Size of the body in bytes. This parameter is useful when the size of the
  7525. // body cannot be determined automatically.
  7526. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  7527. // A standard MIME type describing the format of the object data.
  7528. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  7529. // The date and time at which the object is no longer cacheable.
  7530. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  7531. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  7532. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  7533. // Allows grantee to read the object data and its metadata.
  7534. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  7535. // Allows grantee to read the object ACL.
  7536. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  7537. // Allows grantee to write the ACL for the applicable object.
  7538. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  7539. // Object key for which the PUT operation was initiated.
  7540. //
  7541. // Key is a required field
  7542. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7543. // A map of metadata to store with the object in S3.
  7544. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  7545. // Confirms that the requester knows that she or he will be charged for the
  7546. // request. Bucket owners need not specify this parameter in their requests.
  7547. // Documentation on downloading objects from requester pays buckets can be found
  7548. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7549. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7550. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  7551. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7552. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  7553. // data. This value is used to store the object and then it is discarded; Amazon
  7554. // does not store the encryption key. The key must be appropriate for use with
  7555. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  7556. // header.
  7557. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  7558. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  7559. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  7560. // key was transmitted without error.
  7561. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7562. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  7563. // requests for an object protected by AWS KMS will fail if not made via SSL
  7564. // or using SigV4. Documentation on configuring any of the officially supported
  7565. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  7566. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7567. // The Server-side encryption algorithm used when storing this object in S3
  7568. // (e.g., AES256, aws:kms).
  7569. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7570. // The type of storage to use for the object. Defaults to 'STANDARD'.
  7571. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  7572. // If the bucket is configured as a website, redirects requests for this object
  7573. // to another object in the same bucket or to an external URL. Amazon S3 stores
  7574. // the value of this header in the object metadata.
  7575. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  7576. }
  7577. // String returns the string representation
  7578. func (s PutObjectInput) String() string {
  7579. return awsutil.Prettify(s)
  7580. }
  7581. // GoString returns the string representation
  7582. func (s PutObjectInput) GoString() string {
  7583. return s.String()
  7584. }
  7585. // Validate inspects the fields of the type to determine if they are valid.
  7586. func (s *PutObjectInput) Validate() error {
  7587. invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"}
  7588. if s.Bucket == nil {
  7589. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7590. }
  7591. if s.Key == nil {
  7592. invalidParams.Add(request.NewErrParamRequired("Key"))
  7593. }
  7594. if s.Key != nil && len(*s.Key) < 1 {
  7595. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7596. }
  7597. if invalidParams.Len() > 0 {
  7598. return invalidParams
  7599. }
  7600. return nil
  7601. }
  7602. type PutObjectOutput struct {
  7603. _ struct{} `type:"structure"`
  7604. // Entity tag for the uploaded object.
  7605. ETag *string `location:"header" locationName:"ETag" type:"string"`
  7606. // If the object expiration is configured, this will contain the expiration
  7607. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  7608. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  7609. // If present, indicates that the requester was successfully charged for the
  7610. // request.
  7611. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7612. // If server-side encryption with a customer-provided encryption key was requested,
  7613. // the response will include this header confirming the encryption algorithm
  7614. // used.
  7615. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7616. // If server-side encryption with a customer-provided encryption key was requested,
  7617. // the response will include this header to provide round trip message integrity
  7618. // verification of the customer-provided encryption key.
  7619. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7620. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7621. // encryption key that was used for the object.
  7622. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7623. // The Server-side encryption algorithm used when storing this object in S3
  7624. // (e.g., AES256, aws:kms).
  7625. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7626. // Version of the object.
  7627. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  7628. }
  7629. // String returns the string representation
  7630. func (s PutObjectOutput) String() string {
  7631. return awsutil.Prettify(s)
  7632. }
  7633. // GoString returns the string representation
  7634. func (s PutObjectOutput) GoString() string {
  7635. return s.String()
  7636. }
  7637. // Container for specifying an configuration when you want Amazon S3 to publish
  7638. // events to an Amazon Simple Queue Service (Amazon SQS) queue.
  7639. type QueueConfiguration struct {
  7640. _ struct{} `type:"structure"`
  7641. // Events is a required field
  7642. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  7643. // Container for object key name filtering rules. For information about key
  7644. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  7645. Filter *NotificationConfigurationFilter `type:"structure"`
  7646. // Optional unique identifier for configurations in a notification configuration.
  7647. // If you don't provide one, Amazon S3 will assign an ID.
  7648. Id *string `type:"string"`
  7649. // Amazon SQS queue ARN to which Amazon S3 will publish a message when it detects
  7650. // events of specified type.
  7651. //
  7652. // QueueArn is a required field
  7653. QueueArn *string `locationName:"Queue" type:"string" required:"true"`
  7654. }
  7655. // String returns the string representation
  7656. func (s QueueConfiguration) String() string {
  7657. return awsutil.Prettify(s)
  7658. }
  7659. // GoString returns the string representation
  7660. func (s QueueConfiguration) GoString() string {
  7661. return s.String()
  7662. }
  7663. // Validate inspects the fields of the type to determine if they are valid.
  7664. func (s *QueueConfiguration) Validate() error {
  7665. invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"}
  7666. if s.Events == nil {
  7667. invalidParams.Add(request.NewErrParamRequired("Events"))
  7668. }
  7669. if s.QueueArn == nil {
  7670. invalidParams.Add(request.NewErrParamRequired("QueueArn"))
  7671. }
  7672. if invalidParams.Len() > 0 {
  7673. return invalidParams
  7674. }
  7675. return nil
  7676. }
  7677. type QueueConfigurationDeprecated struct {
  7678. _ struct{} `type:"structure"`
  7679. // Bucket event for which to send notifications.
  7680. Event *string `deprecated:"true" type:"string" enum:"Event"`
  7681. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  7682. // Optional unique identifier for configurations in a notification configuration.
  7683. // If you don't provide one, Amazon S3 will assign an ID.
  7684. Id *string `type:"string"`
  7685. Queue *string `type:"string"`
  7686. }
  7687. // String returns the string representation
  7688. func (s QueueConfigurationDeprecated) String() string {
  7689. return awsutil.Prettify(s)
  7690. }
  7691. // GoString returns the string representation
  7692. func (s QueueConfigurationDeprecated) GoString() string {
  7693. return s.String()
  7694. }
  7695. type Redirect struct {
  7696. _ struct{} `type:"structure"`
  7697. // The host name to use in the redirect request.
  7698. HostName *string `type:"string"`
  7699. // The HTTP redirect code to use on the response. Not required if one of the
  7700. // siblings is present.
  7701. HttpRedirectCode *string `type:"string"`
  7702. // Protocol to use (http, https) when redirecting requests. The default is the
  7703. // protocol that is used in the original request.
  7704. Protocol *string `type:"string" enum:"Protocol"`
  7705. // The object key prefix to use in the redirect request. For example, to redirect
  7706. // requests for all pages with prefix docs/ (objects in the docs/ folder) to
  7707. // documents/, you can set a condition block with KeyPrefixEquals set to docs/
  7708. // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required
  7709. // if one of the siblings is present. Can be present only if ReplaceKeyWith
  7710. // is not provided.
  7711. ReplaceKeyPrefixWith *string `type:"string"`
  7712. // The specific object key to use in the redirect request. For example, redirect
  7713. // request to error.html. Not required if one of the sibling is present. Can
  7714. // be present only if ReplaceKeyPrefixWith is not provided.
  7715. ReplaceKeyWith *string `type:"string"`
  7716. }
  7717. // String returns the string representation
  7718. func (s Redirect) String() string {
  7719. return awsutil.Prettify(s)
  7720. }
  7721. // GoString returns the string representation
  7722. func (s Redirect) GoString() string {
  7723. return s.String()
  7724. }
  7725. type RedirectAllRequestsTo struct {
  7726. _ struct{} `type:"structure"`
  7727. // Name of the host where requests will be redirected.
  7728. //
  7729. // HostName is a required field
  7730. HostName *string `type:"string" required:"true"`
  7731. // Protocol to use (http, https) when redirecting requests. The default is the
  7732. // protocol that is used in the original request.
  7733. Protocol *string `type:"string" enum:"Protocol"`
  7734. }
  7735. // String returns the string representation
  7736. func (s RedirectAllRequestsTo) String() string {
  7737. return awsutil.Prettify(s)
  7738. }
  7739. // GoString returns the string representation
  7740. func (s RedirectAllRequestsTo) GoString() string {
  7741. return s.String()
  7742. }
  7743. // Validate inspects the fields of the type to determine if they are valid.
  7744. func (s *RedirectAllRequestsTo) Validate() error {
  7745. invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"}
  7746. if s.HostName == nil {
  7747. invalidParams.Add(request.NewErrParamRequired("HostName"))
  7748. }
  7749. if invalidParams.Len() > 0 {
  7750. return invalidParams
  7751. }
  7752. return nil
  7753. }
  7754. // Container for replication rules. You can add as many as 1,000 rules. Total
  7755. // replication configuration size can be up to 2 MB.
  7756. type ReplicationConfiguration struct {
  7757. _ struct{} `type:"structure"`
  7758. // Amazon Resource Name (ARN) of an IAM role for Amazon S3 to assume when replicating
  7759. // the objects.
  7760. //
  7761. // Role is a required field
  7762. Role *string `type:"string" required:"true"`
  7763. // Container for information about a particular replication rule. Replication
  7764. // configuration must have at least one rule and can contain up to 1,000 rules.
  7765. //
  7766. // Rules is a required field
  7767. Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  7768. }
  7769. // String returns the string representation
  7770. func (s ReplicationConfiguration) String() string {
  7771. return awsutil.Prettify(s)
  7772. }
  7773. // GoString returns the string representation
  7774. func (s ReplicationConfiguration) GoString() string {
  7775. return s.String()
  7776. }
  7777. // Validate inspects the fields of the type to determine if they are valid.
  7778. func (s *ReplicationConfiguration) Validate() error {
  7779. invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"}
  7780. if s.Role == nil {
  7781. invalidParams.Add(request.NewErrParamRequired("Role"))
  7782. }
  7783. if s.Rules == nil {
  7784. invalidParams.Add(request.NewErrParamRequired("Rules"))
  7785. }
  7786. if s.Rules != nil {
  7787. for i, v := range s.Rules {
  7788. if v == nil {
  7789. continue
  7790. }
  7791. if err := v.Validate(); err != nil {
  7792. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  7793. }
  7794. }
  7795. }
  7796. if invalidParams.Len() > 0 {
  7797. return invalidParams
  7798. }
  7799. return nil
  7800. }
  7801. type ReplicationRule struct {
  7802. _ struct{} `type:"structure"`
  7803. // Destination is a required field
  7804. Destination *Destination `type:"structure" required:"true"`
  7805. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  7806. ID *string `type:"string"`
  7807. // Object keyname prefix identifying one or more objects to which the rule applies.
  7808. // Maximum prefix length can be up to 1,024 characters. Overlapping prefixes
  7809. // are not supported.
  7810. //
  7811. // Prefix is a required field
  7812. Prefix *string `type:"string" required:"true"`
  7813. // The rule is ignored if status is not Enabled.
  7814. //
  7815. // Status is a required field
  7816. Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`
  7817. }
  7818. // String returns the string representation
  7819. func (s ReplicationRule) String() string {
  7820. return awsutil.Prettify(s)
  7821. }
  7822. // GoString returns the string representation
  7823. func (s ReplicationRule) GoString() string {
  7824. return s.String()
  7825. }
  7826. // Validate inspects the fields of the type to determine if they are valid.
  7827. func (s *ReplicationRule) Validate() error {
  7828. invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"}
  7829. if s.Destination == nil {
  7830. invalidParams.Add(request.NewErrParamRequired("Destination"))
  7831. }
  7832. if s.Prefix == nil {
  7833. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  7834. }
  7835. if s.Status == nil {
  7836. invalidParams.Add(request.NewErrParamRequired("Status"))
  7837. }
  7838. if s.Destination != nil {
  7839. if err := s.Destination.Validate(); err != nil {
  7840. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  7841. }
  7842. }
  7843. if invalidParams.Len() > 0 {
  7844. return invalidParams
  7845. }
  7846. return nil
  7847. }
  7848. type RequestPaymentConfiguration struct {
  7849. _ struct{} `type:"structure"`
  7850. // Specifies who pays for the download and request fees.
  7851. //
  7852. // Payer is a required field
  7853. Payer *string `type:"string" required:"true" enum:"Payer"`
  7854. }
  7855. // String returns the string representation
  7856. func (s RequestPaymentConfiguration) String() string {
  7857. return awsutil.Prettify(s)
  7858. }
  7859. // GoString returns the string representation
  7860. func (s RequestPaymentConfiguration) GoString() string {
  7861. return s.String()
  7862. }
  7863. // Validate inspects the fields of the type to determine if they are valid.
  7864. func (s *RequestPaymentConfiguration) Validate() error {
  7865. invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"}
  7866. if s.Payer == nil {
  7867. invalidParams.Add(request.NewErrParamRequired("Payer"))
  7868. }
  7869. if invalidParams.Len() > 0 {
  7870. return invalidParams
  7871. }
  7872. return nil
  7873. }
  7874. type RestoreObjectInput struct {
  7875. _ struct{} `type:"structure" payload:"RestoreRequest"`
  7876. // Bucket is a required field
  7877. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7878. // Key is a required field
  7879. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7880. // Confirms that the requester knows that she or he will be charged for the
  7881. // request. Bucket owners need not specify this parameter in their requests.
  7882. // Documentation on downloading objects from requester pays buckets can be found
  7883. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7884. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7885. RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure"`
  7886. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  7887. }
  7888. // String returns the string representation
  7889. func (s RestoreObjectInput) String() string {
  7890. return awsutil.Prettify(s)
  7891. }
  7892. // GoString returns the string representation
  7893. func (s RestoreObjectInput) GoString() string {
  7894. return s.String()
  7895. }
  7896. // Validate inspects the fields of the type to determine if they are valid.
  7897. func (s *RestoreObjectInput) Validate() error {
  7898. invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"}
  7899. if s.Bucket == nil {
  7900. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7901. }
  7902. if s.Key == nil {
  7903. invalidParams.Add(request.NewErrParamRequired("Key"))
  7904. }
  7905. if s.Key != nil && len(*s.Key) < 1 {
  7906. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7907. }
  7908. if s.RestoreRequest != nil {
  7909. if err := s.RestoreRequest.Validate(); err != nil {
  7910. invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams))
  7911. }
  7912. }
  7913. if invalidParams.Len() > 0 {
  7914. return invalidParams
  7915. }
  7916. return nil
  7917. }
  7918. type RestoreObjectOutput struct {
  7919. _ struct{} `type:"structure"`
  7920. // If present, indicates that the requester was successfully charged for the
  7921. // request.
  7922. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7923. }
  7924. // String returns the string representation
  7925. func (s RestoreObjectOutput) String() string {
  7926. return awsutil.Prettify(s)
  7927. }
  7928. // GoString returns the string representation
  7929. func (s RestoreObjectOutput) GoString() string {
  7930. return s.String()
  7931. }
  7932. type RestoreRequest struct {
  7933. _ struct{} `type:"structure"`
  7934. // Lifetime of the active copy in days
  7935. //
  7936. // Days is a required field
  7937. Days *int64 `type:"integer" required:"true"`
  7938. }
  7939. // String returns the string representation
  7940. func (s RestoreRequest) String() string {
  7941. return awsutil.Prettify(s)
  7942. }
  7943. // GoString returns the string representation
  7944. func (s RestoreRequest) GoString() string {
  7945. return s.String()
  7946. }
  7947. // Validate inspects the fields of the type to determine if they are valid.
  7948. func (s *RestoreRequest) Validate() error {
  7949. invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"}
  7950. if s.Days == nil {
  7951. invalidParams.Add(request.NewErrParamRequired("Days"))
  7952. }
  7953. if invalidParams.Len() > 0 {
  7954. return invalidParams
  7955. }
  7956. return nil
  7957. }
  7958. type RoutingRule struct {
  7959. _ struct{} `type:"structure"`
  7960. // A container for describing a condition that must be met for the specified
  7961. // redirect to apply. For example, 1. If request is for pages in the /docs folder,
  7962. // redirect to the /documents folder. 2. If request results in HTTP error 4xx,
  7963. // redirect request to another host where you might process the error.
  7964. Condition *Condition `type:"structure"`
  7965. // Container for redirect information. You can redirect requests to another
  7966. // host, to another page, or with another protocol. In the event of an error,
  7967. // you can can specify a different error code to return.
  7968. //
  7969. // Redirect is a required field
  7970. Redirect *Redirect `type:"structure" required:"true"`
  7971. }
  7972. // String returns the string representation
  7973. func (s RoutingRule) String() string {
  7974. return awsutil.Prettify(s)
  7975. }
  7976. // GoString returns the string representation
  7977. func (s RoutingRule) GoString() string {
  7978. return s.String()
  7979. }
  7980. // Validate inspects the fields of the type to determine if they are valid.
  7981. func (s *RoutingRule) Validate() error {
  7982. invalidParams := request.ErrInvalidParams{Context: "RoutingRule"}
  7983. if s.Redirect == nil {
  7984. invalidParams.Add(request.NewErrParamRequired("Redirect"))
  7985. }
  7986. if invalidParams.Len() > 0 {
  7987. return invalidParams
  7988. }
  7989. return nil
  7990. }
  7991. type Rule struct {
  7992. _ struct{} `type:"structure"`
  7993. // Specifies the days since the initiation of an Incomplete Multipart Upload
  7994. // that Lifecycle will wait before permanently removing all parts of the upload.
  7995. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  7996. Expiration *LifecycleExpiration `type:"structure"`
  7997. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  7998. ID *string `type:"string"`
  7999. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  8000. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  8001. // configuration action on a bucket that has versioning enabled (or suspended)
  8002. // to request that Amazon S3 delete noncurrent object versions at a specific
  8003. // period in the object's lifetime.
  8004. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  8005. // Container for the transition rule that describes when noncurrent objects
  8006. // transition to the STANDARD_IA or GLACIER storage class. If your bucket is
  8007. // versioning-enabled (or versioning is suspended), you can set this action
  8008. // to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA
  8009. // or GLACIER storage class at a specific period in the object's lifetime.
  8010. NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"`
  8011. // Prefix identifying one or more objects to which the rule applies.
  8012. //
  8013. // Prefix is a required field
  8014. Prefix *string `type:"string" required:"true"`
  8015. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  8016. // is not currently being applied.
  8017. //
  8018. // Status is a required field
  8019. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  8020. Transition *Transition `type:"structure"`
  8021. }
  8022. // String returns the string representation
  8023. func (s Rule) String() string {
  8024. return awsutil.Prettify(s)
  8025. }
  8026. // GoString returns the string representation
  8027. func (s Rule) GoString() string {
  8028. return s.String()
  8029. }
  8030. // Validate inspects the fields of the type to determine if they are valid.
  8031. func (s *Rule) Validate() error {
  8032. invalidParams := request.ErrInvalidParams{Context: "Rule"}
  8033. if s.Prefix == nil {
  8034. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  8035. }
  8036. if s.Status == nil {
  8037. invalidParams.Add(request.NewErrParamRequired("Status"))
  8038. }
  8039. if invalidParams.Len() > 0 {
  8040. return invalidParams
  8041. }
  8042. return nil
  8043. }
  8044. type Tag struct {
  8045. _ struct{} `type:"structure"`
  8046. // Name of the tag.
  8047. //
  8048. // Key is a required field
  8049. Key *string `min:"1" type:"string" required:"true"`
  8050. // Value of the tag.
  8051. //
  8052. // Value is a required field
  8053. Value *string `type:"string" required:"true"`
  8054. }
  8055. // String returns the string representation
  8056. func (s Tag) String() string {
  8057. return awsutil.Prettify(s)
  8058. }
  8059. // GoString returns the string representation
  8060. func (s Tag) GoString() string {
  8061. return s.String()
  8062. }
  8063. // Validate inspects the fields of the type to determine if they are valid.
  8064. func (s *Tag) Validate() error {
  8065. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  8066. if s.Key == nil {
  8067. invalidParams.Add(request.NewErrParamRequired("Key"))
  8068. }
  8069. if s.Key != nil && len(*s.Key) < 1 {
  8070. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8071. }
  8072. if s.Value == nil {
  8073. invalidParams.Add(request.NewErrParamRequired("Value"))
  8074. }
  8075. if invalidParams.Len() > 0 {
  8076. return invalidParams
  8077. }
  8078. return nil
  8079. }
  8080. type Tagging struct {
  8081. _ struct{} `type:"structure"`
  8082. // TagSet is a required field
  8083. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  8084. }
  8085. // String returns the string representation
  8086. func (s Tagging) String() string {
  8087. return awsutil.Prettify(s)
  8088. }
  8089. // GoString returns the string representation
  8090. func (s Tagging) GoString() string {
  8091. return s.String()
  8092. }
  8093. // Validate inspects the fields of the type to determine if they are valid.
  8094. func (s *Tagging) Validate() error {
  8095. invalidParams := request.ErrInvalidParams{Context: "Tagging"}
  8096. if s.TagSet == nil {
  8097. invalidParams.Add(request.NewErrParamRequired("TagSet"))
  8098. }
  8099. if s.TagSet != nil {
  8100. for i, v := range s.TagSet {
  8101. if v == nil {
  8102. continue
  8103. }
  8104. if err := v.Validate(); err != nil {
  8105. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams))
  8106. }
  8107. }
  8108. }
  8109. if invalidParams.Len() > 0 {
  8110. return invalidParams
  8111. }
  8112. return nil
  8113. }
  8114. type TargetGrant struct {
  8115. _ struct{} `type:"structure"`
  8116. Grantee *Grantee `type:"structure"`
  8117. // Logging permissions assigned to the Grantee for the bucket.
  8118. Permission *string `type:"string" enum:"BucketLogsPermission"`
  8119. }
  8120. // String returns the string representation
  8121. func (s TargetGrant) String() string {
  8122. return awsutil.Prettify(s)
  8123. }
  8124. // GoString returns the string representation
  8125. func (s TargetGrant) GoString() string {
  8126. return s.String()
  8127. }
  8128. // Validate inspects the fields of the type to determine if they are valid.
  8129. func (s *TargetGrant) Validate() error {
  8130. invalidParams := request.ErrInvalidParams{Context: "TargetGrant"}
  8131. if s.Grantee != nil {
  8132. if err := s.Grantee.Validate(); err != nil {
  8133. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  8134. }
  8135. }
  8136. if invalidParams.Len() > 0 {
  8137. return invalidParams
  8138. }
  8139. return nil
  8140. }
  8141. // Container for specifying the configuration when you want Amazon S3 to publish
  8142. // events to an Amazon Simple Notification Service (Amazon SNS) topic.
  8143. type TopicConfiguration struct {
  8144. _ struct{} `type:"structure"`
  8145. // Events is a required field
  8146. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  8147. // Container for object key name filtering rules. For information about key
  8148. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  8149. Filter *NotificationConfigurationFilter `type:"structure"`
  8150. // Optional unique identifier for configurations in a notification configuration.
  8151. // If you don't provide one, Amazon S3 will assign an ID.
  8152. Id *string `type:"string"`
  8153. // Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects
  8154. // events of specified type.
  8155. //
  8156. // TopicArn is a required field
  8157. TopicArn *string `locationName:"Topic" type:"string" required:"true"`
  8158. }
  8159. // String returns the string representation
  8160. func (s TopicConfiguration) String() string {
  8161. return awsutil.Prettify(s)
  8162. }
  8163. // GoString returns the string representation
  8164. func (s TopicConfiguration) GoString() string {
  8165. return s.String()
  8166. }
  8167. // Validate inspects the fields of the type to determine if they are valid.
  8168. func (s *TopicConfiguration) Validate() error {
  8169. invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"}
  8170. if s.Events == nil {
  8171. invalidParams.Add(request.NewErrParamRequired("Events"))
  8172. }
  8173. if s.TopicArn == nil {
  8174. invalidParams.Add(request.NewErrParamRequired("TopicArn"))
  8175. }
  8176. if invalidParams.Len() > 0 {
  8177. return invalidParams
  8178. }
  8179. return nil
  8180. }
  8181. type TopicConfigurationDeprecated struct {
  8182. _ struct{} `type:"structure"`
  8183. // Bucket event for which to send notifications.
  8184. Event *string `deprecated:"true" type:"string" enum:"Event"`
  8185. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  8186. // Optional unique identifier for configurations in a notification configuration.
  8187. // If you don't provide one, Amazon S3 will assign an ID.
  8188. Id *string `type:"string"`
  8189. // Amazon SNS topic to which Amazon S3 will publish a message to report the
  8190. // specified events for the bucket.
  8191. Topic *string `type:"string"`
  8192. }
  8193. // String returns the string representation
  8194. func (s TopicConfigurationDeprecated) String() string {
  8195. return awsutil.Prettify(s)
  8196. }
  8197. // GoString returns the string representation
  8198. func (s TopicConfigurationDeprecated) GoString() string {
  8199. return s.String()
  8200. }
  8201. type Transition struct {
  8202. _ struct{} `type:"structure"`
  8203. // Indicates at what date the object is to be moved or deleted. Should be in
  8204. // GMT ISO 8601 Format.
  8205. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  8206. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  8207. // The value must be a non-zero positive integer.
  8208. Days *int64 `type:"integer"`
  8209. // The class of storage used to store the object.
  8210. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  8211. }
  8212. // String returns the string representation
  8213. func (s Transition) String() string {
  8214. return awsutil.Prettify(s)
  8215. }
  8216. // GoString returns the string representation
  8217. func (s Transition) GoString() string {
  8218. return s.String()
  8219. }
  8220. type UploadPartCopyInput struct {
  8221. _ struct{} `type:"structure"`
  8222. // Bucket is a required field
  8223. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8224. // The name of the source bucket and key name of the source object, separated
  8225. // by a slash (/). Must be URL-encoded.
  8226. //
  8227. // CopySource is a required field
  8228. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  8229. // Copies the object if its entity tag (ETag) matches the specified tag.
  8230. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  8231. // Copies the object if it has been modified since the specified time.
  8232. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"`
  8233. // Copies the object if its entity tag (ETag) is different than the specified
  8234. // ETag.
  8235. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  8236. // Copies the object if it hasn't been modified since the specified time.
  8237. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"`
  8238. // The range of bytes to copy from the source object. The range value must use
  8239. // the form bytes=first-last, where the first and last are the zero-based byte
  8240. // offsets to copy. For example, bytes=0-9 indicates that you want to copy the
  8241. // first ten bytes of the source. You can copy a range only if the source object
  8242. // is greater than 5 GB.
  8243. CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`
  8244. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  8245. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  8246. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  8247. // the source object. The encryption key provided in this header must be one
  8248. // that was used when the source object was created.
  8249. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  8250. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  8251. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  8252. // key was transmitted without error.
  8253. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  8254. // Key is a required field
  8255. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  8256. // Part number of part being copied. This is a positive integer between 1 and
  8257. // 10,000.
  8258. //
  8259. // PartNumber is a required field
  8260. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  8261. // Confirms that the requester knows that she or he will be charged for the
  8262. // request. Bucket owners need not specify this parameter in their requests.
  8263. // Documentation on downloading objects from requester pays buckets can be found
  8264. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8265. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8266. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  8267. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  8268. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  8269. // data. This value is used to store the object and then it is discarded; Amazon
  8270. // does not store the encryption key. The key must be appropriate for use with
  8271. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  8272. // header. This must be the same encryption key specified in the initiate multipart
  8273. // upload request.
  8274. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  8275. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  8276. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  8277. // key was transmitted without error.
  8278. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  8279. // Upload ID identifying the multipart upload whose part is being copied.
  8280. //
  8281. // UploadId is a required field
  8282. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  8283. }
  8284. // String returns the string representation
  8285. func (s UploadPartCopyInput) String() string {
  8286. return awsutil.Prettify(s)
  8287. }
  8288. // GoString returns the string representation
  8289. func (s UploadPartCopyInput) GoString() string {
  8290. return s.String()
  8291. }
  8292. // Validate inspects the fields of the type to determine if they are valid.
  8293. func (s *UploadPartCopyInput) Validate() error {
  8294. invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"}
  8295. if s.Bucket == nil {
  8296. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8297. }
  8298. if s.CopySource == nil {
  8299. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  8300. }
  8301. if s.Key == nil {
  8302. invalidParams.Add(request.NewErrParamRequired("Key"))
  8303. }
  8304. if s.Key != nil && len(*s.Key) < 1 {
  8305. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8306. }
  8307. if s.PartNumber == nil {
  8308. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  8309. }
  8310. if s.UploadId == nil {
  8311. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  8312. }
  8313. if invalidParams.Len() > 0 {
  8314. return invalidParams
  8315. }
  8316. return nil
  8317. }
  8318. type UploadPartCopyOutput struct {
  8319. _ struct{} `type:"structure" payload:"CopyPartResult"`
  8320. CopyPartResult *CopyPartResult `type:"structure"`
  8321. // The version of the source object that was copied, if you have enabled versioning
  8322. // on the source bucket.
  8323. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  8324. // If present, indicates that the requester was successfully charged for the
  8325. // request.
  8326. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8327. // If server-side encryption with a customer-provided encryption key was requested,
  8328. // the response will include this header confirming the encryption algorithm
  8329. // used.
  8330. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  8331. // If server-side encryption with a customer-provided encryption key was requested,
  8332. // the response will include this header to provide round trip message integrity
  8333. // verification of the customer-provided encryption key.
  8334. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  8335. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  8336. // encryption key that was used for the object.
  8337. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  8338. // The Server-side encryption algorithm used when storing this object in S3
  8339. // (e.g., AES256, aws:kms).
  8340. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  8341. }
  8342. // String returns the string representation
  8343. func (s UploadPartCopyOutput) String() string {
  8344. return awsutil.Prettify(s)
  8345. }
  8346. // GoString returns the string representation
  8347. func (s UploadPartCopyOutput) GoString() string {
  8348. return s.String()
  8349. }
  8350. type UploadPartInput struct {
  8351. _ struct{} `type:"structure" payload:"Body"`
  8352. // Object data.
  8353. Body io.ReadSeeker `type:"blob"`
  8354. // Name of the bucket to which the multipart upload was initiated.
  8355. //
  8356. // Bucket is a required field
  8357. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8358. // Size of the body in bytes. This parameter is useful when the size of the
  8359. // body cannot be determined automatically.
  8360. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  8361. // Object key for which the multipart upload was initiated.
  8362. //
  8363. // Key is a required field
  8364. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  8365. // Part number of part being uploaded. This is a positive integer between 1
  8366. // and 10,000.
  8367. //
  8368. // PartNumber is a required field
  8369. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  8370. // Confirms that the requester knows that she or he will be charged for the
  8371. // request. Bucket owners need not specify this parameter in their requests.
  8372. // Documentation on downloading objects from requester pays buckets can be found
  8373. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8374. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8375. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  8376. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  8377. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  8378. // data. This value is used to store the object and then it is discarded; Amazon
  8379. // does not store the encryption key. The key must be appropriate for use with
  8380. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  8381. // header. This must be the same encryption key specified in the initiate multipart
  8382. // upload request.
  8383. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  8384. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  8385. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  8386. // key was transmitted without error.
  8387. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  8388. // Upload ID identifying the multipart upload whose part is being uploaded.
  8389. //
  8390. // UploadId is a required field
  8391. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  8392. }
  8393. // String returns the string representation
  8394. func (s UploadPartInput) String() string {
  8395. return awsutil.Prettify(s)
  8396. }
  8397. // GoString returns the string representation
  8398. func (s UploadPartInput) GoString() string {
  8399. return s.String()
  8400. }
  8401. // Validate inspects the fields of the type to determine if they are valid.
  8402. func (s *UploadPartInput) Validate() error {
  8403. invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"}
  8404. if s.Bucket == nil {
  8405. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8406. }
  8407. if s.Key == nil {
  8408. invalidParams.Add(request.NewErrParamRequired("Key"))
  8409. }
  8410. if s.Key != nil && len(*s.Key) < 1 {
  8411. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8412. }
  8413. if s.PartNumber == nil {
  8414. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  8415. }
  8416. if s.UploadId == nil {
  8417. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  8418. }
  8419. if invalidParams.Len() > 0 {
  8420. return invalidParams
  8421. }
  8422. return nil
  8423. }
  8424. type UploadPartOutput struct {
  8425. _ struct{} `type:"structure"`
  8426. // Entity tag for the uploaded object.
  8427. ETag *string `location:"header" locationName:"ETag" type:"string"`
  8428. // If present, indicates that the requester was successfully charged for the
  8429. // request.
  8430. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8431. // If server-side encryption with a customer-provided encryption key was requested,
  8432. // the response will include this header confirming the encryption algorithm
  8433. // used.
  8434. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  8435. // If server-side encryption with a customer-provided encryption key was requested,
  8436. // the response will include this header to provide round trip message integrity
  8437. // verification of the customer-provided encryption key.
  8438. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  8439. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  8440. // encryption key that was used for the object.
  8441. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  8442. // The Server-side encryption algorithm used when storing this object in S3
  8443. // (e.g., AES256, aws:kms).
  8444. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  8445. }
  8446. // String returns the string representation
  8447. func (s UploadPartOutput) String() string {
  8448. return awsutil.Prettify(s)
  8449. }
  8450. // GoString returns the string representation
  8451. func (s UploadPartOutput) GoString() string {
  8452. return s.String()
  8453. }
  8454. type VersioningConfiguration struct {
  8455. _ struct{} `type:"structure"`
  8456. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  8457. // This element is only returned if the bucket has been configured with MFA
  8458. // delete. If the bucket has never been so configured, this element is not returned.
  8459. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"`
  8460. // The versioning state of the bucket.
  8461. Status *string `type:"string" enum:"BucketVersioningStatus"`
  8462. }
  8463. // String returns the string representation
  8464. func (s VersioningConfiguration) String() string {
  8465. return awsutil.Prettify(s)
  8466. }
  8467. // GoString returns the string representation
  8468. func (s VersioningConfiguration) GoString() string {
  8469. return s.String()
  8470. }
  8471. type WebsiteConfiguration struct {
  8472. _ struct{} `type:"structure"`
  8473. ErrorDocument *ErrorDocument `type:"structure"`
  8474. IndexDocument *IndexDocument `type:"structure"`
  8475. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  8476. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  8477. }
  8478. // String returns the string representation
  8479. func (s WebsiteConfiguration) String() string {
  8480. return awsutil.Prettify(s)
  8481. }
  8482. // GoString returns the string representation
  8483. func (s WebsiteConfiguration) GoString() string {
  8484. return s.String()
  8485. }
  8486. // Validate inspects the fields of the type to determine if they are valid.
  8487. func (s *WebsiteConfiguration) Validate() error {
  8488. invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"}
  8489. if s.ErrorDocument != nil {
  8490. if err := s.ErrorDocument.Validate(); err != nil {
  8491. invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams))
  8492. }
  8493. }
  8494. if s.IndexDocument != nil {
  8495. if err := s.IndexDocument.Validate(); err != nil {
  8496. invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams))
  8497. }
  8498. }
  8499. if s.RedirectAllRequestsTo != nil {
  8500. if err := s.RedirectAllRequestsTo.Validate(); err != nil {
  8501. invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams))
  8502. }
  8503. }
  8504. if s.RoutingRules != nil {
  8505. for i, v := range s.RoutingRules {
  8506. if v == nil {
  8507. continue
  8508. }
  8509. if err := v.Validate(); err != nil {
  8510. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams))
  8511. }
  8512. }
  8513. }
  8514. if invalidParams.Len() > 0 {
  8515. return invalidParams
  8516. }
  8517. return nil
  8518. }
  8519. const (
  8520. // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value
  8521. BucketAccelerateStatusEnabled = "Enabled"
  8522. // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value
  8523. BucketAccelerateStatusSuspended = "Suspended"
  8524. )
  8525. const (
  8526. // BucketCannedACLPrivate is a BucketCannedACL enum value
  8527. BucketCannedACLPrivate = "private"
  8528. // BucketCannedACLPublicRead is a BucketCannedACL enum value
  8529. BucketCannedACLPublicRead = "public-read"
  8530. // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value
  8531. BucketCannedACLPublicReadWrite = "public-read-write"
  8532. // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value
  8533. BucketCannedACLAuthenticatedRead = "authenticated-read"
  8534. )
  8535. const (
  8536. // BucketLocationConstraintEu is a BucketLocationConstraint enum value
  8537. BucketLocationConstraintEu = "EU"
  8538. // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value
  8539. BucketLocationConstraintEuWest1 = "eu-west-1"
  8540. // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value
  8541. BucketLocationConstraintUsWest1 = "us-west-1"
  8542. // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value
  8543. BucketLocationConstraintUsWest2 = "us-west-2"
  8544. // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value
  8545. BucketLocationConstraintApSouth1 = "ap-south-1"
  8546. // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value
  8547. BucketLocationConstraintApSoutheast1 = "ap-southeast-1"
  8548. // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value
  8549. BucketLocationConstraintApSoutheast2 = "ap-southeast-2"
  8550. // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value
  8551. BucketLocationConstraintApNortheast1 = "ap-northeast-1"
  8552. // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value
  8553. BucketLocationConstraintSaEast1 = "sa-east-1"
  8554. // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value
  8555. BucketLocationConstraintCnNorth1 = "cn-north-1"
  8556. // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value
  8557. BucketLocationConstraintEuCentral1 = "eu-central-1"
  8558. )
  8559. const (
  8560. // BucketLogsPermissionFullControl is a BucketLogsPermission enum value
  8561. BucketLogsPermissionFullControl = "FULL_CONTROL"
  8562. // BucketLogsPermissionRead is a BucketLogsPermission enum value
  8563. BucketLogsPermissionRead = "READ"
  8564. // BucketLogsPermissionWrite is a BucketLogsPermission enum value
  8565. BucketLogsPermissionWrite = "WRITE"
  8566. )
  8567. const (
  8568. // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value
  8569. BucketVersioningStatusEnabled = "Enabled"
  8570. // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value
  8571. BucketVersioningStatusSuspended = "Suspended"
  8572. )
  8573. // Requests Amazon S3 to encode the object keys in the response and specifies
  8574. // the encoding method to use. An object key may contain any Unicode character;
  8575. // however, XML 1.0 parser cannot parse some characters, such as characters
  8576. // with an ASCII value from 0 to 10. For characters that are not supported in
  8577. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  8578. // keys in the response.
  8579. const (
  8580. // EncodingTypeUrl is a EncodingType enum value
  8581. EncodingTypeUrl = "url"
  8582. )
  8583. // Bucket event for which to send notifications.
  8584. const (
  8585. // EventS3ReducedRedundancyLostObject is a Event enum value
  8586. EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject"
  8587. // EventS3ObjectCreated is a Event enum value
  8588. EventS3ObjectCreated = "s3:ObjectCreated:*"
  8589. // EventS3ObjectCreatedPut is a Event enum value
  8590. EventS3ObjectCreatedPut = "s3:ObjectCreated:Put"
  8591. // EventS3ObjectCreatedPost is a Event enum value
  8592. EventS3ObjectCreatedPost = "s3:ObjectCreated:Post"
  8593. // EventS3ObjectCreatedCopy is a Event enum value
  8594. EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy"
  8595. // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value
  8596. EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload"
  8597. // EventS3ObjectRemoved is a Event enum value
  8598. EventS3ObjectRemoved = "s3:ObjectRemoved:*"
  8599. // EventS3ObjectRemovedDelete is a Event enum value
  8600. EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete"
  8601. // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value
  8602. EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated"
  8603. )
  8604. const (
  8605. // ExpirationStatusEnabled is a ExpirationStatus enum value
  8606. ExpirationStatusEnabled = "Enabled"
  8607. // ExpirationStatusDisabled is a ExpirationStatus enum value
  8608. ExpirationStatusDisabled = "Disabled"
  8609. )
  8610. const (
  8611. // FilterRuleNamePrefix is a FilterRuleName enum value
  8612. FilterRuleNamePrefix = "prefix"
  8613. // FilterRuleNameSuffix is a FilterRuleName enum value
  8614. FilterRuleNameSuffix = "suffix"
  8615. )
  8616. const (
  8617. // MFADeleteEnabled is a MFADelete enum value
  8618. MFADeleteEnabled = "Enabled"
  8619. // MFADeleteDisabled is a MFADelete enum value
  8620. MFADeleteDisabled = "Disabled"
  8621. )
  8622. const (
  8623. // MFADeleteStatusEnabled is a MFADeleteStatus enum value
  8624. MFADeleteStatusEnabled = "Enabled"
  8625. // MFADeleteStatusDisabled is a MFADeleteStatus enum value
  8626. MFADeleteStatusDisabled = "Disabled"
  8627. )
  8628. const (
  8629. // MetadataDirectiveCopy is a MetadataDirective enum value
  8630. MetadataDirectiveCopy = "COPY"
  8631. // MetadataDirectiveReplace is a MetadataDirective enum value
  8632. MetadataDirectiveReplace = "REPLACE"
  8633. )
  8634. const (
  8635. // ObjectCannedACLPrivate is a ObjectCannedACL enum value
  8636. ObjectCannedACLPrivate = "private"
  8637. // ObjectCannedACLPublicRead is a ObjectCannedACL enum value
  8638. ObjectCannedACLPublicRead = "public-read"
  8639. // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value
  8640. ObjectCannedACLPublicReadWrite = "public-read-write"
  8641. // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value
  8642. ObjectCannedACLAuthenticatedRead = "authenticated-read"
  8643. // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value
  8644. ObjectCannedACLAwsExecRead = "aws-exec-read"
  8645. // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value
  8646. ObjectCannedACLBucketOwnerRead = "bucket-owner-read"
  8647. // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value
  8648. ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
  8649. )
  8650. const (
  8651. // ObjectStorageClassStandard is a ObjectStorageClass enum value
  8652. ObjectStorageClassStandard = "STANDARD"
  8653. // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
  8654. ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  8655. // ObjectStorageClassGlacier is a ObjectStorageClass enum value
  8656. ObjectStorageClassGlacier = "GLACIER"
  8657. )
  8658. const (
  8659. // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value
  8660. ObjectVersionStorageClassStandard = "STANDARD"
  8661. )
  8662. const (
  8663. // PayerRequester is a Payer enum value
  8664. PayerRequester = "Requester"
  8665. // PayerBucketOwner is a Payer enum value
  8666. PayerBucketOwner = "BucketOwner"
  8667. )
  8668. const (
  8669. // PermissionFullControl is a Permission enum value
  8670. PermissionFullControl = "FULL_CONTROL"
  8671. // PermissionWrite is a Permission enum value
  8672. PermissionWrite = "WRITE"
  8673. // PermissionWriteAcp is a Permission enum value
  8674. PermissionWriteAcp = "WRITE_ACP"
  8675. // PermissionRead is a Permission enum value
  8676. PermissionRead = "READ"
  8677. // PermissionReadAcp is a Permission enum value
  8678. PermissionReadAcp = "READ_ACP"
  8679. )
  8680. const (
  8681. // ProtocolHttp is a Protocol enum value
  8682. ProtocolHttp = "http"
  8683. // ProtocolHttps is a Protocol enum value
  8684. ProtocolHttps = "https"
  8685. )
  8686. const (
  8687. // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value
  8688. ReplicationRuleStatusEnabled = "Enabled"
  8689. // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value
  8690. ReplicationRuleStatusDisabled = "Disabled"
  8691. )
  8692. const (
  8693. // ReplicationStatusComplete is a ReplicationStatus enum value
  8694. ReplicationStatusComplete = "COMPLETE"
  8695. // ReplicationStatusPending is a ReplicationStatus enum value
  8696. ReplicationStatusPending = "PENDING"
  8697. // ReplicationStatusFailed is a ReplicationStatus enum value
  8698. ReplicationStatusFailed = "FAILED"
  8699. // ReplicationStatusReplica is a ReplicationStatus enum value
  8700. ReplicationStatusReplica = "REPLICA"
  8701. )
  8702. // If present, indicates that the requester was successfully charged for the
  8703. // request.
  8704. const (
  8705. // RequestChargedRequester is a RequestCharged enum value
  8706. RequestChargedRequester = "requester"
  8707. )
  8708. // Confirms that the requester knows that she or he will be charged for the
  8709. // request. Bucket owners need not specify this parameter in their requests.
  8710. // Documentation on downloading objects from requester pays buckets can be found
  8711. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8712. const (
  8713. // RequestPayerRequester is a RequestPayer enum value
  8714. RequestPayerRequester = "requester"
  8715. )
  8716. const (
  8717. // ServerSideEncryptionAes256 is a ServerSideEncryption enum value
  8718. ServerSideEncryptionAes256 = "AES256"
  8719. // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value
  8720. ServerSideEncryptionAwsKms = "aws:kms"
  8721. )
  8722. const (
  8723. // StorageClassStandard is a StorageClass enum value
  8724. StorageClassStandard = "STANDARD"
  8725. // StorageClassReducedRedundancy is a StorageClass enum value
  8726. StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  8727. // StorageClassStandardIa is a StorageClass enum value
  8728. StorageClassStandardIa = "STANDARD_IA"
  8729. )
  8730. const (
  8731. // TransitionStorageClassGlacier is a TransitionStorageClass enum value
  8732. TransitionStorageClassGlacier = "GLACIER"
  8733. // TransitionStorageClassStandardIa is a TransitionStorageClass enum value
  8734. TransitionStorageClassStandardIa = "STANDARD_IA"
  8735. )
  8736. const (
  8737. // TypeCanonicalUser is a Type enum value
  8738. TypeCanonicalUser = "CanonicalUser"
  8739. // TypeAmazonCustomerByEmail is a Type enum value
  8740. TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"
  8741. // TypeGroup is a Type enum value
  8742. TypeGroup = "Group"
  8743. )