api.go 216 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720
  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. "context"
  6. "github.com/ks3sdklib/aws-sdk-go/aws"
  7. "github.com/ks3sdklib/aws-sdk-go/aws/awserr"
  8. "github.com/ks3sdklib/aws-sdk-go/internal/apierr"
  9. "github.com/ks3sdklib/aws-sdk-go/internal/crc"
  10. "hash"
  11. "io"
  12. "net/http"
  13. "net/url"
  14. "os"
  15. "strings"
  16. "time"
  17. )
  18. // AbortMultipartUploadRequest generates a request for the AbortMultipartUpload operation.
  19. func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *aws.Request, output *AbortMultipartUploadOutput) {
  20. op := &aws.Operation{
  21. Name: "AbortMultipartUpload",
  22. HTTPMethod: "DELETE",
  23. HTTPPath: "/{Bucket}/{Key+}",
  24. }
  25. if input == nil {
  26. input = &AbortMultipartUploadInput{}
  27. }
  28. req = c.newRequest(op, input, output)
  29. output = &AbortMultipartUploadOutput{}
  30. req.Data = output
  31. return
  32. }
  33. // AbortMultipartUpload Aborts a multipart upload.
  34. //
  35. // To verify that all parts have been removed, so you don't get charged for
  36. // the part storage, you should call the List Parts operation and ensure the
  37. // parts list is empty.
  38. func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
  39. req, out := c.AbortMultipartUploadRequest(input)
  40. err := req.Send()
  41. return out, err
  42. }
  43. func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
  44. req, out := c.AbortMultipartUploadRequest(input)
  45. req.SetContext(ctx)
  46. err := req.Send()
  47. return out, err
  48. }
  49. // CompleteMultipartUploadRequest generates a request for the CompleteMultipartUpload operation.
  50. func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *aws.Request, output *CompleteMultipartUploadOutput) {
  51. op := &aws.Operation{
  52. Name: "CompleteMultipartUpload",
  53. HTTPMethod: "POST",
  54. HTTPPath: "/{Bucket}/{Key+}",
  55. }
  56. if input == nil {
  57. input = &CompleteMultipartUploadInput{}
  58. }
  59. req = c.newRequest(op, input, output)
  60. output = &CompleteMultipartUploadOutput{}
  61. req.Data = output
  62. return
  63. }
  64. // CompleteMultipartUpload Completes a multipart upload by assembling previously uploaded parts.
  65. func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
  66. req, out := c.CompleteMultipartUploadRequest(input)
  67. err := req.Send()
  68. return out, err
  69. }
  70. func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
  71. req, out := c.CompleteMultipartUploadRequest(input)
  72. req.SetContext(ctx)
  73. err := req.Send()
  74. return out, err
  75. }
  76. // CopyObjectRequest generates a request for the CopyObject operation.
  77. func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *aws.Request, output *CopyObjectOutput) {
  78. op := &aws.Operation{
  79. Name: "CopyObject",
  80. HTTPMethod: "PUT",
  81. HTTPPath: "/{Bucket}/{Key+}",
  82. }
  83. if input == nil {
  84. input = &CopyObjectInput{}
  85. }
  86. // URL encode the copy source
  87. if input.CopySource == nil {
  88. input.CopySource = aws.String(BuildCopySource(input.SourceBucket, input.SourceKey))
  89. }
  90. req = c.newRequest(op, input, output)
  91. output = &CopyObjectOutput{}
  92. req.Data = output
  93. return
  94. }
  95. // CopyObject Creates a copy of an object that is already stored in KS3.
  96. func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
  97. req, out := c.CopyObjectRequest(input)
  98. err := req.Send()
  99. return out, err
  100. }
  101. func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput) (*CopyObjectOutput, error) {
  102. req, out := c.CopyObjectRequest(input)
  103. req.SetContext(ctx)
  104. err := req.Send()
  105. return out, err
  106. }
  107. // CreateBucketRequest generates a request for the CreateBucket operation.
  108. func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *aws.Request, output *CreateBucketOutput) {
  109. var op *aws.Operation
  110. if input.ProjectId == nil {
  111. op = &aws.Operation{
  112. Name: "CreateBucket",
  113. HTTPMethod: "PUT",
  114. HTTPPath: "/{Bucket}",
  115. }
  116. } else {
  117. op = &aws.Operation{
  118. Name: "CreateBucket",
  119. HTTPMethod: "PUT",
  120. HTTPPath: "/{Bucket}?projectId=" + *input.ProjectId,
  121. }
  122. }
  123. if input == nil {
  124. input = &CreateBucketInput{}
  125. }
  126. req = c.newRequest(op, input, output)
  127. output = &CreateBucketOutput{}
  128. req.Data = output
  129. return
  130. }
  131. // CreateBucket Creates a new bucket.
  132. func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
  133. req, out := c.CreateBucketRequest(input)
  134. err := req.Send()
  135. return out, err
  136. }
  137. func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput) (*CreateBucketOutput, error) {
  138. req, out := c.CreateBucketRequest(input)
  139. req.SetContext(ctx)
  140. err := req.Send()
  141. return out, err
  142. }
  143. // CreateMultipartUploadRequest generates a request for the CreateMultipartUpload operation.
  144. func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *aws.Request, output *CreateMultipartUploadOutput) {
  145. op := &aws.Operation{
  146. Name: "CreateMultipartUpload",
  147. HTTPMethod: "POST",
  148. HTTPPath: "/{Bucket}/{Key+}?uploads",
  149. }
  150. if input == nil {
  151. input = &CreateMultipartUploadInput{}
  152. }
  153. req = c.newRequest(op, input, output)
  154. output = &CreateMultipartUploadOutput{}
  155. req.Data = output
  156. return
  157. }
  158. // CreateMultipartUpload Initiates a multipart upload and returns an upload ID.
  159. //
  160. // Note: After you initiate multipart upload and upload one or more parts,
  161. // you must either complete or abort multipart upload in order to stop getting
  162. // charged for storage of the uploaded parts. Only after you either complete
  163. // or abort multipart upload, Amazon S3 frees up the parts storage and stops
  164. // charging you for the parts storage.
  165. func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
  166. req, out := c.CreateMultipartUploadRequest(input)
  167. err := req.Send()
  168. return out, err
  169. }
  170. func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
  171. req, out := c.CreateMultipartUploadRequest(input)
  172. req.SetContext(ctx)
  173. err := req.Send()
  174. return out, err
  175. }
  176. // DeleteBucketRequest generates a request for the DeleteBucket operation.
  177. func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *aws.Request, output *DeleteBucketOutput) {
  178. op := &aws.Operation{
  179. Name: "DeleteBucket",
  180. HTTPMethod: "DELETE",
  181. HTTPPath: "/{Bucket}",
  182. }
  183. if input == nil {
  184. input = &DeleteBucketInput{}
  185. }
  186. req = c.newRequest(op, input, output)
  187. output = &DeleteBucketOutput{}
  188. req.Data = output
  189. return
  190. }
  191. // DeleteBucket Deletes the bucket. All objects (including all object versions and Delete
  192. // Markers) in the bucket must be deleted before the bucket itself can be deleted.
  193. func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
  194. req, out := c.DeleteBucketRequest(input)
  195. err := req.Send()
  196. return out, err
  197. }
  198. func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput) (*DeleteBucketOutput, error) {
  199. req, out := c.DeleteBucketRequest(input)
  200. req.SetContext(ctx)
  201. err := req.Send()
  202. return out, err
  203. }
  204. // DeleteBucketPolicyRequest generates a request for the DeleteBucketPolicy operation.
  205. func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *aws.Request, output *DeleteBucketPolicyOutput) {
  206. op := &aws.Operation{
  207. Name: "DeleteBucketPolicy",
  208. HTTPMethod: "DELETE",
  209. HTTPPath: "/{Bucket}?policy",
  210. }
  211. if input == nil {
  212. input = &DeleteBucketPolicyInput{}
  213. }
  214. req = c.newRequest(op, input, output)
  215. output = &DeleteBucketPolicyOutput{}
  216. req.Data = output
  217. return
  218. }
  219. // DeleteBucketPolicy Deletes the policy from the bucket.
  220. func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
  221. req, out := c.DeleteBucketPolicyRequest(input)
  222. err := req.Send()
  223. return out, err
  224. }
  225. func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
  226. req, out := c.DeleteBucketPolicyRequest(input)
  227. req.SetContext(ctx)
  228. err := req.Send()
  229. return out, err
  230. }
  231. // DeleteBucketWebsiteRequest generates a request for the DeleteBucketWebsite operation.
  232. func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *aws.Request, output *DeleteBucketWebsiteOutput) {
  233. op := &aws.Operation{
  234. Name: "DeleteBucketWebsite",
  235. HTTPMethod: "DELETE",
  236. HTTPPath: "/{Bucket}?website",
  237. }
  238. if input == nil {
  239. input = &DeleteBucketWebsiteInput{}
  240. }
  241. req = c.newRequest(op, input, output)
  242. output = &DeleteBucketWebsiteOutput{}
  243. req.Data = output
  244. return
  245. }
  246. // DeleteBucketWebsite This operation removes the website configuration from the bucket.
  247. func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
  248. req, out := c.DeleteBucketWebsiteRequest(input)
  249. err := req.Send()
  250. return out, err
  251. }
  252. func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
  253. req, out := c.DeleteBucketWebsiteRequest(input)
  254. req.SetContext(ctx)
  255. err := req.Send()
  256. return out, err
  257. }
  258. // DeleteObjectRequest generates a request for the DeleteObject operation.
  259. func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *aws.Request, output *DeleteObjectOutput) {
  260. op := &aws.Operation{
  261. Name: "DeleteObject",
  262. HTTPMethod: "DELETE",
  263. HTTPPath: "/{Bucket}/{Key+}",
  264. }
  265. if input == nil {
  266. input = &DeleteObjectInput{}
  267. }
  268. req = c.newRequest(op, input, output)
  269. output = &DeleteObjectOutput{}
  270. req.Data = output
  271. return
  272. }
  273. // DeleteObject Removes the null version (if there is one) of an object and inserts a delete
  274. // marker, which becomes the latest version of the object. If there isn't a
  275. // null version, Amazon S3 does not remove any objects.
  276. func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
  277. req, out := c.DeleteObjectRequest(input)
  278. err := req.Send()
  279. return out, err
  280. }
  281. func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput) (*DeleteObjectOutput, error) {
  282. req, out := c.DeleteObjectRequest(input)
  283. req.SetContext(ctx)
  284. err := req.Send()
  285. return out, err
  286. }
  287. // DeleteObjectsRequest generates a request for the DeleteObjects operation.
  288. func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *aws.Request, output *DeleteObjectsOutput) {
  289. op := &aws.Operation{
  290. Name: "DeleteObjects",
  291. HTTPMethod: "POST",
  292. HTTPPath: "/{Bucket}?delete",
  293. }
  294. if input == nil {
  295. input = &DeleteObjectsInput{}
  296. }
  297. req = c.newRequest(op, input, output)
  298. output = &DeleteObjectsOutput{}
  299. req.Data = output
  300. return
  301. }
  302. func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
  303. return c.DeleteObjectsWithContext(context.Background(), input)
  304. }
  305. func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
  306. var errors []*Error
  307. var okList []*DeletedObject
  308. if input == nil {
  309. input = &DeleteObjectsInput{}
  310. }
  311. for _, t := range input.Delete.Objects {
  312. _, err := c.DeleteObjectWithContext(ctx, &DeleteObjectInput{Bucket: input.Bucket, Key: t.Key})
  313. if input.IsReTurnResults != nil && *input.IsReTurnResults == true {
  314. if err != nil {
  315. aerr, _ := err.(awserr.Error)
  316. errors = append(errors, &Error{Key: t.Key, Code: aws.String(aerr.Code()), Message: aws.String(aerr.Message())})
  317. } else {
  318. okList = append(okList, &DeletedObject{Key: t.Key})
  319. }
  320. }
  321. }
  322. output := &DeleteObjectsOutput{
  323. Deleted: okList,
  324. Errors: errors,
  325. }
  326. return output, nil
  327. }
  328. // DeleteBucketPrefix deletes all objects with the specified prefix in the bucket.
  329. func (c *S3) DeleteBucketPrefix(input *DeleteBucketPrefixInput) (*DeleteObjectsOutput, error) {
  330. return c.DeleteBucketPrefixWithContext(context.Background(), input)
  331. }
  332. func (c *S3) DeleteBucketPrefixWithContext(ctx aws.Context, input *DeleteBucketPrefixInput) (*DeleteObjectsOutput, error) {
  333. var errors []*Error
  334. var okList []*DeletedObject
  335. var output = &DeleteObjectsOutput{
  336. Deleted: okList,
  337. Errors: errors,
  338. }
  339. if input == nil {
  340. input = &DeleteBucketPrefixInput{}
  341. }
  342. marker := aws.String("")
  343. maxKeys := aws.Long(100)
  344. if input.MaxKeys != nil {
  345. maxKeys = input.MaxKeys
  346. }
  347. for {
  348. resp, err := c.ListObjectsWithContext(ctx, &ListObjectsInput{
  349. Bucket: input.Bucket,
  350. Prefix: input.Prefix,
  351. Marker: marker,
  352. MaxKeys: maxKeys,
  353. })
  354. if err == nil {
  355. for _, t := range resp.Contents {
  356. _, err := c.DeleteObjectWithContext(ctx, &DeleteObjectInput{Bucket: input.Bucket, Key: t.Key})
  357. if input.IsReTurnResults != nil && *input.IsReTurnResults == true {
  358. if err != nil {
  359. aerr, _ := err.(awserr.Error)
  360. errors = append(errors, &Error{Key: t.Key, Code: aws.String(aerr.Code()), Message: aws.String(aerr.Message())})
  361. output.Errors = errors
  362. } else {
  363. okList = append(okList, &DeletedObject{Key: t.Key})
  364. output.Deleted = okList
  365. }
  366. }
  367. }
  368. if *resp.IsTruncated == false {
  369. break
  370. }
  371. marker = resp.Contents[*maxKeys-1].Key
  372. } else {
  373. return output, err
  374. }
  375. }
  376. return output, nil
  377. }
  378. // TryDeleteBucketPrefix deletes all objects with the specified prefix in the bucket, and retries at most 3 times.
  379. func (c *S3) TryDeleteBucketPrefix(input *DeleteBucketPrefixInput) (*DeleteObjectsOutput, error) {
  380. return c.TryDeleteBucketPrefixWithContext(context.Background(), input)
  381. }
  382. func (c *S3) TryDeleteBucketPrefixWithContext(ctx aws.Context, input *DeleteBucketPrefixInput) (*DeleteObjectsOutput, error) {
  383. params := input
  384. var output *DeleteObjectsOutput
  385. err := Do(func(attempt int) (bool, error) {
  386. var err error
  387. output, err = c.DeleteBucketPrefixWithContext(ctx, params)
  388. return attempt < 3, err // 重试3次
  389. })
  390. return output, err
  391. }
  392. // GetBucketACLRequest generates a request for the GetBucketACL operation.
  393. func (c *S3) GetBucketACLRequest(input *GetBucketACLInput) (req *aws.Request, output *GetBucketACLOutput) {
  394. op := &aws.Operation{
  395. Name: "GetBucketAcl",
  396. HTTPMethod: "GET",
  397. HTTPPath: "/{Bucket}?acl",
  398. }
  399. if input == nil {
  400. input = &GetBucketACLInput{}
  401. }
  402. req = c.newRequest(op, input, output)
  403. output = &GetBucketACLOutput{}
  404. req.Data = output
  405. return
  406. }
  407. // GetBucketACL Gets the access control policy for the bucket.
  408. func (c *S3) GetBucketACL(input *GetBucketACLInput) (*GetBucketACLOutput, error) {
  409. req, out := c.GetBucketACLRequest(input)
  410. err := req.Send()
  411. return out, err
  412. }
  413. func (c *S3) GetBucketACLWithContext(ctx aws.Context, input *GetBucketACLInput) (*GetBucketACLOutput, error) {
  414. req, out := c.GetBucketACLRequest(input)
  415. req.SetContext(ctx)
  416. err := req.Send()
  417. return out, err
  418. }
  419. // GetBucketLocationRequest generates a request for the GetBucketLocation operation.
  420. func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *aws.Request, output *GetBucketLocationOutput) {
  421. op := &aws.Operation{
  422. Name: "GetBucketLocation",
  423. HTTPMethod: "GET",
  424. HTTPPath: "/{Bucket}?location",
  425. }
  426. if input == nil {
  427. input = &GetBucketLocationInput{}
  428. }
  429. req = c.newRequest(op, input, output)
  430. req.Handlers.Unmarshal.PushFront(buildGetBucketLocation)
  431. output = &GetBucketLocationOutput{}
  432. req.Data = output
  433. return
  434. }
  435. // GetBucketLocation Returns the region the bucket resides in.
  436. func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
  437. req, out := c.GetBucketLocationRequest(input)
  438. err := req.Send()
  439. return out, err
  440. }
  441. func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
  442. req, out := c.GetBucketLocationRequest(input)
  443. req.SetContext(ctx)
  444. err := req.Send()
  445. return out, err
  446. }
  447. // GetBucketLoggingRequest generates a request for the GetBucketLogging operation.
  448. func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *aws.Request, output *GetBucketLoggingOutput) {
  449. op := &aws.Operation{
  450. Name: "GetBucketLogging",
  451. HTTPMethod: "GET",
  452. HTTPPath: "/{Bucket}?logging",
  453. }
  454. if input == nil {
  455. input = &GetBucketLoggingInput{}
  456. }
  457. req = c.newRequest(op, input, output)
  458. output = &GetBucketLoggingOutput{}
  459. req.Data = output
  460. return
  461. }
  462. // GetBucketLogging Returns the logging status of a bucket and the permissions users have to
  463. // view and modify that status. To use GET, you must be the bucket owner.
  464. func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
  465. req, out := c.GetBucketLoggingRequest(input)
  466. err := req.Send()
  467. return out, err
  468. }
  469. func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
  470. req, out := c.GetBucketLoggingRequest(input)
  471. req.SetContext(ctx)
  472. err := req.Send()
  473. return out, err
  474. }
  475. // GetBucketNotificationRequest generates a request for the GetBucketNotification operation.
  476. func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *aws.Request, output *NotificationConfigurationDeprecated) {
  477. op := &aws.Operation{
  478. Name: "GetBucketNotification",
  479. HTTPMethod: "GET",
  480. HTTPPath: "/{Bucket}?notification",
  481. }
  482. if input == nil {
  483. input = &GetBucketNotificationConfigurationRequest{}
  484. }
  485. req = c.newRequest(op, input, output)
  486. output = &NotificationConfigurationDeprecated{}
  487. req.Data = output
  488. return
  489. }
  490. // GetBucketNotification Deprecated, see the GetBucketNotificationConfiguration operation.
  491. func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
  492. req, out := c.GetBucketNotificationRequest(input)
  493. err := req.Send()
  494. return out, err
  495. }
  496. func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
  497. req, out := c.GetBucketNotificationRequest(input)
  498. req.SetContext(ctx)
  499. err := req.Send()
  500. return out, err
  501. }
  502. // GetBucketNotificationConfigurationRequest generates a request for the GetBucketNotificationConfiguration operation.
  503. func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *aws.Request, output *NotificationConfiguration) {
  504. op := &aws.Operation{
  505. Name: "GetBucketNotificationConfiguration",
  506. HTTPMethod: "GET",
  507. HTTPPath: "/{Bucket}?notification",
  508. }
  509. if input == nil {
  510. input = &GetBucketNotificationConfigurationRequest{}
  511. }
  512. req = c.newRequest(op, input, output)
  513. output = &NotificationConfiguration{}
  514. req.Data = output
  515. return
  516. }
  517. // GetBucketNotificationConfiguration Returns the notification configuration of a bucket.
  518. func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
  519. req, out := c.GetBucketNotificationConfigurationRequest(input)
  520. err := req.Send()
  521. return out, err
  522. }
  523. func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
  524. req, out := c.GetBucketNotificationConfigurationRequest(input)
  525. req.SetContext(ctx)
  526. err := req.Send()
  527. return out, err
  528. }
  529. // GetBucketPolicyRequest generates a request for the GetBucketPolicy operation.
  530. func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *aws.Request, output *GetBucketPolicyOutput) {
  531. op := &aws.Operation{
  532. Name: "GetBucketPolicy",
  533. HTTPMethod: "GET",
  534. HTTPPath: "/{Bucket}?policy",
  535. }
  536. if input == nil {
  537. input = &GetBucketPolicyInput{}
  538. }
  539. req = c.newRequest(op, input, output)
  540. output = &GetBucketPolicyOutput{}
  541. req.Data = output
  542. return
  543. }
  544. // GetBucketPolicy Returns the policy of a specified bucket.
  545. func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
  546. req, out := c.GetBucketPolicyRequest(input)
  547. err := req.Send()
  548. return out, err
  549. }
  550. func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
  551. req, out := c.GetBucketPolicyRequest(input)
  552. req.SetContext(ctx)
  553. err := req.Send()
  554. return out, err
  555. }
  556. // GetBucketRequestPaymentRequest generates a request for the GetBucketRequestPayment operation.
  557. func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *aws.Request, output *GetBucketRequestPaymentOutput) {
  558. op := &aws.Operation{
  559. Name: "GetBucketRequestPayment",
  560. HTTPMethod: "GET",
  561. HTTPPath: "/{Bucket}?requestPayment",
  562. }
  563. if input == nil {
  564. input = &GetBucketRequestPaymentInput{}
  565. }
  566. req = c.newRequest(op, input, output)
  567. output = &GetBucketRequestPaymentOutput{}
  568. req.Data = output
  569. return
  570. }
  571. // GetBucketRequestPayment Returns the request payment configuration of a bucket.
  572. func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
  573. req, out := c.GetBucketRequestPaymentRequest(input)
  574. err := req.Send()
  575. return out, err
  576. }
  577. func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
  578. req, out := c.GetBucketRequestPaymentRequest(input)
  579. req.SetContext(ctx)
  580. err := req.Send()
  581. return out, err
  582. }
  583. // GetBucketVersioningRequest generates a request for the GetBucketVersioning operation.
  584. func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *aws.Request, output *GetBucketVersioningOutput) {
  585. op := &aws.Operation{
  586. Name: "GetBucketVersioning",
  587. HTTPMethod: "GET",
  588. HTTPPath: "/{Bucket}?versioning",
  589. }
  590. if input == nil {
  591. input = &GetBucketVersioningInput{}
  592. }
  593. req = c.newRequest(op, input, output)
  594. output = &GetBucketVersioningOutput{}
  595. req.Data = output
  596. return
  597. }
  598. // GetBucketVersioning Returns the versioning state of a bucket.
  599. func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
  600. req, out := c.GetBucketVersioningRequest(input)
  601. err := req.Send()
  602. return out, err
  603. }
  604. func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
  605. req, out := c.GetBucketVersioningRequest(input)
  606. req.SetContext(ctx)
  607. err := req.Send()
  608. return out, err
  609. }
  610. // GetBucketWebsiteRequest generates a request for the GetBucketWebsite operation.
  611. func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *aws.Request, output *GetBucketWebsiteOutput) {
  612. op := &aws.Operation{
  613. Name: "GetBucketWebsite",
  614. HTTPMethod: "GET",
  615. HTTPPath: "/{Bucket}?website",
  616. }
  617. if input == nil {
  618. input = &GetBucketWebsiteInput{}
  619. }
  620. req = c.newRequest(op, input, output)
  621. output = &GetBucketWebsiteOutput{}
  622. req.Data = output
  623. return
  624. }
  625. // GetBucketWebsite Returns the website configuration for a bucket.
  626. func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
  627. req, out := c.GetBucketWebsiteRequest(input)
  628. err := req.Send()
  629. return out, err
  630. }
  631. func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
  632. req, out := c.GetBucketWebsiteRequest(input)
  633. req.SetContext(ctx)
  634. err := req.Send()
  635. return out, err
  636. }
  637. // GetObjectRequest generates a request for the GetObject operation.
  638. func (c *S3) GetObjectRequest(input *GetObjectInput) (req *aws.Request, output *GetObjectOutput) {
  639. op := &aws.Operation{
  640. Name: "GetObject",
  641. HTTPMethod: "GET",
  642. HTTPPath: "/{Bucket}/{Key+}",
  643. }
  644. if input == nil {
  645. input = &GetObjectInput{}
  646. }
  647. req = c.newRequest(op, input, output)
  648. output = &GetObjectOutput{}
  649. req.Data = output
  650. return
  651. }
  652. // GetObject Retrieves objects from KS3.
  653. func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
  654. req, out := c.GetObjectRequest(input)
  655. err := req.Send()
  656. return out, err
  657. }
  658. func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput) (*GetObjectOutput, error) {
  659. req, out := c.GetObjectRequest(input)
  660. req.SetContext(ctx)
  661. err := req.Send()
  662. return out, err
  663. }
  664. func (c *S3) GetObjectToFile(input *GetObjectInput, filePath string) error {
  665. // Calls the API to actually download the object. Returns the result instance.
  666. res, err := c.GetObject(input)
  667. if err != nil {
  668. return err
  669. }
  670. return c.SaveObjectToFile(filePath, input, res)
  671. }
  672. func (c *S3) GetObjectToFileWithContext(ctx aws.Context, input *GetObjectInput, filePath string) error {
  673. // Calls the API to actually download the object. Returns the result instance.
  674. res, err := c.GetObjectWithContext(ctx, input)
  675. if err != nil {
  676. return err
  677. }
  678. return c.SaveObjectToFile(filePath, input, res)
  679. }
  680. func (c *S3) SaveObjectToFile(filePath string, input *GetObjectInput, res *GetObjectOutput) error {
  681. tempFilePath := filePath + TempFileSuffix
  682. // If the local file does not exist, create a new one. If it exists, overwrite it.
  683. fd, err := os.OpenFile(tempFilePath, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, os.FileMode(0664))
  684. if err != nil {
  685. return err
  686. }
  687. var crc64 hash.Hash64
  688. if c.Config.CrcCheckEnabled {
  689. crc64 = crc.NewCRC(crc.CrcTable(), 0)
  690. }
  691. if c.Config.CrcCheckEnabled || input.ProgressFn != nil {
  692. var contentLength int64
  693. if res.ContentLength != nil {
  694. contentLength = *res.ContentLength
  695. }
  696. res.Body = aws.TeeReader(res.Body, crc64, contentLength, input.ProgressFn)
  697. }
  698. // Copy the data to the local file path.
  699. _, err = io.Copy(fd, res.Body)
  700. fd.Close()
  701. if err != nil {
  702. return err
  703. }
  704. if c.Config.CrcCheckEnabled {
  705. err = CheckDownloadCrc64(c, res, crc64)
  706. if err != nil {
  707. return err
  708. }
  709. }
  710. return os.Rename(tempFilePath, filePath)
  711. }
  712. // GetObjectACLRequest generates a request for the GetObjectACL operation.
  713. func (c *S3) GetObjectACLRequest(input *GetObjectACLInput) (req *aws.Request, output *GetObjectACLOutput) {
  714. op := &aws.Operation{
  715. Name: "GetObjectAcl",
  716. HTTPMethod: "GET",
  717. HTTPPath: "/{Bucket}/{Key+}?acl",
  718. }
  719. if input == nil {
  720. input = &GetObjectACLInput{}
  721. }
  722. req = c.newRequest(op, input, output)
  723. output = &GetObjectACLOutput{}
  724. req.Data = output
  725. return
  726. }
  727. // GetObjectACL Returns the access control list (ACL) of an object.
  728. func (c *S3) GetObjectACL(input *GetObjectACLInput) (*GetObjectACLOutput, error) {
  729. req, out := c.GetObjectACLRequest(input)
  730. err := req.Send()
  731. return out, err
  732. }
  733. func (c *S3) GetObjectACLWithContext(ctx aws.Context, input *GetObjectACLInput) (*GetObjectACLOutput, error) {
  734. req, out := c.GetObjectACLRequest(input)
  735. req.SetContext(ctx)
  736. err := req.Send()
  737. return out, err
  738. }
  739. // GetObjectTorrentRequest generates a request for the GetObjectTorrent operation.
  740. func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *aws.Request, output *GetObjectTorrentOutput) {
  741. op := &aws.Operation{
  742. Name: "GetObjectTorrent",
  743. HTTPMethod: "GET",
  744. HTTPPath: "/{Bucket}/{Key+}?torrent",
  745. }
  746. if input == nil {
  747. input = &GetObjectTorrentInput{}
  748. }
  749. req = c.newRequest(op, input, output)
  750. output = &GetObjectTorrentOutput{}
  751. req.Data = output
  752. return
  753. }
  754. // GetObjectTorrent Return torrent files from a bucket.
  755. func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
  756. req, out := c.GetObjectTorrentRequest(input)
  757. err := req.Send()
  758. return out, err
  759. }
  760. func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
  761. req, out := c.GetObjectTorrentRequest(input)
  762. req.SetContext(ctx)
  763. err := req.Send()
  764. return out, err
  765. }
  766. // HeadBucketRequest generates a request for the HeadBucket operation.
  767. func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *aws.Request, output *HeadBucketOutput) {
  768. op := &aws.Operation{
  769. Name: "HeadBucket",
  770. HTTPMethod: "HEAD",
  771. HTTPPath: "/{Bucket}",
  772. }
  773. if input == nil {
  774. input = &HeadBucketInput{}
  775. }
  776. req = c.newRequest(op, input, output)
  777. output = &HeadBucketOutput{}
  778. req.Data = output
  779. return
  780. }
  781. // HeadBucket This operation is useful to determine if a bucket exists and you have permission
  782. // to access it.
  783. func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
  784. req, out := c.HeadBucketRequest(input)
  785. err := req.Send()
  786. return out, err
  787. }
  788. func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput) (*HeadBucketOutput, error) {
  789. req, out := c.HeadBucketRequest(input)
  790. req.SetContext(ctx)
  791. err := req.Send()
  792. return out, err
  793. }
  794. // HeadBucketExist checks if the bucket exists.
  795. func (c *S3) HeadBucketExist(bucket string) (bool, error) {
  796. var err error
  797. req, _ := c.HeadBucketRequest(&HeadBucketInput{
  798. Bucket: aws.String(bucket),
  799. })
  800. err = req.Send()
  801. if err == nil && req.HTTPResponse.StatusCode == 200 {
  802. return true, nil
  803. }
  804. return false, err
  805. }
  806. func (c *S3) HeadBucketExistWithContext(ctx aws.Context, bucket string) (bool, error) {
  807. var err error
  808. req, _ := c.HeadBucketRequest(&HeadBucketInput{
  809. Bucket: aws.String(bucket),
  810. })
  811. req.SetContext(ctx)
  812. err = req.Send()
  813. if err == nil && req.HTTPResponse.StatusCode == 200 {
  814. return true, nil
  815. }
  816. return false, err
  817. }
  818. // HeadObjectRequest generates a request for the HeadObject operation.
  819. func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *aws.Request, output *HeadObjectOutput) {
  820. op := &aws.Operation{
  821. Name: "HeadObject",
  822. HTTPMethod: "HEAD",
  823. HTTPPath: "/{Bucket}/{Key+}",
  824. }
  825. if input == nil {
  826. input = &HeadObjectInput{}
  827. }
  828. req = c.newRequest(op, input, output)
  829. output = &HeadObjectOutput{}
  830. req.Data = output
  831. return
  832. }
  833. // HeadObject The HEAD operation retrieves metadata from an object without returning the
  834. // object itself. This operation is useful if you're only interested in an object's
  835. // metadata. To use HEAD, you must have READ access to the object.
  836. func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
  837. req, out := c.HeadObjectRequest(input)
  838. err := req.Send()
  839. return out, err
  840. }
  841. func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput) (*HeadObjectOutput, error) {
  842. req, out := c.HeadObjectRequest(input)
  843. req.SetContext(ctx)
  844. err := req.Send()
  845. return out, err
  846. }
  847. // ListBucketsRequest generates a request for the ListBuckets operation.
  848. func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *aws.Request, output *ListBucketsOutput) {
  849. op := &aws.Operation{
  850. Name: "ListBuckets",
  851. HTTPMethod: "GET",
  852. HTTPPath: "/",
  853. }
  854. if input == nil {
  855. input = &ListBucketsInput{}
  856. }
  857. req = c.newRequest(op, input, output)
  858. output = &ListBucketsOutput{}
  859. req.Data = output
  860. return
  861. }
  862. // ListBuckets Returns a list of all buckets owned by the authenticated sender of the request.
  863. func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
  864. req, out := c.ListBucketsRequest(input)
  865. err := req.Send()
  866. return out, err
  867. }
  868. func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput) (*ListBucketsOutput, error) {
  869. req, out := c.ListBucketsRequest(input)
  870. req.SetContext(ctx)
  871. err := req.Send()
  872. return out, err
  873. }
  874. // ListMultipartUploadsRequest generates a request for the ListMultipartUploads operation.
  875. func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *aws.Request, output *ListMultipartUploadsOutput) {
  876. op := &aws.Operation{
  877. Name: "ListMultipartUploads",
  878. HTTPMethod: "GET",
  879. HTTPPath: "/{Bucket}?uploads",
  880. Paginator: &aws.Paginator{
  881. InputTokens: []string{"KeyMarker", "UploadIdMarker"},
  882. OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
  883. LimitToken: "MaxUploads",
  884. TruncationToken: "IsTruncated",
  885. },
  886. }
  887. if input == nil {
  888. input = &ListMultipartUploadsInput{}
  889. }
  890. req = c.newRequest(op, input, output)
  891. output = &ListMultipartUploadsOutput{}
  892. req.Data = output
  893. return
  894. }
  895. // ListMultipartUploads This operation lists in-progress multipart uploads.
  896. func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
  897. req, out := c.ListMultipartUploadsRequest(input)
  898. err := req.Send()
  899. return out, err
  900. }
  901. func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
  902. req, out := c.ListMultipartUploadsRequest(input)
  903. req.SetContext(ctx)
  904. err := req.Send()
  905. return out, err
  906. }
  907. func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(p *ListMultipartUploadsOutput, lastPage bool) (shouldContinue bool)) error {
  908. page, _ := c.ListMultipartUploadsRequest(input)
  909. return page.EachPage(func(p interface{}, lastPage bool) bool {
  910. return fn(p.(*ListMultipartUploadsOutput), lastPage)
  911. })
  912. }
  913. // ListObjectVersionsRequest generates a request for the ListObjectVersions operation.
  914. func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *aws.Request, output *ListObjectVersionsOutput) {
  915. op := &aws.Operation{
  916. Name: "ListObjectVersions",
  917. HTTPMethod: "GET",
  918. HTTPPath: "/{Bucket}?versions",
  919. Paginator: &aws.Paginator{
  920. InputTokens: []string{"KeyMarker", "VersionIdMarker"},
  921. OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"},
  922. LimitToken: "MaxKeys",
  923. TruncationToken: "IsTruncated",
  924. },
  925. }
  926. if input == nil {
  927. input = &ListObjectVersionsInput{}
  928. }
  929. req = c.newRequest(op, input, output)
  930. output = &ListObjectVersionsOutput{}
  931. req.Data = output
  932. return
  933. }
  934. // ListObjectVersions Returns metadata about all the versions of objects in a bucket.
  935. func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
  936. req, out := c.ListObjectVersionsRequest(input)
  937. err := req.Send()
  938. return out, err
  939. }
  940. func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
  941. req, out := c.ListObjectVersionsRequest(input)
  942. req.SetContext(ctx)
  943. err := req.Send()
  944. return out, err
  945. }
  946. func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(p *ListObjectVersionsOutput, lastPage bool) (shouldContinue bool)) error {
  947. page, _ := c.ListObjectVersionsRequest(input)
  948. return page.EachPage(func(p interface{}, lastPage bool) bool {
  949. return fn(p.(*ListObjectVersionsOutput), lastPage)
  950. })
  951. }
  952. // ListObjectsRequest generates a request for the ListObjects operation.
  953. func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *aws.Request, output *ListObjectsOutput) {
  954. op := &aws.Operation{
  955. Name: "ListObjects",
  956. HTTPMethod: "GET",
  957. HTTPPath: "/{Bucket}",
  958. Paginator: &aws.Paginator{
  959. InputTokens: []string{"Marker"},
  960. OutputTokens: []string{"NextMarker || Contents[-1].Key"},
  961. LimitToken: "MaxKeys",
  962. TruncationToken: "IsTruncated",
  963. },
  964. }
  965. if input == nil {
  966. input = &ListObjectsInput{}
  967. }
  968. req = c.newRequest(op, input, output)
  969. output = &ListObjectsOutput{}
  970. req.Data = output
  971. return
  972. }
  973. // ListObjects Returns some or all (up to 1000) of the objects in a bucket. You can use
  974. // the request parameters as selection criteria to return a subset of the objects
  975. // in a bucket.
  976. func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
  977. req, out := c.ListObjectsRequest(input)
  978. err := req.Send()
  979. return out, err
  980. }
  981. func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput) (*ListObjectsOutput, error) {
  982. req, out := c.ListObjectsRequest(input)
  983. req.SetContext(ctx)
  984. err := req.Send()
  985. return out, err
  986. }
  987. func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(p *ListObjectsOutput, lastPage bool) (shouldContinue bool)) error {
  988. page, _ := c.ListObjectsRequest(input)
  989. return page.EachPage(func(p interface{}, lastPage bool) bool {
  990. return fn(p.(*ListObjectsOutput), lastPage)
  991. })
  992. }
  993. // ListPartsRequest generates a request for the ListParts operation.
  994. func (c *S3) ListPartsRequest(input *ListPartsInput) (req *aws.Request, output *ListPartsOutput) {
  995. op := &aws.Operation{
  996. Name: "ListParts",
  997. HTTPMethod: "GET",
  998. HTTPPath: "/{Bucket}/{Key+}",
  999. Paginator: &aws.Paginator{
  1000. InputTokens: []string{"PartNumberMarker"},
  1001. OutputTokens: []string{"NextPartNumberMarker"},
  1002. LimitToken: "MaxParts",
  1003. TruncationToken: "IsTruncated",
  1004. },
  1005. }
  1006. if input == nil {
  1007. input = &ListPartsInput{}
  1008. }
  1009. req = c.newRequest(op, input, output)
  1010. output = &ListPartsOutput{}
  1011. req.Data = output
  1012. return
  1013. }
  1014. // ListParts Lists the parts that have been uploaded for a specific multipart upload.
  1015. func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
  1016. req, out := c.ListPartsRequest(input)
  1017. err := req.Send()
  1018. return out, err
  1019. }
  1020. func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput) (*ListPartsOutput, error) {
  1021. req, out := c.ListPartsRequest(input)
  1022. req.SetContext(ctx)
  1023. err := req.Send()
  1024. return out, err
  1025. }
  1026. func (c *S3) ListPartsPages(input *ListPartsInput, fn func(p *ListPartsOutput, lastPage bool) (shouldContinue bool)) error {
  1027. page, _ := c.ListPartsRequest(input)
  1028. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1029. return fn(p.(*ListPartsOutput), lastPage)
  1030. })
  1031. }
  1032. // PutBucketACLRequest generates a request for the PutBucketACL operation.
  1033. func (c *S3) PutBucketACLRequest(input *PutBucketACLInput) (req *aws.Request, output *PutBucketACLOutput) {
  1034. op := &aws.Operation{
  1035. Name: "PutBucketAcl",
  1036. HTTPMethod: "PUT",
  1037. HTTPPath: "/{Bucket}?acl",
  1038. }
  1039. if input == nil {
  1040. input = &PutBucketACLInput{}
  1041. }
  1042. req = c.newRequest(op, input, output)
  1043. output = &PutBucketACLOutput{}
  1044. req.Data = output
  1045. return
  1046. }
  1047. // PutBucketACL Sets the permissions on a bucket using access control lists (ACL).
  1048. func (c *S3) PutBucketACL(input *PutBucketACLInput) (*PutBucketACLOutput, error) {
  1049. req, out := c.PutBucketACLRequest(input)
  1050. err := req.Send()
  1051. return out, err
  1052. }
  1053. func (c *S3) PutBucketACLWithContext(ctx aws.Context, input *PutBucketACLInput) (*PutBucketACLOutput, error) {
  1054. req, out := c.PutBucketACLRequest(input)
  1055. req.SetContext(ctx)
  1056. err := req.Send()
  1057. return out, err
  1058. }
  1059. // PutBucketLoggingRequest generates a request for the PutBucketLogging operation.
  1060. func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *aws.Request, output *PutBucketLoggingOutput) {
  1061. op := &aws.Operation{
  1062. Name: "PutBucketLogging",
  1063. HTTPMethod: "PUT",
  1064. HTTPPath: "/{Bucket}?logging",
  1065. }
  1066. if input == nil {
  1067. input = &PutBucketLoggingInput{}
  1068. }
  1069. req = c.newRequest(op, input, output)
  1070. output = &PutBucketLoggingOutput{}
  1071. req.Data = output
  1072. return
  1073. }
  1074. // PutBucketLogging Set the logging parameters for a bucket and to specify permissions for who
  1075. // can view and modify the logging parameters. To set the logging status of
  1076. // a bucket, you must be the bucket owner.
  1077. func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
  1078. req, out := c.PutBucketLoggingRequest(input)
  1079. err := req.Send()
  1080. return out, err
  1081. }
  1082. func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
  1083. req, out := c.PutBucketLoggingRequest(input)
  1084. req.SetContext(ctx)
  1085. err := req.Send()
  1086. return out, err
  1087. }
  1088. // PutBucketNotificationRequest generates a request for the PutBucketNotification operation.
  1089. func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *aws.Request, output *PutBucketNotificationOutput) {
  1090. op := &aws.Operation{
  1091. Name: "PutBucketNotification",
  1092. HTTPMethod: "PUT",
  1093. HTTPPath: "/{Bucket}?notification",
  1094. }
  1095. if input == nil {
  1096. input = &PutBucketNotificationInput{}
  1097. }
  1098. req = c.newRequest(op, input, output)
  1099. output = &PutBucketNotificationOutput{}
  1100. req.Data = output
  1101. return
  1102. }
  1103. // PutBucketNotification Deprecated, see the PutBucketNotificationConfiguraiton operation.
  1104. func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
  1105. req, out := c.PutBucketNotificationRequest(input)
  1106. err := req.Send()
  1107. return out, err
  1108. }
  1109. func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
  1110. req, out := c.PutBucketNotificationRequest(input)
  1111. req.SetContext(ctx)
  1112. err := req.Send()
  1113. return out, err
  1114. }
  1115. // PutBucketNotificationConfigurationRequest generates a request for the PutBucketNotificationConfiguration operation.
  1116. func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *aws.Request, output *PutBucketNotificationConfigurationOutput) {
  1117. op := &aws.Operation{
  1118. Name: "PutBucketNotificationConfiguration",
  1119. HTTPMethod: "PUT",
  1120. HTTPPath: "/{Bucket}?notification",
  1121. }
  1122. if input == nil {
  1123. input = &PutBucketNotificationConfigurationInput{}
  1124. }
  1125. req = c.newRequest(op, input, output)
  1126. output = &PutBucketNotificationConfigurationOutput{}
  1127. req.Data = output
  1128. return
  1129. }
  1130. // PutBucketNotificationConfiguration Enables notifications of specified events for a bucket.
  1131. func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
  1132. req, out := c.PutBucketNotificationConfigurationRequest(input)
  1133. err := req.Send()
  1134. return out, err
  1135. }
  1136. func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
  1137. req, out := c.PutBucketNotificationConfigurationRequest(input)
  1138. req.SetContext(ctx)
  1139. err := req.Send()
  1140. return out, err
  1141. }
  1142. // PutBucketPolicyRequest generates a request for the PutBucketPolicy operation.
  1143. func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *aws.Request, output *PutBucketPolicyOutput) {
  1144. op := &aws.Operation{
  1145. Name: "PutBucketPolicy",
  1146. HTTPMethod: "PUT",
  1147. HTTPPath: "/{Bucket}?policy",
  1148. }
  1149. if input == nil {
  1150. input = &PutBucketPolicyInput{}
  1151. }
  1152. req = c.newRequest(op, input, output)
  1153. output = &PutBucketPolicyOutput{}
  1154. req.Data = output
  1155. return
  1156. }
  1157. // PutBucketPolicy Replaces a policy on a bucket. If the bucket already has a policy, the one
  1158. // in this request completely replaces it.
  1159. func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
  1160. req, out := c.PutBucketPolicyRequest(input)
  1161. err := req.Send()
  1162. return out, err
  1163. }
  1164. func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
  1165. req, out := c.PutBucketPolicyRequest(input)
  1166. req.SetContext(ctx)
  1167. err := req.Send()
  1168. return out, err
  1169. }
  1170. // PutBucketRequestPaymentRequest generates a request for the PutBucketRequestPayment operation.
  1171. func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *aws.Request, output *PutBucketRequestPaymentOutput) {
  1172. op := &aws.Operation{
  1173. Name: "PutBucketRequestPayment",
  1174. HTTPMethod: "PUT",
  1175. HTTPPath: "/{Bucket}?requestPayment",
  1176. }
  1177. if input == nil {
  1178. input = &PutBucketRequestPaymentInput{}
  1179. }
  1180. req = c.newRequest(op, input, output)
  1181. output = &PutBucketRequestPaymentOutput{}
  1182. req.Data = output
  1183. return
  1184. }
  1185. // PutBucketRequestPayment Sets the request payment configuration for a bucket. By default, the bucket
  1186. // owner pays for downloads from the bucket. This configuration parameter enables
  1187. // the bucket owner (only) to specify that the person requesting the download
  1188. // will be charged for the download.
  1189. func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
  1190. req, out := c.PutBucketRequestPaymentRequest(input)
  1191. err := req.Send()
  1192. return out, err
  1193. }
  1194. func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
  1195. req, out := c.PutBucketRequestPaymentRequest(input)
  1196. req.SetContext(ctx)
  1197. err := req.Send()
  1198. return out, err
  1199. }
  1200. // PutBucketVersioningRequest generates a request for the PutBucketVersioning operation.
  1201. func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *aws.Request, output *PutBucketVersioningOutput) {
  1202. op := &aws.Operation{
  1203. Name: "PutBucketVersioning",
  1204. HTTPMethod: "PUT",
  1205. HTTPPath: "/{Bucket}?versioning",
  1206. }
  1207. if input == nil {
  1208. input = &PutBucketVersioningInput{}
  1209. }
  1210. req = c.newRequest(op, input, output)
  1211. output = &PutBucketVersioningOutput{}
  1212. req.Data = output
  1213. return
  1214. }
  1215. // PutBucketVersioning Sets the versioning state of an existing bucket. To set the versioning state,
  1216. // you must be the bucket owner.
  1217. func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
  1218. req, out := c.PutBucketVersioningRequest(input)
  1219. err := req.Send()
  1220. return out, err
  1221. }
  1222. func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
  1223. req, out := c.PutBucketVersioningRequest(input)
  1224. req.SetContext(ctx)
  1225. err := req.Send()
  1226. return out, err
  1227. }
  1228. // PutBucketWebsiteRequest generates a request for the PutBucketWebsite operation.
  1229. func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *aws.Request, output *PutBucketWebsiteOutput) {
  1230. op := &aws.Operation{
  1231. Name: "PutBucketWebsite",
  1232. HTTPMethod: "PUT",
  1233. HTTPPath: "/{Bucket}?website",
  1234. }
  1235. if input == nil {
  1236. input = &PutBucketWebsiteInput{}
  1237. }
  1238. req = c.newRequest(op, input, output)
  1239. output = &PutBucketWebsiteOutput{}
  1240. req.Data = output
  1241. return
  1242. }
  1243. type metadataGeneratePresignedUrlInput struct {
  1244. SDKShapeTraits bool `type:"structure" payload:"GeneratePresignedUrlInput"`
  1245. }
  1246. type GeneratePresignedUrlInput struct {
  1247. // The canned ACL to apply to the object.
  1248. ACL *string `location:"header" locationName:"x-amz-acl" type:"string"`
  1249. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  1250. // A standard MIME type describing the format of the object data.
  1251. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  1252. ContentMd5 *string `location:"header" locationName:"Content-Md5" type:"string"`
  1253. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  1254. // A map of metadata to store with the object in S3.
  1255. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  1256. TrafficLimit *int64 `location:"querystring" locationName:"x-kss-traffic-limit" type:"integer"`
  1257. HTTPMethod HTTPMethod `locationName:"HTTPMethod" type:"string" required:"true"`
  1258. // The date and time at which the object is no longer cacheable.
  1259. Expires int64 `locationName:"Expires" type:"integer" required:"true"`
  1260. // Sets the Cache-Control header of the response.
  1261. ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
  1262. // Sets the Content-Disposition header of the response
  1263. ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
  1264. // Sets the Content-Encoding header of the response.
  1265. ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
  1266. // Sets the Content-Language header of the response.
  1267. ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
  1268. // Sets the Content-Type header of the response.
  1269. ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
  1270. // Sets the Expires header of the response.
  1271. ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"iso8601"`
  1272. // Deprecated, use ExtendHeaders instead.
  1273. Headers map[string]*string `location:"extendHeaders" type:"map"`
  1274. // Deprecated, use ExtendQueryParams instead.
  1275. Parameters map[string]*string `location:"extendQueryParams" type:"map"`
  1276. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  1277. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  1278. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  1279. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  1280. metadataGeneratePresignedUrlInput `json:"-" xml:"-"`
  1281. }
  1282. type GeneratePresignedUrlOutput struct {
  1283. url *string
  1284. }
  1285. // PutBucketWebsite Set the website configuration for a bucket.
  1286. func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
  1287. req, out := c.PutBucketWebsiteRequest(input)
  1288. err := req.Send()
  1289. return out, err
  1290. }
  1291. func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
  1292. req, out := c.PutBucketWebsiteRequest(input)
  1293. req.SetContext(ctx)
  1294. err := req.Send()
  1295. return out, err
  1296. }
  1297. // PutObjectRequest generates a request for the PutObject operation.
  1298. func (c *S3) PutObjectRequest(input *PutObjectInput) (req *aws.Request, output *PutObjectOutput) {
  1299. op := &aws.Operation{
  1300. Name: "PutObject",
  1301. HTTPMethod: "PUT",
  1302. HTTPPath: "/{Bucket}/{Key+}",
  1303. }
  1304. if input == nil {
  1305. input = &PutObjectInput{}
  1306. }
  1307. req = c.newRequest(op, input, output)
  1308. if c.Config.CrcCheckEnabled {
  1309. req.Handlers.CheckCrc64.PushBack(CheckUploadCrc64)
  1310. }
  1311. if input.ProgressFn != nil {
  1312. req.ProgressFn = input.ProgressFn
  1313. }
  1314. output = &PutObjectOutput{}
  1315. req.Data = output
  1316. return
  1317. }
  1318. // PutObject Adds an object to a bucket.
  1319. func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
  1320. req, out := c.PutObjectRequest(input)
  1321. err := req.Send()
  1322. return out, err
  1323. }
  1324. func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput) (*PutObjectOutput, error) {
  1325. req, out := c.PutObjectRequest(input)
  1326. req.SetContext(ctx)
  1327. err := req.Send()
  1328. return out, err
  1329. }
  1330. func (c *S3) PutReaderRequest(input *PutReaderInput) (req *aws.Request, output *PutObjectOutput) {
  1331. op := &aws.Operation{
  1332. Name: "PutObject",
  1333. HTTPMethod: "PUT",
  1334. HTTPPath: "/{Bucket}/{Key+}",
  1335. }
  1336. if input == nil {
  1337. input = &PutReaderInput{}
  1338. }
  1339. input.Body = &Body{io.NopCloser(input.Body)}
  1340. req = c.newRequest(op, input, output)
  1341. if c.Config.CrcCheckEnabled {
  1342. req.Handlers.CheckCrc64.PushBack(CheckUploadCrc64)
  1343. }
  1344. if input.ProgressFn != nil {
  1345. req.ProgressFn = input.ProgressFn
  1346. }
  1347. output = &PutObjectOutput{}
  1348. req.Data = output
  1349. return
  1350. }
  1351. // PutReader Adds an object to a bucket.
  1352. func (c *S3) PutReader(input *PutReaderInput) (*PutObjectOutput, error) {
  1353. req, out := c.PutReaderRequest(input)
  1354. err := req.Send()
  1355. return out, err
  1356. }
  1357. func (c *S3) PutReaderWithContext(ctx aws.Context, input *PutReaderInput) (*PutObjectOutput, error) {
  1358. req, out := c.PutReaderRequest(input)
  1359. req.SetContext(ctx)
  1360. err := req.Send()
  1361. return out, err
  1362. }
  1363. // GeneratePresignedUrl generates a presigned url for the object
  1364. func (c *S3) GeneratePresignedUrl(input *GeneratePresignedUrlInput) (url string, err error) {
  1365. op := &aws.Operation{
  1366. HTTPMethod: string(input.HTTPMethod),
  1367. HTTPPath: "/{Bucket}/{Key+}",
  1368. }
  1369. if input == nil {
  1370. input = &GeneratePresignedUrlInput{}
  1371. }
  1372. if input.ExtendHeaders == nil {
  1373. input.ExtendHeaders = input.Headers
  1374. }
  1375. if input.ExtendQueryParams == nil {
  1376. input.ExtendQueryParams = input.Parameters
  1377. }
  1378. output := &GeneratePresignedUrlOutput{}
  1379. req := c.newRequest(op, input, output)
  1380. aws.ValidateParameters(req)
  1381. if req.Error != nil {
  1382. return "", req.Error
  1383. }
  1384. if string(input.HTTPMethod) == "" {
  1385. return "", apierr.New("InvalidParameter", "missing required parameter: HTTPMethod", nil)
  1386. }
  1387. if input.Expires <= 0 {
  1388. return "", apierr.New("InvalidParameter", "Expires is required and must bigger than 0", nil)
  1389. }
  1390. if IsV4Signature(c.Config.SignerVersion) {
  1391. if input.Expires > 604800 {
  1392. return "", apierr.New("InvalidParameter", "Expires must between 1 and 604800 in V4 signature", nil)
  1393. }
  1394. req.ExpireTime = input.Expires
  1395. } else {
  1396. req.ExpireTime = input.Expires + time.Now().Unix()
  1397. }
  1398. req.Sign()
  1399. return req.HTTPRequest.URL.String(), nil
  1400. }
  1401. // GeneratePresignedUrlInput generates a presigned url for the object
  1402. // Deprecated: Use GeneratePresignedUrl instead.
  1403. func (c *S3) GeneratePresignedUrlInput(input *GeneratePresignedUrlInput) (url string) {
  1404. opGeneratePresigned := &aws.Operation{
  1405. HTTPMethod: string(input.HTTPMethod),
  1406. HTTPPath: "/{Bucket}/{Key+}",
  1407. }
  1408. output := &GeneratePresignedUrlOutput{}
  1409. req := c.newRequest(opGeneratePresigned, input, output)
  1410. now := time.Now().Unix()
  1411. if c.Config.SignerVersion == "V4" || c.Config.SignerVersion == "V4_UNSIGNED_PAYLOAD_SIGNER" {
  1412. req.ExpireTime = input.Expires
  1413. } else {
  1414. req.ExpireTime = input.Expires + now
  1415. }
  1416. req.Sign()
  1417. return req.HTTPRequest.URL.String()
  1418. }
  1419. func (c *S3) PutObjectPreassignedInput(input *PutObjectInput) (*http.Request, error) {
  1420. req, _ := c.PutObjectRequest(input)
  1421. err := req.Sign()
  1422. return req.HTTPRequest, err
  1423. }
  1424. // PutObjectACLRequest generates a request for the PutObjectACL operation.
  1425. func (c *S3) PutObjectACLRequest(input *PutObjectACLInput) (req *aws.Request, output *PutObjectACLOutput) {
  1426. op := &aws.Operation{
  1427. Name: "PutObjectAcl",
  1428. HTTPMethod: "PUT",
  1429. HTTPPath: "/{Bucket}/{Key+}?acl",
  1430. }
  1431. if input == nil {
  1432. input = &PutObjectACLInput{}
  1433. }
  1434. req = c.newRequest(op, input, output)
  1435. output = &PutObjectACLOutput{}
  1436. req.Data = output
  1437. return
  1438. }
  1439. // PutObjectACL uses the acl subresource to set the access control list (ACL) permissions
  1440. // for an object that already exists in a bucket
  1441. func (c *S3) PutObjectACL(input *PutObjectACLInput) (*PutObjectACLOutput, error) {
  1442. req, out := c.PutObjectACLRequest(input)
  1443. err := req.Send()
  1444. return out, err
  1445. }
  1446. func (c *S3) PutObjectACLWithContext(ctx aws.Context, input *PutObjectACLInput) (*PutObjectACLOutput, error) {
  1447. req, out := c.PutObjectACLRequest(input)
  1448. req.SetContext(ctx)
  1449. err := req.Send()
  1450. return out, err
  1451. }
  1452. // RestoreObjectRequest generates a request for the RestoreObject operation.
  1453. func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *aws.Request, output *RestoreObjectOutput) {
  1454. op := &aws.Operation{
  1455. Name: "RestoreObject",
  1456. HTTPMethod: "POST",
  1457. HTTPPath: "/{Bucket}/{Key+}?restore",
  1458. }
  1459. if input == nil {
  1460. input = &RestoreObjectInput{}
  1461. }
  1462. req = c.newRequest(op, input, output)
  1463. output = &RestoreObjectOutput{}
  1464. req.Data = output
  1465. return
  1466. }
  1467. func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
  1468. req, out := c.RestoreObjectRequest(input)
  1469. err := req.Send()
  1470. return out, err
  1471. }
  1472. func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput) (*RestoreObjectOutput, error) {
  1473. req, out := c.RestoreObjectRequest(input)
  1474. req.SetContext(ctx)
  1475. err := req.Send()
  1476. return out, err
  1477. }
  1478. // UploadPartRequest generates a request for the UploadPart operation.
  1479. func (c *S3) UploadPartRequest(input *UploadPartInput) (req *aws.Request, output *UploadPartOutput) {
  1480. op := &aws.Operation{
  1481. Name: "UploadPart",
  1482. HTTPMethod: "PUT",
  1483. HTTPPath: "/{Bucket}/{Key+}",
  1484. }
  1485. if input == nil {
  1486. input = &UploadPartInput{}
  1487. }
  1488. req = c.newRequest(op, input, output)
  1489. if c.Config.CrcCheckEnabled {
  1490. req.Handlers.CheckCrc64.PushBack(CheckUploadCrc64)
  1491. }
  1492. if input.ProgressFn != nil {
  1493. req.ProgressFn = input.ProgressFn
  1494. }
  1495. output = &UploadPartOutput{}
  1496. req.Data = output
  1497. return
  1498. }
  1499. // UploadPart Uploads a part in a multipart upload.
  1500. //
  1501. // Note: After you initiate multipart upload and upload one or more parts,
  1502. // you must either complete or abort multipart upload in order to stop getting
  1503. // charged for storage of the uploaded parts. Only after you either complete
  1504. // or abort multipart upload, Amazon S3 frees up the parts storage and stops
  1505. // charging you for the parts storage.
  1506. func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
  1507. req, out := c.UploadPartRequest(input)
  1508. err := req.Send()
  1509. return out, err
  1510. }
  1511. func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput) (*UploadPartOutput, error) {
  1512. req, out := c.UploadPartRequest(input)
  1513. req.SetContext(ctx)
  1514. err := req.Send()
  1515. return out, err
  1516. }
  1517. // UploadPartCopyRequest generates a request for the UploadPartCopy operation.
  1518. func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *aws.Request, output *UploadPartCopyOutput) {
  1519. op := &aws.Operation{
  1520. Name: "UploadPartCopy",
  1521. HTTPMethod: "PUT",
  1522. HTTPPath: "/{Bucket}/{Key+}",
  1523. }
  1524. if input == nil {
  1525. input = &UploadPartCopyInput{}
  1526. }
  1527. // URL encode the copy source
  1528. if input.CopySource == nil {
  1529. input.CopySource = aws.String(BuildCopySource(input.SourceBucket, input.SourceKey))
  1530. }
  1531. req = c.newRequest(op, input, output)
  1532. output = &UploadPartCopyOutput{}
  1533. req.Data = output
  1534. return
  1535. }
  1536. // UploadPartCopy Uploads a part by copying data from an existing object as data source.
  1537. func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
  1538. req, out := c.UploadPartCopyRequest(input)
  1539. err := req.Send()
  1540. return out, err
  1541. }
  1542. func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
  1543. req, out := c.UploadPartCopyRequest(input)
  1544. req.SetContext(ctx)
  1545. err := req.Send()
  1546. return out, err
  1547. }
  1548. type AbortMultipartUploadInput struct {
  1549. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  1550. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  1551. // Confirms that the requester knows that she or he will be charged for the
  1552. // request. Bucket owners need not specify this parameter in their requests.
  1553. // Documentation on downloading objects from requester pays buckets can be found
  1554. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  1555. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  1556. UploadID *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  1557. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  1558. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  1559. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  1560. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  1561. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  1562. metadataAbortMultipartUploadInput `json:"-" xml:"-"`
  1563. }
  1564. type metadataAbortMultipartUploadInput struct {
  1565. SDKShapeTraits bool `type:"structure"`
  1566. }
  1567. type AbortMultipartUploadOutput struct {
  1568. // If present, indicates that the requester was successfully charged for the request.
  1569. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  1570. metadataAbortMultipartUploadOutput `json:"-" xml:"-"`
  1571. Metadata map[string]*string `location:"headers" type:"map"`
  1572. StatusCode *int64 `location:"statusCode" type:"integer"`
  1573. }
  1574. type metadataAbortMultipartUploadOutput struct {
  1575. SDKShapeTraits bool `type:"structure"`
  1576. }
  1577. type AccessControlPolicy struct {
  1578. // A list of grants.
  1579. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  1580. Owner *Owner `type:"structure"`
  1581. metadataAccessControlPolicy `json:"-" xml:"-"`
  1582. }
  1583. type metadataAccessControlPolicy struct {
  1584. SDKShapeTraits bool `type:"structure"`
  1585. }
  1586. type Bucket struct {
  1587. // Date the bucket was created.
  1588. CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  1589. // The name of the bucket.
  1590. Name *string `type:"string"`
  1591. Region *string `type:"string"`
  1592. Type *string `type:"string"`
  1593. // Bucket visit type, NORMAL is the standard type, FREQUENTLIST is the high-frequency enumeration type.
  1594. VisitType *string `type:"string"`
  1595. // The bucket data redundancy type.
  1596. DataRedundancyType *string `type:"string"`
  1597. metadataBucket `json:"-" xml:"-"`
  1598. }
  1599. type metadataBucket struct {
  1600. SDKShapeTraits bool `type:"structure"`
  1601. }
  1602. type BucketLoggingStatus struct {
  1603. LoggingEnabled *LoggingEnabled `type:"structure"`
  1604. metadataBucketLoggingStatus `json:"-" xml:"-"`
  1605. }
  1606. type metadataBucketLoggingStatus struct {
  1607. SDKShapeTraits bool `type:"structure"`
  1608. }
  1609. type CloudFunctionConfiguration struct {
  1610. CloudFunction *string `type:"string"`
  1611. // Bucket event for which to send notifications.
  1612. Event *string `type:"string"`
  1613. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  1614. // Optional unique identifier for configurations in a notification configuration.
  1615. // If you don't provide one, Amazon S3 will assign an ID.
  1616. ID *string `locationName:"Id" type:"string"`
  1617. InvocationRole *string `type:"string"`
  1618. metadataCloudFunctionConfiguration `json:"-" xml:"-"`
  1619. }
  1620. type metadataCloudFunctionConfiguration struct {
  1621. SDKShapeTraits bool `type:"structure"`
  1622. }
  1623. type CommonPrefix struct {
  1624. Prefix *string `type:"string"`
  1625. metadataCommonPrefix `json:"-" xml:"-"`
  1626. }
  1627. type metadataCommonPrefix struct {
  1628. SDKShapeTraits bool `type:"structure"`
  1629. }
  1630. type CompleteMultipartUploadInput struct {
  1631. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  1632. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  1633. MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure"`
  1634. // Confirms that the requester knows that she or he will be charged for the
  1635. // request. Bucket owners need not specify this parameter in their requests.
  1636. // Documentation on downloading objects from requester pays buckets can be found
  1637. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  1638. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  1639. UploadID *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  1640. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  1641. // Specifies whether the object is forbidden to overwrite.
  1642. ForbidOverwrite *bool `location:"header" locationName:"x-amz-forbid-overwrite" type:"boolean"`
  1643. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  1644. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  1645. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  1646. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  1647. metadataCompleteMultipartUploadInput `json:"-" xml:"-"`
  1648. }
  1649. type metadataCompleteMultipartUploadInput struct {
  1650. SDKShapeTraits bool `type:"structure" payload:"MultipartUpload"`
  1651. }
  1652. type CompleteMultipartUploadOutput struct {
  1653. Bucket *string `type:"string"`
  1654. // Entity tag of the object.
  1655. ETag *string `type:"string"`
  1656. // If the object expiration is configured, this will contain the expiration
  1657. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  1658. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  1659. Key *string `type:"string"`
  1660. Location *string `type:"string"`
  1661. ChecksumCRC64ECMA *string `type:"string"`
  1662. // If present, indicates that the requester was successfully charged for the
  1663. // request.
  1664. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  1665. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  1666. // encryption key that was used for the object.
  1667. SSEKMSKeyID *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  1668. // The Server-side encryption algorithm used when storing this object in KS3, eg: AES256.
  1669. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
  1670. // If server-side encryption with a customer-provided encryption key was requested,
  1671. // the response will include this header confirming the encryption algorithm used.
  1672. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  1673. // If server-side encryption with a customer-provided encryption key was requested,
  1674. // the response will include this header to provide round trip message integrity
  1675. // verification of the customer-provided encryption key.
  1676. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  1677. // Version of the object.
  1678. VersionID *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  1679. metadataCompleteMultipartUploadOutput `json:"-" xml:"-"`
  1680. Metadata map[string]*string `location:"headers" type:"map"`
  1681. StatusCode *int64 `location:"statusCode" type:"integer"`
  1682. }
  1683. type metadataCompleteMultipartUploadOutput struct {
  1684. SDKShapeTraits bool `type:"structure"`
  1685. }
  1686. type CompletedMultipartUpload struct {
  1687. Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
  1688. metadataCompletedMultipartUpload `json:"-" xml:"-"`
  1689. }
  1690. type metadataCompletedMultipartUpload struct {
  1691. SDKShapeTraits bool `type:"structure"`
  1692. }
  1693. type CompletedPart struct {
  1694. // Entity tag returned when the part was uploaded.
  1695. ETag *string `type:"string"`
  1696. // Part number that identifies the part.
  1697. PartNumber *int64 `type:"integer"`
  1698. // CRC64 value of a single part
  1699. ChecksumCRC64ECMA *string `type:"string"`
  1700. metadataCompletedPart `json:"-" xml:"-"`
  1701. }
  1702. type metadataCompletedPart struct {
  1703. SDKShapeTraits bool `type:"structure"`
  1704. }
  1705. type Condition struct {
  1706. // The HTTP error code when the redirect is applied. In the event of an error,
  1707. // if the error code equals this value, then the specified redirect is applied.
  1708. // Required when parent element Condition is specified and sibling KeyPrefixEquals
  1709. // is not specified. If both are specified, then both must be true for the redirect
  1710. // to be applied.
  1711. HTTPErrorCodeReturnedEquals *string `locationName:"HttpErrorCodeReturnedEquals" type:"string"`
  1712. // The object key name prefix when the redirect is applied. For example, to
  1713. // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
  1714. // To redirect request for all pages with the prefix docs/, the key prefix will
  1715. // be /docs, which identifies all objects in the docs/ folder. Required when
  1716. // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
  1717. // is not specified. If both conditions are specified, both must be true for
  1718. // the redirect to be applied.
  1719. KeyPrefixEquals *string `type:"string"`
  1720. metadataCondition `json:"-" xml:"-"`
  1721. }
  1722. type metadataCondition struct {
  1723. SDKShapeTraits bool `type:"structure"`
  1724. }
  1725. type CopyObjectInput struct {
  1726. // The canned ACL to apply to the object.
  1727. ACL *string `location:"header" locationName:"x-amz-acl" type:"string"`
  1728. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  1729. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  1730. SourceBucket *string `location:"uri" locationName:"sourceBucket" type:"string"`
  1731. SourceKey *string `location:"uri" locationName:"sourceKey" type:"string"`
  1732. // Specifies caching behavior along the request/reply chain.
  1733. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  1734. // Specifies presentational information for the object.
  1735. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  1736. // Specifies what content encodings have been applied to the object and thus
  1737. // what decoding mechanisms must be applied to obtain the media-type referenced
  1738. // by the Content-Type header field.
  1739. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  1740. // The language the content is in.
  1741. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  1742. // A standard MIME type describing the format of the object data.
  1743. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  1744. // The name of the source bucket and key name of the source object, separated
  1745. // by a slash (/). Must be URL-encoded.
  1746. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  1747. // Copies the object if its entity tag (ETag) matches the specified tag.
  1748. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  1749. // Copies the object if it has been modified since the specified time.
  1750. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"`
  1751. // Copies the object if its entity tag (ETag) is different from the specified ETag.
  1752. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  1753. // Copies the object if it hasn't been modified since the specified time.
  1754. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"`
  1755. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  1756. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  1757. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  1758. // the source object. The encryption key provided in this header must be one
  1759. // that was used when the source object was created.
  1760. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  1761. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  1762. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  1763. // key was transmitted without error.
  1764. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  1765. // The date and time at which the object is no longer cacheable.
  1766. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  1767. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  1768. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  1769. // Allows grantee to read the object data and its metadata.
  1770. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  1771. // Allows grantee to read the object ACL.
  1772. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  1773. // Allows grantee to write the ACL for the applicable object.
  1774. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  1775. // A map of metadata to store with the object in S3.
  1776. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  1777. // Specifies whether the metadata is copied from the source object or replaced
  1778. // with metadata provided in the request.
  1779. MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string"`
  1780. // Confirms that the requester knows that she or he will be charged for the
  1781. // request. Bucket owners need not specify this parameter in their requests.
  1782. // Documentation on downloading objects from requester pays buckets can be found
  1783. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  1784. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  1785. // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
  1786. // aws:kms).
  1787. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  1788. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  1789. // data. This value is used to store the object and then it is discarded; Amazon
  1790. // does not store the encryption key. The key must be appropriate for use with
  1791. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  1792. // header.
  1793. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  1794. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  1795. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  1796. // key was transmitted without error.
  1797. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  1798. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  1799. // requests for an object protected by AWS KMS will fail if not made via SSL
  1800. // or using SigV4. Documentation on configuring any of the officially supported
  1801. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  1802. SSEKMSKeyID *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  1803. // The Server-side encryption algorithm used when storing this object in S3
  1804. // (e.g., AES256, aws:kms).
  1805. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
  1806. // The type of storage to use for the object. Defaults to 'STANDARD'.
  1807. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string"`
  1808. // If the bucket is configured as a website, redirects requests for this object
  1809. // to another object in the same bucket or to an external URL. Amazon S3 stores
  1810. // the value of this header in the object metadata.
  1811. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  1812. // Specifies the object tag of the object. Multiple tags can be set at the same time, such as: TagA=A&TagB=B.
  1813. // Note: Key and Value need to be URL-encoded first. If an item does not have "=", the Value is considered to be an empty string.
  1814. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  1815. // Specifies how to set the object tag of the target object.
  1816. // Default value: COPY
  1817. // Valid values:
  1818. // COPY (default value): Copies the object tag of the source object to the target object.
  1819. // REPLACE: Ignores the object tag of the source object and directly uses the object tag specified in the request.
  1820. TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string"`
  1821. // Specifies whether the object is forbidden to overwrite.
  1822. ForbidOverwrite *bool `location:"header" locationName:"x-amz-forbid-overwrite" type:"boolean"`
  1823. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  1824. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  1825. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  1826. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  1827. metadataCopyObjectInput `json:"-" xml:"-"`
  1828. }
  1829. type metadataCopyObjectInput struct {
  1830. SDKShapeTraits bool `type:"structure"`
  1831. }
  1832. type CopyObjectOutput struct {
  1833. CopyObjectResult *CopyObjectResult `type:"structure"`
  1834. CopySourceVersionID *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  1835. // If the object expiration is configured, the response includes this header.
  1836. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  1837. // If present, indicates that the requester was successfully charged for the
  1838. // request.
  1839. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  1840. // If server-side encryption with a customer-provided encryption key was requested,
  1841. // the response will include this header confirming the encryption algorithm
  1842. // used.
  1843. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  1844. // If server-side encryption with a customer-provided encryption key was requested,
  1845. // the response will include this header to provide round trip message integrity
  1846. // verification of the customer-provided encryption key.
  1847. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  1848. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  1849. // encryption key that was used for the object.
  1850. SSEKMSKeyID *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  1851. // The Server-side encryption algorithm used when storing this object in S3
  1852. // (e.g., AES256, aws:kms).
  1853. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
  1854. metadataCopyObjectOutput `json:"-" xml:"-"`
  1855. Metadata map[string]*string `location:"headers" type:"map"`
  1856. StatusCode *int64 `location:"statusCode" type:"integer"`
  1857. }
  1858. type metadataCopyObjectOutput struct {
  1859. SDKShapeTraits bool `type:"structure" payload:"CopyObjectResult"`
  1860. }
  1861. type CopyObjectResult struct {
  1862. ETag *string `type:"string"`
  1863. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  1864. // CRC64 value of a single part
  1865. ChecksumCRC64ECMA *string `type:"string"`
  1866. metadataCopyObjectResult `json:"-" xml:"-"`
  1867. }
  1868. type metadataCopyObjectResult struct {
  1869. SDKShapeTraits bool `type:"structure"`
  1870. }
  1871. type CopyPartResult struct {
  1872. // Entity tag of the object.
  1873. ETag *string `type:"string"`
  1874. // Date and time at which the object was uploaded.
  1875. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  1876. // CRC64 value of a single part
  1877. ChecksumCRC64ECMA *string `type:"string"`
  1878. metadataCopyPartResult `json:"-" xml:"-"`
  1879. }
  1880. type metadataCopyPartResult struct {
  1881. SDKShapeTraits bool `type:"structure"`
  1882. }
  1883. type CreateBucketConfiguration struct {
  1884. // Specifies the region where the bucket will be created. If you don't specify
  1885. // a region, the bucket will be created in US Standard.
  1886. LocationConstraint *string `type:"string"`
  1887. // The bucket data redundancy type.
  1888. // Default value: LRS
  1889. // Valid value: LRS丨ZRS
  1890. // LRS: local redundancy storage
  1891. // ZRS: zone redundancy storage
  1892. DataRedundancyType *string `type:"string"`
  1893. metadataCreateBucketConfiguration `json:"-" xml:"-"`
  1894. }
  1895. type metadataCreateBucketConfiguration struct {
  1896. SDKShapeTraits bool `type:"structure"`
  1897. }
  1898. type CreateBucketInput struct {
  1899. // The canned ACL to apply to the bucket.
  1900. ACL *string `location:"header" locationName:"x-amz-acl" type:"string"`
  1901. ProjectId *string `location:"uri" locationName:"ProjectId" type:"string"`
  1902. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  1903. CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  1904. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  1905. // bucket.
  1906. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  1907. // Allows grantee to list the objects in the bucket.
  1908. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  1909. // Allows grantee to read the bucket ACL.
  1910. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  1911. // Allows grantee to create, overwrite, and delete any object in the bucket.
  1912. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  1913. // Allows grantee to write the ACL for the applicable bucket.
  1914. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  1915. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  1916. BucketType *string `location:"header" locationName:"x-amz-bucket-type" type:"string"`
  1917. // Specify the bucket visit type.
  1918. BucketVisitType *string `location:"header" locationName:"x-amz-bucket-visit-type" type:"string"`
  1919. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  1920. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  1921. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  1922. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  1923. MetadataCreateBucketInput `json:"-" xml:"-"`
  1924. }
  1925. type MetadataCreateBucketInput struct {
  1926. SDKShapeTraits bool `type:"structure" payload:"CreateBucketConfiguration"`
  1927. }
  1928. type CreateBucketOutput struct {
  1929. Location *string `location:"header" locationName:"Location" type:"string"`
  1930. metadataCreateBucketOutput `json:"-" xml:"-"`
  1931. Metadata map[string]*string `location:"headers" type:"map"`
  1932. StatusCode *int64 `location:"statusCode" type:"integer"`
  1933. }
  1934. type metadataCreateBucketOutput struct {
  1935. SDKShapeTraits bool `type:"structure"`
  1936. }
  1937. type CreateMultipartUploadInput struct {
  1938. // The canned ACL to apply to the object.
  1939. ACL *string `location:"header" locationName:"x-amz-acl" type:"string"`
  1940. // Specifies the object tag of the object. Multiple tags can be set at the same time, such as: TagA=A&TagB=B.
  1941. // Note: Key and Value need to be URL-encoded first. If an item does not have "=", the Value is considered to be an empty string.
  1942. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  1943. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  1944. // Specifies caching behavior along the request/reply chain.
  1945. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  1946. // Specifies presentational information for the object.
  1947. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  1948. // Specifies what content encodings have been applied to the object and thus
  1949. // what decoding mechanisms must be applied to obtain the media-type referenced
  1950. // by the Content-Type header field.
  1951. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  1952. // The language the content is in.
  1953. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  1954. // A standard MIME type describing the format of the object data.
  1955. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  1956. // The date and time at which the object is no longer cacheable.
  1957. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  1958. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  1959. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  1960. // Allows grantee to read the object data and its metadata.
  1961. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  1962. // Allows grantee to read the object ACL.
  1963. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  1964. // Allows grantee to write the ACL for the applicable object.
  1965. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  1966. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  1967. // A map of metadata to store with the object in S3.
  1968. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  1969. // Confirms that the requester knows that she or he will be charged for the
  1970. // request. Bucket owners need not specify this parameter in their requests.
  1971. // Documentation on downloading objects from requester pays buckets can be found
  1972. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  1973. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  1974. // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
  1975. // aws:kms).
  1976. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  1977. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  1978. // data. This value is used to store the object and then it is discarded; Amazon
  1979. // does not store the encryption key. The key must be appropriate for use with
  1980. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  1981. // header.
  1982. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  1983. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  1984. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  1985. // key was transmitted without error.
  1986. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  1987. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  1988. // requests for an object protected by AWS KMS will fail if not made via SSL
  1989. // or using SigV4. Documentation on configuring any of the officially supported
  1990. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  1991. SSEKMSKeyID *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  1992. // The Server-side encryption algorithm used when storing this object in S3
  1993. // (e.g., AES256, aws:kms).
  1994. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
  1995. // The type of storage to use for the object. Defaults to 'STANDARD'.
  1996. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string"`
  1997. // If the bucket is configured as a website, redirects requests for this object
  1998. // to another object in the same bucket or to an external URL. Amazon S3 stores
  1999. // the value of this header in the object metadata.
  2000. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  2001. // Specifies whether the object is forbidden to overwrite.
  2002. ForbidOverwrite *bool `location:"header" locationName:"x-amz-forbid-overwrite" type:"boolean"`
  2003. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2004. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2005. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2006. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2007. metadataCreateMultipartUploadInput `json:"-" xml:"-"`
  2008. }
  2009. type metadataCreateMultipartUploadInput struct {
  2010. SDKShapeTraits bool `type:"structure"`
  2011. }
  2012. type CreateMultipartUploadOutput struct {
  2013. // Name of the bucket to which the multipart upload was initiated.
  2014. Bucket *string `locationName:"Bucket" type:"string"`
  2015. // Object key for which the multipart upload was initiated.
  2016. Key *string `type:"string"`
  2017. // If present, indicates that the requester was successfully charged for the
  2018. // request.
  2019. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  2020. // If server-side encryption with a customer-provided encryption key was requested,
  2021. // the response will include this header confirming the encryption algorithm
  2022. // used.
  2023. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  2024. // If server-side encryption with a customer-provided encryption key was requested,
  2025. // the response will include this header to provide round trip message integrity
  2026. // verification of the customer-provided encryption key.
  2027. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  2028. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  2029. // encryption key that was used for the object.
  2030. SSEKMSKeyID *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  2031. // The Server-side encryption algorithm used when storing this object in S3
  2032. // (e.g., AES256, aws:kms).
  2033. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
  2034. // ID for the initiated multipart upload.
  2035. UploadID *string `locationName:"UploadId" type:"string"`
  2036. Metadata map[string]*string `location:"headers" type:"map"`
  2037. metadataCreateMultipartUploadOutput `json:"-" xml:"-"`
  2038. }
  2039. type metadataCreateMultipartUploadOutput struct {
  2040. SDKShapeTraits bool `type:"structure"`
  2041. }
  2042. type Delete struct {
  2043. Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
  2044. // Element to enable quiet mode for the request. When you add this element,
  2045. // you must set its value to true.
  2046. Quiet *bool `type:"boolean"`
  2047. metadataDelete `json:"-" xml:"-"`
  2048. }
  2049. type metadataDelete struct {
  2050. SDKShapeTraits bool `type:"structure"`
  2051. }
  2052. type DeleteBucketInput struct {
  2053. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2054. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2055. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2056. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2057. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2058. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2059. metadataDeleteBucketInput `json:"-" xml:"-"`
  2060. }
  2061. type metadataDeleteBucketInput struct {
  2062. SDKShapeTraits bool `type:"structure"`
  2063. }
  2064. type DeleteBucketOutput struct {
  2065. metadataDeleteBucketOutput `json:"-" xml:"-"`
  2066. Metadata map[string]*string `location:"headers" type:"map"`
  2067. StatusCode *int64 `location:"statusCode" type:"integer"`
  2068. }
  2069. type metadataDeleteBucketOutput struct {
  2070. SDKShapeTraits bool `type:"structure"`
  2071. }
  2072. type DeleteBucketPolicyInput struct {
  2073. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2074. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2075. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2076. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2077. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2078. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2079. metadataDeleteBucketPolicyInput `json:"-" xml:"-"`
  2080. }
  2081. type metadataDeleteBucketPolicyInput struct {
  2082. SDKShapeTraits bool `type:"structure"`
  2083. }
  2084. type DeleteBucketPolicyOutput struct {
  2085. metadataDeleteBucketPolicyOutput `json:"-" xml:"-"`
  2086. Metadata map[string]*string `location:"headers" type:"map"`
  2087. StatusCode *int64 `location:"statusCode" type:"integer"`
  2088. }
  2089. type metadataDeleteBucketPolicyOutput struct {
  2090. SDKShapeTraits bool `type:"structure"`
  2091. }
  2092. type DeleteBucketWebsiteInput struct {
  2093. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2094. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2095. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2096. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2097. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2098. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2099. metadataDeleteBucketWebsiteInput `json:"-" xml:"-"`
  2100. }
  2101. type metadataDeleteBucketWebsiteInput struct {
  2102. SDKShapeTraits bool `type:"structure"`
  2103. }
  2104. type DeleteBucketWebsiteOutput struct {
  2105. metadataDeleteBucketWebsiteOutput `json:"-" xml:"-"`
  2106. Metadata map[string]*string `location:"headers" type:"map"`
  2107. StatusCode *int64 `location:"statusCode" type:"integer"`
  2108. }
  2109. type metadataDeleteBucketWebsiteOutput struct {
  2110. SDKShapeTraits bool `type:"structure"`
  2111. }
  2112. type DeleteMarkerEntry struct {
  2113. // Specifies whether the object is (true) or is not (false) the latest version
  2114. // of an object.
  2115. IsLatest *bool `type:"boolean"`
  2116. // The object key.
  2117. Key *string `type:"string"`
  2118. // Date and time the object was last modified.
  2119. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  2120. Owner *Owner `type:"structure"`
  2121. // Version ID of an object.
  2122. VersionID *string `locationName:"VersionId" type:"string"`
  2123. metadataDeleteMarkerEntry `json:"-" xml:"-"`
  2124. }
  2125. type metadataDeleteMarkerEntry struct {
  2126. SDKShapeTraits bool `type:"structure"`
  2127. }
  2128. type DeleteObjectInput struct {
  2129. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2130. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  2131. // The concatenation of the authentication device's serial number, a space,
  2132. // and the value that is displayed on your authentication device.
  2133. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  2134. // Confirms that the requester knows that she or he will be charged for the
  2135. // request. Bucket owners need not specify this parameter in their requests.
  2136. // Documentation on downloading objects from requester pays buckets can be found
  2137. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  2138. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  2139. // VersionId used to reference a specific version of the object.
  2140. VersionID *string `location:"querystring" locationName:"versionId" type:"string"`
  2141. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2142. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2143. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2144. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2145. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2146. metadataDeleteObjectInput `json:"-" xml:"-"`
  2147. }
  2148. type DeleteBucketPrefixInput struct {
  2149. // The name of the bucket.
  2150. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2151. // Prefix of the object.
  2152. Prefix *string `type:"string" required:"true"`
  2153. // The max number of each list.
  2154. MaxKeys *int64 `type:"integer" required:"true"`
  2155. // Is return the deletion result.
  2156. IsReTurnResults *bool `type:"boolean" required:"true"`
  2157. }
  2158. type metadataDeleteObjectInput struct {
  2159. SDKShapeTraits bool `type:"structure"`
  2160. }
  2161. type DeleteObjectOutput struct {
  2162. // Specifies whether the versioned object that was permanently deleted was (true)
  2163. // or was not (false) a delete marker.
  2164. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  2165. // If present, indicates that the requester was successfully charged for the
  2166. // request.
  2167. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  2168. // Returns the version ID of the delete marker created as a result of the DELETE
  2169. // operation.
  2170. VersionID *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  2171. metadataDeleteObjectOutput `json:"-" xml:"-"`
  2172. Metadata map[string]*string `location:"headers" type:"map"`
  2173. StatusCode *int64 `location:"statusCode" type:"integer"`
  2174. }
  2175. type metadataDeleteObjectOutput struct {
  2176. SDKShapeTraits bool `type:"structure"`
  2177. }
  2178. type DeleteObjectsInput struct {
  2179. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2180. Delete *Delete `locationName:"Delete" type:"structure" required:"true"`
  2181. IsReTurnResults *bool `type:"boolean" required:"true"`
  2182. // The concatenation of the authentication device's serial number, a space,
  2183. // and the value that is displayed on your authentication device.
  2184. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  2185. // Confirms that the requester knows that she or he will be charged for the
  2186. // request. Bucket owners need not specify this parameter in their requests.
  2187. // Documentation on downloading objects from requester pays buckets can be found
  2188. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  2189. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  2190. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2191. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2192. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2193. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2194. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2195. metadataDeleteObjectsInput `json:"-" xml:"-"`
  2196. }
  2197. type metadataDeleteObjectsInput struct {
  2198. SDKShapeTraits bool `type:"structure" payload:"Delete"`
  2199. }
  2200. type DeleteObjectsOutput struct {
  2201. Deleted []*DeletedObject `type:"list" flattened:"true"`
  2202. Errors []*Error `locationName:"Error" type:"list" flattened:"true"`
  2203. ErrorsCount *int64 `locationName:"ErrorsCount" type:"integer"`
  2204. // If present, indicates that the requester was successfully charged for the
  2205. // request.
  2206. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  2207. metadataDeleteObjectsOutput `json:"-" xml:"-"`
  2208. Metadata map[string]*string `location:"headers" type:"map"`
  2209. StatusCode *int64 `location:"statusCode" type:"integer"`
  2210. }
  2211. type metadataDeleteObjectsOutput struct {
  2212. SDKShapeTraits bool `type:"structure"`
  2213. }
  2214. type DeletedObject struct {
  2215. DeleteMarker *bool `type:"boolean"`
  2216. DeleteMarkerVersionID *string `locationName:"DeleteMarkerVersionId" type:"string"`
  2217. Key *string `type:"string"`
  2218. VersionID *string `locationName:"VersionId" type:"string"`
  2219. metadataDeletedObject `json:"-" xml:"-"`
  2220. }
  2221. type metadataDeletedObject struct {
  2222. SDKShapeTraits bool `type:"structure"`
  2223. }
  2224. type Error struct {
  2225. Code *string `type:"string"`
  2226. Key *string `type:"string"`
  2227. Message *string `type:"string"`
  2228. VersionID *string `locationName:"VersionId" type:"string"`
  2229. metadataError `json:"-" xml:"-"`
  2230. }
  2231. type metadataError struct {
  2232. SDKShapeTraits bool `type:"structure"`
  2233. }
  2234. type ErrorDocument struct {
  2235. // The object key name to use when a 4XX class error occurs.
  2236. Key *string `type:"string" required:"true"`
  2237. metadataErrorDocument `json:"-" xml:"-"`
  2238. }
  2239. type metadataErrorDocument struct {
  2240. SDKShapeTraits bool `type:"structure"`
  2241. }
  2242. type GetBucketACLInput struct {
  2243. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2244. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2245. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2246. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2247. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2248. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2249. metadataGetBucketACLInput `json:"-" xml:"-"`
  2250. }
  2251. type metadataGetBucketACLInput struct {
  2252. SDKShapeTraits bool `type:"structure"`
  2253. }
  2254. type GetBucketACLOutput struct {
  2255. // A list of grants.
  2256. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  2257. Owner *Owner `type:"structure"`
  2258. metadataGetBucketACLOutput `json:"-" xml:"-"`
  2259. Metadata map[string]*string `location:"headers" type:"map"`
  2260. StatusCode *int64 `location:"statusCode" type:"integer"`
  2261. }
  2262. type metadataGetBucketACLOutput struct {
  2263. SDKShapeTraits bool `type:"structure"`
  2264. }
  2265. type GetBucketLocationInput struct {
  2266. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2267. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2268. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2269. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2270. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2271. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2272. metadataGetBucketLocationInput `json:"-" xml:"-"`
  2273. }
  2274. type metadataGetBucketLocationInput struct {
  2275. SDKShapeTraits bool `type:"structure"`
  2276. }
  2277. type GetBucketLocationOutput struct {
  2278. LocationConstraint *string `type:"string"`
  2279. metadataGetBucketLocationOutput `json:"-" xml:"-"`
  2280. Metadata map[string]*string `location:"headers" type:"map"`
  2281. StatusCode *int64 `location:"statusCode" type:"integer"`
  2282. }
  2283. type metadataGetBucketLocationOutput struct {
  2284. SDKShapeTraits bool `type:"structure"`
  2285. }
  2286. type GetBucketLoggingInput struct {
  2287. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2288. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2289. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2290. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2291. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2292. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2293. metadataGetBucketLoggingInput `json:"-" xml:"-"`
  2294. }
  2295. type metadataGetBucketLoggingInput struct {
  2296. SDKShapeTraits bool `type:"structure"`
  2297. }
  2298. type GetBucketLoggingOutput struct {
  2299. LoggingEnabled *LoggingEnabled `type:"structure"`
  2300. metadataGetBucketLoggingOutput `json:"-" xml:"-"`
  2301. Metadata map[string]*string `location:"headers" type:"map"`
  2302. StatusCode *int64 `location:"statusCode" type:"integer"`
  2303. }
  2304. type metadataGetBucketLoggingOutput struct {
  2305. SDKShapeTraits bool `type:"structure"`
  2306. }
  2307. type GetBucketNotificationConfigurationRequest struct {
  2308. // Name of the buket to get the notification configuration for.
  2309. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2310. metadataGetBucketNotificationConfigurationRequest `json:"-" xml:"-"`
  2311. }
  2312. type metadataGetBucketNotificationConfigurationRequest struct {
  2313. SDKShapeTraits bool `type:"structure"`
  2314. }
  2315. type GetBucketPolicyInput struct {
  2316. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2317. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2318. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2319. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2320. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2321. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2322. metadataGetBucketPolicyInput `json:"-" xml:"-"`
  2323. }
  2324. type metadataGetBucketPolicyInput struct {
  2325. SDKShapeTraits bool `type:"structure"`
  2326. }
  2327. type GetBucketPolicyOutput struct {
  2328. // The bucket policy as a JSON document.
  2329. Policy *string `type:"string"`
  2330. metadataGetBucketPolicyOutput `json:"-" xml:"-"`
  2331. Metadata map[string]*string `location:"headers" type:"map"`
  2332. StatusCode *int64 `location:"statusCode" type:"integer"`
  2333. }
  2334. type metadataGetBucketPolicyOutput struct {
  2335. SDKShapeTraits bool `type:"structure" payload:"Policy"`
  2336. }
  2337. type GetBucketRequestPaymentInput struct {
  2338. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2339. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2340. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2341. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2342. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2343. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2344. metadataGetBucketRequestPaymentInput `json:"-" xml:"-"`
  2345. }
  2346. type metadataGetBucketRequestPaymentInput struct {
  2347. SDKShapeTraits bool `type:"structure"`
  2348. }
  2349. type GetBucketRequestPaymentOutput struct {
  2350. // Specifies who pays for the download and request fees.
  2351. Payer *string `type:"string"`
  2352. metadataGetBucketRequestPaymentOutput `json:"-" xml:"-"`
  2353. Metadata map[string]*string `location:"headers" type:"map"`
  2354. StatusCode *int64 `location:"statusCode" type:"integer"`
  2355. }
  2356. type metadataGetBucketRequestPaymentOutput struct {
  2357. SDKShapeTraits bool `type:"structure"`
  2358. }
  2359. type GetBucketVersioningInput struct {
  2360. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2361. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2362. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2363. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2364. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2365. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2366. metadataGetBucketVersioningInput `json:"-" xml:"-"`
  2367. }
  2368. type metadataGetBucketVersioningInput struct {
  2369. SDKShapeTraits bool `type:"structure"`
  2370. }
  2371. type GetBucketVersioningOutput struct {
  2372. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  2373. // This element is only returned if the bucket has been configured with MFA
  2374. // delete. If the bucket has never been so configured, this element is not returned.
  2375. MFADelete *string `locationName:"MfaDelete" type:"string"`
  2376. // The versioning state of the bucket.
  2377. Status *string `type:"string"`
  2378. metadataGetBucketVersioningOutput `json:"-" xml:"-"`
  2379. Metadata map[string]*string `location:"headers" type:"map"`
  2380. StatusCode *int64 `location:"statusCode" type:"integer"`
  2381. }
  2382. type metadataGetBucketVersioningOutput struct {
  2383. SDKShapeTraits bool `type:"structure"`
  2384. }
  2385. type GetBucketWebsiteInput struct {
  2386. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2387. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2388. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2389. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2390. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2391. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2392. metadataGetBucketWebsiteInput `json:"-" xml:"-"`
  2393. }
  2394. type metadataGetBucketWebsiteInput struct {
  2395. SDKShapeTraits bool `type:"structure"`
  2396. }
  2397. type GetBucketWebsiteOutput struct {
  2398. ErrorDocument *ErrorDocument `type:"structure"`
  2399. IndexDocument *IndexDocument `type:"structure"`
  2400. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  2401. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  2402. metadataGetBucketWebsiteOutput `json:"-" xml:"-"`
  2403. Metadata map[string]*string `location:"headers" type:"map"`
  2404. StatusCode *int64 `location:"statusCode" type:"integer"`
  2405. }
  2406. type metadataGetBucketWebsiteOutput struct {
  2407. SDKShapeTraits bool `type:"structure"`
  2408. }
  2409. type GetObjectACLInput struct {
  2410. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2411. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  2412. // Confirms that the requester knows that she or he will be charged for the
  2413. // request. Bucket owners need not specify this parameter in their requests.
  2414. // Documentation on downloading objects from requester pays buckets can be found
  2415. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  2416. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  2417. // VersionId used to reference a specific version of the object.
  2418. VersionID *string `location:"querystring" locationName:"versionId" type:"string"`
  2419. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2420. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2421. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2422. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2423. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2424. metadataGetObjectACLInput `json:"-" xml:"-"`
  2425. }
  2426. type metadataGetObjectACLInput struct {
  2427. SDKShapeTraits bool `type:"structure"`
  2428. }
  2429. type GetObjectACLOutput struct {
  2430. // A list of grants.
  2431. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  2432. Owner *Owner `type:"structure"`
  2433. // If present, indicates that the requester was successfully charged for the
  2434. // request.
  2435. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  2436. metadataGetObjectACLOutput `json:"-" xml:"-"`
  2437. Metadata map[string]*string `location:"headers" type:"map"`
  2438. StatusCode *int64 `location:"statusCode" type:"integer"`
  2439. }
  2440. type metadataGetObjectACLOutput struct {
  2441. SDKShapeTraits bool `type:"structure"`
  2442. }
  2443. type GetObjectInput struct {
  2444. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2445. // Return the object only if its entity tag (ETag) is the same as the one specified,
  2446. // otherwise return a 412 (precondition failed).
  2447. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  2448. // Return the object only if it has been modified since the specified time,
  2449. // otherwise return a 304 (not modified).
  2450. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"`
  2451. // Return the object only if its entity tag (ETag) is different from the one
  2452. // specified, otherwise return a 304 (not modified).
  2453. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  2454. // Return the object only if it has not been modified since the specified time,
  2455. // otherwise return a 412 (precondition failed).
  2456. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"`
  2457. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  2458. // Downloads the specified range bytes of an object. For more information about
  2459. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  2460. Range *string `location:"header" locationName:"Range" type:"string"`
  2461. // Confirms that the requester knows that she or he will be charged for the
  2462. // request. Bucket owners need not specify this parameter in their requests.
  2463. // Documentation on downloading objects from requester pays buckets can be found
  2464. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  2465. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  2466. // Sets the Cache-Control header of the response.
  2467. ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
  2468. // Sets the Content-Disposition header of the response
  2469. ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
  2470. // Sets the Content-Encoding header of the response.
  2471. ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
  2472. // Sets the Content-Language header of the response.
  2473. ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
  2474. // Sets the Content-Type header of the response.
  2475. ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
  2476. // Sets the Expires header of the response.
  2477. ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"iso8601"`
  2478. // Specify the encoding type of the client.
  2479. // If you want to compress and transmit the returned content using gzip,
  2480. // you need to add a request header: Accept-Encoding:gzip。
  2481. // KS3 will determine whether to return gzip compressed data based on the
  2482. // Content-Type and Object size (not less than 1 KB) of the object.
  2483. // Value: gzip、br、deflate
  2484. AcceptEncoding *string `location:"header" locationName:"Accept-Encoding" type:"string"`
  2485. // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
  2486. // aws:kms).
  2487. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  2488. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  2489. // data. This value is used to store the object and then it is discarded; Amazon
  2490. // does not store the encryption key. The key must be appropriate for use with
  2491. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  2492. // header.
  2493. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  2494. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  2495. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  2496. // key was transmitted without error.
  2497. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  2498. // VersionId used to reference a specific version of the object.
  2499. VersionID *string `location:"querystring" locationName:"versionId" type:"string"`
  2500. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2501. TrafficLimit *int64 `location:"header" locationName:"x-kss-traffic-limit" type:"string"`
  2502. // Progress callback function
  2503. ProgressFn aws.ProgressFunc `location:"function"`
  2504. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2505. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2506. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2507. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2508. metadataGetObjectInput `json:"-" xml:"-"`
  2509. }
  2510. type metadataGetObjectInput struct {
  2511. SDKShapeTraits bool `type:"structure"`
  2512. }
  2513. type GetObjectOutput struct {
  2514. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  2515. // Object data.
  2516. Body io.ReadCloser `type:"blob"`
  2517. // Specifies caching behavior along the request/reply chain.
  2518. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  2519. // Specifies presentational information for the object.
  2520. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  2521. // Specifies what content encodings have been applied to the object and thus
  2522. // what decoding mechanisms must be applied to obtain the media-type referenced
  2523. // by the Content-Type header field.
  2524. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  2525. // The language the content is in.
  2526. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  2527. // Size of the body in bytes.
  2528. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"integer"`
  2529. // The portion of the object returned in the response.
  2530. ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
  2531. // A standard MIME type describing the format of the object data.
  2532. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2533. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  2534. // Marker. If false, this response header does not appear in the response.
  2535. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  2536. // An ETag is an opaque identifier assigned by a web server to a specific version
  2537. // of a resource found at a URL
  2538. ETag *string `location:"header" locationName:"ETag" type:"string"`
  2539. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  2540. // includes this header. It includes the expiry-date and rule-id key value pairs
  2541. // providing object expiration information. The value of the rule-id is URL
  2542. // encoded.
  2543. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  2544. // The date and time at which the object is no longer cacheable.
  2545. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  2546. // Last modified date of the object
  2547. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
  2548. // This is set to the number of metadata entries not returned in x-amz-meta
  2549. // headers. This can happen if you create metadata using an API like SOAP that
  2550. // supports more flexible metadata than the REST API. For example, using SOAP,
  2551. // you can create metadata whose values are not legal HTTP headers.
  2552. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  2553. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string"`
  2554. // If present, indicates that the requester was successfully charged for the
  2555. // request.
  2556. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  2557. // Provides information about object restoration operation and expiration time
  2558. // of the restored object copy.
  2559. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  2560. // If server-side encryption with a customer-provided encryption key was requested,
  2561. // the response will include this header confirming the encryption algorithm
  2562. // used.
  2563. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  2564. // If server-side encryption with a customer-provided encryption key was requested,
  2565. // the response will include this header to provide round trip message integrity
  2566. // verification of the customer-provided encryption key.
  2567. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  2568. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  2569. // encryption key that was used for the object.
  2570. SSEKMSKeyID *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  2571. // The Server-side encryption algorithm used when storing this object in S3
  2572. // (e.g., AES256, aws:kms).
  2573. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
  2574. // Version of the object.
  2575. VersionID *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  2576. // If the bucket is configured as a website, redirects requests for this object
  2577. // to another object in the same bucket or to an external URL. Amazon S3 stores
  2578. // the value of this header in the object metadata.
  2579. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  2580. metadataGetObjectOutput `json:"-" xml:"-"`
  2581. Metadata map[string]*string `location:"headers" type:"map"`
  2582. StatusCode *int64 `location:"statusCode" type:"integer"`
  2583. }
  2584. type metadataGetObjectOutput struct {
  2585. SDKShapeTraits bool `type:"structure" payload:"Body"`
  2586. }
  2587. type GetObjectTorrentInput struct {
  2588. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2589. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  2590. // Confirms that the requester knows that she or he will be charged for the
  2591. // request. Bucket owners need not specify this parameter in their requests.
  2592. // Documentation on downloading objects from requester pays buckets can be found
  2593. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  2594. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  2595. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2596. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2597. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2598. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2599. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2600. metadataGetObjectTorrentInput `json:"-" xml:"-"`
  2601. }
  2602. type metadataGetObjectTorrentInput struct {
  2603. SDKShapeTraits bool `type:"structure"`
  2604. }
  2605. type GetObjectTorrentOutput struct {
  2606. Body io.ReadCloser `type:"blob"`
  2607. // If present, indicates that the requester was successfully charged for the
  2608. // request.
  2609. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  2610. metadataGetObjectTorrentOutput `json:"-" xml:"-"`
  2611. Metadata map[string]*string `location:"headers" type:"map"`
  2612. StatusCode *int64 `location:"statusCode" type:"integer"`
  2613. }
  2614. type metadataGetObjectTorrentOutput struct {
  2615. SDKShapeTraits bool `type:"structure" payload:"Body"`
  2616. }
  2617. type Grant struct {
  2618. Grantee *Grantee `type:"structure"`
  2619. // Specifies the permission given to the grantee.
  2620. Permission *string `type:"string"`
  2621. metadataGrant `json:"-" xml:"-"`
  2622. }
  2623. type metadataGrant struct {
  2624. SDKShapeTraits bool `type:"structure"`
  2625. }
  2626. type Grantee struct {
  2627. // Screen name of the grantee.
  2628. DisplayName *string `type:"string"`
  2629. // Email address of the grantee.
  2630. EmailAddress *string `type:"string"`
  2631. // The canonical user ID of the grantee.
  2632. ID *string `type:"string"`
  2633. // Type of grantee
  2634. Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true"`
  2635. // URI of the grantee group.
  2636. URI *string `type:"string"`
  2637. metadataGrantee `json:"-" xml:"-"`
  2638. }
  2639. type metadataGrantee struct {
  2640. SDKShapeTraits bool `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  2641. }
  2642. type HeadBucketInput struct {
  2643. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2644. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2645. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2646. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2647. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2648. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2649. metadataHeadBucketInput `json:"-" xml:"-"`
  2650. }
  2651. type metadataHeadBucketInput struct {
  2652. SDKShapeTraits bool `type:"structure"`
  2653. }
  2654. type HeadBucketOutput struct {
  2655. metadataHeadBucketOutput `json:"-" xml:"-"`
  2656. Metadata map[string]*string `location:"headers" type:"map"`
  2657. StatusCode *int64 `location:"statusCode" type:"integer"`
  2658. }
  2659. type metadataHeadBucketOutput struct {
  2660. SDKShapeTraits bool `type:"structure"`
  2661. }
  2662. type HeadObjectInput struct {
  2663. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2664. // Return the object only if its entity tag (ETag) is the same as the one specified,
  2665. // otherwise return a 412 (precondition failed).
  2666. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  2667. // Return the object only if it has been modified since the specified time,
  2668. // otherwise return a 304 (not modified).
  2669. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"`
  2670. // Return the object only if its entity tag (ETag) is different from the one
  2671. // specified, otherwise return a 304 (not modified).
  2672. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  2673. // Return the object only if it has not been modified since the specified time,
  2674. // otherwise return a 412 (precondition failed).
  2675. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"`
  2676. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  2677. // Downloads the specified range bytes of an object. For more information about
  2678. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  2679. Range *string `location:"header" locationName:"Range" type:"string"`
  2680. // Confirms that the requester knows that she or he will be charged for the
  2681. // request. Bucket owners need not specify this parameter in their requests.
  2682. // Documentation on downloading objects from requester pays buckets can be found
  2683. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  2684. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  2685. // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
  2686. // aws:kms).
  2687. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  2688. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  2689. // data. This value is used to store the object and then it is discarded; Amazon
  2690. // does not store the encryption key. The key must be appropriate for use with
  2691. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  2692. // header.
  2693. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  2694. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  2695. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  2696. // key was transmitted without error.
  2697. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  2698. // VersionId used to reference a specific version of the object.
  2699. VersionID *string `location:"querystring" locationName:"versionId" type:"string"`
  2700. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2701. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2702. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2703. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2704. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2705. metadataHeadObjectInput `json:"-" xml:"-"`
  2706. }
  2707. type metadataHeadObjectInput struct {
  2708. SDKShapeTraits bool `type:"structure"`
  2709. }
  2710. type HeadObjectOutput struct {
  2711. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  2712. // Specifies caching behavior along the request/reply chain.
  2713. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  2714. // Specifies presentational information for the object.
  2715. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  2716. // Specifies what content encodings have been applied to the object and thus
  2717. // what decoding mechanisms must be applied to obtain the media-type referenced
  2718. // by the Content-Type header field.
  2719. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  2720. // The language the content is in.
  2721. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  2722. // Size of the body in bytes.
  2723. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"integer"`
  2724. // A standard MIME type describing the format of the object data.
  2725. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2726. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  2727. // Marker. If false, this response header does not appear in the response.
  2728. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  2729. // An ETag is an opaque identifier assigned by a web server to a specific version
  2730. // of a resource found at a URL
  2731. ETag *string `location:"header" locationName:"ETag" type:"string"`
  2732. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  2733. // includes this header. It includes the expiry-date and rule-id key value pairs
  2734. // providing object expiration information. The value of the rule-id is URL
  2735. // encoded.
  2736. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  2737. // The date and time at which the object is no longer cacheable.
  2738. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  2739. // Last modified date of the object
  2740. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
  2741. // This is set to the number of metadata entries not returned in x-amz-meta
  2742. // headers. This can happen if you create metadata using an API like SOAP that
  2743. // supports more flexible metadata than the REST API. For example, using SOAP,
  2744. // you can create metadata whose values are not legal HTTP headers.
  2745. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  2746. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string"`
  2747. // If present, indicates that the requester was successfully charged for the
  2748. // request.
  2749. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  2750. // Provides information about object restoration operation and expiration time
  2751. // of the restored object copy.
  2752. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  2753. // If server-side encryption with a customer-provided encryption key was requested,
  2754. // the response will include this header confirming the encryption algorithm
  2755. // used.
  2756. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  2757. // If server-side encryption with a customer-provided encryption key was requested,
  2758. // the response will include this header to provide round trip message integrity
  2759. // verification of the customer-provided encryption key.
  2760. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  2761. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  2762. // encryption key that was used for the object.
  2763. SSEKMSKeyID *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  2764. // The Server-side encryption algorithm used when storing this object in S3
  2765. // (e.g., AES256, aws:kms).
  2766. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
  2767. // Version of the object.
  2768. VersionID *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  2769. // If the bucket is configured as a website, redirects requests for this object
  2770. // to another object in the same bucket or to an external URL. Amazon S3 stores
  2771. // the value of this header in the object metadata.
  2772. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  2773. metadataHeadObjectOutput `json:"-" xml:"-"`
  2774. Metadata map[string]*string `location:"headers" type:"map"`
  2775. StatusCode *int64 `location:"statusCode" type:"integer"`
  2776. }
  2777. type metadataHeadObjectOutput struct {
  2778. SDKShapeTraits bool `type:"structure"`
  2779. }
  2780. type IndexDocument struct {
  2781. // A suffix that is appended to a request that is for a directory on the website
  2782. // endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/
  2783. // the data that is returned will be for the object with the key name images/index.html)
  2784. // The suffix must not be empty and must not include a slash character.
  2785. Suffix *string `type:"string" required:"true"`
  2786. metadataIndexDocument `json:"-" xml:"-"`
  2787. }
  2788. type metadataIndexDocument struct {
  2789. SDKShapeTraits bool `type:"structure"`
  2790. }
  2791. type Initiator struct {
  2792. // Name of the Principal.
  2793. DisplayName *string `type:"string"`
  2794. // If the principal is an AWS account, it provides the Canonical User ID. If
  2795. // the principal is an IAM User, it provides a user ARN value.
  2796. ID *string `type:"string"`
  2797. metadataInitiator `json:"-" xml:"-"`
  2798. }
  2799. type metadataInitiator struct {
  2800. SDKShapeTraits bool `type:"structure"`
  2801. }
  2802. // LambdaFunctionConfiguration Container for specifying the AWS Lambda notification configuration.
  2803. type LambdaFunctionConfiguration struct {
  2804. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  2805. // Optional unique identifier for configurations in a notification configuration.
  2806. // If you don't provide one, Amazon S3 will assign an ID.
  2807. ID *string `locationName:"Id" type:"string"`
  2808. // Lambda cloud function ARN that Amazon S3 can invoke when it detects events
  2809. // of the specified type.
  2810. LambdaFunctionARN *string `locationName:"CloudFunction" type:"string" required:"true"`
  2811. metadataLambdaFunctionConfiguration `json:"-" xml:"-"`
  2812. }
  2813. type metadataLambdaFunctionConfiguration struct {
  2814. SDKShapeTraits bool `type:"structure"`
  2815. }
  2816. type ListBucketsInput struct {
  2817. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2818. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2819. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2820. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2821. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2822. metadataListBucketsInput `json:"-" xml:"-"`
  2823. }
  2824. type metadataListBucketsInput struct {
  2825. SDKShapeTraits bool `type:"structure"`
  2826. }
  2827. type ListBucketsOutput struct {
  2828. Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
  2829. Owner *Owner `type:"structure"`
  2830. metadataListBucketsOutput `json:"-" xml:"-"`
  2831. Metadata map[string]*string `location:"headers" type:"map"`
  2832. StatusCode *int64 `location:"statusCode" type:"integer"`
  2833. }
  2834. type metadataListBucketsOutput struct {
  2835. SDKShapeTraits bool `type:"structure"`
  2836. }
  2837. type ListMultipartUploadsInput struct {
  2838. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2839. // Character you use to group keys.
  2840. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  2841. // Requests Amazon S3 to encode the object keys in the response and specifies
  2842. // the encoding method to use. An object key may contain any Unicode character;
  2843. // however, XML 1.0 parser cannot parse some characters, such as characters
  2844. // with an ASCII value from 0 to 10. For characters that are not supported in
  2845. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  2846. // keys in the response.
  2847. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string"`
  2848. // Together with upload-id-marker, this parameter specifies the multipart upload
  2849. // after which listing should begin.
  2850. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  2851. // Sets the maximum number of multipart uploads, from 1 to 1,000, to return
  2852. // in the response body. 1,000 is the maximum number of uploads that can be
  2853. // returned in a response.
  2854. MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
  2855. // Lists in-progress uploads only for those keys that begin with the specified
  2856. // prefix.
  2857. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  2858. // Together with key-marker, specifies the multipart upload after which listing
  2859. // should begin. If key-marker is not specified, the upload-id-marker parameter
  2860. // is ignored.
  2861. UploadIDMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
  2862. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2863. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2864. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2865. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2866. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2867. metadataListMultipartUploadsInput `json:"-" xml:"-"`
  2868. }
  2869. type metadataListMultipartUploadsInput struct {
  2870. SDKShapeTraits bool `type:"structure"`
  2871. }
  2872. type ListMultipartUploadsOutput struct {
  2873. // Name of the bucket to which the multipart upload was initiated.
  2874. Bucket *string `type:"string"`
  2875. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  2876. Delimiter *string `type:"string"`
  2877. // Encoding type used by Amazon S3 to encode object keys in the response.
  2878. EncodingType *string `type:"string"`
  2879. // Indicates whether the returned list of multipart uploads is truncated. A
  2880. // value of true indicates that the list was truncated. The list can be truncated
  2881. // if the number of multipart uploads exceeds the limit allowed or specified
  2882. // by max uploads.
  2883. IsTruncated *bool `type:"boolean"`
  2884. // The key at or after which the listing began.
  2885. KeyMarker *string `type:"string"`
  2886. // Maximum number of multipart uploads that could have been included in the
  2887. // response.
  2888. MaxUploads *int64 `type:"integer"`
  2889. // When a list is truncated, this element specifies the value that should be
  2890. // used for the key-marker request parameter in a subsequent request.
  2891. NextKeyMarker *string `type:"string"`
  2892. // When a list is truncated, this element specifies the value that should be
  2893. // used for the upload-id-marker request parameter in a subsequent request.
  2894. NextUploadIDMarker *string `locationName:"NextUploadIdMarker" type:"string"`
  2895. // When a prefix is provided in the request, this field contains the specified
  2896. // prefix. The result contains only keys starting with the specified prefix.
  2897. Prefix *string `type:"string"`
  2898. // Upload ID after which listing began.
  2899. UploadIDMarker *string `locationName:"UploadIdMarker" type:"string"`
  2900. Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
  2901. metadataListMultipartUploadsOutput `json:"-" xml:"-"`
  2902. Metadata map[string]*string `location:"headers" type:"map"`
  2903. StatusCode *int64 `location:"statusCode" type:"integer"`
  2904. }
  2905. type metadataListMultipartUploadsOutput struct {
  2906. SDKShapeTraits bool `type:"structure"`
  2907. }
  2908. type ListObjectVersionsInput struct {
  2909. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2910. // A delimiter is a character you use to group keys.
  2911. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  2912. // Requests Amazon S3 to encode the object keys in the response and specifies
  2913. // the encoding method to use. An object key may contain any Unicode character;
  2914. // however, XML 1.0 parser cannot parse some characters, such as characters
  2915. // with an ASCII value from 0 to 10. For characters that are not supported in
  2916. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  2917. // keys in the response.
  2918. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string"`
  2919. // Specifies the key to start with when listing objects in a bucket.
  2920. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  2921. // Sets the maximum number of keys returned in the response. The response might
  2922. // contain fewer keys but will never contain more.
  2923. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  2924. // Limits the response to keys that begin with the specified prefix.
  2925. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  2926. // Specifies the object version you want to start listing from.
  2927. VersionIDMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"`
  2928. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2929. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2930. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2931. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2932. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2933. metadataListObjectVersionsInput `json:"-" xml:"-"`
  2934. }
  2935. type metadataListObjectVersionsInput struct {
  2936. SDKShapeTraits bool `type:"structure"`
  2937. }
  2938. type ListObjectVersionsOutput struct {
  2939. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  2940. DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"`
  2941. Delimiter *string `type:"string"`
  2942. // Encoding type used by Amazon S3 to encode object keys in the response.
  2943. EncodingType *string `type:"string"`
  2944. // A flag that indicates whether or not Amazon S3 returned all of the results
  2945. // that satisfied the search criteria. If your results were truncated, you can
  2946. // make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
  2947. // response parameters as a starting place in another request to return the
  2948. // rest of the results.
  2949. IsTruncated *bool `type:"boolean"`
  2950. // Marks the last Key returned in a truncated response.
  2951. KeyMarker *string `type:"string"`
  2952. MaxKeys *int64 `type:"integer"`
  2953. Name *string `type:"string"`
  2954. // Use this value for the key marker request parameter in a subsequent request.
  2955. NextKeyMarker *string `type:"string"`
  2956. // Use this value for the next version id marker parameter in a subsequent request.
  2957. NextVersionIDMarker *string `locationName:"NextVersionIdMarker" type:"string"`
  2958. Prefix *string `type:"string"`
  2959. VersionIDMarker *string `locationName:"VersionIdMarker" type:"string"`
  2960. Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"`
  2961. metadataListObjectVersionsOutput `json:"-" xml:"-"`
  2962. Metadata map[string]*string `location:"headers" type:"map"`
  2963. StatusCode *int64 `location:"statusCode" type:"integer"`
  2964. }
  2965. type metadataListObjectVersionsOutput struct {
  2966. SDKShapeTraits bool `type:"structure"`
  2967. }
  2968. type ListObjectsInput struct {
  2969. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  2970. // A delimiter is a character you use to group keys.
  2971. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  2972. // Requests Amazon S3 to encode the object keys in the response and specifies
  2973. // the encoding method to use. An object key may contain any Unicode character;
  2974. // however, XML 1.0 parser cannot parse some characters, such as characters
  2975. // with an ASCII value from 0 to 10. For characters that are not supported in
  2976. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  2977. // keys in the response.
  2978. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string"`
  2979. // Specifies the key to start with when listing objects in a bucket.
  2980. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  2981. // Sets the maximum number of keys returned in the response. The response might
  2982. // contain fewer keys but will never contain more.
  2983. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  2984. // Limits the response to keys that begin with the specified prefix.
  2985. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  2986. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2987. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  2988. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  2989. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  2990. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  2991. metadataListObjectsInput `json:"-" xml:"-"`
  2992. }
  2993. type metadataListObjectsInput struct {
  2994. SDKShapeTraits bool `type:"structure"`
  2995. }
  2996. type ListObjectsOutput struct {
  2997. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  2998. Contents []*Object `type:"list" flattened:"true"`
  2999. Delimiter *string `type:"string"`
  3000. // Encoding type used by Amazon S3 to encode object keys in the response.
  3001. EncodingType *string `type:"string"`
  3002. // A flag that indicates whether or not Amazon S3 returned all of the results
  3003. // that satisfied the search criteria.
  3004. IsTruncated *bool `type:"boolean"`
  3005. Marker *string `type:"string"`
  3006. MaxKeys *int64 `type:"integer"`
  3007. Name *string `type:"string"`
  3008. // When response is truncated (the IsTruncated element value in the response
  3009. // is true), you can use the key name in this field as marker in the subsequent
  3010. // request to get next set of objects. Amazon S3 lists objects in alphabetical
  3011. // order Note: This element is returned only if you have delimiter request parameter
  3012. // specified. If response does not include the NextMaker and it is truncated,
  3013. // you can use the value of the last Key in the response as the marker in the
  3014. // subsequent request to get the next set of object keys.
  3015. NextMarker *string `type:"string"`
  3016. Prefix *string `type:"string"`
  3017. metadataListObjectsOutput `json:"-" xml:"-"`
  3018. Metadata map[string]*string `location:"headers" type:"map"`
  3019. StatusCode *int64 `location:"statusCode" type:"integer"`
  3020. }
  3021. type metadataListObjectsOutput struct {
  3022. SDKShapeTraits bool `type:"structure"`
  3023. }
  3024. type ListPartsInput struct {
  3025. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3026. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  3027. // Sets the maximum number of parts to return.
  3028. MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`
  3029. // Specifies the part after which listing should begin. Only parts with higher
  3030. // part numbers will be listed.
  3031. PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
  3032. // Confirms that the requester knows that she or he will be charged for the
  3033. // request. Bucket owners need not specify this parameter in their requests.
  3034. // Documentation on downloading objects from requester pays buckets can be found
  3035. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  3036. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  3037. // Upload ID identifying the multipart upload whose parts are being listed.
  3038. UploadID *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  3039. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3040. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3041. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3042. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3043. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3044. metadataListPartsInput `json:"-" xml:"-"`
  3045. }
  3046. type metadataListPartsInput struct {
  3047. SDKShapeTraits bool `type:"structure"`
  3048. }
  3049. type ListPartsOutput struct {
  3050. // Name of the bucket to which the multipart upload was initiated.
  3051. Bucket *string `type:"string"`
  3052. // Identifies who initiated the multipart upload.
  3053. Initiator *Initiator `type:"structure"`
  3054. // Indicates whether the returned list of parts is truncated.
  3055. IsTruncated *bool `type:"boolean"`
  3056. // Object key for which the multipart upload was initiated.
  3057. Key *string `type:"string"`
  3058. // Maximum number of parts that were allowed in the response.
  3059. MaxParts *int64 `type:"integer"`
  3060. // When a list is truncated, this element specifies the last part in the list,
  3061. // as well as the value to use for the part-number-marker request parameter
  3062. // in a subsequent request.
  3063. NextPartNumberMarker *int64 `type:"integer"`
  3064. Owner *Owner `type:"structure"`
  3065. // Part number after which listing begins.
  3066. PartNumberMarker *int64 `type:"integer"`
  3067. Parts []*Part `locationName:"Part" type:"list" flattened:"true"`
  3068. // If present, indicates that the requester was successfully charged for the
  3069. // request.
  3070. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  3071. // The class of storage used to store the object.
  3072. StorageClass *string `type:"string"`
  3073. // Upload ID identifying the multipart upload whose parts are being listed.
  3074. UploadID *string `locationName:"UploadId" type:"string"`
  3075. metadataListPartsOutput `json:"-" xml:"-"`
  3076. Metadata map[string]*string `location:"headers" type:"map"`
  3077. StatusCode *int64 `location:"statusCode" type:"integer"`
  3078. }
  3079. type metadataListPartsOutput struct {
  3080. SDKShapeTraits bool `type:"structure"`
  3081. }
  3082. type LoggingEnabled struct {
  3083. // Specifies the bucket where you want Amazon S3 to store server access logs.
  3084. // You can have your logs delivered to any bucket that you own, including the
  3085. // same bucket that is being logged. You can also configure multiple buckets
  3086. // to deliver their logs to the same target bucket. In this case you should
  3087. // choose a different TargetPrefix for each source bucket so that the delivered
  3088. // log files can be distinguished by key.
  3089. TargetBucket *string `type:"string"`
  3090. TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
  3091. // This element lets you specify a prefix for the keys that the log files will
  3092. // be stored under.
  3093. TargetPrefix *string `type:"string"`
  3094. metadataLoggingEnabled `json:"-" xml:"-"`
  3095. }
  3096. type metadataLoggingEnabled struct {
  3097. SDKShapeTraits bool `type:"structure"`
  3098. }
  3099. type MultipartUpload struct {
  3100. // Date and time at which the multipart upload was initiated.
  3101. Initiated *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  3102. // Identifies who initiated the multipart upload.
  3103. Initiator *Initiator `type:"structure"`
  3104. // Key of the object for which the multipart upload was initiated.
  3105. Key *string `type:"string"`
  3106. Owner *Owner `type:"structure"`
  3107. // The class of storage used to store the object.
  3108. StorageClass *string `type:"string"`
  3109. // Upload ID that identifies the multipart upload.
  3110. UploadID *string `locationName:"UploadId" type:"string"`
  3111. metadataMultipartUpload `json:"-" xml:"-"`
  3112. }
  3113. type metadataMultipartUpload struct {
  3114. SDKShapeTraits bool `type:"structure"`
  3115. }
  3116. // NotificationConfiguration Container for specifying the notification configuration of the bucket. If
  3117. // this element is empty, notifications are turned off on the bucket.
  3118. type NotificationConfiguration struct {
  3119. LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
  3120. QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"`
  3121. TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"`
  3122. metadataNotificationConfiguration `json:"-" xml:"-"`
  3123. }
  3124. type metadataNotificationConfiguration struct {
  3125. SDKShapeTraits bool `type:"structure"`
  3126. }
  3127. type NotificationConfigurationDeprecated struct {
  3128. CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
  3129. QueueConfiguration *QueueConfigurationDeprecated `type:"structure"`
  3130. TopicConfiguration *TopicConfigurationDeprecated `type:"structure"`
  3131. metadataNotificationConfigurationDeprecated `json:"-" xml:"-"`
  3132. }
  3133. type metadataNotificationConfigurationDeprecated struct {
  3134. SDKShapeTraits bool `type:"structure"`
  3135. }
  3136. type Object struct {
  3137. ETag *string `type:"string"`
  3138. Key *string `type:"string"`
  3139. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  3140. Owner *Owner `type:"structure"`
  3141. Size *int64 `type:"integer"`
  3142. // The class of storage used to store the object.
  3143. StorageClass *string `type:"string"`
  3144. // The redundancy type of the object.
  3145. Redundancy *string `type:"string"`
  3146. metadataObject `json:"-" xml:"-"`
  3147. }
  3148. type metadataObject struct {
  3149. SDKShapeTraits bool `type:"structure"`
  3150. }
  3151. type ObjectIdentifier struct {
  3152. // Key name of the object to delete.
  3153. Key *string `type:"string" required:"true"`
  3154. // VersionId for the specific version of the object to delete.
  3155. VersionID *string `locationName:"VersionId" type:"string"`
  3156. metadataObjectIdentifier `json:"-" xml:"-"`
  3157. }
  3158. type metadataObjectIdentifier struct {
  3159. SDKShapeTraits bool `type:"structure"`
  3160. }
  3161. type ObjectVersion struct {
  3162. ETag *string `type:"string"`
  3163. // Specifies whether the object is (true) or is not (false) the latest version
  3164. // of an object.
  3165. IsLatest *bool `type:"boolean"`
  3166. // The object key.
  3167. Key *string `type:"string"`
  3168. // Date and time the object was last modified.
  3169. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  3170. Owner *Owner `type:"structure"`
  3171. // Size in bytes of the object.
  3172. Size *int64 `type:"integer"`
  3173. // The class of storage used to store the object.
  3174. StorageClass *string `type:"string"`
  3175. // Version ID of an object.
  3176. VersionID *string `locationName:"VersionId" type:"string"`
  3177. metadataObjectVersion `json:"-" xml:"-"`
  3178. }
  3179. type metadataObjectVersion struct {
  3180. SDKShapeTraits bool `type:"structure"`
  3181. }
  3182. type Owner struct {
  3183. DisplayName *string `type:"string"`
  3184. ID *string `type:"string"`
  3185. metadataOwner `json:"-" xml:"-"`
  3186. }
  3187. type metadataOwner struct {
  3188. SDKShapeTraits bool `type:"structure"`
  3189. }
  3190. type Part struct {
  3191. // Entity tag returned when the part was uploaded.
  3192. ETag *string `type:"string"`
  3193. // Date and time at which the part was uploaded.
  3194. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  3195. // Part number identifying the part.
  3196. PartNumber *int64 `type:"integer"`
  3197. // Size of the uploaded part data.
  3198. Size *int64 `type:"integer"`
  3199. metadataPart `json:"-" xml:"-"`
  3200. }
  3201. type metadataPart struct {
  3202. SDKShapeTraits bool `type:"structure"`
  3203. }
  3204. type PutBucketACLInput struct {
  3205. // The canned ACL to apply to the bucket.
  3206. ACL *string `location:"header" locationName:"x-amz-acl" type:"string"`
  3207. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"`
  3208. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3209. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  3210. // bucket.
  3211. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  3212. // Allows grantee to list the objects in the bucket.
  3213. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  3214. // Allows grantee to read the bucket ACL.
  3215. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  3216. // Allows grantee to create, overwrite, and delete any object in the bucket.
  3217. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  3218. // Allows grantee to write the ACL for the applicable bucket.
  3219. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  3220. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3221. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3222. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3223. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3224. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3225. metadataPutBucketACLInput `json:"-" xml:"-"`
  3226. }
  3227. type metadataPutBucketACLInput struct {
  3228. SDKShapeTraits bool `type:"structure" payload:"AccessControlPolicy"`
  3229. }
  3230. type PutBucketACLOutput struct {
  3231. metadataPutBucketACLOutput `json:"-" xml:"-"`
  3232. Metadata map[string]*string `location:"headers" type:"map"`
  3233. StatusCode *int64 `location:"statusCode" type:"integer"`
  3234. }
  3235. type metadataPutBucketACLOutput struct {
  3236. SDKShapeTraits bool `type:"structure"`
  3237. }
  3238. type PutBucketLoggingInput struct {
  3239. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3240. BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  3241. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3242. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3243. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3244. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3245. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3246. metadataPutBucketLoggingInput `json:"-" xml:"-"`
  3247. }
  3248. type metadataPutBucketLoggingInput struct {
  3249. SDKShapeTraits bool `type:"structure" payload:"BucketLoggingStatus"`
  3250. }
  3251. type PutBucketLoggingOutput struct {
  3252. metadataPutBucketLoggingOutput `json:"-" xml:"-"`
  3253. Metadata map[string]*string `location:"headers" type:"map"`
  3254. StatusCode *int64 `location:"statusCode" type:"integer"`
  3255. }
  3256. type metadataPutBucketLoggingOutput struct {
  3257. SDKShapeTraits bool `type:"structure"`
  3258. }
  3259. type PutBucketNotificationConfigurationInput struct {
  3260. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3261. // Container for specifying the notification configuration of the bucket. If
  3262. // this element is empty, notifications are turned off on the bucket.
  3263. NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true"`
  3264. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3265. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3266. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3267. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3268. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3269. metadataPutBucketNotificationConfigurationInput `json:"-" xml:"-"`
  3270. }
  3271. type metadataPutBucketNotificationConfigurationInput struct {
  3272. SDKShapeTraits bool `type:"structure" payload:"NotificationConfiguration"`
  3273. }
  3274. type PutBucketNotificationConfigurationOutput struct {
  3275. metadataPutBucketNotificationConfigurationOutput `json:"-" xml:"-"`
  3276. Metadata map[string]*string `location:"headers" type:"map"`
  3277. StatusCode *int64 `location:"statusCode" type:"integer"`
  3278. }
  3279. type metadataPutBucketNotificationConfigurationOutput struct {
  3280. SDKShapeTraits bool `type:"structure"`
  3281. }
  3282. type PutBucketNotificationInput struct {
  3283. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3284. NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true"`
  3285. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3286. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3287. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3288. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3289. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3290. metadataPutBucketNotificationInput `json:"-" xml:"-"`
  3291. }
  3292. type metadataPutBucketNotificationInput struct {
  3293. SDKShapeTraits bool `type:"structure" payload:"NotificationConfiguration"`
  3294. }
  3295. type PutBucketNotificationOutput struct {
  3296. metadataPutBucketNotificationOutput `json:"-" xml:"-"`
  3297. Metadata map[string]*string `location:"headers" type:"map"`
  3298. StatusCode *int64 `location:"statusCode" type:"integer"`
  3299. }
  3300. type metadataPutBucketNotificationOutput struct {
  3301. SDKShapeTraits bool `type:"structure"`
  3302. }
  3303. type PutBucketPolicyInput struct {
  3304. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3305. // The bucket policy as a JSON document.
  3306. Policy *string `type:"string" required:"true"`
  3307. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3308. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3309. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3310. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3311. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3312. metadataPutBucketPolicyInput `json:"-" xml:"-"`
  3313. }
  3314. type metadataPutBucketPolicyInput struct {
  3315. SDKShapeTraits bool `type:"structure" payload:"Policy"`
  3316. }
  3317. type PutBucketPolicyOutput struct {
  3318. metadataPutBucketPolicyOutput `json:"-" xml:"-"`
  3319. Metadata map[string]*string `location:"headers" type:"map"`
  3320. StatusCode *int64 `location:"statusCode" type:"integer"`
  3321. }
  3322. type metadataPutBucketPolicyOutput struct {
  3323. SDKShapeTraits bool `type:"structure"`
  3324. }
  3325. type PutBucketRequestPaymentInput struct {
  3326. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3327. RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true"`
  3328. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3329. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3330. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3331. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3332. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3333. metadataPutBucketRequestPaymentInput `json:"-" xml:"-"`
  3334. }
  3335. type metadataPutBucketRequestPaymentInput struct {
  3336. SDKShapeTraits bool `type:"structure" payload:"RequestPaymentConfiguration"`
  3337. }
  3338. type PutBucketRequestPaymentOutput struct {
  3339. metadataPutBucketRequestPaymentOutput `json:"-" xml:"-"`
  3340. }
  3341. type metadataPutBucketRequestPaymentOutput struct {
  3342. SDKShapeTraits bool `type:"structure"`
  3343. }
  3344. type PutBucketVersioningInput struct {
  3345. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3346. // The concatenation of the authentication device's serial number, a space,
  3347. // and the value that is displayed on your authentication device.
  3348. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  3349. VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true"`
  3350. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3351. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3352. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3353. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3354. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3355. metadataPutBucketVersioningInput `json:"-" xml:"-"`
  3356. }
  3357. type metadataPutBucketVersioningInput struct {
  3358. SDKShapeTraits bool `type:"structure" payload:"VersioningConfiguration"`
  3359. }
  3360. type PutBucketVersioningOutput struct {
  3361. metadataPutBucketVersioningOutput `json:"-" xml:"-"`
  3362. Metadata map[string]*string `location:"headers" type:"map"`
  3363. StatusCode *int64 `location:"statusCode" type:"integer"`
  3364. }
  3365. type metadataPutBucketVersioningOutput struct {
  3366. SDKShapeTraits bool `type:"structure"`
  3367. }
  3368. type PutBucketWebsiteInput struct {
  3369. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3370. WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true"`
  3371. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3372. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3373. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3374. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3375. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3376. metadataPutBucketWebsiteInput `json:"-" xml:"-"`
  3377. }
  3378. type metadataPutBucketWebsiteInput struct {
  3379. SDKShapeTraits bool `type:"structure" payload:"WebsiteConfiguration"`
  3380. }
  3381. type PutBucketWebsiteOutput struct {
  3382. metadataPutBucketWebsiteOutput `json:"-" xml:"-"`
  3383. Metadata map[string]*string `location:"headers" type:"map"`
  3384. StatusCode *int64 `location:"statusCode" type:"integer"`
  3385. }
  3386. type metadataPutBucketWebsiteOutput struct {
  3387. SDKShapeTraits bool `type:"structure"`
  3388. }
  3389. type PutObjectACLInput struct {
  3390. // The canned ACL to apply to the object.
  3391. ACL *string `location:"header" locationName:"x-amz-acl" type:"string"`
  3392. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"`
  3393. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3394. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  3395. // bucket.
  3396. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  3397. // Allows grantee to list the objects in the bucket.
  3398. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  3399. // Allows grantee to read the bucket ACL.
  3400. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  3401. // Allows grantee to create, overwrite, and delete any object in the bucket.
  3402. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  3403. // Allows grantee to write the ACL for the applicable bucket.
  3404. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  3405. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  3406. // Confirms that the requester knows that she or he will be charged for the
  3407. // request. Bucket owners need not specify this parameter in their requests.
  3408. // Documentation on downloading objects from requester pays buckets can be found
  3409. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  3410. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  3411. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3412. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3413. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3414. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3415. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3416. metadataPutObjectACLInput `json:"-" xml:"-"`
  3417. }
  3418. type metadataPutObjectACLInput struct {
  3419. SDKShapeTraits bool `type:"structure" payload:"AccessControlPolicy"`
  3420. }
  3421. type PutObjectACLOutput struct {
  3422. // If present, indicates that the requester was successfully charged for the
  3423. // request.
  3424. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  3425. metadataPutObjectACLOutput `json:"-" xml:"-"`
  3426. Metadata map[string]*string `location:"headers" type:"map"`
  3427. StatusCode *int64 `location:"statusCode" type:"integer"`
  3428. }
  3429. type metadataPutObjectACLOutput struct {
  3430. SDKShapeTraits bool `type:"structure"`
  3431. }
  3432. type PutObjectInput struct {
  3433. // The canned ACL to apply to the object.
  3434. ACL *string `location:"header" locationName:"x-amz-acl" type:"string"`
  3435. // Object data.
  3436. Body io.ReadSeeker `type:"blob"`
  3437. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3438. // Specifies caching behavior along the request/reply chain.
  3439. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  3440. // Specifies presentational information for the object.
  3441. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  3442. // Specifies what content encodings have been applied to the object and thus
  3443. // what decoding mechanisms must be applied to obtain the media-type referenced
  3444. // by the Content-Type header field.
  3445. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  3446. // The language the content is in.
  3447. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  3448. // Size of the body in bytes. This parameter is useful when the size of the
  3449. // body cannot be determined automatically.
  3450. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"integer"`
  3451. // A standard MIME type describing the format of the object data.
  3452. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3453. // The date and time at which the object is no longer cacheable.
  3454. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  3455. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  3456. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  3457. // Allows grantee to read the object data and its metadata.
  3458. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  3459. // Allows grantee to read the object ACL.
  3460. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  3461. // Allows grantee to write the ACL for the applicable object.
  3462. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  3463. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  3464. // A map of metadata to store with the object in S3.
  3465. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  3466. // Specifies the object tag of the object. Multiple tags can be set at the same time, such as: TagA=A&TagB=B.
  3467. // Note: Key and Value need to be URL-encoded first. If an item does not have "=", the Value is considered to be an empty string.
  3468. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  3469. // Specifies whether the object is forbidden to overwrite.
  3470. ForbidOverwrite *bool `location:"header" locationName:"x-amz-forbid-overwrite" type:"boolean"`
  3471. // Confirms that the requester knows that she or he will be charged for the
  3472. // request. Bucket owners need not specify this parameter in their requests.
  3473. // Documentation on downloading objects from requester pays buckets can be found
  3474. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  3475. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  3476. // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
  3477. // aws:kms).
  3478. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  3479. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  3480. // data. This value is used to store the object and then it is discarded; Amazon
  3481. // does not store the encryption key. The key must be appropriate for use with
  3482. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  3483. // header.
  3484. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  3485. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  3486. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  3487. // key was transmitted without error.
  3488. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  3489. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  3490. // requests for an object protected by AWS KMS will fail if not made via SSL
  3491. // or using SigV4. Documentation on configuring any of the officially supported
  3492. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  3493. SSEKMSKeyID *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  3494. // The Server-side encryption algorithm used when storing this object in S3
  3495. // (e.g., AES256, aws:kms).
  3496. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
  3497. // The type of storage to use for the object. Defaults to 'STANDARD'.
  3498. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string"`
  3499. // If the bucket is configured as a website, redirects requests for this object
  3500. // to another object in the same bucket or to an external URL. Amazon S3 stores
  3501. // the value of this header in the object metadata.
  3502. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  3503. ContentMaxLength *int64 `location:"header" locationName:"x-amz-content-maxlength" type:"integer"`
  3504. CallbackUrl *string `location:"header" locationName:"x-kss-callbackurl" type:"string"`
  3505. CallbackBody *string `location:"header" locationName:"x-kss-callbackbody" type:"string"`
  3506. TrafficLimit *int64 `location:"header" locationName:"x-kss-traffic-limit" type:"integer"`
  3507. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  3508. // Progress callback function
  3509. ProgressFn aws.ProgressFunc `location:"function"`
  3510. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3511. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3512. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3513. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3514. metadataPutObjectInput `json:"-" xml:"-"`
  3515. }
  3516. type PutReaderInput struct {
  3517. // The canned ACL to apply to the object.
  3518. ACL *string `location:"header" locationName:"x-amz-acl" type:"string"`
  3519. // Object data.
  3520. Body io.Reader `type:"blob"`
  3521. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3522. // Specifies caching behavior along the request/reply chain.
  3523. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  3524. // Specifies presentational information for the object.
  3525. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  3526. // Specifies what content encodings have been applied to the object and thus
  3527. // what decoding mechanisms must be applied to obtain the media-type referenced
  3528. // by the Content-Type header field.
  3529. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  3530. // The language the content is in.
  3531. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  3532. // Size of the body in bytes. This parameter is useful when the size of the
  3533. // body cannot be determined automatically.
  3534. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"integer"`
  3535. // A standard MIME type describing the format of the object data.
  3536. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3537. // The date and time at which the object is no longer cacheable.
  3538. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  3539. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  3540. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  3541. // Allows grantee to read the object data and its metadata.
  3542. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  3543. // Allows grantee to read the object ACL.
  3544. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  3545. // Allows grantee to write the ACL for the applicable object.
  3546. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  3547. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  3548. // A map of metadata to store with the object in S3.
  3549. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  3550. // Specifies the object tag of the object. Multiple tags can be set at the same time, such as: TagA=A&TagB=B.
  3551. // Note: Key and Value need to be URL-encoded first. If an item does not have "=", the Value is considered to be an empty string.
  3552. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  3553. // Specifies whether the object is forbidden to overwrite.
  3554. ForbidOverwrite *bool `location:"header" locationName:"x-amz-forbid-overwrite" type:"boolean"`
  3555. // Confirms that the requester knows that she or he will be charged for the
  3556. // request. Bucket owners need not specify this parameter in their requests.
  3557. // Documentation on downloading objects from requester pays buckets can be found
  3558. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  3559. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  3560. // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
  3561. // aws:kms).
  3562. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  3563. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  3564. // data. This value is used to store the object and then it is discarded; Amazon
  3565. // does not store the encryption key. The key must be appropriate for use with
  3566. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  3567. // header.
  3568. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  3569. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  3570. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  3571. // key was transmitted without error.
  3572. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  3573. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  3574. // requests for an object protected by AWS KMS will fail if not made via SSL
  3575. // or using SigV4. Documentation on configuring any of the officially supported
  3576. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  3577. SSEKMSKeyID *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  3578. // The Server-side encryption algorithm used when storing this object in S3
  3579. // (e.g., AES256, aws:kms).
  3580. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
  3581. // The type of storage to use for the object. Defaults to 'STANDARD'.
  3582. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string"`
  3583. // If the bucket is configured as a website, redirects requests for this object
  3584. // to another object in the same bucket or to an external URL. Amazon S3 stores
  3585. // the value of this header in the object metadata.
  3586. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  3587. ContentMaxLength *int64 `location:"header" locationName:"x-amz-content-maxlength" type:"integer"`
  3588. CallbackUrl *string `location:"header" locationName:"x-kss-callbackurl" type:"string"`
  3589. CallbackBody *string `location:"header" locationName:"x-kss-callbackbody" type:"string"`
  3590. TrafficLimit *int64 `location:"header" locationName:"x-kss-traffic-limit" type:"integer"`
  3591. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  3592. // Progress callback function
  3593. ProgressFn aws.ProgressFunc `location:"function"`
  3594. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3595. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3596. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3597. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3598. metadataPutObjectInput `json:"-" xml:"-"`
  3599. }
  3600. type metadataPutObjectInput struct {
  3601. SDKShapeTraits bool `type:"structure" payload:"Body"`
  3602. }
  3603. type PutObjectOutput struct {
  3604. // Entity tag for the uploaded object.
  3605. ETag *string `location:"header" locationName:"ETag" type:"string"`
  3606. // If the object expiration is configured, this will contain the expiration
  3607. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  3608. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  3609. // If present, indicates that the requester was successfully charged for the
  3610. // request.
  3611. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  3612. // If server-side encryption with a customer-provided encryption key was requested,
  3613. // the response will include this header confirming the encryption algorithm
  3614. // used.
  3615. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  3616. // If server-side encryption with a customer-provided encryption key was requested,
  3617. // the response will include this header to provide round trip message integrity
  3618. // verification of the customer-provided encryption key.
  3619. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  3620. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  3621. // encryption key that was used for the object.
  3622. SSEKMSKeyID *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  3623. // The Server-side encryption algorithm used when storing this object in S3
  3624. // (e.g., AES256, aws:kms).
  3625. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
  3626. // Version of the object.
  3627. VersionID *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  3628. NewFileName *string `location:"header" locationName:"newfilename" type:"string"`
  3629. metadataPutObjectOutput `json:"-" xml:"-"`
  3630. Metadata map[string]*string `location:"headers" type:"map"`
  3631. StatusCode *int64 `location:"statusCode" type:"integer"`
  3632. }
  3633. type metadataPutObjectOutput struct {
  3634. SDKShapeTraits bool `type:"structure"`
  3635. }
  3636. // QueueConfiguration Container for specifying an configuration when you want Amazon S3 to publish
  3637. // events to an Amazon Simple Queue Service (Amazon SQS) queue.
  3638. type QueueConfiguration struct {
  3639. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  3640. // Optional unique identifier for configurations in a notification configuration.
  3641. // If you don't provide one, Amazon S3 will assign an ID.
  3642. ID *string `locationName:"Id" type:"string"`
  3643. // Amazon SQS queue ARN to which Amazon S3 will publish a message when it detects
  3644. // events of specified type.
  3645. QueueARN *string `locationName:"Queue" type:"string" required:"true"`
  3646. metadataQueueConfiguration `json:"-" xml:"-"`
  3647. }
  3648. type metadataQueueConfiguration struct {
  3649. SDKShapeTraits bool `type:"structure"`
  3650. }
  3651. type QueueConfigurationDeprecated struct {
  3652. // Bucket event for which to send notifications.
  3653. Event *string `type:"string"`
  3654. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  3655. // Optional unique identifier for configurations in a notification configuration.
  3656. // If you don't provide one, Amazon S3 will assign an ID.
  3657. ID *string `locationName:"Id" type:"string"`
  3658. Queue *string `type:"string"`
  3659. metadataQueueConfigurationDeprecated `json:"-" xml:"-"`
  3660. }
  3661. type metadataQueueConfigurationDeprecated struct {
  3662. SDKShapeTraits bool `type:"structure"`
  3663. }
  3664. type Redirect struct {
  3665. // The HTTP redirect code to use on the response. Not required if one of the
  3666. // siblings is present.
  3667. HTTPRedirectCode *string `locationName:"HttpRedirectCode" type:"string"`
  3668. // The host name to use in the redirect request.
  3669. HostName *string `type:"string"`
  3670. // Protocol to use (http, https) when redirecting requests. The default is the
  3671. // protocol that is used in the original request.
  3672. Protocol *string `type:"string"`
  3673. // The object key prefix to use in the redirect request. For example, to redirect
  3674. // requests for all pages with prefix docs/ (objects in the docs/ folder) to
  3675. // documents/, you can set a condition block with KeyPrefixEquals set to docs/
  3676. // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required
  3677. // if one of the siblings is present. Can be present only if ReplaceKeyWith
  3678. // is not provided.
  3679. ReplaceKeyPrefixWith *string `type:"string"`
  3680. // The specific object key to use in the redirect request. For example, redirect
  3681. // request to error.html. Not required if one of the sibling is present. Can
  3682. // be present only if ReplaceKeyPrefixWith is not provided.
  3683. ReplaceKeyWith *string `type:"string"`
  3684. metadataRedirect `json:"-" xml:"-"`
  3685. }
  3686. type metadataRedirect struct {
  3687. SDKShapeTraits bool `type:"structure"`
  3688. }
  3689. type RedirectAllRequestsTo struct {
  3690. // Name of the host where requests will be redirected.
  3691. HostName *string `type:"string" required:"true"`
  3692. // Protocol to use (http, https) when redirecting requests. The default is the
  3693. // protocol that is used in the original request.
  3694. Protocol *string `type:"string"`
  3695. metadataRedirectAllRequestsTo `json:"-" xml:"-"`
  3696. }
  3697. type metadataRedirectAllRequestsTo struct {
  3698. SDKShapeTraits bool `type:"structure"`
  3699. }
  3700. type RequestPaymentConfiguration struct {
  3701. // Specifies who pays for the download and request fees.
  3702. Payer *string `type:"string" required:"true"`
  3703. metadataRequestPaymentConfiguration `json:"-" xml:"-"`
  3704. }
  3705. type metadataRequestPaymentConfiguration struct {
  3706. SDKShapeTraits bool `type:"structure"`
  3707. }
  3708. type RestoreObjectInput struct {
  3709. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3710. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  3711. // Confirms that the requester knows that she or he will be charged for the
  3712. // request. Bucket owners need not specify this parameter in their requests.
  3713. // Documentation on downloading objects from requester pays buckets can be found
  3714. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  3715. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  3716. RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure"`
  3717. VersionID *string `location:"querystring" locationName:"versionId" type:"string"`
  3718. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3719. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3720. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3721. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3722. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3723. metadataRestoreObjectInput `json:"-" xml:"-"`
  3724. }
  3725. type metadataRestoreObjectInput struct {
  3726. SDKShapeTraits bool `type:"structure" payload:"RestoreRequest"`
  3727. }
  3728. type RestoreObjectOutput struct {
  3729. Metadata map[string]*string `location:"headers" type:"map"`
  3730. StatusCode *int64 `location:"statusCode" type:"integer"`
  3731. }
  3732. type RestoreRequest struct {
  3733. // Lifetime of the active copy in days
  3734. Days *int64 `type:"integer" required:"true"`
  3735. metadataRestoreRequest `json:"-" xml:"-"`
  3736. }
  3737. type metadataRestoreRequest struct {
  3738. SDKShapeTraits bool `type:"structure"`
  3739. }
  3740. type RoutingRule struct {
  3741. // A container for describing a condition that must be met for the specified
  3742. // redirect to apply. For example, 1. If request is for pages in the /docs folder,
  3743. // redirect to the /documents folder. 2. If request results in HTTP error 4xx,
  3744. // redirect request to another host where you might process the error.
  3745. Condition *Condition `type:"structure"`
  3746. // Container for redirect information. You can redirect requests to another
  3747. // host, to another page, or with another protocol. In the event of an error,
  3748. // you can can specify a different error code to return.
  3749. Redirect *Redirect `type:"structure" required:"true"`
  3750. metadataRoutingRule `json:"-" xml:"-"`
  3751. }
  3752. type metadataRoutingRule struct {
  3753. SDKShapeTraits bool `type:"structure"`
  3754. }
  3755. type Tag struct {
  3756. // Name of the tag.
  3757. Key *string `type:"string" required:"true"`
  3758. // Value of the tag.
  3759. Value *string `type:"string" required:"true"`
  3760. metadataTag `json:"-" xml:"-"`
  3761. }
  3762. type metadataTag struct {
  3763. SDKShapeTraits bool `type:"structure"`
  3764. }
  3765. type Tagging struct {
  3766. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  3767. metadataTagging `json:"-" xml:"-"`
  3768. }
  3769. func (t *Tagging) ToString() string {
  3770. if t == nil || t.TagSet == nil || len(t.TagSet) == 0 {
  3771. return ""
  3772. }
  3773. var builder strings.Builder
  3774. for i := 0; i < len(t.TagSet); i++ {
  3775. if i > 0 {
  3776. builder.WriteString("&")
  3777. }
  3778. tag := t.TagSet[i]
  3779. encodedKey := url.QueryEscape(aws.ToString(tag.Key))
  3780. encodedValue := url.QueryEscape(aws.ToString(tag.Value))
  3781. builder.WriteString(encodedKey)
  3782. builder.WriteString("=")
  3783. builder.WriteString(encodedValue)
  3784. }
  3785. return builder.String()
  3786. }
  3787. type metadataTagging struct {
  3788. SDKShapeTraits bool `type:"structure"`
  3789. }
  3790. type TargetGrant struct {
  3791. Grantee *Grantee `type:"structure"`
  3792. // Logging permissions assigned to the Grantee for the bucket.
  3793. Permission *string `type:"string"`
  3794. metadataTargetGrant `json:"-" xml:"-"`
  3795. }
  3796. type metadataTargetGrant struct {
  3797. SDKShapeTraits bool `type:"structure"`
  3798. }
  3799. // TopicConfiguration Container for specifying the configuration when you want Amazon S3 to publish
  3800. // events to an Amazon Simple Notification Service (Amazon SNS) topic.
  3801. type TopicConfiguration struct {
  3802. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  3803. // Optional unique identifier for configurations in a notification configuration.
  3804. // If you don't provide one, Amazon S3 will assign an ID.
  3805. ID *string `locationName:"Id" type:"string"`
  3806. // Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects
  3807. // events of specified type.
  3808. TopicARN *string `locationName:"Topic" type:"string" required:"true"`
  3809. metadataTopicConfiguration `json:"-" xml:"-"`
  3810. }
  3811. type metadataTopicConfiguration struct {
  3812. SDKShapeTraits bool `type:"structure"`
  3813. }
  3814. type TopicConfigurationDeprecated struct {
  3815. // Bucket event for which to send notifications.
  3816. Event *string `type:"string"`
  3817. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  3818. // Optional unique identifier for configurations in a notification configuration.
  3819. // If you don't provide one, Amazon S3 will assign an ID.
  3820. ID *string `locationName:"Id" type:"string"`
  3821. // Amazon SNS topic to which Amazon S3 will publish a message to report the
  3822. // specified events for the bucket.
  3823. Topic *string `type:"string"`
  3824. metadataTopicConfigurationDeprecated `json:"-" xml:"-"`
  3825. }
  3826. type metadataTopicConfigurationDeprecated struct {
  3827. SDKShapeTraits bool `type:"structure"`
  3828. }
  3829. type UploadPartCopyInput struct {
  3830. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3831. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  3832. SourceBucket *string `location:"uri" locationName:"sourceBucket" type:"string"`
  3833. SourceKey *string `location:"uri" locationName:"sourceKey" type:"string"`
  3834. // The name of the source bucket and key name of the source object, separated
  3835. // by a slash (/). Must be URL-encoded.
  3836. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  3837. // Copies the object if its entity tag (ETag) matches the specified tag.
  3838. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  3839. // Copies the object if it has been modified since the specified time.
  3840. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"`
  3841. // Copies the object if its entity tag (ETag) is different than the specified
  3842. // ETag.
  3843. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  3844. // Copies the object if it hasn't been modified since the specified time.
  3845. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"`
  3846. // The range of bytes to copy from the source object. The range value must use
  3847. // the form bytes=first-last, where the first and last are the zero-based byte
  3848. // offsets to copy. For example, bytes=0-9 indicates that you want to copy the
  3849. // first ten bytes of the source. You can copy a range only if the source object
  3850. // is greater than 5 GB.
  3851. CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`
  3852. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  3853. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  3854. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  3855. // the source object. The encryption key provided in this header must be one
  3856. // that was used when the source object was created.
  3857. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  3858. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  3859. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  3860. // key was transmitted without error.
  3861. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  3862. // Part number of part being copied.
  3863. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  3864. // Confirms that the requester knows that she or he will be charged for the
  3865. // request. Bucket owners need not specify this parameter in their requests.
  3866. // Documentation on downloading objects from requester pays buckets can be found
  3867. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  3868. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  3869. // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
  3870. // aws:kms).
  3871. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  3872. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  3873. // data. This value is used to store the object and then it is discarded; Amazon
  3874. // does not store the encryption key. The key must be appropriate for use with
  3875. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  3876. // header. This must be the same encryption key specified in the initiate multipart
  3877. // upload request.
  3878. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  3879. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  3880. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  3881. // key was transmitted without error.
  3882. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  3883. // Upload ID identifying the multipart upload whose part is being copied.
  3884. UploadID *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  3885. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3886. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3887. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3888. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3889. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3890. metadataUploadPartCopyInput `json:"-" xml:"-"`
  3891. }
  3892. type metadataUploadPartCopyInput struct {
  3893. SDKShapeTraits bool `type:"structure"`
  3894. }
  3895. type UploadPartCopyOutput struct {
  3896. CopyPartResult *CopyPartResult `type:"structure"`
  3897. // The version of the source object that was copied, if you have enabled versioning
  3898. // on the source bucket.
  3899. CopySourceVersionID *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  3900. // If present, indicates that the requester was successfully charged for the
  3901. // request.
  3902. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  3903. // If server-side encryption with a customer-provided encryption key was requested,
  3904. // the response will include this header confirming the encryption algorithm
  3905. // used.
  3906. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  3907. // If server-side encryption with a customer-provided encryption key was requested,
  3908. // the response will include this header to provide round trip message integrity
  3909. // verification of the customer-provided encryption key.
  3910. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  3911. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  3912. // encryption key that was used for the object.
  3913. SSEKMSKeyID *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  3914. // The Server-side encryption algorithm used when storing this object in S3
  3915. // (e.g., AES256, aws:kms).
  3916. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
  3917. metadataUploadPartCopyOutput `json:"-" xml:"-"`
  3918. Metadata map[string]*string `location:"headers" type:"map"`
  3919. StatusCode *int64 `location:"statusCode" type:"integer"`
  3920. }
  3921. type metadataUploadPartCopyOutput struct {
  3922. SDKShapeTraits bool `type:"structure" payload:"CopyPartResult"`
  3923. }
  3924. type UploadPartInput struct {
  3925. Body io.ReadSeeker `type:"blob"`
  3926. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3927. // Size of the body in bytes. This parameter is useful when the size of the
  3928. // body cannot be determined automatically.
  3929. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"integer"`
  3930. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  3931. // Part number of part being uploaded.
  3932. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  3933. // Confirms that the requester knows that she or he will be charged for the
  3934. // request. Bucket owners need not specify this parameter in their requests.
  3935. // Documentation on downloading objects from requester pays buckets can be found
  3936. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  3937. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  3938. // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
  3939. // aws:kms).
  3940. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  3941. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  3942. // data. This value is used to store the object and then it is discarded; Amazon
  3943. // does not store the encryption key. The key must be appropriate for use with
  3944. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  3945. // header. This must be the same encryption key specified in the initiate multipart
  3946. // upload request.
  3947. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  3948. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  3949. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  3950. // key was transmitted without error.
  3951. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  3952. // Upload ID identifying the multipart upload whose part is being uploaded.
  3953. UploadID *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  3954. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3955. TrafficLimit *int64 `location:"header" locationName:"x-kss-traffic-limit" type:"string"`
  3956. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  3957. // Progress callback function
  3958. ProgressFn aws.ProgressFunc `location:"function"`
  3959. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  3960. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  3961. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  3962. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  3963. metadataUploadPartInput `json:"-" xml:"-"`
  3964. }
  3965. type metadataUploadPartInput struct {
  3966. SDKShapeTraits bool `type:"structure" payload:"Body"`
  3967. }
  3968. type UploadPartOutput struct {
  3969. // Entity tag for the uploaded object.
  3970. ETag *string `location:"header" locationName:"ETag" type:"string"`
  3971. // CRC64 value of a single part.
  3972. ChecksumCRC64ECMA *string `location:"header" locationName:"x-amz-checksum-crc64ecma" type:"string"`
  3973. // If present, indicates that the requester was successfully charged for the
  3974. // request.
  3975. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  3976. // If server-side encryption with a customer-provided encryption key was requested,
  3977. // the response will include this header confirming the encryption algorithm
  3978. // used.
  3979. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  3980. // If server-side encryption with a customer-provided encryption key was requested,
  3981. // the response will include this header to provide round trip message integrity
  3982. // verification of the customer-provided encryption key.
  3983. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  3984. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  3985. // encryption key that was used for the object.
  3986. SSEKMSKeyID *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  3987. // The Server-side encryption algorithm used when storing this object in S3
  3988. // (e.g., AES256, aws:kms).
  3989. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
  3990. metadataUploadPartOutput `json:"-" xml:"-"`
  3991. Metadata map[string]*string `location:"headers" type:"map"`
  3992. StatusCode *int64 `location:"statusCode" type:"integer"`
  3993. }
  3994. type metadataUploadPartOutput struct {
  3995. SDKShapeTraits bool `type:"structure"`
  3996. }
  3997. type VersioningConfiguration struct {
  3998. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  3999. // This element is only returned if the bucket has been configured with MFA
  4000. // delete. If the bucket has never been so configured, this element is not returned.
  4001. MFADelete *string `locationName:"MfaDelete" type:"string"`
  4002. // The versioning state of the bucket.
  4003. Status *string `type:"string"`
  4004. metadataVersioningConfiguration `json:"-" xml:"-"`
  4005. }
  4006. type metadataVersioningConfiguration struct {
  4007. SDKShapeTraits bool `type:"structure"`
  4008. }
  4009. type WebsiteConfiguration struct {
  4010. ErrorDocument *ErrorDocument `type:"structure"`
  4011. IndexDocument *IndexDocument `type:"structure"`
  4012. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  4013. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  4014. metadataWebsiteConfiguration `json:"-" xml:"-"`
  4015. }
  4016. type metadataWebsiteConfiguration struct {
  4017. SDKShapeTraits bool `type:"structure"`
  4018. }
  4019. func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *aws.Request, output *DeleteObjectTaggingOutput) {
  4020. op := &aws.Operation{
  4021. Name: "DeleteObjectTagging",
  4022. HTTPMethod: "DELETE",
  4023. HTTPPath: "/{Bucket}/{Key+}?tagging",
  4024. }
  4025. if input == nil {
  4026. input = &DeleteObjectTaggingInput{}
  4027. }
  4028. req = c.newRequest(op, input, output)
  4029. output = &DeleteObjectTaggingOutput{}
  4030. req.Data = output
  4031. return
  4032. }
  4033. func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
  4034. req, out := c.DeleteObjectTaggingRequest(input)
  4035. err := req.Send()
  4036. return out, err
  4037. }
  4038. func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
  4039. req, out := c.DeleteObjectTaggingRequest(input)
  4040. req.SetContext(ctx)
  4041. err := req.Send()
  4042. return out, err
  4043. }
  4044. type DeleteObjectTaggingInput struct {
  4045. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4046. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  4047. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  4048. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  4049. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  4050. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  4051. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  4052. metadataDeleteObjectTaggingInput `json:"-" xml:"-"`
  4053. }
  4054. type metadataDeleteObjectTaggingInput struct {
  4055. SDKShapeTraits bool `type:"structure"`
  4056. }
  4057. type DeleteObjectTaggingOutput struct {
  4058. metadataDeleteObjectTaggingOutput `json:"-" xml:"-"`
  4059. Metadata map[string]*string `location:"headers" type:"map"`
  4060. StatusCode *int64 `location:"statusCode" type:"integer"`
  4061. }
  4062. type metadataDeleteObjectTaggingOutput struct {
  4063. SDKShapeTraits bool `type:"structure"`
  4064. }
  4065. // GetObjectTaggingRequest generates a request for the GetObjectTagging operation.
  4066. func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *aws.Request, output *GetObjectTaggingOutput) {
  4067. op := &aws.Operation{
  4068. Name: "GetObjectTagging",
  4069. HTTPMethod: "GET",
  4070. HTTPPath: "/{Bucket}/{Key+}?tagging",
  4071. }
  4072. if input == nil {
  4073. input = &GetObjectTaggingInput{}
  4074. }
  4075. req = c.newRequest(op, input, output)
  4076. output = &GetObjectTaggingOutput{}
  4077. req.Data = output
  4078. return
  4079. }
  4080. // GetObjectTagging gets the tagging configuration for an object.
  4081. func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
  4082. req, out := c.GetObjectTaggingRequest(input)
  4083. err := req.Send()
  4084. return out, err
  4085. }
  4086. func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
  4087. req, out := c.GetObjectTaggingRequest(input)
  4088. req.SetContext(ctx)
  4089. err := req.Send()
  4090. return out, err
  4091. }
  4092. type GetObjectTaggingInput struct {
  4093. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4094. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  4095. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  4096. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  4097. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  4098. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  4099. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  4100. metadataGetObjectTaggingInput `json:"-" xml:"-"`
  4101. }
  4102. type metadataGetObjectTaggingInput struct {
  4103. SDKShapeTraits bool `type:"structure"`
  4104. }
  4105. type GetObjectTaggingOutput struct {
  4106. Tagging *Tagging `locationName:"Tagging" type:"structure"`
  4107. metadataGetObjectTaggingOutput `json:"-" xml:"-"`
  4108. Metadata map[string]*string `location:"headers" type:"map"`
  4109. StatusCode *int64 `location:"statusCode" type:"integer"`
  4110. }
  4111. type metadataGetObjectTaggingOutput struct {
  4112. SDKShapeTraits bool `type:"structure" payload:"Tagging"`
  4113. }
  4114. // PutObjectTaggingRequest generates a request for the PutObjectTagging operation.
  4115. func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *aws.Request, output *PutObjectTaggingOutput) {
  4116. op := &aws.Operation{
  4117. Name: "PutObjectTagging",
  4118. HTTPMethod: "PUT",
  4119. HTTPPath: "/{Bucket}/{Key+}?tagging",
  4120. }
  4121. if input == nil {
  4122. input = &PutObjectTaggingInput{}
  4123. }
  4124. input.ContentType = aws.String("application/xml")
  4125. req = c.newRequest(op, input, output)
  4126. output = &PutObjectTaggingOutput{}
  4127. req.Data = output
  4128. return
  4129. }
  4130. // PutObjectTagging sets the tagging configuration for an object.
  4131. func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
  4132. req, out := c.PutObjectTaggingRequest(input)
  4133. err := req.Send()
  4134. return out, err
  4135. }
  4136. func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
  4137. req, out := c.PutObjectTaggingRequest(input)
  4138. req.SetContext(ctx)
  4139. err := req.Send()
  4140. return out, err
  4141. }
  4142. type PutObjectTaggingInput struct {
  4143. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4144. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  4145. Tagging *Tagging `locationName:"Tagging" type:"structure"`
  4146. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  4147. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  4148. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  4149. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  4150. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  4151. metadataPutObjectTaggingInput `json:"-" xml:"-"`
  4152. }
  4153. type metadataPutObjectTaggingInput struct {
  4154. SDKShapeTraits bool `type:"structure" payload:"Tagging"`
  4155. }
  4156. type PutObjectTaggingOutput struct {
  4157. metadataPutObjectTaggingOutput `json:"-" xml:"-"`
  4158. Metadata map[string]*string `location:"headers" type:"map"`
  4159. StatusCode *int64 `location:"statusCode" type:"integer"`
  4160. }
  4161. type metadataPutObjectTaggingOutput struct {
  4162. SDKShapeTraits bool `type:"structure"`
  4163. }
  4164. // FetchObjectRequest generates a request for the FetchObject operation.
  4165. func (c *S3) FetchObjectRequest(input *FetchObjectInput) (req *aws.Request, output *FetchObjectOutput) {
  4166. op := &aws.Operation{
  4167. Name: "FetchObject",
  4168. HTTPMethod: "PUT",
  4169. HTTPPath: "/{Bucket}/{Key+}?fetch",
  4170. }
  4171. if input == nil {
  4172. input = &FetchObjectInput{}
  4173. }
  4174. if input.SourceUrl != nil {
  4175. input.SourceUrl = aws.String(url.QueryEscape(*input.SourceUrl))
  4176. }
  4177. req = c.newRequest(op, input, output)
  4178. output = &FetchObjectOutput{}
  4179. req.Data = output
  4180. return
  4181. }
  4182. func (c *S3) FetchObject(input *FetchObjectInput) (*FetchObjectOutput, error) {
  4183. req, out := c.FetchObjectRequest(input)
  4184. err := req.Send()
  4185. return out, err
  4186. }
  4187. func (c *S3) FetchObjectWithContext(ctx aws.Context, input *FetchObjectInput) (*FetchObjectOutput, error) {
  4188. req, out := c.FetchObjectRequest(input)
  4189. req.SetContext(ctx)
  4190. err := req.Send()
  4191. return out, err
  4192. }
  4193. type FetchObjectInput struct {
  4194. // The canned ACL to apply to the object.
  4195. ACL *string `location:"header" locationName:"x-kss-acl" type:"string"`
  4196. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4197. // Specifies caching behavior along the request/reply chain.
  4198. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  4199. // Specifies presentational information for the object.
  4200. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  4201. // Specifies what content encodings have been applied to the object and thus
  4202. // what decoding mechanisms must be applied to obtain the media-type referenced
  4203. // by the Content-Type header field.
  4204. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  4205. // The language the content is in.
  4206. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  4207. // A standard MIME type describing the format of the object data.
  4208. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  4209. // The name of the source bucket and key name of the source object, separated
  4210. // by a slash (/). Must be URL-encoded.
  4211. SourceUrl *string `location:"header" locationName:"x-kss-sourceurl" type:"string" required:"true"`
  4212. CallbackUrl *string `location:"header" locationName:"x-kss-callbackurl" type:"string"`
  4213. // The date and time at which the object is no longer cacheable.
  4214. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  4215. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  4216. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  4217. // Allows grantee to read the object data and its metadata.
  4218. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  4219. // Allows grantee to read the object ACL.
  4220. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  4221. // Allows grantee to write the ACL for the applicable object.
  4222. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  4223. Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
  4224. // A map of metadata to store with the object in S3.
  4225. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  4226. // Specifies whether the metadata is copied from the source object or replaced
  4227. // with metadata provided in the request.
  4228. MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string"`
  4229. // Confirms that the requester knows that she or he will be charged for the
  4230. // request. Bucket owners need not specify this parameter in their requests.
  4231. // Documentation on downloading objects from requester pays buckets can be found
  4232. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  4233. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
  4234. // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
  4235. // aws:kms).
  4236. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  4237. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  4238. // data. This value is used to store the object and then it is discarded; Amazon
  4239. // does not store the encryption key. The key must be appropriate for use with
  4240. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  4241. // header.
  4242. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  4243. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  4244. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  4245. // key was transmitted without error.
  4246. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  4247. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  4248. // requests for an object protected by AWS KMS will fail if not made via SSL
  4249. // or using SigV4. Documentation on configuring any of the officially supported
  4250. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  4251. SSEKMSKeyID *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  4252. // The Server-side encryption algorithm used when storing this object in S3
  4253. // (e.g., AES256, aws:kms).
  4254. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
  4255. // The type of storage to use for the object. Defaults to 'STANDARD'.
  4256. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string"`
  4257. // If the bucket is configured as a website, redirects requests for this object
  4258. // to another object in the same bucket or to an external URL. Amazon S3 stores
  4259. // the value of this header in the object metadata.
  4260. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  4261. // Specifies the object tag of the object. Multiple tags can be set at the same time, such as: TagA=A&TagB=B.
  4262. // Note: Key and Value need to be URL-encoded first. If an item does not have "=", the Value is considered to be an empty string.
  4263. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  4264. // Set extend request headers. If the existing fields do not support setting the request header you need, you can set it through this field.
  4265. ExtendHeaders map[string]*string `location:"extendHeaders" type:"map"`
  4266. // Set extend query params. If the existing fields do not support setting the query param you need, you can set it through this field.
  4267. ExtendQueryParams map[string]*string `location:"extendQueryParams" type:"map"`
  4268. metadataFetchObjectInput `json:"-" xml:"-"`
  4269. }
  4270. type metadataFetchObjectInput struct {
  4271. SDKShapeTraits bool `type:"structure"`
  4272. }
  4273. type FetchObjectOutput struct {
  4274. // If the object expiration is configured, the response includes this header.
  4275. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  4276. // If present, indicates that the requester was successfully charged for the
  4277. // request.
  4278. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
  4279. // If server-side encryption with a customer-provided encryption key was requested,
  4280. // the response will include this header confirming the encryption algorithm
  4281. // used.
  4282. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  4283. // If server-side encryption with a customer-provided encryption key was requested,
  4284. // the response will include this header to provide round trip message integrity
  4285. // verification of the customer-provided encryption key.
  4286. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  4287. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  4288. // encryption key that was used for the object.
  4289. SSEKMSKeyID *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  4290. // The Server-side encryption algorithm used when storing this object in S3
  4291. // (e.g., AES256, aws:kms).
  4292. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
  4293. Metadata map[string]*string `location:"headers" type:"map"`
  4294. StatusCode *int64 `location:"statusCode" type:"integer"`
  4295. metadataFetchObjectOutput `json:"-" xml:"-"`
  4296. }
  4297. type metadataFetchObjectOutput struct {
  4298. SDKShapeTraits bool `type:"structure"`
  4299. }