api.go 319 KB

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