api.go 187 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package glacier provides a client for Amazon Glacier.
  3. package glacier
  4. import (
  5. "io"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/private/protocol"
  9. "github.com/aws/aws-sdk-go/private/protocol/restjson"
  10. )
  11. const opAbortMultipartUpload = "AbortMultipartUpload"
  12. // AbortMultipartUploadRequest generates a "aws/request.Request" representing the
  13. // client's request for the AbortMultipartUpload operation. The "output" return
  14. // value can be used to capture response data after the request's "Send" method
  15. // is called.
  16. //
  17. // Creating a request object using this method should be used when you want to inject
  18. // custom logic into the request's lifecycle using a custom handler, or if you want to
  19. // access properties on the request object before or after sending the request. If
  20. // you just want the service response, call the AbortMultipartUpload method directly
  21. // instead.
  22. //
  23. // Note: You must call the "Send" method on the returned request object in order
  24. // to execute the request.
  25. //
  26. // // Example sending a request using the AbortMultipartUploadRequest method.
  27. // req, resp := client.AbortMultipartUploadRequest(params)
  28. //
  29. // err := req.Send()
  30. // if err == nil { // resp is now filled
  31. // fmt.Println(resp)
  32. // }
  33. //
  34. func (c *Glacier) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
  35. op := &request.Operation{
  36. Name: opAbortMultipartUpload,
  37. HTTPMethod: "DELETE",
  38. HTTPPath: "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}",
  39. }
  40. if input == nil {
  41. input = &AbortMultipartUploadInput{}
  42. }
  43. req = c.newRequest(op, input, output)
  44. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  45. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  46. output = &AbortMultipartUploadOutput{}
  47. req.Data = output
  48. return
  49. }
  50. // This operation aborts a multipart upload identified by the upload ID.
  51. //
  52. // After the Abort Multipart Upload request succeeds, you cannot upload any
  53. // more parts to the multipart upload or complete the multipart upload. Aborting
  54. // a completed upload fails. However, aborting an already-aborted upload will
  55. // succeed, for a short time. For more information about uploading a part and
  56. // completing a multipart upload, see UploadMultipartPart and CompleteMultipartUpload.
  57. //
  58. // This operation is idempotent.
  59. //
  60. // An AWS account has full permission to perform all operations (actions).
  61. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  62. // by default. You must grant them explicit permission to perform specific actions.
  63. // For more information, see Access Control Using AWS Identity and Access Management
  64. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  65. //
  66. // For conceptual information and underlying REST API, go to Working with
  67. // Archives in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html)
  68. // and Abort Multipart Upload (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-abort-upload.html)
  69. // in the Amazon Glacier Developer Guide.
  70. func (c *Glacier) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
  71. req, out := c.AbortMultipartUploadRequest(input)
  72. err := req.Send()
  73. return out, err
  74. }
  75. const opAbortVaultLock = "AbortVaultLock"
  76. // AbortVaultLockRequest generates a "aws/request.Request" representing the
  77. // client's request for the AbortVaultLock operation. The "output" return
  78. // value can be used to capture response data after the request's "Send" method
  79. // is called.
  80. //
  81. // Creating a request object using this method should be used when you want to inject
  82. // custom logic into the request's lifecycle using a custom handler, or if you want to
  83. // access properties on the request object before or after sending the request. If
  84. // you just want the service response, call the AbortVaultLock method directly
  85. // instead.
  86. //
  87. // Note: You must call the "Send" method on the returned request object in order
  88. // to execute the request.
  89. //
  90. // // Example sending a request using the AbortVaultLockRequest method.
  91. // req, resp := client.AbortVaultLockRequest(params)
  92. //
  93. // err := req.Send()
  94. // if err == nil { // resp is now filled
  95. // fmt.Println(resp)
  96. // }
  97. //
  98. func (c *Glacier) AbortVaultLockRequest(input *AbortVaultLockInput) (req *request.Request, output *AbortVaultLockOutput) {
  99. op := &request.Operation{
  100. Name: opAbortVaultLock,
  101. HTTPMethod: "DELETE",
  102. HTTPPath: "/{accountId}/vaults/{vaultName}/lock-policy",
  103. }
  104. if input == nil {
  105. input = &AbortVaultLockInput{}
  106. }
  107. req = c.newRequest(op, input, output)
  108. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  109. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  110. output = &AbortVaultLockOutput{}
  111. req.Data = output
  112. return
  113. }
  114. // This operation aborts the vault locking process if the vault lock is not
  115. // in the Locked state. If the vault lock is in the Locked state when this operation
  116. // is requested, the operation returns an AccessDeniedException error. Aborting
  117. // the vault locking process removes the vault lock policy from the specified
  118. // vault.
  119. //
  120. // A vault lock is put into the InProgress state by calling InitiateVaultLock.
  121. // A vault lock is put into the Locked state by calling CompleteVaultLock. You
  122. // can get the state of a vault lock by calling GetVaultLock. For more information
  123. // about the vault locking process, see Amazon Glacier Vault Lock (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html).
  124. // For more information about vault lock policies, see Amazon Glacier Access
  125. // Control with Vault Lock Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html).
  126. //
  127. // This operation is idempotent. You can successfully invoke this operation
  128. // multiple times, if the vault lock is in the InProgress state or if there
  129. // is no policy associated with the vault.
  130. func (c *Glacier) AbortVaultLock(input *AbortVaultLockInput) (*AbortVaultLockOutput, error) {
  131. req, out := c.AbortVaultLockRequest(input)
  132. err := req.Send()
  133. return out, err
  134. }
  135. const opAddTagsToVault = "AddTagsToVault"
  136. // AddTagsToVaultRequest generates a "aws/request.Request" representing the
  137. // client's request for the AddTagsToVault operation. The "output" return
  138. // value can be used to capture response data after the request's "Send" method
  139. // is called.
  140. //
  141. // Creating a request object using this method should be used when you want to inject
  142. // custom logic into the request's lifecycle using a custom handler, or if you want to
  143. // access properties on the request object before or after sending the request. If
  144. // you just want the service response, call the AddTagsToVault method directly
  145. // instead.
  146. //
  147. // Note: You must call the "Send" method on the returned request object in order
  148. // to execute the request.
  149. //
  150. // // Example sending a request using the AddTagsToVaultRequest method.
  151. // req, resp := client.AddTagsToVaultRequest(params)
  152. //
  153. // err := req.Send()
  154. // if err == nil { // resp is now filled
  155. // fmt.Println(resp)
  156. // }
  157. //
  158. func (c *Glacier) AddTagsToVaultRequest(input *AddTagsToVaultInput) (req *request.Request, output *AddTagsToVaultOutput) {
  159. op := &request.Operation{
  160. Name: opAddTagsToVault,
  161. HTTPMethod: "POST",
  162. HTTPPath: "/{accountId}/vaults/{vaultName}/tags?operation=add",
  163. }
  164. if input == nil {
  165. input = &AddTagsToVaultInput{}
  166. }
  167. req = c.newRequest(op, input, output)
  168. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  169. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  170. output = &AddTagsToVaultOutput{}
  171. req.Data = output
  172. return
  173. }
  174. // This operation adds the specified tags to a vault. Each tag is composed of
  175. // a key and a value. Each vault can have up to 10 tags. If your request would
  176. // cause the tag limit for the vault to be exceeded, the operation throws the
  177. // LimitExceededException error. If a tag already exists on the vault under
  178. // a specified key, the existing key value will be overwritten. For more information
  179. // about tags, see Tagging Amazon Glacier Resources (http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html).
  180. func (c *Glacier) AddTagsToVault(input *AddTagsToVaultInput) (*AddTagsToVaultOutput, error) {
  181. req, out := c.AddTagsToVaultRequest(input)
  182. err := req.Send()
  183. return out, err
  184. }
  185. const opCompleteMultipartUpload = "CompleteMultipartUpload"
  186. // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
  187. // client's request for the CompleteMultipartUpload operation. The "output" return
  188. // value can be used to capture response data after the request's "Send" method
  189. // is called.
  190. //
  191. // Creating a request object using this method should be used when you want to inject
  192. // custom logic into the request's lifecycle using a custom handler, or if you want to
  193. // access properties on the request object before or after sending the request. If
  194. // you just want the service response, call the CompleteMultipartUpload method directly
  195. // instead.
  196. //
  197. // Note: You must call the "Send" method on the returned request object in order
  198. // to execute the request.
  199. //
  200. // // Example sending a request using the CompleteMultipartUploadRequest method.
  201. // req, resp := client.CompleteMultipartUploadRequest(params)
  202. //
  203. // err := req.Send()
  204. // if err == nil { // resp is now filled
  205. // fmt.Println(resp)
  206. // }
  207. //
  208. func (c *Glacier) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *ArchiveCreationOutput) {
  209. op := &request.Operation{
  210. Name: opCompleteMultipartUpload,
  211. HTTPMethod: "POST",
  212. HTTPPath: "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}",
  213. }
  214. if input == nil {
  215. input = &CompleteMultipartUploadInput{}
  216. }
  217. req = c.newRequest(op, input, output)
  218. output = &ArchiveCreationOutput{}
  219. req.Data = output
  220. return
  221. }
  222. // You call this operation to inform Amazon Glacier that all the archive parts
  223. // have been uploaded and that Amazon Glacier can now assemble the archive from
  224. // the uploaded parts. After assembling and saving the archive to the vault,
  225. // Amazon Glacier returns the URI path of the newly created archive resource.
  226. // Using the URI path, you can then access the archive. After you upload an
  227. // archive, you should save the archive ID returned to retrieve the archive
  228. // at a later point. You can also get the vault inventory to obtain a list of
  229. // archive IDs in a vault. For more information, see InitiateJob.
  230. //
  231. // In the request, you must include the computed SHA256 tree hash of the entire
  232. // archive you have uploaded. For information about computing a SHA256 tree
  233. // hash, see Computing Checksums (http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html).
  234. // On the server side, Amazon Glacier also constructs the SHA256 tree hash of
  235. // the assembled archive. If the values match, Amazon Glacier saves the archive
  236. // to the vault; otherwise, it returns an error, and the operation fails. The
  237. // ListParts operation returns a list of parts uploaded for a specific multipart
  238. // upload. It includes checksum information for each uploaded part that can
  239. // be used to debug a bad checksum issue.
  240. //
  241. // Additionally, Amazon Glacier also checks for any missing content ranges
  242. // when assembling the archive, if missing content ranges are found, Amazon
  243. // Glacier returns an error and the operation fails.
  244. //
  245. // Complete Multipart Upload is an idempotent operation. After your first successful
  246. // complete multipart upload, if you call the operation again within a short
  247. // period, the operation will succeed and return the same archive ID. This is
  248. // useful in the event you experience a network issue that causes an aborted
  249. // connection or receive a 500 server error, in which case you can repeat your
  250. // Complete Multipart Upload request and get the same archive ID without creating
  251. // duplicate archives. Note, however, that after the multipart upload completes,
  252. // you cannot call the List Parts operation and the multipart upload will not
  253. // appear in List Multipart Uploads response, even if idempotent complete is
  254. // possible.
  255. //
  256. // An AWS account has full permission to perform all operations (actions).
  257. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  258. // by default. You must grant them explicit permission to perform specific actions.
  259. // For more information, see Access Control Using AWS Identity and Access Management
  260. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  261. //
  262. // For conceptual information and underlying REST API, go to Uploading Large
  263. // Archives in Parts (Multipart Upload) (http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html)
  264. // and Complete Multipart Upload (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-complete-upload.html)
  265. // in the Amazon Glacier Developer Guide.
  266. func (c *Glacier) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*ArchiveCreationOutput, error) {
  267. req, out := c.CompleteMultipartUploadRequest(input)
  268. err := req.Send()
  269. return out, err
  270. }
  271. const opCompleteVaultLock = "CompleteVaultLock"
  272. // CompleteVaultLockRequest generates a "aws/request.Request" representing the
  273. // client's request for the CompleteVaultLock operation. The "output" return
  274. // value can be used to capture response data after the request's "Send" method
  275. // is called.
  276. //
  277. // Creating a request object using this method should be used when you want to inject
  278. // custom logic into the request's lifecycle using a custom handler, or if you want to
  279. // access properties on the request object before or after sending the request. If
  280. // you just want the service response, call the CompleteVaultLock method directly
  281. // instead.
  282. //
  283. // Note: You must call the "Send" method on the returned request object in order
  284. // to execute the request.
  285. //
  286. // // Example sending a request using the CompleteVaultLockRequest method.
  287. // req, resp := client.CompleteVaultLockRequest(params)
  288. //
  289. // err := req.Send()
  290. // if err == nil { // resp is now filled
  291. // fmt.Println(resp)
  292. // }
  293. //
  294. func (c *Glacier) CompleteVaultLockRequest(input *CompleteVaultLockInput) (req *request.Request, output *CompleteVaultLockOutput) {
  295. op := &request.Operation{
  296. Name: opCompleteVaultLock,
  297. HTTPMethod: "POST",
  298. HTTPPath: "/{accountId}/vaults/{vaultName}/lock-policy/{lockId}",
  299. }
  300. if input == nil {
  301. input = &CompleteVaultLockInput{}
  302. }
  303. req = c.newRequest(op, input, output)
  304. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  305. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  306. output = &CompleteVaultLockOutput{}
  307. req.Data = output
  308. return
  309. }
  310. // This operation completes the vault locking process by transitioning the vault
  311. // lock from the InProgress state to the Locked state, which causes the vault
  312. // lock policy to become unchangeable. A vault lock is put into the InProgress
  313. // state by calling InitiateVaultLock. You can obtain the state of the vault
  314. // lock by calling GetVaultLock. For more information about the vault locking
  315. // process, Amazon Glacier Vault Lock (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html).
  316. //
  317. // This operation is idempotent. This request is always successful if the vault
  318. // lock is in the Locked state and the provided lock ID matches the lock ID
  319. // originally used to lock the vault.
  320. //
  321. // If an invalid lock ID is passed in the request when the vault lock is in
  322. // the Locked state, the operation returns an AccessDeniedException error. If
  323. // an invalid lock ID is passed in the request when the vault lock is in the
  324. // InProgress state, the operation throws an InvalidParameter error.
  325. func (c *Glacier) CompleteVaultLock(input *CompleteVaultLockInput) (*CompleteVaultLockOutput, error) {
  326. req, out := c.CompleteVaultLockRequest(input)
  327. err := req.Send()
  328. return out, err
  329. }
  330. const opCreateVault = "CreateVault"
  331. // CreateVaultRequest generates a "aws/request.Request" representing the
  332. // client's request for the CreateVault operation. The "output" return
  333. // value can be used to capture response data after the request's "Send" method
  334. // is called.
  335. //
  336. // Creating a request object using this method should be used when you want to inject
  337. // custom logic into the request's lifecycle using a custom handler, or if you want to
  338. // access properties on the request object before or after sending the request. If
  339. // you just want the service response, call the CreateVault method directly
  340. // instead.
  341. //
  342. // Note: You must call the "Send" method on the returned request object in order
  343. // to execute the request.
  344. //
  345. // // Example sending a request using the CreateVaultRequest method.
  346. // req, resp := client.CreateVaultRequest(params)
  347. //
  348. // err := req.Send()
  349. // if err == nil { // resp is now filled
  350. // fmt.Println(resp)
  351. // }
  352. //
  353. func (c *Glacier) CreateVaultRequest(input *CreateVaultInput) (req *request.Request, output *CreateVaultOutput) {
  354. op := &request.Operation{
  355. Name: opCreateVault,
  356. HTTPMethod: "PUT",
  357. HTTPPath: "/{accountId}/vaults/{vaultName}",
  358. }
  359. if input == nil {
  360. input = &CreateVaultInput{}
  361. }
  362. req = c.newRequest(op, input, output)
  363. output = &CreateVaultOutput{}
  364. req.Data = output
  365. return
  366. }
  367. // This operation creates a new vault with the specified name. The name of the
  368. // vault must be unique within a region for an AWS account. You can create up
  369. // to 1,000 vaults per account. If you need to create more vaults, contact Amazon
  370. // Glacier.
  371. //
  372. // You must use the following guidelines when naming a vault.
  373. //
  374. // Names can be between 1 and 255 characters long.
  375. //
  376. // Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen),
  377. // and '.' (period).
  378. //
  379. // This operation is idempotent.
  380. //
  381. // An AWS account has full permission to perform all operations (actions).
  382. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  383. // by default. You must grant them explicit permission to perform specific actions.
  384. // For more information, see Access Control Using AWS Identity and Access Management
  385. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  386. //
  387. // For conceptual information and underlying REST API, go to Creating a Vault
  388. // in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/creating-vaults.html)
  389. // and Create Vault (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-put.html)
  390. // in the Amazon Glacier Developer Guide.
  391. func (c *Glacier) CreateVault(input *CreateVaultInput) (*CreateVaultOutput, error) {
  392. req, out := c.CreateVaultRequest(input)
  393. err := req.Send()
  394. return out, err
  395. }
  396. const opDeleteArchive = "DeleteArchive"
  397. // DeleteArchiveRequest generates a "aws/request.Request" representing the
  398. // client's request for the DeleteArchive operation. The "output" return
  399. // value can be used to capture response data after the request's "Send" method
  400. // is called.
  401. //
  402. // Creating a request object using this method should be used when you want to inject
  403. // custom logic into the request's lifecycle using a custom handler, or if you want to
  404. // access properties on the request object before or after sending the request. If
  405. // you just want the service response, call the DeleteArchive method directly
  406. // instead.
  407. //
  408. // Note: You must call the "Send" method on the returned request object in order
  409. // to execute the request.
  410. //
  411. // // Example sending a request using the DeleteArchiveRequest method.
  412. // req, resp := client.DeleteArchiveRequest(params)
  413. //
  414. // err := req.Send()
  415. // if err == nil { // resp is now filled
  416. // fmt.Println(resp)
  417. // }
  418. //
  419. func (c *Glacier) DeleteArchiveRequest(input *DeleteArchiveInput) (req *request.Request, output *DeleteArchiveOutput) {
  420. op := &request.Operation{
  421. Name: opDeleteArchive,
  422. HTTPMethod: "DELETE",
  423. HTTPPath: "/{accountId}/vaults/{vaultName}/archives/{archiveId}",
  424. }
  425. if input == nil {
  426. input = &DeleteArchiveInput{}
  427. }
  428. req = c.newRequest(op, input, output)
  429. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  430. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  431. output = &DeleteArchiveOutput{}
  432. req.Data = output
  433. return
  434. }
  435. // This operation deletes an archive from a vault. Subsequent requests to initiate
  436. // a retrieval of this archive will fail. Archive retrievals that are in progress
  437. // for this archive ID may or may not succeed according to the following scenarios:
  438. //
  439. // If the archive retrieval job is actively preparing the data for download
  440. // when Amazon Glacier receives the delete archive request, the archival retrieval
  441. // operation might fail. If the archive retrieval job has successfully prepared
  442. // the archive for download when Amazon Glacier receives the delete archive
  443. // request, you will be able to download the output. This operation is idempotent.
  444. // Attempting to delete an already-deleted archive does not result in an error.
  445. //
  446. // An AWS account has full permission to perform all operations (actions).
  447. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  448. // by default. You must grant them explicit permission to perform specific actions.
  449. // For more information, see Access Control Using AWS Identity and Access Management
  450. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  451. //
  452. // For conceptual information and underlying REST API, go to Deleting an Archive
  453. // in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/deleting-an-archive.html)
  454. // and Delete Archive (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-delete.html)
  455. // in the Amazon Glacier Developer Guide.
  456. func (c *Glacier) DeleteArchive(input *DeleteArchiveInput) (*DeleteArchiveOutput, error) {
  457. req, out := c.DeleteArchiveRequest(input)
  458. err := req.Send()
  459. return out, err
  460. }
  461. const opDeleteVault = "DeleteVault"
  462. // DeleteVaultRequest generates a "aws/request.Request" representing the
  463. // client's request for the DeleteVault operation. The "output" return
  464. // value can be used to capture response data after the request's "Send" method
  465. // is called.
  466. //
  467. // Creating a request object using this method should be used when you want to inject
  468. // custom logic into the request's lifecycle using a custom handler, or if you want to
  469. // access properties on the request object before or after sending the request. If
  470. // you just want the service response, call the DeleteVault method directly
  471. // instead.
  472. //
  473. // Note: You must call the "Send" method on the returned request object in order
  474. // to execute the request.
  475. //
  476. // // Example sending a request using the DeleteVaultRequest method.
  477. // req, resp := client.DeleteVaultRequest(params)
  478. //
  479. // err := req.Send()
  480. // if err == nil { // resp is now filled
  481. // fmt.Println(resp)
  482. // }
  483. //
  484. func (c *Glacier) DeleteVaultRequest(input *DeleteVaultInput) (req *request.Request, output *DeleteVaultOutput) {
  485. op := &request.Operation{
  486. Name: opDeleteVault,
  487. HTTPMethod: "DELETE",
  488. HTTPPath: "/{accountId}/vaults/{vaultName}",
  489. }
  490. if input == nil {
  491. input = &DeleteVaultInput{}
  492. }
  493. req = c.newRequest(op, input, output)
  494. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  495. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  496. output = &DeleteVaultOutput{}
  497. req.Data = output
  498. return
  499. }
  500. // This operation deletes a vault. Amazon Glacier will delete a vault only if
  501. // there are no archives in the vault as of the last inventory and there have
  502. // been no writes to the vault since the last inventory. If either of these
  503. // conditions is not satisfied, the vault deletion fails (that is, the vault
  504. // is not removed) and Amazon Glacier returns an error. You can use DescribeVault
  505. // to return the number of archives in a vault, and you can use Initiate a Job
  506. // (POST jobs) (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html)
  507. // to initiate a new inventory retrieval for a vault. The inventory contains
  508. // the archive IDs you use to delete archives using Delete Archive (DELETE archive)
  509. // (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-delete.html).
  510. //
  511. // This operation is idempotent.
  512. //
  513. // An AWS account has full permission to perform all operations (actions).
  514. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  515. // by default. You must grant them explicit permission to perform specific actions.
  516. // For more information, see Access Control Using AWS Identity and Access Management
  517. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  518. //
  519. // For conceptual information and underlying REST API, go to Deleting a Vault
  520. // in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/deleting-vaults.html)
  521. // and Delete Vault (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-delete.html)
  522. // in the Amazon Glacier Developer Guide.
  523. func (c *Glacier) DeleteVault(input *DeleteVaultInput) (*DeleteVaultOutput, error) {
  524. req, out := c.DeleteVaultRequest(input)
  525. err := req.Send()
  526. return out, err
  527. }
  528. const opDeleteVaultAccessPolicy = "DeleteVaultAccessPolicy"
  529. // DeleteVaultAccessPolicyRequest generates a "aws/request.Request" representing the
  530. // client's request for the DeleteVaultAccessPolicy operation. The "output" return
  531. // value can be used to capture response data after the request's "Send" method
  532. // is called.
  533. //
  534. // Creating a request object using this method should be used when you want to inject
  535. // custom logic into the request's lifecycle using a custom handler, or if you want to
  536. // access properties on the request object before or after sending the request. If
  537. // you just want the service response, call the DeleteVaultAccessPolicy method directly
  538. // instead.
  539. //
  540. // Note: You must call the "Send" method on the returned request object in order
  541. // to execute the request.
  542. //
  543. // // Example sending a request using the DeleteVaultAccessPolicyRequest method.
  544. // req, resp := client.DeleteVaultAccessPolicyRequest(params)
  545. //
  546. // err := req.Send()
  547. // if err == nil { // resp is now filled
  548. // fmt.Println(resp)
  549. // }
  550. //
  551. func (c *Glacier) DeleteVaultAccessPolicyRequest(input *DeleteVaultAccessPolicyInput) (req *request.Request, output *DeleteVaultAccessPolicyOutput) {
  552. op := &request.Operation{
  553. Name: opDeleteVaultAccessPolicy,
  554. HTTPMethod: "DELETE",
  555. HTTPPath: "/{accountId}/vaults/{vaultName}/access-policy",
  556. }
  557. if input == nil {
  558. input = &DeleteVaultAccessPolicyInput{}
  559. }
  560. req = c.newRequest(op, input, output)
  561. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  562. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  563. output = &DeleteVaultAccessPolicyOutput{}
  564. req.Data = output
  565. return
  566. }
  567. // This operation deletes the access policy associated with the specified vault.
  568. // The operation is eventually consistent; that is, it might take some time
  569. // for Amazon Glacier to completely remove the access policy, and you might
  570. // still see the effect of the policy for a short time after you send the delete
  571. // request.
  572. //
  573. // This operation is idempotent. You can invoke delete multiple times, even
  574. // if there is no policy associated with the vault. For more information about
  575. // vault access policies, see Amazon Glacier Access Control with Vault Access
  576. // Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html).
  577. func (c *Glacier) DeleteVaultAccessPolicy(input *DeleteVaultAccessPolicyInput) (*DeleteVaultAccessPolicyOutput, error) {
  578. req, out := c.DeleteVaultAccessPolicyRequest(input)
  579. err := req.Send()
  580. return out, err
  581. }
  582. const opDeleteVaultNotifications = "DeleteVaultNotifications"
  583. // DeleteVaultNotificationsRequest generates a "aws/request.Request" representing the
  584. // client's request for the DeleteVaultNotifications operation. The "output" return
  585. // value can be used to capture response data after the request's "Send" method
  586. // is called.
  587. //
  588. // Creating a request object using this method should be used when you want to inject
  589. // custom logic into the request's lifecycle using a custom handler, or if you want to
  590. // access properties on the request object before or after sending the request. If
  591. // you just want the service response, call the DeleteVaultNotifications method directly
  592. // instead.
  593. //
  594. // Note: You must call the "Send" method on the returned request object in order
  595. // to execute the request.
  596. //
  597. // // Example sending a request using the DeleteVaultNotificationsRequest method.
  598. // req, resp := client.DeleteVaultNotificationsRequest(params)
  599. //
  600. // err := req.Send()
  601. // if err == nil { // resp is now filled
  602. // fmt.Println(resp)
  603. // }
  604. //
  605. func (c *Glacier) DeleteVaultNotificationsRequest(input *DeleteVaultNotificationsInput) (req *request.Request, output *DeleteVaultNotificationsOutput) {
  606. op := &request.Operation{
  607. Name: opDeleteVaultNotifications,
  608. HTTPMethod: "DELETE",
  609. HTTPPath: "/{accountId}/vaults/{vaultName}/notification-configuration",
  610. }
  611. if input == nil {
  612. input = &DeleteVaultNotificationsInput{}
  613. }
  614. req = c.newRequest(op, input, output)
  615. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  616. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  617. output = &DeleteVaultNotificationsOutput{}
  618. req.Data = output
  619. return
  620. }
  621. // This operation deletes the notification configuration set for a vault. The
  622. // operation is eventually consistent; that is, it might take some time for
  623. // Amazon Glacier to completely disable the notifications and you might still
  624. // receive some notifications for a short time after you send the delete request.
  625. //
  626. // An AWS account has full permission to perform all operations (actions).
  627. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  628. // by default. You must grant them explicit permission to perform specific actions.
  629. // For more information, see Access Control Using AWS Identity and Access Management
  630. // (IAM) (http://docs.aws.amazon.com/latest/dev/using-iam-with-amazon-glacier.html).
  631. //
  632. // For conceptual information and underlying REST API, go to Configuring Vault
  633. // Notifications in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html)
  634. // and Delete Vault Notification Configuration (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-delete.html)
  635. // in the Amazon Glacier Developer Guide.
  636. func (c *Glacier) DeleteVaultNotifications(input *DeleteVaultNotificationsInput) (*DeleteVaultNotificationsOutput, error) {
  637. req, out := c.DeleteVaultNotificationsRequest(input)
  638. err := req.Send()
  639. return out, err
  640. }
  641. const opDescribeJob = "DescribeJob"
  642. // DescribeJobRequest generates a "aws/request.Request" representing the
  643. // client's request for the DescribeJob operation. The "output" return
  644. // value can be used to capture response data after the request's "Send" method
  645. // is called.
  646. //
  647. // Creating a request object using this method should be used when you want to inject
  648. // custom logic into the request's lifecycle using a custom handler, or if you want to
  649. // access properties on the request object before or after sending the request. If
  650. // you just want the service response, call the DescribeJob method directly
  651. // instead.
  652. //
  653. // Note: You must call the "Send" method on the returned request object in order
  654. // to execute the request.
  655. //
  656. // // Example sending a request using the DescribeJobRequest method.
  657. // req, resp := client.DescribeJobRequest(params)
  658. //
  659. // err := req.Send()
  660. // if err == nil { // resp is now filled
  661. // fmt.Println(resp)
  662. // }
  663. //
  664. func (c *Glacier) DescribeJobRequest(input *DescribeJobInput) (req *request.Request, output *JobDescription) {
  665. op := &request.Operation{
  666. Name: opDescribeJob,
  667. HTTPMethod: "GET",
  668. HTTPPath: "/{accountId}/vaults/{vaultName}/jobs/{jobId}",
  669. }
  670. if input == nil {
  671. input = &DescribeJobInput{}
  672. }
  673. req = c.newRequest(op, input, output)
  674. output = &JobDescription{}
  675. req.Data = output
  676. return
  677. }
  678. // This operation returns information about a job you previously initiated,
  679. // including the job initiation date, the user who initiated the job, the job
  680. // status code/message and the Amazon SNS topic to notify after Amazon Glacier
  681. // completes the job. For more information about initiating a job, see InitiateJob.
  682. //
  683. // This operation enables you to check the status of your job. However, it
  684. // is strongly recommended that you set up an Amazon SNS topic and specify it
  685. // in your initiate job request so that Amazon Glacier can notify the topic
  686. // after it completes the job.
  687. //
  688. // A job ID will not expire for at least 24 hours after Amazon Glacier completes
  689. // the job.
  690. //
  691. // An AWS account has full permission to perform all operations (actions).
  692. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  693. // by default. You must grant them explicit permission to perform specific actions.
  694. // For more information, see Access Control Using AWS Identity and Access Management
  695. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  696. //
  697. // For information about the underlying REST API, go to Working with Archives
  698. // in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-describe-job-get.html)
  699. // in the Amazon Glacier Developer Guide.
  700. func (c *Glacier) DescribeJob(input *DescribeJobInput) (*JobDescription, error) {
  701. req, out := c.DescribeJobRequest(input)
  702. err := req.Send()
  703. return out, err
  704. }
  705. const opDescribeVault = "DescribeVault"
  706. // DescribeVaultRequest generates a "aws/request.Request" representing the
  707. // client's request for the DescribeVault operation. The "output" return
  708. // value can be used to capture response data after the request's "Send" method
  709. // is called.
  710. //
  711. // Creating a request object using this method should be used when you want to inject
  712. // custom logic into the request's lifecycle using a custom handler, or if you want to
  713. // access properties on the request object before or after sending the request. If
  714. // you just want the service response, call the DescribeVault method directly
  715. // instead.
  716. //
  717. // Note: You must call the "Send" method on the returned request object in order
  718. // to execute the request.
  719. //
  720. // // Example sending a request using the DescribeVaultRequest method.
  721. // req, resp := client.DescribeVaultRequest(params)
  722. //
  723. // err := req.Send()
  724. // if err == nil { // resp is now filled
  725. // fmt.Println(resp)
  726. // }
  727. //
  728. func (c *Glacier) DescribeVaultRequest(input *DescribeVaultInput) (req *request.Request, output *DescribeVaultOutput) {
  729. op := &request.Operation{
  730. Name: opDescribeVault,
  731. HTTPMethod: "GET",
  732. HTTPPath: "/{accountId}/vaults/{vaultName}",
  733. }
  734. if input == nil {
  735. input = &DescribeVaultInput{}
  736. }
  737. req = c.newRequest(op, input, output)
  738. output = &DescribeVaultOutput{}
  739. req.Data = output
  740. return
  741. }
  742. // This operation returns information about a vault, including the vault's Amazon
  743. // Resource Name (ARN), the date the vault was created, the number of archives
  744. // it contains, and the total size of all the archives in the vault. The number
  745. // of archives and their total size are as of the last inventory generation.
  746. // This means that if you add or remove an archive from a vault, and then immediately
  747. // use Describe Vault, the change in contents will not be immediately reflected.
  748. // If you want to retrieve the latest inventory of the vault, use InitiateJob.
  749. // Amazon Glacier generates vault inventories approximately daily. For more
  750. // information, see Downloading a Vault Inventory in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-inventory.html).
  751. //
  752. // An AWS account has full permission to perform all operations (actions).
  753. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  754. // by default. You must grant them explicit permission to perform specific actions.
  755. // For more information, see Access Control Using AWS Identity and Access Management
  756. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  757. //
  758. // For conceptual information and underlying REST API, go to Retrieving Vault
  759. // Metadata in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/retrieving-vault-info.html)
  760. // and Describe Vault (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-get.html)
  761. // in the Amazon Glacier Developer Guide.
  762. func (c *Glacier) DescribeVault(input *DescribeVaultInput) (*DescribeVaultOutput, error) {
  763. req, out := c.DescribeVaultRequest(input)
  764. err := req.Send()
  765. return out, err
  766. }
  767. const opGetDataRetrievalPolicy = "GetDataRetrievalPolicy"
  768. // GetDataRetrievalPolicyRequest generates a "aws/request.Request" representing the
  769. // client's request for the GetDataRetrievalPolicy operation. The "output" return
  770. // value can be used to capture response data after the request's "Send" method
  771. // is called.
  772. //
  773. // Creating a request object using this method should be used when you want to inject
  774. // custom logic into the request's lifecycle using a custom handler, or if you want to
  775. // access properties on the request object before or after sending the request. If
  776. // you just want the service response, call the GetDataRetrievalPolicy method directly
  777. // instead.
  778. //
  779. // Note: You must call the "Send" method on the returned request object in order
  780. // to execute the request.
  781. //
  782. // // Example sending a request using the GetDataRetrievalPolicyRequest method.
  783. // req, resp := client.GetDataRetrievalPolicyRequest(params)
  784. //
  785. // err := req.Send()
  786. // if err == nil { // resp is now filled
  787. // fmt.Println(resp)
  788. // }
  789. //
  790. func (c *Glacier) GetDataRetrievalPolicyRequest(input *GetDataRetrievalPolicyInput) (req *request.Request, output *GetDataRetrievalPolicyOutput) {
  791. op := &request.Operation{
  792. Name: opGetDataRetrievalPolicy,
  793. HTTPMethod: "GET",
  794. HTTPPath: "/{accountId}/policies/data-retrieval",
  795. }
  796. if input == nil {
  797. input = &GetDataRetrievalPolicyInput{}
  798. }
  799. req = c.newRequest(op, input, output)
  800. output = &GetDataRetrievalPolicyOutput{}
  801. req.Data = output
  802. return
  803. }
  804. // This operation returns the current data retrieval policy for the account
  805. // and region specified in the GET request. For more information about data
  806. // retrieval policies, see Amazon Glacier Data Retrieval Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/data-retrieval-policy.html).
  807. func (c *Glacier) GetDataRetrievalPolicy(input *GetDataRetrievalPolicyInput) (*GetDataRetrievalPolicyOutput, error) {
  808. req, out := c.GetDataRetrievalPolicyRequest(input)
  809. err := req.Send()
  810. return out, err
  811. }
  812. const opGetJobOutput = "GetJobOutput"
  813. // GetJobOutputRequest generates a "aws/request.Request" representing the
  814. // client's request for the GetJobOutput operation. The "output" return
  815. // value can be used to capture response data after the request's "Send" method
  816. // is called.
  817. //
  818. // Creating a request object using this method should be used when you want to inject
  819. // custom logic into the request's lifecycle using a custom handler, or if you want to
  820. // access properties on the request object before or after sending the request. If
  821. // you just want the service response, call the GetJobOutput method directly
  822. // instead.
  823. //
  824. // Note: You must call the "Send" method on the returned request object in order
  825. // to execute the request.
  826. //
  827. // // Example sending a request using the GetJobOutputRequest method.
  828. // req, resp := client.GetJobOutputRequest(params)
  829. //
  830. // err := req.Send()
  831. // if err == nil { // resp is now filled
  832. // fmt.Println(resp)
  833. // }
  834. //
  835. func (c *Glacier) GetJobOutputRequest(input *GetJobOutputInput) (req *request.Request, output *GetJobOutputOutput) {
  836. op := &request.Operation{
  837. Name: opGetJobOutput,
  838. HTTPMethod: "GET",
  839. HTTPPath: "/{accountId}/vaults/{vaultName}/jobs/{jobId}/output",
  840. }
  841. if input == nil {
  842. input = &GetJobOutputInput{}
  843. }
  844. req = c.newRequest(op, input, output)
  845. output = &GetJobOutputOutput{}
  846. req.Data = output
  847. return
  848. }
  849. // This operation downloads the output of the job you initiated using InitiateJob.
  850. // Depending on the job type you specified when you initiated the job, the output
  851. // will be either the content of an archive or a vault inventory.
  852. //
  853. // A job ID will not expire for at least 24 hours after Amazon Glacier completes
  854. // the job. That is, you can download the job output within the 24 hours period
  855. // after Amazon Glacier completes the job.
  856. //
  857. // If the job output is large, then you can use the Range request header to
  858. // retrieve a portion of the output. This allows you to download the entire
  859. // output in smaller chunks of bytes. For example, suppose you have 1 GB of
  860. // job output you want to download and you decide to download 128 MB chunks
  861. // of data at a time, which is a total of eight Get Job Output requests. You
  862. // use the following process to download the job output:
  863. //
  864. // Download a 128 MB chunk of output by specifying the appropriate byte range
  865. // using the Range header.
  866. //
  867. // Along with the data, the response includes a SHA256 tree hash of the payload.
  868. // You compute the checksum of the payload on the client and compare it with
  869. // the checksum you received in the response to ensure you received all the
  870. // expected data.
  871. //
  872. // Repeat steps 1 and 2 for all the eight 128 MB chunks of output data, each
  873. // time specifying the appropriate byte range.
  874. //
  875. // After downloading all the parts of the job output, you have a list of
  876. // eight checksum values. Compute the tree hash of these values to find the
  877. // checksum of the entire output. Using the DescribeJob API, obtain job information
  878. // of the job that provided you the output. The response includes the checksum
  879. // of the entire archive stored in Amazon Glacier. You compare this value with
  880. // the checksum you computed to ensure you have downloaded the entire archive
  881. // content with no errors.
  882. //
  883. // An AWS account has full permission to perform all operations (actions).
  884. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  885. // by default. You must grant them explicit permission to perform specific actions.
  886. // For more information, see Access Control Using AWS Identity and Access Management
  887. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  888. //
  889. // For conceptual information and the underlying REST API, go to Downloading
  890. // a Vault Inventory (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-inventory.html),
  891. // Downloading an Archive (http://docs.aws.amazon.com/amazonglacier/latest/dev/downloading-an-archive.html),
  892. // and Get Job Output (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-job-output-get.html)
  893. func (c *Glacier) GetJobOutput(input *GetJobOutputInput) (*GetJobOutputOutput, error) {
  894. req, out := c.GetJobOutputRequest(input)
  895. err := req.Send()
  896. return out, err
  897. }
  898. const opGetVaultAccessPolicy = "GetVaultAccessPolicy"
  899. // GetVaultAccessPolicyRequest generates a "aws/request.Request" representing the
  900. // client's request for the GetVaultAccessPolicy operation. The "output" return
  901. // value can be used to capture response data after the request's "Send" method
  902. // is called.
  903. //
  904. // Creating a request object using this method should be used when you want to inject
  905. // custom logic into the request's lifecycle using a custom handler, or if you want to
  906. // access properties on the request object before or after sending the request. If
  907. // you just want the service response, call the GetVaultAccessPolicy method directly
  908. // instead.
  909. //
  910. // Note: You must call the "Send" method on the returned request object in order
  911. // to execute the request.
  912. //
  913. // // Example sending a request using the GetVaultAccessPolicyRequest method.
  914. // req, resp := client.GetVaultAccessPolicyRequest(params)
  915. //
  916. // err := req.Send()
  917. // if err == nil { // resp is now filled
  918. // fmt.Println(resp)
  919. // }
  920. //
  921. func (c *Glacier) GetVaultAccessPolicyRequest(input *GetVaultAccessPolicyInput) (req *request.Request, output *GetVaultAccessPolicyOutput) {
  922. op := &request.Operation{
  923. Name: opGetVaultAccessPolicy,
  924. HTTPMethod: "GET",
  925. HTTPPath: "/{accountId}/vaults/{vaultName}/access-policy",
  926. }
  927. if input == nil {
  928. input = &GetVaultAccessPolicyInput{}
  929. }
  930. req = c.newRequest(op, input, output)
  931. output = &GetVaultAccessPolicyOutput{}
  932. req.Data = output
  933. return
  934. }
  935. // This operation retrieves the access-policy subresource set on the vault;
  936. // for more information on setting this subresource, see Set Vault Access Policy
  937. // (PUT access-policy) (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-SetVaultAccessPolicy.html).
  938. // If there is no access policy set on the vault, the operation returns a 404
  939. // Not found error. For more information about vault access policies, see Amazon
  940. // Glacier Access Control with Vault Access Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html).
  941. func (c *Glacier) GetVaultAccessPolicy(input *GetVaultAccessPolicyInput) (*GetVaultAccessPolicyOutput, error) {
  942. req, out := c.GetVaultAccessPolicyRequest(input)
  943. err := req.Send()
  944. return out, err
  945. }
  946. const opGetVaultLock = "GetVaultLock"
  947. // GetVaultLockRequest generates a "aws/request.Request" representing the
  948. // client's request for the GetVaultLock operation. The "output" return
  949. // value can be used to capture response data after the request's "Send" method
  950. // is called.
  951. //
  952. // Creating a request object using this method should be used when you want to inject
  953. // custom logic into the request's lifecycle using a custom handler, or if you want to
  954. // access properties on the request object before or after sending the request. If
  955. // you just want the service response, call the GetVaultLock method directly
  956. // instead.
  957. //
  958. // Note: You must call the "Send" method on the returned request object in order
  959. // to execute the request.
  960. //
  961. // // Example sending a request using the GetVaultLockRequest method.
  962. // req, resp := client.GetVaultLockRequest(params)
  963. //
  964. // err := req.Send()
  965. // if err == nil { // resp is now filled
  966. // fmt.Println(resp)
  967. // }
  968. //
  969. func (c *Glacier) GetVaultLockRequest(input *GetVaultLockInput) (req *request.Request, output *GetVaultLockOutput) {
  970. op := &request.Operation{
  971. Name: opGetVaultLock,
  972. HTTPMethod: "GET",
  973. HTTPPath: "/{accountId}/vaults/{vaultName}/lock-policy",
  974. }
  975. if input == nil {
  976. input = &GetVaultLockInput{}
  977. }
  978. req = c.newRequest(op, input, output)
  979. output = &GetVaultLockOutput{}
  980. req.Data = output
  981. return
  982. }
  983. // This operation retrieves the following attributes from the lock-policy subresource
  984. // set on the specified vault: The vault lock policy set on the vault.
  985. //
  986. // The state of the vault lock, which is either InProgess or Locked.
  987. //
  988. // When the lock ID expires. The lock ID is used to complete the vault locking
  989. // process.
  990. //
  991. // When the vault lock was initiated and put into the InProgress state.
  992. //
  993. // A vault lock is put into the InProgress state by calling InitiateVaultLock.
  994. // A vault lock is put into the Locked state by calling CompleteVaultLock. You
  995. // can abort the vault locking process by calling AbortVaultLock. For more information
  996. // about the vault locking process, Amazon Glacier Vault Lock (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html).
  997. //
  998. // If there is no vault lock policy set on the vault, the operation returns
  999. // a 404 Not found error. For more information about vault lock policies, Amazon
  1000. // Glacier Access Control with Vault Lock Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html).
  1001. func (c *Glacier) GetVaultLock(input *GetVaultLockInput) (*GetVaultLockOutput, error) {
  1002. req, out := c.GetVaultLockRequest(input)
  1003. err := req.Send()
  1004. return out, err
  1005. }
  1006. const opGetVaultNotifications = "GetVaultNotifications"
  1007. // GetVaultNotificationsRequest generates a "aws/request.Request" representing the
  1008. // client's request for the GetVaultNotifications operation. The "output" return
  1009. // value can be used to capture response data after the request's "Send" method
  1010. // is called.
  1011. //
  1012. // Creating a request object using this method should be used when you want to inject
  1013. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1014. // access properties on the request object before or after sending the request. If
  1015. // you just want the service response, call the GetVaultNotifications method directly
  1016. // instead.
  1017. //
  1018. // Note: You must call the "Send" method on the returned request object in order
  1019. // to execute the request.
  1020. //
  1021. // // Example sending a request using the GetVaultNotificationsRequest method.
  1022. // req, resp := client.GetVaultNotificationsRequest(params)
  1023. //
  1024. // err := req.Send()
  1025. // if err == nil { // resp is now filled
  1026. // fmt.Println(resp)
  1027. // }
  1028. //
  1029. func (c *Glacier) GetVaultNotificationsRequest(input *GetVaultNotificationsInput) (req *request.Request, output *GetVaultNotificationsOutput) {
  1030. op := &request.Operation{
  1031. Name: opGetVaultNotifications,
  1032. HTTPMethod: "GET",
  1033. HTTPPath: "/{accountId}/vaults/{vaultName}/notification-configuration",
  1034. }
  1035. if input == nil {
  1036. input = &GetVaultNotificationsInput{}
  1037. }
  1038. req = c.newRequest(op, input, output)
  1039. output = &GetVaultNotificationsOutput{}
  1040. req.Data = output
  1041. return
  1042. }
  1043. // This operation retrieves the notification-configuration subresource of the
  1044. // specified vault.
  1045. //
  1046. // For information about setting a notification configuration on a vault, see
  1047. // SetVaultNotifications. If a notification configuration for a vault is not
  1048. // set, the operation returns a 404 Not Found error. For more information about
  1049. // vault notifications, see Configuring Vault Notifications in Amazon Glacier
  1050. // (http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html).
  1051. //
  1052. // An AWS account has full permission to perform all operations (actions).
  1053. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  1054. // by default. You must grant them explicit permission to perform specific actions.
  1055. // For more information, see Access Control Using AWS Identity and Access Management
  1056. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  1057. //
  1058. // For conceptual information and underlying REST API, go to Configuring Vault
  1059. // Notifications in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html)
  1060. // and Get Vault Notification Configuration (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-get.html)
  1061. // in the Amazon Glacier Developer Guide.
  1062. func (c *Glacier) GetVaultNotifications(input *GetVaultNotificationsInput) (*GetVaultNotificationsOutput, error) {
  1063. req, out := c.GetVaultNotificationsRequest(input)
  1064. err := req.Send()
  1065. return out, err
  1066. }
  1067. const opInitiateJob = "InitiateJob"
  1068. // InitiateJobRequest generates a "aws/request.Request" representing the
  1069. // client's request for the InitiateJob operation. The "output" return
  1070. // value can be used to capture response data after the request's "Send" method
  1071. // is called.
  1072. //
  1073. // Creating a request object using this method should be used when you want to inject
  1074. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1075. // access properties on the request object before or after sending the request. If
  1076. // you just want the service response, call the InitiateJob method directly
  1077. // instead.
  1078. //
  1079. // Note: You must call the "Send" method on the returned request object in order
  1080. // to execute the request.
  1081. //
  1082. // // Example sending a request using the InitiateJobRequest method.
  1083. // req, resp := client.InitiateJobRequest(params)
  1084. //
  1085. // err := req.Send()
  1086. // if err == nil { // resp is now filled
  1087. // fmt.Println(resp)
  1088. // }
  1089. //
  1090. func (c *Glacier) InitiateJobRequest(input *InitiateJobInput) (req *request.Request, output *InitiateJobOutput) {
  1091. op := &request.Operation{
  1092. Name: opInitiateJob,
  1093. HTTPMethod: "POST",
  1094. HTTPPath: "/{accountId}/vaults/{vaultName}/jobs",
  1095. }
  1096. if input == nil {
  1097. input = &InitiateJobInput{}
  1098. }
  1099. req = c.newRequest(op, input, output)
  1100. output = &InitiateJobOutput{}
  1101. req.Data = output
  1102. return
  1103. }
  1104. // This operation initiates a job of the specified type. In this release, you
  1105. // can initiate a job to retrieve either an archive or a vault inventory (a
  1106. // list of archives in a vault).
  1107. //
  1108. // Retrieving data from Amazon Glacier is a two-step process:
  1109. //
  1110. // Initiate a retrieval job.
  1111. //
  1112. // A data retrieval policy can cause your initiate retrieval job request to
  1113. // fail with a PolicyEnforcedException exception. For more information about
  1114. // data retrieval policies, see Amazon Glacier Data Retrieval Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/data-retrieval-policy.html).
  1115. // For more information about the PolicyEnforcedException exception, see Error
  1116. // Responses (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-error-responses.html).
  1117. //
  1118. // After the job completes, download the bytes.
  1119. //
  1120. // The retrieval request is executed asynchronously. When you initiate a retrieval
  1121. // job, Amazon Glacier creates a job and returns a job ID in the response. When
  1122. // Amazon Glacier completes the job, you can get the job output (archive or
  1123. // inventory data). For information about getting job output, see GetJobOutput
  1124. // operation.
  1125. //
  1126. // The job must complete before you can get its output. To determine when a
  1127. // job is complete, you have the following options:
  1128. //
  1129. // Use Amazon SNS Notification You can specify an Amazon Simple Notification
  1130. // Service (Amazon SNS) topic to which Amazon Glacier can post a notification
  1131. // after the job is completed. You can specify an SNS topic per job request.
  1132. // The notification is sent only after Amazon Glacier completes the job. In
  1133. // addition to specifying an SNS topic per job request, you can configure vault
  1134. // notifications for a vault so that job notifications are always sent. For
  1135. // more information, see SetVaultNotifications.
  1136. //
  1137. // Get job details You can make a DescribeJob request to obtain job status
  1138. // information while a job is in progress. However, it is more efficient to
  1139. // use an Amazon SNS notification to determine when a job is complete.
  1140. //
  1141. // The information you get via notification is same that you get by calling
  1142. // DescribeJob.
  1143. //
  1144. // If for a specific event, you add both the notification configuration on
  1145. // the vault and also specify an SNS topic in your initiate job request, Amazon
  1146. // Glacier sends both notifications. For more information, see SetVaultNotifications.
  1147. //
  1148. // An AWS account has full permission to perform all operations (actions).
  1149. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  1150. // by default. You must grant them explicit permission to perform specific actions.
  1151. // For more information, see Access Control Using AWS Identity and Access Management
  1152. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  1153. //
  1154. // About the Vault Inventory
  1155. //
  1156. // Amazon Glacier prepares an inventory for each vault periodically, every
  1157. // 24 hours. When you initiate a job for a vault inventory, Amazon Glacier returns
  1158. // the last inventory for the vault. The inventory data you get might be up
  1159. // to a day or two days old. Also, the initiate inventory job might take some
  1160. // time to complete before you can download the vault inventory. So you do not
  1161. // want to retrieve a vault inventory for each vault operation. However, in
  1162. // some scenarios, you might find the vault inventory useful. For example, when
  1163. // you upload an archive, you can provide an archive description but not an
  1164. // archive name. Amazon Glacier provides you a unique archive ID, an opaque
  1165. // string of characters. So, you might maintain your own database that maps
  1166. // archive names to their corresponding Amazon Glacier assigned archive IDs.
  1167. // You might find the vault inventory useful in the event you need to reconcile
  1168. // information in your database with the actual vault inventory.
  1169. //
  1170. // Range Inventory Retrieval
  1171. //
  1172. // You can limit the number of inventory items retrieved by filtering on the
  1173. // archive creation date or by setting a limit.
  1174. //
  1175. // Filtering by Archive Creation Date
  1176. //
  1177. // You can retrieve inventory items for archives created between StartDate
  1178. // and EndDate by specifying values for these parameters in the InitiateJob
  1179. // request. Archives created on or after the StartDate and before the EndDate
  1180. // will be returned. If you only provide the StartDate without the EndDate,
  1181. // you will retrieve the inventory for all archives created on or after the
  1182. // StartDate. If you only provide the EndDate without the StartDate, you will
  1183. // get back the inventory for all archives created before the EndDate.
  1184. //
  1185. // Limiting Inventory Items per Retrieval
  1186. //
  1187. // You can limit the number of inventory items returned by setting the Limit
  1188. // parameter in the InitiateJob request. The inventory job output will contain
  1189. // inventory items up to the specified Limit. If there are more inventory items
  1190. // available, the result is paginated. After a job is complete you can use the
  1191. // DescribeJob operation to get a marker that you use in a subsequent InitiateJob
  1192. // request. The marker will indicate the starting point to retrieve the next
  1193. // set of inventory items. You can page through your entire inventory by repeatedly
  1194. // making InitiateJob requests with the marker from the previous DescribeJob
  1195. // output, until you get a marker from DescribeJob that returns null, indicating
  1196. // that there are no more inventory items available.
  1197. //
  1198. // You can use the Limit parameter together with the date range parameters.
  1199. //
  1200. // About Ranged Archive Retrieval
  1201. //
  1202. // You can initiate an archive retrieval for the whole archive or a range
  1203. // of the archive. In the case of ranged archive retrieval, you specify a byte
  1204. // range to return or the whole archive. The range specified must be megabyte
  1205. // (MB) aligned, that is the range start value must be divisible by 1 MB and
  1206. // range end value plus 1 must be divisible by 1 MB or equal the end of the
  1207. // archive. If the ranged archive retrieval is not megabyte aligned, this operation
  1208. // returns a 400 response. Furthermore, to ensure you get checksum values for
  1209. // data you download using Get Job Output API, the range must be tree hash aligned.
  1210. //
  1211. // An AWS account has full permission to perform all operations (actions).
  1212. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  1213. // by default. You must grant them explicit permission to perform specific actions.
  1214. // For more information, see Access Control Using AWS Identity and Access Management
  1215. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  1216. //
  1217. // For conceptual information and the underlying REST API, go to Initiate a
  1218. // Job (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html)
  1219. // and Downloading a Vault Inventory (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-inventory.html)
  1220. func (c *Glacier) InitiateJob(input *InitiateJobInput) (*InitiateJobOutput, error) {
  1221. req, out := c.InitiateJobRequest(input)
  1222. err := req.Send()
  1223. return out, err
  1224. }
  1225. const opInitiateMultipartUpload = "InitiateMultipartUpload"
  1226. // InitiateMultipartUploadRequest generates a "aws/request.Request" representing the
  1227. // client's request for the InitiateMultipartUpload operation. The "output" return
  1228. // value can be used to capture response data after the request's "Send" method
  1229. // is called.
  1230. //
  1231. // Creating a request object using this method should be used when you want to inject
  1232. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1233. // access properties on the request object before or after sending the request. If
  1234. // you just want the service response, call the InitiateMultipartUpload method directly
  1235. // instead.
  1236. //
  1237. // Note: You must call the "Send" method on the returned request object in order
  1238. // to execute the request.
  1239. //
  1240. // // Example sending a request using the InitiateMultipartUploadRequest method.
  1241. // req, resp := client.InitiateMultipartUploadRequest(params)
  1242. //
  1243. // err := req.Send()
  1244. // if err == nil { // resp is now filled
  1245. // fmt.Println(resp)
  1246. // }
  1247. //
  1248. func (c *Glacier) InitiateMultipartUploadRequest(input *InitiateMultipartUploadInput) (req *request.Request, output *InitiateMultipartUploadOutput) {
  1249. op := &request.Operation{
  1250. Name: opInitiateMultipartUpload,
  1251. HTTPMethod: "POST",
  1252. HTTPPath: "/{accountId}/vaults/{vaultName}/multipart-uploads",
  1253. }
  1254. if input == nil {
  1255. input = &InitiateMultipartUploadInput{}
  1256. }
  1257. req = c.newRequest(op, input, output)
  1258. output = &InitiateMultipartUploadOutput{}
  1259. req.Data = output
  1260. return
  1261. }
  1262. // This operation initiates a multipart upload. Amazon Glacier creates a multipart
  1263. // upload resource and returns its ID in the response. The multipart upload
  1264. // ID is used in subsequent requests to upload parts of an archive (see UploadMultipartPart).
  1265. //
  1266. // When you initiate a multipart upload, you specify the part size in number
  1267. // of bytes. The part size must be a megabyte (1024 KB) multiplied by a power
  1268. // of 2-for example, 1048576 (1 MB), 2097152 (2 MB), 4194304 (4 MB), 8388608
  1269. // (8 MB), and so on. The minimum allowable part size is 1 MB, and the maximum
  1270. // is 4 GB.
  1271. //
  1272. // Every part you upload to this resource (see UploadMultipartPart), except
  1273. // the last one, must have the same size. The last one can be the same size
  1274. // or smaller. For example, suppose you want to upload a 16.2 MB file. If you
  1275. // initiate the multipart upload with a part size of 4 MB, you will upload four
  1276. // parts of 4 MB each and one part of 0.2 MB.
  1277. //
  1278. // You don't need to know the size of the archive when you start a multipart
  1279. // upload because Amazon Glacier does not require you to specify the overall
  1280. // archive size.
  1281. //
  1282. // After you complete the multipart upload, Amazon Glacier removes the multipart
  1283. // upload resource referenced by the ID. Amazon Glacier also removes the multipart
  1284. // upload resource if you cancel the multipart upload or it may be removed if
  1285. // there is no activity for a period of 24 hours.
  1286. //
  1287. // An AWS account has full permission to perform all operations (actions).
  1288. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  1289. // by default. You must grant them explicit permission to perform specific actions.
  1290. // For more information, see Access Control Using AWS Identity and Access Management
  1291. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  1292. //
  1293. // For conceptual information and underlying REST API, go to Uploading Large
  1294. // Archives in Parts (Multipart Upload) (http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html)
  1295. // and Initiate Multipart Upload (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-initiate-upload.html)
  1296. // in the Amazon Glacier Developer Guide.
  1297. func (c *Glacier) InitiateMultipartUpload(input *InitiateMultipartUploadInput) (*InitiateMultipartUploadOutput, error) {
  1298. req, out := c.InitiateMultipartUploadRequest(input)
  1299. err := req.Send()
  1300. return out, err
  1301. }
  1302. const opInitiateVaultLock = "InitiateVaultLock"
  1303. // InitiateVaultLockRequest generates a "aws/request.Request" representing the
  1304. // client's request for the InitiateVaultLock operation. The "output" return
  1305. // value can be used to capture response data after the request's "Send" method
  1306. // is called.
  1307. //
  1308. // Creating a request object using this method should be used when you want to inject
  1309. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1310. // access properties on the request object before or after sending the request. If
  1311. // you just want the service response, call the InitiateVaultLock method directly
  1312. // instead.
  1313. //
  1314. // Note: You must call the "Send" method on the returned request object in order
  1315. // to execute the request.
  1316. //
  1317. // // Example sending a request using the InitiateVaultLockRequest method.
  1318. // req, resp := client.InitiateVaultLockRequest(params)
  1319. //
  1320. // err := req.Send()
  1321. // if err == nil { // resp is now filled
  1322. // fmt.Println(resp)
  1323. // }
  1324. //
  1325. func (c *Glacier) InitiateVaultLockRequest(input *InitiateVaultLockInput) (req *request.Request, output *InitiateVaultLockOutput) {
  1326. op := &request.Operation{
  1327. Name: opInitiateVaultLock,
  1328. HTTPMethod: "POST",
  1329. HTTPPath: "/{accountId}/vaults/{vaultName}/lock-policy",
  1330. }
  1331. if input == nil {
  1332. input = &InitiateVaultLockInput{}
  1333. }
  1334. req = c.newRequest(op, input, output)
  1335. output = &InitiateVaultLockOutput{}
  1336. req.Data = output
  1337. return
  1338. }
  1339. // This operation initiates the vault locking process by doing the following:
  1340. // Installing a vault lock policy on the specified vault.
  1341. //
  1342. // Setting the lock state of vault lock to InProgress.
  1343. //
  1344. // Returning a lock ID, which is used to complete the vault locking process.
  1345. //
  1346. // You can set one vault lock policy for each vault and this policy can
  1347. // be up to 20 KB in size. For more information about vault lock policies, see
  1348. // Amazon Glacier Access Control with Vault Lock Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html).
  1349. //
  1350. // You must complete the vault locking process within 24 hours after the vault
  1351. // lock enters the InProgress state. After the 24 hour window ends, the lock
  1352. // ID expires, the vault automatically exits the InProgress state, and the vault
  1353. // lock policy is removed from the vault. You call CompleteVaultLock to complete
  1354. // the vault locking process by setting the state of the vault lock to Locked.
  1355. //
  1356. // After a vault lock is in the Locked state, you cannot initiate a new vault
  1357. // lock for the vault.
  1358. //
  1359. // You can abort the vault locking process by calling AbortVaultLock. You can
  1360. // get the state of the vault lock by calling GetVaultLock. For more information
  1361. // about the vault locking process, Amazon Glacier Vault Lock (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html).
  1362. //
  1363. // If this operation is called when the vault lock is in the InProgress state,
  1364. // the operation returns an AccessDeniedException error. When the vault lock
  1365. // is in the InProgress state you must call AbortVaultLock before you can initiate
  1366. // a new vault lock policy.
  1367. func (c *Glacier) InitiateVaultLock(input *InitiateVaultLockInput) (*InitiateVaultLockOutput, error) {
  1368. req, out := c.InitiateVaultLockRequest(input)
  1369. err := req.Send()
  1370. return out, err
  1371. }
  1372. const opListJobs = "ListJobs"
  1373. // ListJobsRequest generates a "aws/request.Request" representing the
  1374. // client's request for the ListJobs operation. The "output" return
  1375. // value can be used to capture response data after the request's "Send" method
  1376. // is called.
  1377. //
  1378. // Creating a request object using this method should be used when you want to inject
  1379. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1380. // access properties on the request object before or after sending the request. If
  1381. // you just want the service response, call the ListJobs method directly
  1382. // instead.
  1383. //
  1384. // Note: You must call the "Send" method on the returned request object in order
  1385. // to execute the request.
  1386. //
  1387. // // Example sending a request using the ListJobsRequest method.
  1388. // req, resp := client.ListJobsRequest(params)
  1389. //
  1390. // err := req.Send()
  1391. // if err == nil { // resp is now filled
  1392. // fmt.Println(resp)
  1393. // }
  1394. //
  1395. func (c *Glacier) ListJobsRequest(input *ListJobsInput) (req *request.Request, output *ListJobsOutput) {
  1396. op := &request.Operation{
  1397. Name: opListJobs,
  1398. HTTPMethod: "GET",
  1399. HTTPPath: "/{accountId}/vaults/{vaultName}/jobs",
  1400. Paginator: &request.Paginator{
  1401. InputTokens: []string{"marker"},
  1402. OutputTokens: []string{"Marker"},
  1403. LimitToken: "limit",
  1404. TruncationToken: "",
  1405. },
  1406. }
  1407. if input == nil {
  1408. input = &ListJobsInput{}
  1409. }
  1410. req = c.newRequest(op, input, output)
  1411. output = &ListJobsOutput{}
  1412. req.Data = output
  1413. return
  1414. }
  1415. // This operation lists jobs for a vault, including jobs that are in-progress
  1416. // and jobs that have recently finished.
  1417. //
  1418. // Amazon Glacier retains recently completed jobs for a period before deleting
  1419. // them; however, it eventually removes completed jobs. The output of completed
  1420. // jobs can be retrieved. Retaining completed jobs for a period of time after
  1421. // they have completed enables you to get a job output in the event you miss
  1422. // the job completion notification or your first attempt to download it fails.
  1423. // For example, suppose you start an archive retrieval job to download an archive.
  1424. // After the job completes, you start to download the archive but encounter
  1425. // a network error. In this scenario, you can retry and download the archive
  1426. // while the job exists.
  1427. //
  1428. // To retrieve an archive or retrieve a vault inventory from Amazon Glacier,
  1429. // you first initiate a job, and after the job completes, you download the data.
  1430. // For an archive retrieval, the output is the archive data, and for an inventory
  1431. // retrieval, it is the inventory list. The List Job operation returns a list
  1432. // of these jobs sorted by job initiation time.
  1433. //
  1434. // This List Jobs operation supports pagination. By default, this operation
  1435. // returns up to 1,000 jobs in the response. You should always check the response
  1436. // for a marker at which to continue the list; if there are no more items the
  1437. // marker is null. To return a list of jobs that begins at a specific job, set
  1438. // the marker request parameter to the value you obtained from a previous List
  1439. // Jobs request. You can also limit the number of jobs returned in the response
  1440. // by specifying the limit parameter in the request.
  1441. //
  1442. // Additionally, you can filter the jobs list returned by specifying an optional
  1443. // statuscode (InProgress, Succeeded, or Failed) and completed (true, false)
  1444. // parameter. The statuscode allows you to specify that only jobs that match
  1445. // a specified status are returned. The completed parameter allows you to specify
  1446. // that only jobs in a specific completion state are returned.
  1447. //
  1448. // An AWS account has full permission to perform all operations (actions).
  1449. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  1450. // by default. You must grant them explicit permission to perform specific actions.
  1451. // For more information, see Access Control Using AWS Identity and Access Management
  1452. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  1453. //
  1454. // For the underlying REST API, go to List Jobs (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-jobs-get.html)
  1455. func (c *Glacier) ListJobs(input *ListJobsInput) (*ListJobsOutput, error) {
  1456. req, out := c.ListJobsRequest(input)
  1457. err := req.Send()
  1458. return out, err
  1459. }
  1460. // ListJobsPages iterates over the pages of a ListJobs operation,
  1461. // calling the "fn" function with the response data for each page. To stop
  1462. // iterating, return false from the fn function.
  1463. //
  1464. // See ListJobs method for more information on how to use this operation.
  1465. //
  1466. // Note: This operation can generate multiple requests to a service.
  1467. //
  1468. // // Example iterating over at most 3 pages of a ListJobs operation.
  1469. // pageNum := 0
  1470. // err := client.ListJobsPages(params,
  1471. // func(page *ListJobsOutput, lastPage bool) bool {
  1472. // pageNum++
  1473. // fmt.Println(page)
  1474. // return pageNum <= 3
  1475. // })
  1476. //
  1477. func (c *Glacier) ListJobsPages(input *ListJobsInput, fn func(p *ListJobsOutput, lastPage bool) (shouldContinue bool)) error {
  1478. page, _ := c.ListJobsRequest(input)
  1479. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1480. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1481. return fn(p.(*ListJobsOutput), lastPage)
  1482. })
  1483. }
  1484. const opListMultipartUploads = "ListMultipartUploads"
  1485. // ListMultipartUploadsRequest generates a "aws/request.Request" representing the
  1486. // client's request for the ListMultipartUploads operation. The "output" return
  1487. // value can be used to capture response data after the request's "Send" method
  1488. // is called.
  1489. //
  1490. // Creating a request object using this method should be used when you want to inject
  1491. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1492. // access properties on the request object before or after sending the request. If
  1493. // you just want the service response, call the ListMultipartUploads method directly
  1494. // instead.
  1495. //
  1496. // Note: You must call the "Send" method on the returned request object in order
  1497. // to execute the request.
  1498. //
  1499. // // Example sending a request using the ListMultipartUploadsRequest method.
  1500. // req, resp := client.ListMultipartUploadsRequest(params)
  1501. //
  1502. // err := req.Send()
  1503. // if err == nil { // resp is now filled
  1504. // fmt.Println(resp)
  1505. // }
  1506. //
  1507. func (c *Glacier) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
  1508. op := &request.Operation{
  1509. Name: opListMultipartUploads,
  1510. HTTPMethod: "GET",
  1511. HTTPPath: "/{accountId}/vaults/{vaultName}/multipart-uploads",
  1512. Paginator: &request.Paginator{
  1513. InputTokens: []string{"marker"},
  1514. OutputTokens: []string{"Marker"},
  1515. LimitToken: "limit",
  1516. TruncationToken: "",
  1517. },
  1518. }
  1519. if input == nil {
  1520. input = &ListMultipartUploadsInput{}
  1521. }
  1522. req = c.newRequest(op, input, output)
  1523. output = &ListMultipartUploadsOutput{}
  1524. req.Data = output
  1525. return
  1526. }
  1527. // This operation lists in-progress multipart uploads for the specified vault.
  1528. // An in-progress multipart upload is a multipart upload that has been initiated
  1529. // by an InitiateMultipartUpload request, but has not yet been completed or
  1530. // aborted. The list returned in the List Multipart Upload response has no guaranteed
  1531. // order.
  1532. //
  1533. // The List Multipart Uploads operation supports pagination. By default, this
  1534. // operation returns up to 1,000 multipart uploads in the response. You should
  1535. // always check the response for a marker at which to continue the list; if
  1536. // there are no more items the marker is null. To return a list of multipart
  1537. // uploads that begins at a specific upload, set the marker request parameter
  1538. // to the value you obtained from a previous List Multipart Upload request.
  1539. // You can also limit the number of uploads returned in the response by specifying
  1540. // the limit parameter in the request.
  1541. //
  1542. // Note the difference between this operation and listing parts (ListParts).
  1543. // The List Multipart Uploads operation lists all multipart uploads for a vault
  1544. // and does not require a multipart upload ID. The List Parts operation requires
  1545. // a multipart upload ID since parts are associated with a single upload.
  1546. //
  1547. // An AWS account has full permission to perform all operations (actions).
  1548. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  1549. // by default. You must grant them explicit permission to perform specific actions.
  1550. // For more information, see Access Control Using AWS Identity and Access Management
  1551. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  1552. //
  1553. // For conceptual information and the underlying REST API, go to Working with
  1554. // Archives in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html)
  1555. // and List Multipart Uploads (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-list-uploads.html)
  1556. // in the Amazon Glacier Developer Guide.
  1557. func (c *Glacier) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
  1558. req, out := c.ListMultipartUploadsRequest(input)
  1559. err := req.Send()
  1560. return out, err
  1561. }
  1562. // ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
  1563. // calling the "fn" function with the response data for each page. To stop
  1564. // iterating, return false from the fn function.
  1565. //
  1566. // See ListMultipartUploads method for more information on how to use this operation.
  1567. //
  1568. // Note: This operation can generate multiple requests to a service.
  1569. //
  1570. // // Example iterating over at most 3 pages of a ListMultipartUploads operation.
  1571. // pageNum := 0
  1572. // err := client.ListMultipartUploadsPages(params,
  1573. // func(page *ListMultipartUploadsOutput, lastPage bool) bool {
  1574. // pageNum++
  1575. // fmt.Println(page)
  1576. // return pageNum <= 3
  1577. // })
  1578. //
  1579. func (c *Glacier) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(p *ListMultipartUploadsOutput, lastPage bool) (shouldContinue bool)) error {
  1580. page, _ := c.ListMultipartUploadsRequest(input)
  1581. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1582. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1583. return fn(p.(*ListMultipartUploadsOutput), lastPage)
  1584. })
  1585. }
  1586. const opListParts = "ListParts"
  1587. // ListPartsRequest generates a "aws/request.Request" representing the
  1588. // client's request for the ListParts operation. The "output" return
  1589. // value can be used to capture response data after the request's "Send" method
  1590. // is called.
  1591. //
  1592. // Creating a request object using this method should be used when you want to inject
  1593. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1594. // access properties on the request object before or after sending the request. If
  1595. // you just want the service response, call the ListParts method directly
  1596. // instead.
  1597. //
  1598. // Note: You must call the "Send" method on the returned request object in order
  1599. // to execute the request.
  1600. //
  1601. // // Example sending a request using the ListPartsRequest method.
  1602. // req, resp := client.ListPartsRequest(params)
  1603. //
  1604. // err := req.Send()
  1605. // if err == nil { // resp is now filled
  1606. // fmt.Println(resp)
  1607. // }
  1608. //
  1609. func (c *Glacier) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
  1610. op := &request.Operation{
  1611. Name: opListParts,
  1612. HTTPMethod: "GET",
  1613. HTTPPath: "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}",
  1614. Paginator: &request.Paginator{
  1615. InputTokens: []string{"marker"},
  1616. OutputTokens: []string{"Marker"},
  1617. LimitToken: "limit",
  1618. TruncationToken: "",
  1619. },
  1620. }
  1621. if input == nil {
  1622. input = &ListPartsInput{}
  1623. }
  1624. req = c.newRequest(op, input, output)
  1625. output = &ListPartsOutput{}
  1626. req.Data = output
  1627. return
  1628. }
  1629. // This operation lists the parts of an archive that have been uploaded in a
  1630. // specific multipart upload. You can make this request at any time during an
  1631. // in-progress multipart upload before you complete the upload (see CompleteMultipartUpload.
  1632. // List Parts returns an error for completed uploads. The list returned in the
  1633. // List Parts response is sorted by part range.
  1634. //
  1635. // The List Parts operation supports pagination. By default, this operation
  1636. // returns up to 1,000 uploaded parts in the response. You should always check
  1637. // the response for a marker at which to continue the list; if there are no
  1638. // more items the marker is null. To return a list of parts that begins at a
  1639. // specific part, set the marker request parameter to the value you obtained
  1640. // from a previous List Parts request. You can also limit the number of parts
  1641. // returned in the response by specifying the limit parameter in the request.
  1642. //
  1643. // An AWS account has full permission to perform all operations (actions).
  1644. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  1645. // by default. You must grant them explicit permission to perform specific actions.
  1646. // For more information, see Access Control Using AWS Identity and Access Management
  1647. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  1648. //
  1649. // For conceptual information and the underlying REST API, go to Working with
  1650. // Archives in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html)
  1651. // and List Parts (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-list-parts.html)
  1652. // in the Amazon Glacier Developer Guide.
  1653. func (c *Glacier) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
  1654. req, out := c.ListPartsRequest(input)
  1655. err := req.Send()
  1656. return out, err
  1657. }
  1658. // ListPartsPages iterates over the pages of a ListParts operation,
  1659. // calling the "fn" function with the response data for each page. To stop
  1660. // iterating, return false from the fn function.
  1661. //
  1662. // See ListParts method for more information on how to use this operation.
  1663. //
  1664. // Note: This operation can generate multiple requests to a service.
  1665. //
  1666. // // Example iterating over at most 3 pages of a ListParts operation.
  1667. // pageNum := 0
  1668. // err := client.ListPartsPages(params,
  1669. // func(page *ListPartsOutput, lastPage bool) bool {
  1670. // pageNum++
  1671. // fmt.Println(page)
  1672. // return pageNum <= 3
  1673. // })
  1674. //
  1675. func (c *Glacier) ListPartsPages(input *ListPartsInput, fn func(p *ListPartsOutput, lastPage bool) (shouldContinue bool)) error {
  1676. page, _ := c.ListPartsRequest(input)
  1677. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1678. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1679. return fn(p.(*ListPartsOutput), lastPage)
  1680. })
  1681. }
  1682. const opListTagsForVault = "ListTagsForVault"
  1683. // ListTagsForVaultRequest generates a "aws/request.Request" representing the
  1684. // client's request for the ListTagsForVault operation. The "output" return
  1685. // value can be used to capture response data after the request's "Send" method
  1686. // is called.
  1687. //
  1688. // Creating a request object using this method should be used when you want to inject
  1689. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1690. // access properties on the request object before or after sending the request. If
  1691. // you just want the service response, call the ListTagsForVault method directly
  1692. // instead.
  1693. //
  1694. // Note: You must call the "Send" method on the returned request object in order
  1695. // to execute the request.
  1696. //
  1697. // // Example sending a request using the ListTagsForVaultRequest method.
  1698. // req, resp := client.ListTagsForVaultRequest(params)
  1699. //
  1700. // err := req.Send()
  1701. // if err == nil { // resp is now filled
  1702. // fmt.Println(resp)
  1703. // }
  1704. //
  1705. func (c *Glacier) ListTagsForVaultRequest(input *ListTagsForVaultInput) (req *request.Request, output *ListTagsForVaultOutput) {
  1706. op := &request.Operation{
  1707. Name: opListTagsForVault,
  1708. HTTPMethod: "GET",
  1709. HTTPPath: "/{accountId}/vaults/{vaultName}/tags",
  1710. }
  1711. if input == nil {
  1712. input = &ListTagsForVaultInput{}
  1713. }
  1714. req = c.newRequest(op, input, output)
  1715. output = &ListTagsForVaultOutput{}
  1716. req.Data = output
  1717. return
  1718. }
  1719. // This operation lists all the tags attached to a vault. The operation returns
  1720. // an empty map if there are no tags. For more information about tags, see Tagging
  1721. // Amazon Glacier Resources (http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html).
  1722. func (c *Glacier) ListTagsForVault(input *ListTagsForVaultInput) (*ListTagsForVaultOutput, error) {
  1723. req, out := c.ListTagsForVaultRequest(input)
  1724. err := req.Send()
  1725. return out, err
  1726. }
  1727. const opListVaults = "ListVaults"
  1728. // ListVaultsRequest generates a "aws/request.Request" representing the
  1729. // client's request for the ListVaults operation. The "output" return
  1730. // value can be used to capture response data after the request's "Send" method
  1731. // is called.
  1732. //
  1733. // Creating a request object using this method should be used when you want to inject
  1734. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1735. // access properties on the request object before or after sending the request. If
  1736. // you just want the service response, call the ListVaults method directly
  1737. // instead.
  1738. //
  1739. // Note: You must call the "Send" method on the returned request object in order
  1740. // to execute the request.
  1741. //
  1742. // // Example sending a request using the ListVaultsRequest method.
  1743. // req, resp := client.ListVaultsRequest(params)
  1744. //
  1745. // err := req.Send()
  1746. // if err == nil { // resp is now filled
  1747. // fmt.Println(resp)
  1748. // }
  1749. //
  1750. func (c *Glacier) ListVaultsRequest(input *ListVaultsInput) (req *request.Request, output *ListVaultsOutput) {
  1751. op := &request.Operation{
  1752. Name: opListVaults,
  1753. HTTPMethod: "GET",
  1754. HTTPPath: "/{accountId}/vaults",
  1755. Paginator: &request.Paginator{
  1756. InputTokens: []string{"marker"},
  1757. OutputTokens: []string{"Marker"},
  1758. LimitToken: "limit",
  1759. TruncationToken: "",
  1760. },
  1761. }
  1762. if input == nil {
  1763. input = &ListVaultsInput{}
  1764. }
  1765. req = c.newRequest(op, input, output)
  1766. output = &ListVaultsOutput{}
  1767. req.Data = output
  1768. return
  1769. }
  1770. // This operation lists all vaults owned by the calling user's account. The
  1771. // list returned in the response is ASCII-sorted by vault name.
  1772. //
  1773. // By default, this operation returns up to 1,000 items. If there are more
  1774. // vaults to list, the response marker field contains the vault Amazon Resource
  1775. // Name (ARN) at which to continue the list with a new List Vaults request;
  1776. // otherwise, the marker field is null. To return a list of vaults that begins
  1777. // at a specific vault, set the marker request parameter to the vault ARN you
  1778. // obtained from a previous List Vaults request. You can also limit the number
  1779. // of vaults returned in the response by specifying the limit parameter in the
  1780. // request.
  1781. //
  1782. // An AWS account has full permission to perform all operations (actions).
  1783. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  1784. // by default. You must grant them explicit permission to perform specific actions.
  1785. // For more information, see Access Control Using AWS Identity and Access Management
  1786. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  1787. //
  1788. // For conceptual information and underlying REST API, go to Retrieving Vault
  1789. // Metadata in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/retrieving-vault-info.html)
  1790. // and List Vaults (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vaults-get.html)
  1791. // in the Amazon Glacier Developer Guide.
  1792. func (c *Glacier) ListVaults(input *ListVaultsInput) (*ListVaultsOutput, error) {
  1793. req, out := c.ListVaultsRequest(input)
  1794. err := req.Send()
  1795. return out, err
  1796. }
  1797. // ListVaultsPages iterates over the pages of a ListVaults operation,
  1798. // calling the "fn" function with the response data for each page. To stop
  1799. // iterating, return false from the fn function.
  1800. //
  1801. // See ListVaults method for more information on how to use this operation.
  1802. //
  1803. // Note: This operation can generate multiple requests to a service.
  1804. //
  1805. // // Example iterating over at most 3 pages of a ListVaults operation.
  1806. // pageNum := 0
  1807. // err := client.ListVaultsPages(params,
  1808. // func(page *ListVaultsOutput, lastPage bool) bool {
  1809. // pageNum++
  1810. // fmt.Println(page)
  1811. // return pageNum <= 3
  1812. // })
  1813. //
  1814. func (c *Glacier) ListVaultsPages(input *ListVaultsInput, fn func(p *ListVaultsOutput, lastPage bool) (shouldContinue bool)) error {
  1815. page, _ := c.ListVaultsRequest(input)
  1816. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1817. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1818. return fn(p.(*ListVaultsOutput), lastPage)
  1819. })
  1820. }
  1821. const opRemoveTagsFromVault = "RemoveTagsFromVault"
  1822. // RemoveTagsFromVaultRequest generates a "aws/request.Request" representing the
  1823. // client's request for the RemoveTagsFromVault operation. The "output" return
  1824. // value can be used to capture response data after the request's "Send" method
  1825. // is called.
  1826. //
  1827. // Creating a request object using this method should be used when you want to inject
  1828. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1829. // access properties on the request object before or after sending the request. If
  1830. // you just want the service response, call the RemoveTagsFromVault method directly
  1831. // instead.
  1832. //
  1833. // Note: You must call the "Send" method on the returned request object in order
  1834. // to execute the request.
  1835. //
  1836. // // Example sending a request using the RemoveTagsFromVaultRequest method.
  1837. // req, resp := client.RemoveTagsFromVaultRequest(params)
  1838. //
  1839. // err := req.Send()
  1840. // if err == nil { // resp is now filled
  1841. // fmt.Println(resp)
  1842. // }
  1843. //
  1844. func (c *Glacier) RemoveTagsFromVaultRequest(input *RemoveTagsFromVaultInput) (req *request.Request, output *RemoveTagsFromVaultOutput) {
  1845. op := &request.Operation{
  1846. Name: opRemoveTagsFromVault,
  1847. HTTPMethod: "POST",
  1848. HTTPPath: "/{accountId}/vaults/{vaultName}/tags?operation=remove",
  1849. }
  1850. if input == nil {
  1851. input = &RemoveTagsFromVaultInput{}
  1852. }
  1853. req = c.newRequest(op, input, output)
  1854. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1855. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1856. output = &RemoveTagsFromVaultOutput{}
  1857. req.Data = output
  1858. return
  1859. }
  1860. // This operation removes one or more tags from the set of tags attached to
  1861. // a vault. For more information about tags, see Tagging Amazon Glacier Resources
  1862. // (http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html). This
  1863. // operation is idempotent. The operation will be successful, even if there
  1864. // are no tags attached to the vault.
  1865. func (c *Glacier) RemoveTagsFromVault(input *RemoveTagsFromVaultInput) (*RemoveTagsFromVaultOutput, error) {
  1866. req, out := c.RemoveTagsFromVaultRequest(input)
  1867. err := req.Send()
  1868. return out, err
  1869. }
  1870. const opSetDataRetrievalPolicy = "SetDataRetrievalPolicy"
  1871. // SetDataRetrievalPolicyRequest generates a "aws/request.Request" representing the
  1872. // client's request for the SetDataRetrievalPolicy operation. The "output" return
  1873. // value can be used to capture response data after the request's "Send" method
  1874. // is called.
  1875. //
  1876. // Creating a request object using this method should be used when you want to inject
  1877. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1878. // access properties on the request object before or after sending the request. If
  1879. // you just want the service response, call the SetDataRetrievalPolicy method directly
  1880. // instead.
  1881. //
  1882. // Note: You must call the "Send" method on the returned request object in order
  1883. // to execute the request.
  1884. //
  1885. // // Example sending a request using the SetDataRetrievalPolicyRequest method.
  1886. // req, resp := client.SetDataRetrievalPolicyRequest(params)
  1887. //
  1888. // err := req.Send()
  1889. // if err == nil { // resp is now filled
  1890. // fmt.Println(resp)
  1891. // }
  1892. //
  1893. func (c *Glacier) SetDataRetrievalPolicyRequest(input *SetDataRetrievalPolicyInput) (req *request.Request, output *SetDataRetrievalPolicyOutput) {
  1894. op := &request.Operation{
  1895. Name: opSetDataRetrievalPolicy,
  1896. HTTPMethod: "PUT",
  1897. HTTPPath: "/{accountId}/policies/data-retrieval",
  1898. }
  1899. if input == nil {
  1900. input = &SetDataRetrievalPolicyInput{}
  1901. }
  1902. req = c.newRequest(op, input, output)
  1903. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1904. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1905. output = &SetDataRetrievalPolicyOutput{}
  1906. req.Data = output
  1907. return
  1908. }
  1909. // This operation sets and then enacts a data retrieval policy in the region
  1910. // specified in the PUT request. You can set one policy per region for an AWS
  1911. // account. The policy is enacted within a few minutes of a successful PUT operation.
  1912. //
  1913. // The set policy operation does not affect retrieval jobs that were in progress
  1914. // before the policy was enacted. For more information about data retrieval
  1915. // policies, see Amazon Glacier Data Retrieval Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/data-retrieval-policy.html).
  1916. func (c *Glacier) SetDataRetrievalPolicy(input *SetDataRetrievalPolicyInput) (*SetDataRetrievalPolicyOutput, error) {
  1917. req, out := c.SetDataRetrievalPolicyRequest(input)
  1918. err := req.Send()
  1919. return out, err
  1920. }
  1921. const opSetVaultAccessPolicy = "SetVaultAccessPolicy"
  1922. // SetVaultAccessPolicyRequest generates a "aws/request.Request" representing the
  1923. // client's request for the SetVaultAccessPolicy operation. The "output" return
  1924. // value can be used to capture response data after the request's "Send" method
  1925. // is called.
  1926. //
  1927. // Creating a request object using this method should be used when you want to inject
  1928. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1929. // access properties on the request object before or after sending the request. If
  1930. // you just want the service response, call the SetVaultAccessPolicy method directly
  1931. // instead.
  1932. //
  1933. // Note: You must call the "Send" method on the returned request object in order
  1934. // to execute the request.
  1935. //
  1936. // // Example sending a request using the SetVaultAccessPolicyRequest method.
  1937. // req, resp := client.SetVaultAccessPolicyRequest(params)
  1938. //
  1939. // err := req.Send()
  1940. // if err == nil { // resp is now filled
  1941. // fmt.Println(resp)
  1942. // }
  1943. //
  1944. func (c *Glacier) SetVaultAccessPolicyRequest(input *SetVaultAccessPolicyInput) (req *request.Request, output *SetVaultAccessPolicyOutput) {
  1945. op := &request.Operation{
  1946. Name: opSetVaultAccessPolicy,
  1947. HTTPMethod: "PUT",
  1948. HTTPPath: "/{accountId}/vaults/{vaultName}/access-policy",
  1949. }
  1950. if input == nil {
  1951. input = &SetVaultAccessPolicyInput{}
  1952. }
  1953. req = c.newRequest(op, input, output)
  1954. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1955. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1956. output = &SetVaultAccessPolicyOutput{}
  1957. req.Data = output
  1958. return
  1959. }
  1960. // This operation configures an access policy for a vault and will overwrite
  1961. // an existing policy. To configure a vault access policy, send a PUT request
  1962. // to the access-policy subresource of the vault. An access policy is specific
  1963. // to a vault and is also called a vault subresource. You can set one access
  1964. // policy per vault and the policy can be up to 20 KB in size. For more information
  1965. // about vault access policies, see Amazon Glacier Access Control with Vault
  1966. // Access Policies (http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html).
  1967. func (c *Glacier) SetVaultAccessPolicy(input *SetVaultAccessPolicyInput) (*SetVaultAccessPolicyOutput, error) {
  1968. req, out := c.SetVaultAccessPolicyRequest(input)
  1969. err := req.Send()
  1970. return out, err
  1971. }
  1972. const opSetVaultNotifications = "SetVaultNotifications"
  1973. // SetVaultNotificationsRequest generates a "aws/request.Request" representing the
  1974. // client's request for the SetVaultNotifications operation. The "output" return
  1975. // value can be used to capture response data after the request's "Send" method
  1976. // is called.
  1977. //
  1978. // Creating a request object using this method should be used when you want to inject
  1979. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1980. // access properties on the request object before or after sending the request. If
  1981. // you just want the service response, call the SetVaultNotifications method directly
  1982. // instead.
  1983. //
  1984. // Note: You must call the "Send" method on the returned request object in order
  1985. // to execute the request.
  1986. //
  1987. // // Example sending a request using the SetVaultNotificationsRequest method.
  1988. // req, resp := client.SetVaultNotificationsRequest(params)
  1989. //
  1990. // err := req.Send()
  1991. // if err == nil { // resp is now filled
  1992. // fmt.Println(resp)
  1993. // }
  1994. //
  1995. func (c *Glacier) SetVaultNotificationsRequest(input *SetVaultNotificationsInput) (req *request.Request, output *SetVaultNotificationsOutput) {
  1996. op := &request.Operation{
  1997. Name: opSetVaultNotifications,
  1998. HTTPMethod: "PUT",
  1999. HTTPPath: "/{accountId}/vaults/{vaultName}/notification-configuration",
  2000. }
  2001. if input == nil {
  2002. input = &SetVaultNotificationsInput{}
  2003. }
  2004. req = c.newRequest(op, input, output)
  2005. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  2006. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2007. output = &SetVaultNotificationsOutput{}
  2008. req.Data = output
  2009. return
  2010. }
  2011. // This operation configures notifications that will be sent when specific events
  2012. // happen to a vault. By default, you don't get any notifications.
  2013. //
  2014. // To configure vault notifications, send a PUT request to the notification-configuration
  2015. // subresource of the vault. The request should include a JSON document that
  2016. // provides an Amazon SNS topic and specific events for which you want Amazon
  2017. // Glacier to send notifications to the topic.
  2018. //
  2019. // Amazon SNS topics must grant permission to the vault to be allowed to publish
  2020. // notifications to the topic. You can configure a vault to publish a notification
  2021. // for the following vault events:
  2022. //
  2023. // ArchiveRetrievalCompleted This event occurs when a job that was initiated
  2024. // for an archive retrieval is completed (InitiateJob). The status of the completed
  2025. // job can be "Succeeded" or "Failed". The notification sent to the SNS topic
  2026. // is the same output as returned from DescribeJob. InventoryRetrievalCompleted
  2027. // This event occurs when a job that was initiated for an inventory retrieval
  2028. // is completed (InitiateJob). The status of the completed job can be "Succeeded"
  2029. // or "Failed". The notification sent to the SNS topic is the same output as
  2030. // returned from DescribeJob. An AWS account has full permission to perform
  2031. // all operations (actions). However, AWS Identity and Access Management (IAM)
  2032. // users don't have any permissions by default. You must grant them explicit
  2033. // permission to perform specific actions. For more information, see Access
  2034. // Control Using AWS Identity and Access Management (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  2035. //
  2036. // For conceptual information and underlying REST API, go to Configuring Vault
  2037. // Notifications in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html)
  2038. // and Set Vault Notification Configuration (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-put.html)
  2039. // in the Amazon Glacier Developer Guide.
  2040. func (c *Glacier) SetVaultNotifications(input *SetVaultNotificationsInput) (*SetVaultNotificationsOutput, error) {
  2041. req, out := c.SetVaultNotificationsRequest(input)
  2042. err := req.Send()
  2043. return out, err
  2044. }
  2045. const opUploadArchive = "UploadArchive"
  2046. // UploadArchiveRequest generates a "aws/request.Request" representing the
  2047. // client's request for the UploadArchive operation. The "output" return
  2048. // value can be used to capture response data after the request's "Send" method
  2049. // is called.
  2050. //
  2051. // Creating a request object using this method should be used when you want to inject
  2052. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2053. // access properties on the request object before or after sending the request. If
  2054. // you just want the service response, call the UploadArchive method directly
  2055. // instead.
  2056. //
  2057. // Note: You must call the "Send" method on the returned request object in order
  2058. // to execute the request.
  2059. //
  2060. // // Example sending a request using the UploadArchiveRequest method.
  2061. // req, resp := client.UploadArchiveRequest(params)
  2062. //
  2063. // err := req.Send()
  2064. // if err == nil { // resp is now filled
  2065. // fmt.Println(resp)
  2066. // }
  2067. //
  2068. func (c *Glacier) UploadArchiveRequest(input *UploadArchiveInput) (req *request.Request, output *ArchiveCreationOutput) {
  2069. op := &request.Operation{
  2070. Name: opUploadArchive,
  2071. HTTPMethod: "POST",
  2072. HTTPPath: "/{accountId}/vaults/{vaultName}/archives",
  2073. }
  2074. if input == nil {
  2075. input = &UploadArchiveInput{}
  2076. }
  2077. req = c.newRequest(op, input, output)
  2078. output = &ArchiveCreationOutput{}
  2079. req.Data = output
  2080. return
  2081. }
  2082. // This operation adds an archive to a vault. This is a synchronous operation,
  2083. // and for a successful upload, your data is durably persisted. Amazon Glacier
  2084. // returns the archive ID in the x-amz-archive-id header of the response.
  2085. //
  2086. // You must use the archive ID to access your data in Amazon Glacier. After
  2087. // you upload an archive, you should save the archive ID returned so that you
  2088. // can retrieve or delete the archive later. Besides saving the archive ID,
  2089. // you can also index it and give it a friendly name to allow for better searching.
  2090. // You can also use the optional archive description field to specify how the
  2091. // archive is referred to in an external index of archives, such as you might
  2092. // create in Amazon DynamoDB. You can also get the vault inventory to obtain
  2093. // a list of archive IDs in a vault. For more information, see InitiateJob.
  2094. //
  2095. // You must provide a SHA256 tree hash of the data you are uploading. For information
  2096. // about computing a SHA256 tree hash, see Computing Checksums (http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html).
  2097. //
  2098. // You can optionally specify an archive description of up to 1,024 printable
  2099. // ASCII characters. You can get the archive description when you either retrieve
  2100. // the archive or get the vault inventory. For more information, see InitiateJob.
  2101. // Amazon Glacier does not interpret the description in any way. An archive
  2102. // description does not need to be unique. You cannot use the description to
  2103. // retrieve or sort the archive list.
  2104. //
  2105. // Archives are immutable. After you upload an archive, you cannot edit the
  2106. // archive or its description.
  2107. //
  2108. // An AWS account has full permission to perform all operations (actions).
  2109. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  2110. // by default. You must grant them explicit permission to perform specific actions.
  2111. // For more information, see Access Control Using AWS Identity and Access Management
  2112. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  2113. //
  2114. // For conceptual information and underlying REST API, go to Uploading an
  2115. // Archive in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-an-archive.html)
  2116. // and Upload Archive (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-post.html)
  2117. // in the Amazon Glacier Developer Guide.
  2118. func (c *Glacier) UploadArchive(input *UploadArchiveInput) (*ArchiveCreationOutput, error) {
  2119. req, out := c.UploadArchiveRequest(input)
  2120. err := req.Send()
  2121. return out, err
  2122. }
  2123. const opUploadMultipartPart = "UploadMultipartPart"
  2124. // UploadMultipartPartRequest generates a "aws/request.Request" representing the
  2125. // client's request for the UploadMultipartPart operation. The "output" return
  2126. // value can be used to capture response data after the request's "Send" method
  2127. // is called.
  2128. //
  2129. // Creating a request object using this method should be used when you want to inject
  2130. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2131. // access properties on the request object before or after sending the request. If
  2132. // you just want the service response, call the UploadMultipartPart method directly
  2133. // instead.
  2134. //
  2135. // Note: You must call the "Send" method on the returned request object in order
  2136. // to execute the request.
  2137. //
  2138. // // Example sending a request using the UploadMultipartPartRequest method.
  2139. // req, resp := client.UploadMultipartPartRequest(params)
  2140. //
  2141. // err := req.Send()
  2142. // if err == nil { // resp is now filled
  2143. // fmt.Println(resp)
  2144. // }
  2145. //
  2146. func (c *Glacier) UploadMultipartPartRequest(input *UploadMultipartPartInput) (req *request.Request, output *UploadMultipartPartOutput) {
  2147. op := &request.Operation{
  2148. Name: opUploadMultipartPart,
  2149. HTTPMethod: "PUT",
  2150. HTTPPath: "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}",
  2151. }
  2152. if input == nil {
  2153. input = &UploadMultipartPartInput{}
  2154. }
  2155. req = c.newRequest(op, input, output)
  2156. output = &UploadMultipartPartOutput{}
  2157. req.Data = output
  2158. return
  2159. }
  2160. // This operation uploads a part of an archive. You can upload archive parts
  2161. // in any order. You can also upload them in parallel. You can upload up to
  2162. // 10,000 parts for a multipart upload.
  2163. //
  2164. // Amazon Glacier rejects your upload part request if any of the following
  2165. // conditions is true:
  2166. //
  2167. // SHA256 tree hash does not matchTo ensure that part data is not corrupted
  2168. // in transmission, you compute a SHA256 tree hash of the part and include it
  2169. // in your request. Upon receiving the part data, Amazon Glacier also computes
  2170. // a SHA256 tree hash. If these hash values don't match, the operation fails.
  2171. // For information about computing a SHA256 tree hash, see Computing Checksums
  2172. // (http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html).
  2173. //
  2174. // Part size does not matchThe size of each part except the last must match
  2175. // the size specified in the corresponding InitiateMultipartUpload request.
  2176. // The size of the last part must be the same size as, or smaller than, the
  2177. // specified size.
  2178. //
  2179. // If you upload a part whose size is smaller than the part size you specified
  2180. // in your initiate multipart upload request and that part is not the last part,
  2181. // then the upload part request will succeed. However, the subsequent Complete
  2182. // Multipart Upload request will fail.
  2183. //
  2184. // Range does not alignThe byte range value in the request does not align
  2185. // with the part size specified in the corresponding initiate request. For example,
  2186. // if you specify a part size of 4194304 bytes (4 MB), then 0 to 4194303 bytes
  2187. // (4 MB - 1) and 4194304 (4 MB) to 8388607 (8 MB - 1) are valid part ranges.
  2188. // However, if you set a range value of 2 MB to 6 MB, the range does not align
  2189. // with the part size and the upload will fail. This operation is idempotent.
  2190. // If you upload the same part multiple times, the data included in the most
  2191. // recent request overwrites the previously uploaded data.
  2192. //
  2193. // An AWS account has full permission to perform all operations (actions).
  2194. // However, AWS Identity and Access Management (IAM) users don't have any permissions
  2195. // by default. You must grant them explicit permission to perform specific actions.
  2196. // For more information, see Access Control Using AWS Identity and Access Management
  2197. // (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html).
  2198. //
  2199. // For conceptual information and underlying REST API, go to Uploading Large
  2200. // Archives in Parts (Multipart Upload) (http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html)
  2201. // and Upload Part (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-upload-part.html)
  2202. // in the Amazon Glacier Developer Guide.
  2203. func (c *Glacier) UploadMultipartPart(input *UploadMultipartPartInput) (*UploadMultipartPartOutput, error) {
  2204. req, out := c.UploadMultipartPartRequest(input)
  2205. err := req.Send()
  2206. return out, err
  2207. }
  2208. // Provides options to abort a multipart upload identified by the upload ID.
  2209. //
  2210. // For information about the underlying REST API, go to Abort Multipart Upload
  2211. // (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-abort-upload.html).
  2212. // For conceptual information, go to Working with Archives in Amazon Glacier
  2213. // (http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html).
  2214. type AbortMultipartUploadInput struct {
  2215. _ struct{} `type:"structure"`
  2216. // The AccountId value is the AWS account ID of the account that owns the vault.
  2217. // You can either specify an AWS account ID or optionally a single apos-apos
  2218. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  2219. // with the credentials used to sign the request. If you use an account ID,
  2220. // do not include any hyphens (apos-apos) in the ID.
  2221. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2222. // The upload ID of the multipart upload to delete.
  2223. UploadId *string `location:"uri" locationName:"uploadId" type:"string" required:"true"`
  2224. // The name of the vault.
  2225. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  2226. }
  2227. // String returns the string representation
  2228. func (s AbortMultipartUploadInput) String() string {
  2229. return awsutil.Prettify(s)
  2230. }
  2231. // GoString returns the string representation
  2232. func (s AbortMultipartUploadInput) GoString() string {
  2233. return s.String()
  2234. }
  2235. // Validate inspects the fields of the type to determine if they are valid.
  2236. func (s *AbortMultipartUploadInput) Validate() error {
  2237. invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"}
  2238. if s.AccountId == nil {
  2239. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2240. }
  2241. if s.UploadId == nil {
  2242. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  2243. }
  2244. if s.VaultName == nil {
  2245. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  2246. }
  2247. if invalidParams.Len() > 0 {
  2248. return invalidParams
  2249. }
  2250. return nil
  2251. }
  2252. type AbortMultipartUploadOutput struct {
  2253. _ struct{} `type:"structure"`
  2254. }
  2255. // String returns the string representation
  2256. func (s AbortMultipartUploadOutput) String() string {
  2257. return awsutil.Prettify(s)
  2258. }
  2259. // GoString returns the string representation
  2260. func (s AbortMultipartUploadOutput) GoString() string {
  2261. return s.String()
  2262. }
  2263. // The input values for AbortVaultLock.
  2264. type AbortVaultLockInput struct {
  2265. _ struct{} `type:"structure"`
  2266. // The AccountId value is the AWS account ID. This value must match the AWS
  2267. // account ID associated with the credentials used to sign the request. You
  2268. // can either specify an AWS account ID or optionally a single apos-apos (hyphen),
  2269. // in which case Amazon Glacier uses the AWS account ID associated with the
  2270. // credentials used to sign the request. If you specify your account ID, do
  2271. // not include any hyphens (apos-apos) in the ID.
  2272. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2273. // The name of the vault.
  2274. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  2275. }
  2276. // String returns the string representation
  2277. func (s AbortVaultLockInput) String() string {
  2278. return awsutil.Prettify(s)
  2279. }
  2280. // GoString returns the string representation
  2281. func (s AbortVaultLockInput) GoString() string {
  2282. return s.String()
  2283. }
  2284. // Validate inspects the fields of the type to determine if they are valid.
  2285. func (s *AbortVaultLockInput) Validate() error {
  2286. invalidParams := request.ErrInvalidParams{Context: "AbortVaultLockInput"}
  2287. if s.AccountId == nil {
  2288. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2289. }
  2290. if s.VaultName == nil {
  2291. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  2292. }
  2293. if invalidParams.Len() > 0 {
  2294. return invalidParams
  2295. }
  2296. return nil
  2297. }
  2298. type AbortVaultLockOutput struct {
  2299. _ struct{} `type:"structure"`
  2300. }
  2301. // String returns the string representation
  2302. func (s AbortVaultLockOutput) String() string {
  2303. return awsutil.Prettify(s)
  2304. }
  2305. // GoString returns the string representation
  2306. func (s AbortVaultLockOutput) GoString() string {
  2307. return s.String()
  2308. }
  2309. // The input values for AddTagsToVault.
  2310. type AddTagsToVaultInput struct {
  2311. _ struct{} `type:"structure"`
  2312. // The AccountId value is the AWS account ID of the account that owns the vault.
  2313. // You can either specify an AWS account ID or optionally a single apos-apos
  2314. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  2315. // with the credentials used to sign the request. If you use an account ID,
  2316. // do not include any hyphens (apos-apos) in the ID.
  2317. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2318. // The tags to add to the vault. Each tag is composed of a key and a value.
  2319. // The value can be an empty string.
  2320. Tags map[string]*string `type:"map"`
  2321. // The name of the vault.
  2322. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  2323. }
  2324. // String returns the string representation
  2325. func (s AddTagsToVaultInput) String() string {
  2326. return awsutil.Prettify(s)
  2327. }
  2328. // GoString returns the string representation
  2329. func (s AddTagsToVaultInput) GoString() string {
  2330. return s.String()
  2331. }
  2332. // Validate inspects the fields of the type to determine if they are valid.
  2333. func (s *AddTagsToVaultInput) Validate() error {
  2334. invalidParams := request.ErrInvalidParams{Context: "AddTagsToVaultInput"}
  2335. if s.AccountId == nil {
  2336. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2337. }
  2338. if s.VaultName == nil {
  2339. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  2340. }
  2341. if invalidParams.Len() > 0 {
  2342. return invalidParams
  2343. }
  2344. return nil
  2345. }
  2346. type AddTagsToVaultOutput struct {
  2347. _ struct{} `type:"structure"`
  2348. }
  2349. // String returns the string representation
  2350. func (s AddTagsToVaultOutput) String() string {
  2351. return awsutil.Prettify(s)
  2352. }
  2353. // GoString returns the string representation
  2354. func (s AddTagsToVaultOutput) GoString() string {
  2355. return s.String()
  2356. }
  2357. // Contains the Amazon Glacier response to your request.
  2358. //
  2359. // For information about the underlying REST API, go to Upload Archive (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-post.html).
  2360. // For conceptual information, go to Working with Archives in Amazon Glacier
  2361. // (http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html).
  2362. type ArchiveCreationOutput struct {
  2363. _ struct{} `type:"structure"`
  2364. // The ID of the archive. This value is also included as part of the location.
  2365. ArchiveId *string `location:"header" locationName:"x-amz-archive-id" type:"string"`
  2366. // The checksum of the archive computed by Amazon Glacier.
  2367. Checksum *string `location:"header" locationName:"x-amz-sha256-tree-hash" type:"string"`
  2368. // The relative URI path of the newly added archive resource.
  2369. Location *string `location:"header" locationName:"Location" type:"string"`
  2370. }
  2371. // String returns the string representation
  2372. func (s ArchiveCreationOutput) String() string {
  2373. return awsutil.Prettify(s)
  2374. }
  2375. // GoString returns the string representation
  2376. func (s ArchiveCreationOutput) GoString() string {
  2377. return s.String()
  2378. }
  2379. // Provides options to complete a multipart upload operation. This informs Amazon
  2380. // Glacier that all the archive parts have been uploaded and Amazon Glacier
  2381. // can now assemble the archive from the uploaded parts. After assembling and
  2382. // saving the archive to the vault, Amazon Glacier returns the URI path of the
  2383. // newly created archive resource.
  2384. type CompleteMultipartUploadInput struct {
  2385. _ struct{} `type:"structure"`
  2386. // The AccountId value is the AWS account ID of the account that owns the vault.
  2387. // You can either specify an AWS account ID or optionally a single apos-apos
  2388. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  2389. // with the credentials used to sign the request. If you use an account ID,
  2390. // do not include any hyphens (apos-apos) in the ID.
  2391. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2392. // The total size, in bytes, of the entire archive. This value should be the
  2393. // sum of all the sizes of the individual parts that you uploaded.
  2394. ArchiveSize *string `location:"header" locationName:"x-amz-archive-size" type:"string"`
  2395. // The SHA256 tree hash of the entire archive. It is the tree hash of SHA256
  2396. // tree hash of the individual parts. If the value you specify in the request
  2397. // does not match the SHA256 tree hash of the final assembled archive as computed
  2398. // by Amazon Glacier, Amazon Glacier returns an error and the request fails.
  2399. Checksum *string `location:"header" locationName:"x-amz-sha256-tree-hash" type:"string"`
  2400. // The upload ID of the multipart upload.
  2401. UploadId *string `location:"uri" locationName:"uploadId" type:"string" required:"true"`
  2402. // The name of the vault.
  2403. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  2404. }
  2405. // String returns the string representation
  2406. func (s CompleteMultipartUploadInput) String() string {
  2407. return awsutil.Prettify(s)
  2408. }
  2409. // GoString returns the string representation
  2410. func (s CompleteMultipartUploadInput) GoString() string {
  2411. return s.String()
  2412. }
  2413. // Validate inspects the fields of the type to determine if they are valid.
  2414. func (s *CompleteMultipartUploadInput) Validate() error {
  2415. invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"}
  2416. if s.AccountId == nil {
  2417. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2418. }
  2419. if s.UploadId == nil {
  2420. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  2421. }
  2422. if s.VaultName == nil {
  2423. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  2424. }
  2425. if invalidParams.Len() > 0 {
  2426. return invalidParams
  2427. }
  2428. return nil
  2429. }
  2430. // The input values for CompleteVaultLock.
  2431. type CompleteVaultLockInput struct {
  2432. _ struct{} `type:"structure"`
  2433. // The AccountId value is the AWS account ID. This value must match the AWS
  2434. // account ID associated with the credentials used to sign the request. You
  2435. // can either specify an AWS account ID or optionally a single apos-apos (hyphen),
  2436. // in which case Amazon Glacier uses the AWS account ID associated with the
  2437. // credentials used to sign the request. If you specify your account ID, do
  2438. // not include any hyphens (apos-apos) in the ID.
  2439. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2440. // The lockId value is the lock ID obtained from a InitiateVaultLock request.
  2441. LockId *string `location:"uri" locationName:"lockId" type:"string" required:"true"`
  2442. // The name of the vault.
  2443. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  2444. }
  2445. // String returns the string representation
  2446. func (s CompleteVaultLockInput) String() string {
  2447. return awsutil.Prettify(s)
  2448. }
  2449. // GoString returns the string representation
  2450. func (s CompleteVaultLockInput) GoString() string {
  2451. return s.String()
  2452. }
  2453. // Validate inspects the fields of the type to determine if they are valid.
  2454. func (s *CompleteVaultLockInput) Validate() error {
  2455. invalidParams := request.ErrInvalidParams{Context: "CompleteVaultLockInput"}
  2456. if s.AccountId == nil {
  2457. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2458. }
  2459. if s.LockId == nil {
  2460. invalidParams.Add(request.NewErrParamRequired("LockId"))
  2461. }
  2462. if s.VaultName == nil {
  2463. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  2464. }
  2465. if invalidParams.Len() > 0 {
  2466. return invalidParams
  2467. }
  2468. return nil
  2469. }
  2470. type CompleteVaultLockOutput struct {
  2471. _ struct{} `type:"structure"`
  2472. }
  2473. // String returns the string representation
  2474. func (s CompleteVaultLockOutput) String() string {
  2475. return awsutil.Prettify(s)
  2476. }
  2477. // GoString returns the string representation
  2478. func (s CompleteVaultLockOutput) GoString() string {
  2479. return s.String()
  2480. }
  2481. // Provides options to create a vault.
  2482. type CreateVaultInput struct {
  2483. _ struct{} `type:"structure"`
  2484. // The AccountId value is the AWS account ID. This value must match the AWS
  2485. // account ID associated with the credentials used to sign the request. You
  2486. // can either specify an AWS account ID or optionally a single apos-apos (hyphen),
  2487. // in which case Amazon Glacier uses the AWS account ID associated with the
  2488. // credentials used to sign the request. If you specify your account ID, do
  2489. // not include any hyphens (apos-apos) in the ID.
  2490. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2491. // The name of the vault.
  2492. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  2493. }
  2494. // String returns the string representation
  2495. func (s CreateVaultInput) String() string {
  2496. return awsutil.Prettify(s)
  2497. }
  2498. // GoString returns the string representation
  2499. func (s CreateVaultInput) GoString() string {
  2500. return s.String()
  2501. }
  2502. // Validate inspects the fields of the type to determine if they are valid.
  2503. func (s *CreateVaultInput) Validate() error {
  2504. invalidParams := request.ErrInvalidParams{Context: "CreateVaultInput"}
  2505. if s.AccountId == nil {
  2506. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2507. }
  2508. if s.VaultName == nil {
  2509. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  2510. }
  2511. if invalidParams.Len() > 0 {
  2512. return invalidParams
  2513. }
  2514. return nil
  2515. }
  2516. // Contains the Amazon Glacier response to your request.
  2517. type CreateVaultOutput struct {
  2518. _ struct{} `type:"structure"`
  2519. // The URI of the vault that was created.
  2520. Location *string `location:"header" locationName:"Location" type:"string"`
  2521. }
  2522. // String returns the string representation
  2523. func (s CreateVaultOutput) String() string {
  2524. return awsutil.Prettify(s)
  2525. }
  2526. // GoString returns the string representation
  2527. func (s CreateVaultOutput) GoString() string {
  2528. return s.String()
  2529. }
  2530. // Data retrieval policy.
  2531. type DataRetrievalPolicy struct {
  2532. _ struct{} `type:"structure"`
  2533. // The policy rule. Although this is a list type, currently there must be only
  2534. // one rule, which contains a Strategy field and optionally a BytesPerHour field.
  2535. Rules []*DataRetrievalRule `type:"list"`
  2536. }
  2537. // String returns the string representation
  2538. func (s DataRetrievalPolicy) String() string {
  2539. return awsutil.Prettify(s)
  2540. }
  2541. // GoString returns the string representation
  2542. func (s DataRetrievalPolicy) GoString() string {
  2543. return s.String()
  2544. }
  2545. // Data retrieval policy rule.
  2546. type DataRetrievalRule struct {
  2547. _ struct{} `type:"structure"`
  2548. // The maximum number of bytes that can be retrieved in an hour.
  2549. //
  2550. // This field is required only if the value of the Strategy field is BytesPerHour.
  2551. // Your PUT operation will be rejected if the Strategy field is not set to BytesPerHour
  2552. // and you set this field.
  2553. BytesPerHour *int64 `type:"long"`
  2554. // The type of data retrieval policy to set.
  2555. //
  2556. // Valid values: BytesPerHour|FreeTier|None
  2557. Strategy *string `type:"string"`
  2558. }
  2559. // String returns the string representation
  2560. func (s DataRetrievalRule) String() string {
  2561. return awsutil.Prettify(s)
  2562. }
  2563. // GoString returns the string representation
  2564. func (s DataRetrievalRule) GoString() string {
  2565. return s.String()
  2566. }
  2567. // Provides options for deleting an archive from an Amazon Glacier vault.
  2568. type DeleteArchiveInput struct {
  2569. _ struct{} `type:"structure"`
  2570. // The AccountId value is the AWS account ID of the account that owns the vault.
  2571. // You can either specify an AWS account ID or optionally a single apos-apos
  2572. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  2573. // with the credentials used to sign the request. If you use an account ID,
  2574. // do not include any hyphens (apos-apos) in the ID.
  2575. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2576. // The ID of the archive to delete.
  2577. ArchiveId *string `location:"uri" locationName:"archiveId" type:"string" required:"true"`
  2578. // The name of the vault.
  2579. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  2580. }
  2581. // String returns the string representation
  2582. func (s DeleteArchiveInput) String() string {
  2583. return awsutil.Prettify(s)
  2584. }
  2585. // GoString returns the string representation
  2586. func (s DeleteArchiveInput) GoString() string {
  2587. return s.String()
  2588. }
  2589. // Validate inspects the fields of the type to determine if they are valid.
  2590. func (s *DeleteArchiveInput) Validate() error {
  2591. invalidParams := request.ErrInvalidParams{Context: "DeleteArchiveInput"}
  2592. if s.AccountId == nil {
  2593. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2594. }
  2595. if s.ArchiveId == nil {
  2596. invalidParams.Add(request.NewErrParamRequired("ArchiveId"))
  2597. }
  2598. if s.VaultName == nil {
  2599. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  2600. }
  2601. if invalidParams.Len() > 0 {
  2602. return invalidParams
  2603. }
  2604. return nil
  2605. }
  2606. type DeleteArchiveOutput struct {
  2607. _ struct{} `type:"structure"`
  2608. }
  2609. // String returns the string representation
  2610. func (s DeleteArchiveOutput) String() string {
  2611. return awsutil.Prettify(s)
  2612. }
  2613. // GoString returns the string representation
  2614. func (s DeleteArchiveOutput) GoString() string {
  2615. return s.String()
  2616. }
  2617. // DeleteVaultAccessPolicy input.
  2618. type DeleteVaultAccessPolicyInput struct {
  2619. _ struct{} `type:"structure"`
  2620. // The AccountId value is the AWS account ID of the account that owns the vault.
  2621. // You can either specify an AWS account ID or optionally a single apos-apos
  2622. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  2623. // with the credentials used to sign the request. If you use an account ID,
  2624. // do not include any hyphens (apos-apos) in the ID.
  2625. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2626. // The name of the vault.
  2627. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  2628. }
  2629. // String returns the string representation
  2630. func (s DeleteVaultAccessPolicyInput) String() string {
  2631. return awsutil.Prettify(s)
  2632. }
  2633. // GoString returns the string representation
  2634. func (s DeleteVaultAccessPolicyInput) GoString() string {
  2635. return s.String()
  2636. }
  2637. // Validate inspects the fields of the type to determine if they are valid.
  2638. func (s *DeleteVaultAccessPolicyInput) Validate() error {
  2639. invalidParams := request.ErrInvalidParams{Context: "DeleteVaultAccessPolicyInput"}
  2640. if s.AccountId == nil {
  2641. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2642. }
  2643. if s.VaultName == nil {
  2644. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  2645. }
  2646. if invalidParams.Len() > 0 {
  2647. return invalidParams
  2648. }
  2649. return nil
  2650. }
  2651. type DeleteVaultAccessPolicyOutput struct {
  2652. _ struct{} `type:"structure"`
  2653. }
  2654. // String returns the string representation
  2655. func (s DeleteVaultAccessPolicyOutput) String() string {
  2656. return awsutil.Prettify(s)
  2657. }
  2658. // GoString returns the string representation
  2659. func (s DeleteVaultAccessPolicyOutput) GoString() string {
  2660. return s.String()
  2661. }
  2662. // Provides options for deleting a vault from Amazon Glacier.
  2663. type DeleteVaultInput struct {
  2664. _ struct{} `type:"structure"`
  2665. // The AccountId value is the AWS account ID of the account that owns the vault.
  2666. // You can either specify an AWS account ID or optionally a single apos-apos
  2667. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  2668. // with the credentials used to sign the request. If you use an account ID,
  2669. // do not include any hyphens (apos-apos) in the ID.
  2670. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2671. // The name of the vault.
  2672. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  2673. }
  2674. // String returns the string representation
  2675. func (s DeleteVaultInput) String() string {
  2676. return awsutil.Prettify(s)
  2677. }
  2678. // GoString returns the string representation
  2679. func (s DeleteVaultInput) GoString() string {
  2680. return s.String()
  2681. }
  2682. // Validate inspects the fields of the type to determine if they are valid.
  2683. func (s *DeleteVaultInput) Validate() error {
  2684. invalidParams := request.ErrInvalidParams{Context: "DeleteVaultInput"}
  2685. if s.AccountId == nil {
  2686. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2687. }
  2688. if s.VaultName == nil {
  2689. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  2690. }
  2691. if invalidParams.Len() > 0 {
  2692. return invalidParams
  2693. }
  2694. return nil
  2695. }
  2696. // Provides options for deleting a vault notification configuration from an
  2697. // Amazon Glacier vault.
  2698. type DeleteVaultNotificationsInput struct {
  2699. _ struct{} `type:"structure"`
  2700. // The AccountId value is the AWS account ID of the account that owns the vault.
  2701. // You can either specify an AWS account ID or optionally a single apos-apos
  2702. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  2703. // with the credentials used to sign the request. If you use an account ID,
  2704. // do not include any hyphens (apos-apos) in the ID.
  2705. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2706. // The name of the vault.
  2707. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  2708. }
  2709. // String returns the string representation
  2710. func (s DeleteVaultNotificationsInput) String() string {
  2711. return awsutil.Prettify(s)
  2712. }
  2713. // GoString returns the string representation
  2714. func (s DeleteVaultNotificationsInput) GoString() string {
  2715. return s.String()
  2716. }
  2717. // Validate inspects the fields of the type to determine if they are valid.
  2718. func (s *DeleteVaultNotificationsInput) Validate() error {
  2719. invalidParams := request.ErrInvalidParams{Context: "DeleteVaultNotificationsInput"}
  2720. if s.AccountId == nil {
  2721. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2722. }
  2723. if s.VaultName == nil {
  2724. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  2725. }
  2726. if invalidParams.Len() > 0 {
  2727. return invalidParams
  2728. }
  2729. return nil
  2730. }
  2731. type DeleteVaultNotificationsOutput struct {
  2732. _ struct{} `type:"structure"`
  2733. }
  2734. // String returns the string representation
  2735. func (s DeleteVaultNotificationsOutput) String() string {
  2736. return awsutil.Prettify(s)
  2737. }
  2738. // GoString returns the string representation
  2739. func (s DeleteVaultNotificationsOutput) GoString() string {
  2740. return s.String()
  2741. }
  2742. type DeleteVaultOutput struct {
  2743. _ struct{} `type:"structure"`
  2744. }
  2745. // String returns the string representation
  2746. func (s DeleteVaultOutput) String() string {
  2747. return awsutil.Prettify(s)
  2748. }
  2749. // GoString returns the string representation
  2750. func (s DeleteVaultOutput) GoString() string {
  2751. return s.String()
  2752. }
  2753. // Provides options for retrieving a job description.
  2754. type DescribeJobInput struct {
  2755. _ struct{} `type:"structure"`
  2756. // The AccountId value is the AWS account ID of the account that owns the vault.
  2757. // You can either specify an AWS account ID or optionally a single apos-apos
  2758. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  2759. // with the credentials used to sign the request. If you use an account ID,
  2760. // do not include any hyphens (apos-apos) in the ID.
  2761. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2762. // The ID of the job to describe.
  2763. JobId *string `location:"uri" locationName:"jobId" type:"string" required:"true"`
  2764. // The name of the vault.
  2765. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  2766. }
  2767. // String returns the string representation
  2768. func (s DescribeJobInput) String() string {
  2769. return awsutil.Prettify(s)
  2770. }
  2771. // GoString returns the string representation
  2772. func (s DescribeJobInput) GoString() string {
  2773. return s.String()
  2774. }
  2775. // Validate inspects the fields of the type to determine if they are valid.
  2776. func (s *DescribeJobInput) Validate() error {
  2777. invalidParams := request.ErrInvalidParams{Context: "DescribeJobInput"}
  2778. if s.AccountId == nil {
  2779. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2780. }
  2781. if s.JobId == nil {
  2782. invalidParams.Add(request.NewErrParamRequired("JobId"))
  2783. }
  2784. if s.VaultName == nil {
  2785. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  2786. }
  2787. if invalidParams.Len() > 0 {
  2788. return invalidParams
  2789. }
  2790. return nil
  2791. }
  2792. // Provides options for retrieving metadata for a specific vault in Amazon Glacier.
  2793. type DescribeVaultInput struct {
  2794. _ struct{} `type:"structure"`
  2795. // The AccountId value is the AWS account ID of the account that owns the vault.
  2796. // You can either specify an AWS account ID or optionally a single apos-apos
  2797. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  2798. // with the credentials used to sign the request. If you use an account ID,
  2799. // do not include any hyphens (apos-apos) in the ID.
  2800. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2801. // The name of the vault.
  2802. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  2803. }
  2804. // String returns the string representation
  2805. func (s DescribeVaultInput) String() string {
  2806. return awsutil.Prettify(s)
  2807. }
  2808. // GoString returns the string representation
  2809. func (s DescribeVaultInput) GoString() string {
  2810. return s.String()
  2811. }
  2812. // Validate inspects the fields of the type to determine if they are valid.
  2813. func (s *DescribeVaultInput) Validate() error {
  2814. invalidParams := request.ErrInvalidParams{Context: "DescribeVaultInput"}
  2815. if s.AccountId == nil {
  2816. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2817. }
  2818. if s.VaultName == nil {
  2819. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  2820. }
  2821. if invalidParams.Len() > 0 {
  2822. return invalidParams
  2823. }
  2824. return nil
  2825. }
  2826. // Contains the Amazon Glacier response to your request.
  2827. type DescribeVaultOutput struct {
  2828. _ struct{} `type:"structure"`
  2829. // The UTC date when the vault was created. A string representation of ISO 8601
  2830. // date format, for example, "2012-03-20T17:03:43.221Z".
  2831. CreationDate *string `type:"string"`
  2832. // The UTC date when Amazon Glacier completed the last vault inventory. A string
  2833. // representation of ISO 8601 date format, for example, "2012-03-20T17:03:43.221Z".
  2834. LastInventoryDate *string `type:"string"`
  2835. // The number of archives in the vault as of the last inventory date. This field
  2836. // will return null if an inventory has not yet run on the vault, for example,
  2837. // if you just created the vault.
  2838. NumberOfArchives *int64 `type:"long"`
  2839. // Total size, in bytes, of the archives in the vault as of the last inventory
  2840. // date. This field will return null if an inventory has not yet run on the
  2841. // vault, for example, if you just created the vault.
  2842. SizeInBytes *int64 `type:"long"`
  2843. // The Amazon Resource Name (ARN) of the vault.
  2844. VaultARN *string `type:"string"`
  2845. // The name of the vault.
  2846. VaultName *string `type:"string"`
  2847. }
  2848. // String returns the string representation
  2849. func (s DescribeVaultOutput) String() string {
  2850. return awsutil.Prettify(s)
  2851. }
  2852. // GoString returns the string representation
  2853. func (s DescribeVaultOutput) GoString() string {
  2854. return s.String()
  2855. }
  2856. // Input for GetDataRetrievalPolicy.
  2857. type GetDataRetrievalPolicyInput struct {
  2858. _ struct{} `type:"structure"`
  2859. // The AccountId value is the AWS account ID. This value must match the AWS
  2860. // account ID associated with the credentials used to sign the request. You
  2861. // can either specify an AWS account ID or optionally a single apos-apos (hyphen),
  2862. // in which case Amazon Glacier uses the AWS account ID associated with the
  2863. // credentials used to sign the request. If you specify your account ID, do
  2864. // not include any hyphens (apos-apos) in the ID.
  2865. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2866. }
  2867. // String returns the string representation
  2868. func (s GetDataRetrievalPolicyInput) String() string {
  2869. return awsutil.Prettify(s)
  2870. }
  2871. // GoString returns the string representation
  2872. func (s GetDataRetrievalPolicyInput) GoString() string {
  2873. return s.String()
  2874. }
  2875. // Validate inspects the fields of the type to determine if they are valid.
  2876. func (s *GetDataRetrievalPolicyInput) Validate() error {
  2877. invalidParams := request.ErrInvalidParams{Context: "GetDataRetrievalPolicyInput"}
  2878. if s.AccountId == nil {
  2879. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2880. }
  2881. if invalidParams.Len() > 0 {
  2882. return invalidParams
  2883. }
  2884. return nil
  2885. }
  2886. // Contains the Amazon Glacier response to the GetDataRetrievalPolicy request.
  2887. type GetDataRetrievalPolicyOutput struct {
  2888. _ struct{} `type:"structure"`
  2889. // Contains the returned data retrieval policy in JSON format.
  2890. Policy *DataRetrievalPolicy `type:"structure"`
  2891. }
  2892. // String returns the string representation
  2893. func (s GetDataRetrievalPolicyOutput) String() string {
  2894. return awsutil.Prettify(s)
  2895. }
  2896. // GoString returns the string representation
  2897. func (s GetDataRetrievalPolicyOutput) GoString() string {
  2898. return s.String()
  2899. }
  2900. // Provides options for downloading output of an Amazon Glacier job.
  2901. type GetJobOutputInput struct {
  2902. _ struct{} `type:"structure"`
  2903. // The AccountId value is the AWS account ID of the account that owns the vault.
  2904. // You can either specify an AWS account ID or optionally a single apos-apos
  2905. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  2906. // with the credentials used to sign the request. If you use an account ID,
  2907. // do not include any hyphens (apos-apos) in the ID.
  2908. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2909. // The job ID whose data is downloaded.
  2910. JobId *string `location:"uri" locationName:"jobId" type:"string" required:"true"`
  2911. // The range of bytes to retrieve from the output. For example, if you want
  2912. // to download the first 1,048,576 bytes, specify "Range: bytes=0-1048575".
  2913. // By default, this operation downloads the entire output.
  2914. Range *string `location:"header" locationName:"Range" type:"string"`
  2915. // The name of the vault.
  2916. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  2917. }
  2918. // String returns the string representation
  2919. func (s GetJobOutputInput) String() string {
  2920. return awsutil.Prettify(s)
  2921. }
  2922. // GoString returns the string representation
  2923. func (s GetJobOutputInput) GoString() string {
  2924. return s.String()
  2925. }
  2926. // Validate inspects the fields of the type to determine if they are valid.
  2927. func (s *GetJobOutputInput) Validate() error {
  2928. invalidParams := request.ErrInvalidParams{Context: "GetJobOutputInput"}
  2929. if s.AccountId == nil {
  2930. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  2931. }
  2932. if s.JobId == nil {
  2933. invalidParams.Add(request.NewErrParamRequired("JobId"))
  2934. }
  2935. if s.VaultName == nil {
  2936. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  2937. }
  2938. if invalidParams.Len() > 0 {
  2939. return invalidParams
  2940. }
  2941. return nil
  2942. }
  2943. // Contains the Amazon Glacier response to your request.
  2944. type GetJobOutputOutput struct {
  2945. _ struct{} `type:"structure" payload:"Body"`
  2946. // Indicates the range units accepted. For more information, go to RFC2616 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
  2947. AcceptRanges *string `location:"header" locationName:"Accept-Ranges" type:"string"`
  2948. // The description of an archive.
  2949. ArchiveDescription *string `location:"header" locationName:"x-amz-archive-description" type:"string"`
  2950. // The job data, either archive data or inventory data.
  2951. Body io.ReadCloser `locationName:"body" type:"blob"`
  2952. // The checksum of the data in the response. This header is returned only when
  2953. // retrieving the output for an archive retrieval job. Furthermore, this header
  2954. // appears only under the following conditions: You get the entire range of
  2955. // the archive. You request a range to return of the archive that starts and
  2956. // ends on a multiple of 1 MB. For example, if you have an 3.1 MB archive and
  2957. // you specify a range to return that starts at 1 MB and ends at 2 MB, then
  2958. // the x-amz-sha256-tree-hash is returned as a response header. You request
  2959. // a range of the archive to return that starts on a multiple of 1 MB and goes
  2960. // to the end of the archive. For example, if you have a 3.1 MB archive and
  2961. // you specify a range that starts at 2 MB and ends at 3.1 MB (the end of the
  2962. // archive), then the x-amz-sha256-tree-hash is returned as a response header.
  2963. Checksum *string `location:"header" locationName:"x-amz-sha256-tree-hash" type:"string"`
  2964. // The range of bytes returned by Amazon Glacier. If only partial output is
  2965. // downloaded, the response provides the range of bytes Amazon Glacier returned.
  2966. // For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.
  2967. ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
  2968. // The Content-Type depends on whether the job output is an archive or a vault
  2969. // inventory. For archive data, the Content-Type is application/octet-stream.
  2970. // For vault inventory, if you requested CSV format when you initiated the job,
  2971. // the Content-Type is text/csv. Otherwise, by default, vault inventory is returned
  2972. // as JSON, and the Content-Type is application/json.
  2973. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2974. // The HTTP response code for a job output request. The value depends on whether
  2975. // a range was specified in the request.
  2976. Status *int64 `location:"statusCode" locationName:"status" type:"integer"`
  2977. }
  2978. // String returns the string representation
  2979. func (s GetJobOutputOutput) String() string {
  2980. return awsutil.Prettify(s)
  2981. }
  2982. // GoString returns the string representation
  2983. func (s GetJobOutputOutput) GoString() string {
  2984. return s.String()
  2985. }
  2986. // Input for GetVaultAccessPolicy.
  2987. type GetVaultAccessPolicyInput struct {
  2988. _ struct{} `type:"structure"`
  2989. // The AccountId value is the AWS account ID of the account that owns the vault.
  2990. // You can either specify an AWS account ID or optionally a single apos-apos
  2991. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  2992. // with the credentials used to sign the request. If you use an account ID,
  2993. // do not include any hyphens (apos-apos) in the ID.
  2994. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  2995. // The name of the vault.
  2996. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  2997. }
  2998. // String returns the string representation
  2999. func (s GetVaultAccessPolicyInput) String() string {
  3000. return awsutil.Prettify(s)
  3001. }
  3002. // GoString returns the string representation
  3003. func (s GetVaultAccessPolicyInput) GoString() string {
  3004. return s.String()
  3005. }
  3006. // Validate inspects the fields of the type to determine if they are valid.
  3007. func (s *GetVaultAccessPolicyInput) Validate() error {
  3008. invalidParams := request.ErrInvalidParams{Context: "GetVaultAccessPolicyInput"}
  3009. if s.AccountId == nil {
  3010. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3011. }
  3012. if s.VaultName == nil {
  3013. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  3014. }
  3015. if invalidParams.Len() > 0 {
  3016. return invalidParams
  3017. }
  3018. return nil
  3019. }
  3020. // Output for GetVaultAccessPolicy.
  3021. type GetVaultAccessPolicyOutput struct {
  3022. _ struct{} `type:"structure" payload:"Policy"`
  3023. // Contains the returned vault access policy as a JSON string.
  3024. Policy *VaultAccessPolicy `locationName:"policy" type:"structure"`
  3025. }
  3026. // String returns the string representation
  3027. func (s GetVaultAccessPolicyOutput) String() string {
  3028. return awsutil.Prettify(s)
  3029. }
  3030. // GoString returns the string representation
  3031. func (s GetVaultAccessPolicyOutput) GoString() string {
  3032. return s.String()
  3033. }
  3034. // The input values for GetVaultLock.
  3035. type GetVaultLockInput struct {
  3036. _ struct{} `type:"structure"`
  3037. // The AccountId value is the AWS account ID of the account that owns the vault.
  3038. // You can either specify an AWS account ID or optionally a single apos-apos
  3039. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  3040. // with the credentials used to sign the request. If you use an account ID,
  3041. // do not include any hyphens (apos-apos) in the ID.
  3042. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  3043. // The name of the vault.
  3044. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  3045. }
  3046. // String returns the string representation
  3047. func (s GetVaultLockInput) String() string {
  3048. return awsutil.Prettify(s)
  3049. }
  3050. // GoString returns the string representation
  3051. func (s GetVaultLockInput) GoString() string {
  3052. return s.String()
  3053. }
  3054. // Validate inspects the fields of the type to determine if they are valid.
  3055. func (s *GetVaultLockInput) Validate() error {
  3056. invalidParams := request.ErrInvalidParams{Context: "GetVaultLockInput"}
  3057. if s.AccountId == nil {
  3058. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3059. }
  3060. if s.VaultName == nil {
  3061. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  3062. }
  3063. if invalidParams.Len() > 0 {
  3064. return invalidParams
  3065. }
  3066. return nil
  3067. }
  3068. // Contains the Amazon Glacier response to your request.
  3069. type GetVaultLockOutput struct {
  3070. _ struct{} `type:"structure"`
  3071. // The UTC date and time at which the vault lock was put into the InProgress
  3072. // state.
  3073. CreationDate *string `type:"string"`
  3074. // The UTC date and time at which the lock ID expires. This value can be null
  3075. // if the vault lock is in a Locked state.
  3076. ExpirationDate *string `type:"string"`
  3077. // The vault lock policy as a JSON string, which uses "\" as an escape character.
  3078. Policy *string `type:"string"`
  3079. // The state of the vault lock. InProgress or Locked.
  3080. State *string `type:"string"`
  3081. }
  3082. // String returns the string representation
  3083. func (s GetVaultLockOutput) String() string {
  3084. return awsutil.Prettify(s)
  3085. }
  3086. // GoString returns the string representation
  3087. func (s GetVaultLockOutput) GoString() string {
  3088. return s.String()
  3089. }
  3090. // Provides options for retrieving the notification configuration set on an
  3091. // Amazon Glacier vault.
  3092. type GetVaultNotificationsInput struct {
  3093. _ struct{} `type:"structure"`
  3094. // The AccountId value is the AWS account ID of the account that owns the vault.
  3095. // You can either specify an AWS account ID or optionally a single apos-apos
  3096. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  3097. // with the credentials used to sign the request. If you use an account ID,
  3098. // do not include any hyphens (apos-apos) in the ID.
  3099. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  3100. // The name of the vault.
  3101. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  3102. }
  3103. // String returns the string representation
  3104. func (s GetVaultNotificationsInput) String() string {
  3105. return awsutil.Prettify(s)
  3106. }
  3107. // GoString returns the string representation
  3108. func (s GetVaultNotificationsInput) GoString() string {
  3109. return s.String()
  3110. }
  3111. // Validate inspects the fields of the type to determine if they are valid.
  3112. func (s *GetVaultNotificationsInput) Validate() error {
  3113. invalidParams := request.ErrInvalidParams{Context: "GetVaultNotificationsInput"}
  3114. if s.AccountId == nil {
  3115. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3116. }
  3117. if s.VaultName == nil {
  3118. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  3119. }
  3120. if invalidParams.Len() > 0 {
  3121. return invalidParams
  3122. }
  3123. return nil
  3124. }
  3125. // Contains the Amazon Glacier response to your request.
  3126. type GetVaultNotificationsOutput struct {
  3127. _ struct{} `type:"structure" payload:"VaultNotificationConfig"`
  3128. // Returns the notification configuration set on the vault.
  3129. VaultNotificationConfig *VaultNotificationConfig `locationName:"vaultNotificationConfig" type:"structure"`
  3130. }
  3131. // String returns the string representation
  3132. func (s GetVaultNotificationsOutput) String() string {
  3133. return awsutil.Prettify(s)
  3134. }
  3135. // GoString returns the string representation
  3136. func (s GetVaultNotificationsOutput) GoString() string {
  3137. return s.String()
  3138. }
  3139. // Provides options for initiating an Amazon Glacier job.
  3140. type InitiateJobInput struct {
  3141. _ struct{} `type:"structure" payload:"JobParameters"`
  3142. // The AccountId value is the AWS account ID of the account that owns the vault.
  3143. // You can either specify an AWS account ID or optionally a single apos-apos
  3144. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  3145. // with the credentials used to sign the request. If you use an account ID,
  3146. // do not include any hyphens (apos-apos) in the ID.
  3147. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  3148. // Provides options for specifying job information.
  3149. JobParameters *JobParameters `locationName:"jobParameters" type:"structure"`
  3150. // The name of the vault.
  3151. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  3152. }
  3153. // String returns the string representation
  3154. func (s InitiateJobInput) String() string {
  3155. return awsutil.Prettify(s)
  3156. }
  3157. // GoString returns the string representation
  3158. func (s InitiateJobInput) GoString() string {
  3159. return s.String()
  3160. }
  3161. // Validate inspects the fields of the type to determine if they are valid.
  3162. func (s *InitiateJobInput) Validate() error {
  3163. invalidParams := request.ErrInvalidParams{Context: "InitiateJobInput"}
  3164. if s.AccountId == nil {
  3165. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3166. }
  3167. if s.VaultName == nil {
  3168. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  3169. }
  3170. if invalidParams.Len() > 0 {
  3171. return invalidParams
  3172. }
  3173. return nil
  3174. }
  3175. // Contains the Amazon Glacier response to your request.
  3176. type InitiateJobOutput struct {
  3177. _ struct{} `type:"structure"`
  3178. // The ID of the job.
  3179. JobId *string `location:"header" locationName:"x-amz-job-id" type:"string"`
  3180. // The relative URI path of the job.
  3181. Location *string `location:"header" locationName:"Location" type:"string"`
  3182. }
  3183. // String returns the string representation
  3184. func (s InitiateJobOutput) String() string {
  3185. return awsutil.Prettify(s)
  3186. }
  3187. // GoString returns the string representation
  3188. func (s InitiateJobOutput) GoString() string {
  3189. return s.String()
  3190. }
  3191. // Provides options for initiating a multipart upload to an Amazon Glacier vault.
  3192. type InitiateMultipartUploadInput struct {
  3193. _ struct{} `type:"structure"`
  3194. // The AccountId value is the AWS account ID of the account that owns the vault.
  3195. // You can either specify an AWS account ID or optionally a single apos-apos
  3196. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  3197. // with the credentials used to sign the request. If you use an account ID,
  3198. // do not include any hyphens (apos-apos) in the ID.
  3199. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  3200. // The archive description that you are uploading in parts.
  3201. //
  3202. // The part size must be a megabyte (1024 KB) multiplied by a power of 2, for
  3203. // example 1048576 (1 MB), 2097152 (2 MB), 4194304 (4 MB), 8388608 (8 MB), and
  3204. // so on. The minimum allowable part size is 1 MB, and the maximum is 4 GB (4096
  3205. // MB).
  3206. ArchiveDescription *string `location:"header" locationName:"x-amz-archive-description" type:"string"`
  3207. // The size of each part except the last, in bytes. The last part can be smaller
  3208. // than this part size.
  3209. PartSize *string `location:"header" locationName:"x-amz-part-size" type:"string"`
  3210. // The name of the vault.
  3211. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  3212. }
  3213. // String returns the string representation
  3214. func (s InitiateMultipartUploadInput) String() string {
  3215. return awsutil.Prettify(s)
  3216. }
  3217. // GoString returns the string representation
  3218. func (s InitiateMultipartUploadInput) GoString() string {
  3219. return s.String()
  3220. }
  3221. // Validate inspects the fields of the type to determine if they are valid.
  3222. func (s *InitiateMultipartUploadInput) Validate() error {
  3223. invalidParams := request.ErrInvalidParams{Context: "InitiateMultipartUploadInput"}
  3224. if s.AccountId == nil {
  3225. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3226. }
  3227. if s.VaultName == nil {
  3228. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  3229. }
  3230. if invalidParams.Len() > 0 {
  3231. return invalidParams
  3232. }
  3233. return nil
  3234. }
  3235. // The Amazon Glacier response to your request.
  3236. type InitiateMultipartUploadOutput struct {
  3237. _ struct{} `type:"structure"`
  3238. // The relative URI path of the multipart upload ID Amazon Glacier created.
  3239. Location *string `location:"header" locationName:"Location" type:"string"`
  3240. // The ID of the multipart upload. This value is also included as part of the
  3241. // location.
  3242. UploadId *string `location:"header" locationName:"x-amz-multipart-upload-id" type:"string"`
  3243. }
  3244. // String returns the string representation
  3245. func (s InitiateMultipartUploadOutput) String() string {
  3246. return awsutil.Prettify(s)
  3247. }
  3248. // GoString returns the string representation
  3249. func (s InitiateMultipartUploadOutput) GoString() string {
  3250. return s.String()
  3251. }
  3252. // The input values for InitiateVaultLock.
  3253. type InitiateVaultLockInput struct {
  3254. _ struct{} `type:"structure" payload:"Policy"`
  3255. // The AccountId value is the AWS account ID. This value must match the AWS
  3256. // account ID associated with the credentials used to sign the request. You
  3257. // can either specify an AWS account ID or optionally a single apos-apos (hyphen),
  3258. // in which case Amazon Glacier uses the AWS account ID associated with the
  3259. // credentials used to sign the request. If you specify your account ID, do
  3260. // not include any hyphens (apos-apos) in the ID.
  3261. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  3262. // The vault lock policy as a JSON string, which uses "\" as an escape character.
  3263. Policy *VaultLockPolicy `locationName:"policy" type:"structure"`
  3264. // The name of the vault.
  3265. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  3266. }
  3267. // String returns the string representation
  3268. func (s InitiateVaultLockInput) String() string {
  3269. return awsutil.Prettify(s)
  3270. }
  3271. // GoString returns the string representation
  3272. func (s InitiateVaultLockInput) GoString() string {
  3273. return s.String()
  3274. }
  3275. // Validate inspects the fields of the type to determine if they are valid.
  3276. func (s *InitiateVaultLockInput) Validate() error {
  3277. invalidParams := request.ErrInvalidParams{Context: "InitiateVaultLockInput"}
  3278. if s.AccountId == nil {
  3279. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3280. }
  3281. if s.VaultName == nil {
  3282. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  3283. }
  3284. if invalidParams.Len() > 0 {
  3285. return invalidParams
  3286. }
  3287. return nil
  3288. }
  3289. // Contains the Amazon Glacier response to your request.
  3290. type InitiateVaultLockOutput struct {
  3291. _ struct{} `type:"structure"`
  3292. // The lock ID, which is used to complete the vault locking process.
  3293. LockId *string `location:"header" locationName:"x-amz-lock-id" type:"string"`
  3294. }
  3295. // String returns the string representation
  3296. func (s InitiateVaultLockOutput) String() string {
  3297. return awsutil.Prettify(s)
  3298. }
  3299. // GoString returns the string representation
  3300. func (s InitiateVaultLockOutput) GoString() string {
  3301. return s.String()
  3302. }
  3303. // Describes the options for a range inventory retrieval job.
  3304. type InventoryRetrievalJobDescription struct {
  3305. _ struct{} `type:"structure"`
  3306. // The end of the date range in UTC for vault inventory retrieval that includes
  3307. // archives created before this date. A string representation of ISO 8601 date
  3308. // format, for example, 2013-03-20T17:03:43Z.
  3309. EndDate *string `type:"string"`
  3310. // The output format for the vault inventory list, which is set by the InitiateJob
  3311. // request when initiating a job to retrieve a vault inventory. Valid values
  3312. // are "CSV" and "JSON".
  3313. Format *string `type:"string"`
  3314. // Specifies the maximum number of inventory items returned per vault inventory
  3315. // retrieval request. This limit is set when initiating the job with the a InitiateJob
  3316. // request.
  3317. Limit *string `type:"string"`
  3318. // An opaque string that represents where to continue pagination of the vault
  3319. // inventory retrieval results. You use the marker in a new InitiateJob request
  3320. // to obtain additional inventory items. If there are no more inventory items,
  3321. // this value is null. For more information, see Range Inventory Retrieval
  3322. // (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html#api-initiate-job-post-vault-inventory-list-filtering).
  3323. Marker *string `type:"string"`
  3324. // The start of the date range in UTC for vault inventory retrieval that includes
  3325. // archives created on or after this date. A string representation of ISO 8601
  3326. // date format, for example, 2013-03-20T17:03:43Z.
  3327. StartDate *string `type:"string"`
  3328. }
  3329. // String returns the string representation
  3330. func (s InventoryRetrievalJobDescription) String() string {
  3331. return awsutil.Prettify(s)
  3332. }
  3333. // GoString returns the string representation
  3334. func (s InventoryRetrievalJobDescription) GoString() string {
  3335. return s.String()
  3336. }
  3337. // Provides options for specifying a range inventory retrieval job.
  3338. type InventoryRetrievalJobInput struct {
  3339. _ struct{} `type:"structure"`
  3340. // The end of the date range in UTC for vault inventory retrieval that includes
  3341. // archives created before this date. A string representation of ISO 8601 date
  3342. // format, for example, 2013-03-20T17:03:43Z.
  3343. EndDate *string `type:"string"`
  3344. // Specifies the maximum number of inventory items returned per vault inventory
  3345. // retrieval request. Valid values are greater than or equal to 1.
  3346. Limit *string `type:"string"`
  3347. // An opaque string that represents where to continue pagination of the vault
  3348. // inventory retrieval results. You use the marker in a new InitiateJob request
  3349. // to obtain additional inventory items. If there are no more inventory items,
  3350. // this value is null.
  3351. Marker *string `type:"string"`
  3352. // The start of the date range in UTC for vault inventory retrieval that includes
  3353. // archives created on or after this date. A string representation of ISO 8601
  3354. // date format, for example, 2013-03-20T17:03:43Z.
  3355. StartDate *string `type:"string"`
  3356. }
  3357. // String returns the string representation
  3358. func (s InventoryRetrievalJobInput) String() string {
  3359. return awsutil.Prettify(s)
  3360. }
  3361. // GoString returns the string representation
  3362. func (s InventoryRetrievalJobInput) GoString() string {
  3363. return s.String()
  3364. }
  3365. // Describes an Amazon Glacier job.
  3366. type JobDescription struct {
  3367. _ struct{} `type:"structure"`
  3368. // The job type. It is either ArchiveRetrieval or InventoryRetrieval.
  3369. Action *string `type:"string" enum:"ActionCode"`
  3370. // For an ArchiveRetrieval job, this is the archive ID requested for download.
  3371. // Otherwise, this field is null.
  3372. ArchiveId *string `type:"string"`
  3373. // The SHA256 tree hash of the entire archive for an archive retrieval. For
  3374. // inventory retrieval jobs, this field is null.
  3375. ArchiveSHA256TreeHash *string `type:"string"`
  3376. // For an ArchiveRetrieval job, this is the size in bytes of the archive being
  3377. // requested for download. For the InventoryRetrieval job, the value is null.
  3378. ArchiveSizeInBytes *int64 `type:"long"`
  3379. // The job status. When a job is completed, you get the job's output.
  3380. Completed *bool `type:"boolean"`
  3381. // The UTC time that the archive retrieval request completed. While the job
  3382. // is in progress, the value will be null.
  3383. CompletionDate *string `type:"string"`
  3384. // The UTC date when the job was created. A string representation of ISO 8601
  3385. // date format, for example, "2012-03-20T17:03:43.221Z".
  3386. CreationDate *string `type:"string"`
  3387. // Parameters used for range inventory retrieval.
  3388. InventoryRetrievalParameters *InventoryRetrievalJobDescription `type:"structure"`
  3389. // For an InventoryRetrieval job, this is the size in bytes of the inventory
  3390. // requested for download. For the ArchiveRetrieval job, the value is null.
  3391. InventorySizeInBytes *int64 `type:"long"`
  3392. // The job description you provided when you initiated the job.
  3393. JobDescription *string `type:"string"`
  3394. // An opaque string that identifies an Amazon Glacier job.
  3395. JobId *string `type:"string"`
  3396. // The retrieved byte range for archive retrieval jobs in the form "StartByteValue-EndByteValue"
  3397. // If no range was specified in the archive retrieval, then the whole archive
  3398. // is retrieved and StartByteValue equals 0 and EndByteValue equals the size
  3399. // of the archive minus 1. For inventory retrieval jobs this field is null.
  3400. RetrievalByteRange *string `type:"string"`
  3401. // For an ArchiveRetrieval job, it is the checksum of the archive. Otherwise,
  3402. // the value is null.
  3403. //
  3404. // The SHA256 tree hash value for the requested range of an archive. If the
  3405. // Initiate a Job request for an archive specified a tree-hash aligned range,
  3406. // then this field returns a value.
  3407. //
  3408. // For the specific case when the whole archive is retrieved, this value is
  3409. // the same as the ArchiveSHA256TreeHash value.
  3410. //
  3411. // This field is null in the following situations: Archive retrieval jobs
  3412. // that specify a range that is not tree-hash aligned.
  3413. //
  3414. // Archival jobs that specify a range that is equal to the whole archive
  3415. // and the job status is InProgress.
  3416. //
  3417. // Inventory jobs.
  3418. SHA256TreeHash *string `type:"string"`
  3419. // An Amazon Simple Notification Service (Amazon SNS) topic that receives notification.
  3420. SNSTopic *string `type:"string"`
  3421. // The status code can be InProgress, Succeeded, or Failed, and indicates the
  3422. // status of the job.
  3423. StatusCode *string `type:"string" enum:"StatusCode"`
  3424. // A friendly message that describes the job status.
  3425. StatusMessage *string `type:"string"`
  3426. // The Amazon Resource Name (ARN) of the vault from which the archive retrieval
  3427. // was requested.
  3428. VaultARN *string `type:"string"`
  3429. }
  3430. // String returns the string representation
  3431. func (s JobDescription) String() string {
  3432. return awsutil.Prettify(s)
  3433. }
  3434. // GoString returns the string representation
  3435. func (s JobDescription) GoString() string {
  3436. return s.String()
  3437. }
  3438. // Provides options for defining a job.
  3439. type JobParameters struct {
  3440. _ struct{} `type:"structure"`
  3441. // The ID of the archive that you want to retrieve. This field is required only
  3442. // if Type is set to archive-retrieval. An error occurs if you specify this
  3443. // request parameter for an inventory retrieval job request.
  3444. ArchiveId *string `type:"string"`
  3445. // The optional description for the job. The description must be less than or
  3446. // equal to 1,024 bytes. The allowable characters are 7-bit ASCII without control
  3447. // codes-specifically, ASCII values 32-126 decimal or 0x20-0x7E hexadecimal.
  3448. Description *string `type:"string"`
  3449. // When initiating a job to retrieve a vault inventory, you can optionally add
  3450. // this parameter to your request to specify the output format. If you are initiating
  3451. // an inventory job and do not specify a Format field, JSON is the default format.
  3452. // Valid values are "CSV" and "JSON".
  3453. Format *string `type:"string"`
  3454. // Input parameters used for range inventory retrieval.
  3455. InventoryRetrievalParameters *InventoryRetrievalJobInput `type:"structure"`
  3456. // The byte range to retrieve for an archive retrieval. in the form "StartByteValue-EndByteValue"
  3457. // If not specified, the whole archive is retrieved. If specified, the byte
  3458. // range must be megabyte (1024*1024) aligned which means that StartByteValue
  3459. // must be divisible by 1 MB and EndByteValue plus 1 must be divisible by 1
  3460. // MB or be the end of the archive specified as the archive byte size value
  3461. // minus 1. If RetrievalByteRange is not megabyte aligned, this operation returns
  3462. // a 400 response.
  3463. //
  3464. // An error occurs if you specify this field for an inventory retrieval job
  3465. // request.
  3466. RetrievalByteRange *string `type:"string"`
  3467. // The Amazon SNS topic ARN to which Amazon Glacier sends a notification when
  3468. // the job is completed and the output is ready for you to download. The specified
  3469. // topic publishes the notification to its subscribers. The SNS topic must exist.
  3470. SNSTopic *string `type:"string"`
  3471. // The job type. You can initiate a job to retrieve an archive or get an inventory
  3472. // of a vault. Valid values are "archive-retrieval" and "inventory-retrieval".
  3473. Type *string `type:"string"`
  3474. }
  3475. // String returns the string representation
  3476. func (s JobParameters) String() string {
  3477. return awsutil.Prettify(s)
  3478. }
  3479. // GoString returns the string representation
  3480. func (s JobParameters) GoString() string {
  3481. return s.String()
  3482. }
  3483. // Provides options for retrieving a job list for an Amazon Glacier vault.
  3484. type ListJobsInput struct {
  3485. _ struct{} `type:"structure"`
  3486. // The AccountId value is the AWS account ID of the account that owns the vault.
  3487. // You can either specify an AWS account ID or optionally a single apos-apos
  3488. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  3489. // with the credentials used to sign the request. If you use an account ID,
  3490. // do not include any hyphens (apos-apos) in the ID.
  3491. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  3492. // Specifies the state of the jobs to return. You can specify true or false.
  3493. Completed *string `location:"querystring" locationName:"completed" type:"string"`
  3494. // Specifies that the response be limited to the specified number of items or
  3495. // fewer. If not specified, the List Jobs operation returns up to 1,000 jobs.
  3496. Limit *string `location:"querystring" locationName:"limit" type:"string"`
  3497. // An opaque string used for pagination. This value specifies the job at which
  3498. // the listing of jobs should begin. Get the marker value from a previous List
  3499. // Jobs response. You need only include the marker if you are continuing the
  3500. // pagination of results started in a previous List Jobs request.
  3501. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  3502. // Specifies the type of job status to return. You can specify the following
  3503. // values: "InProgress", "Succeeded", or "Failed".
  3504. Statuscode *string `location:"querystring" locationName:"statuscode" type:"string"`
  3505. // The name of the vault.
  3506. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  3507. }
  3508. // String returns the string representation
  3509. func (s ListJobsInput) String() string {
  3510. return awsutil.Prettify(s)
  3511. }
  3512. // GoString returns the string representation
  3513. func (s ListJobsInput) GoString() string {
  3514. return s.String()
  3515. }
  3516. // Validate inspects the fields of the type to determine if they are valid.
  3517. func (s *ListJobsInput) Validate() error {
  3518. invalidParams := request.ErrInvalidParams{Context: "ListJobsInput"}
  3519. if s.AccountId == nil {
  3520. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3521. }
  3522. if s.VaultName == nil {
  3523. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  3524. }
  3525. if invalidParams.Len() > 0 {
  3526. return invalidParams
  3527. }
  3528. return nil
  3529. }
  3530. // Contains the Amazon Glacier response to your request.
  3531. type ListJobsOutput struct {
  3532. _ struct{} `type:"structure"`
  3533. // A list of job objects. Each job object contains metadata describing the job.
  3534. JobList []*JobDescription `type:"list"`
  3535. // An opaque string that represents where to continue pagination of the results.
  3536. // You use this value in a new List Jobs request to obtain more jobs in the
  3537. // list. If there are no more jobs, this value is null.
  3538. Marker *string `type:"string"`
  3539. }
  3540. // String returns the string representation
  3541. func (s ListJobsOutput) String() string {
  3542. return awsutil.Prettify(s)
  3543. }
  3544. // GoString returns the string representation
  3545. func (s ListJobsOutput) GoString() string {
  3546. return s.String()
  3547. }
  3548. // Provides options for retrieving list of in-progress multipart uploads for
  3549. // an Amazon Glacier vault.
  3550. type ListMultipartUploadsInput struct {
  3551. _ struct{} `type:"structure"`
  3552. // The AccountId value is the AWS account ID of the account that owns the vault.
  3553. // You can either specify an AWS account ID or optionally a single apos-apos
  3554. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  3555. // with the credentials used to sign the request. If you use an account ID,
  3556. // do not include any hyphens (apos-apos) in the ID.
  3557. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  3558. // Specifies the maximum number of uploads returned in the response body. If
  3559. // this value is not specified, the List Uploads operation returns up to 1,000
  3560. // uploads.
  3561. Limit *string `location:"querystring" locationName:"limit" type:"string"`
  3562. // An opaque string used for pagination. This value specifies the upload at
  3563. // which the listing of uploads should begin. Get the marker value from a previous
  3564. // List Uploads response. You need only include the marker if you are continuing
  3565. // the pagination of results started in a previous List Uploads request.
  3566. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  3567. // The name of the vault.
  3568. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  3569. }
  3570. // String returns the string representation
  3571. func (s ListMultipartUploadsInput) String() string {
  3572. return awsutil.Prettify(s)
  3573. }
  3574. // GoString returns the string representation
  3575. func (s ListMultipartUploadsInput) GoString() string {
  3576. return s.String()
  3577. }
  3578. // Validate inspects the fields of the type to determine if they are valid.
  3579. func (s *ListMultipartUploadsInput) Validate() error {
  3580. invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"}
  3581. if s.AccountId == nil {
  3582. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3583. }
  3584. if s.VaultName == nil {
  3585. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  3586. }
  3587. if invalidParams.Len() > 0 {
  3588. return invalidParams
  3589. }
  3590. return nil
  3591. }
  3592. // Contains the Amazon Glacier response to your request.
  3593. type ListMultipartUploadsOutput struct {
  3594. _ struct{} `type:"structure"`
  3595. // An opaque string that represents where to continue pagination of the results.
  3596. // You use the marker in a new List Multipart Uploads request to obtain more
  3597. // uploads in the list. If there are no more uploads, this value is null.
  3598. Marker *string `type:"string"`
  3599. // A list of in-progress multipart uploads.
  3600. UploadsList []*UploadListElement `type:"list"`
  3601. }
  3602. // String returns the string representation
  3603. func (s ListMultipartUploadsOutput) String() string {
  3604. return awsutil.Prettify(s)
  3605. }
  3606. // GoString returns the string representation
  3607. func (s ListMultipartUploadsOutput) GoString() string {
  3608. return s.String()
  3609. }
  3610. // Provides options for retrieving a list of parts of an archive that have been
  3611. // uploaded in a specific multipart upload.
  3612. type ListPartsInput struct {
  3613. _ struct{} `type:"structure"`
  3614. // The AccountId value is the AWS account ID of the account that owns the vault.
  3615. // You can either specify an AWS account ID or optionally a single apos-apos
  3616. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  3617. // with the credentials used to sign the request. If you use an account ID,
  3618. // do not include any hyphens (apos-apos) in the ID.
  3619. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  3620. // Specifies the maximum number of parts returned in the response body. If this
  3621. // value is not specified, the List Parts operation returns up to 1,000 uploads.
  3622. Limit *string `location:"querystring" locationName:"limit" type:"string"`
  3623. // An opaque string used for pagination. This value specifies the part at which
  3624. // the listing of parts should begin. Get the marker value from the response
  3625. // of a previous List Parts response. You need only include the marker if you
  3626. // are continuing the pagination of results started in a previous List Parts
  3627. // request.
  3628. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  3629. // The upload ID of the multipart upload.
  3630. UploadId *string `location:"uri" locationName:"uploadId" type:"string" required:"true"`
  3631. // The name of the vault.
  3632. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  3633. }
  3634. // String returns the string representation
  3635. func (s ListPartsInput) String() string {
  3636. return awsutil.Prettify(s)
  3637. }
  3638. // GoString returns the string representation
  3639. func (s ListPartsInput) GoString() string {
  3640. return s.String()
  3641. }
  3642. // Validate inspects the fields of the type to determine if they are valid.
  3643. func (s *ListPartsInput) Validate() error {
  3644. invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"}
  3645. if s.AccountId == nil {
  3646. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3647. }
  3648. if s.UploadId == nil {
  3649. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  3650. }
  3651. if s.VaultName == nil {
  3652. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  3653. }
  3654. if invalidParams.Len() > 0 {
  3655. return invalidParams
  3656. }
  3657. return nil
  3658. }
  3659. // Contains the Amazon Glacier response to your request.
  3660. type ListPartsOutput struct {
  3661. _ struct{} `type:"structure"`
  3662. // The description of the archive that was specified in the Initiate Multipart
  3663. // Upload request.
  3664. ArchiveDescription *string `type:"string"`
  3665. // The UTC time at which the multipart upload was initiated.
  3666. CreationDate *string `type:"string"`
  3667. // An opaque string that represents where to continue pagination of the results.
  3668. // You use the marker in a new List Parts request to obtain more jobs in the
  3669. // list. If there are no more parts, this value is null.
  3670. Marker *string `type:"string"`
  3671. // The ID of the upload to which the parts are associated.
  3672. MultipartUploadId *string `type:"string"`
  3673. // The part size in bytes.
  3674. PartSizeInBytes *int64 `type:"long"`
  3675. // A list of the part sizes of the multipart upload.
  3676. Parts []*PartListElement `type:"list"`
  3677. // The Amazon Resource Name (ARN) of the vault to which the multipart upload
  3678. // was initiated.
  3679. VaultARN *string `type:"string"`
  3680. }
  3681. // String returns the string representation
  3682. func (s ListPartsOutput) String() string {
  3683. return awsutil.Prettify(s)
  3684. }
  3685. // GoString returns the string representation
  3686. func (s ListPartsOutput) GoString() string {
  3687. return s.String()
  3688. }
  3689. // The input value for ListTagsForVaultInput.
  3690. type ListTagsForVaultInput struct {
  3691. _ struct{} `type:"structure"`
  3692. // The AccountId value is the AWS account ID of the account that owns the vault.
  3693. // You can either specify an AWS account ID or optionally a single apos-apos
  3694. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  3695. // with the credentials used to sign the request. If you use an account ID,
  3696. // do not include any hyphens (apos-apos) in the ID.
  3697. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  3698. // The name of the vault.
  3699. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  3700. }
  3701. // String returns the string representation
  3702. func (s ListTagsForVaultInput) String() string {
  3703. return awsutil.Prettify(s)
  3704. }
  3705. // GoString returns the string representation
  3706. func (s ListTagsForVaultInput) GoString() string {
  3707. return s.String()
  3708. }
  3709. // Validate inspects the fields of the type to determine if they are valid.
  3710. func (s *ListTagsForVaultInput) Validate() error {
  3711. invalidParams := request.ErrInvalidParams{Context: "ListTagsForVaultInput"}
  3712. if s.AccountId == nil {
  3713. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3714. }
  3715. if s.VaultName == nil {
  3716. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  3717. }
  3718. if invalidParams.Len() > 0 {
  3719. return invalidParams
  3720. }
  3721. return nil
  3722. }
  3723. // Contains the Amazon Glacier response to your request.
  3724. type ListTagsForVaultOutput struct {
  3725. _ struct{} `type:"structure"`
  3726. // The tags attached to the vault. Each tag is composed of a key and a value.
  3727. Tags map[string]*string `type:"map"`
  3728. }
  3729. // String returns the string representation
  3730. func (s ListTagsForVaultOutput) String() string {
  3731. return awsutil.Prettify(s)
  3732. }
  3733. // GoString returns the string representation
  3734. func (s ListTagsForVaultOutput) GoString() string {
  3735. return s.String()
  3736. }
  3737. // Provides options to retrieve the vault list owned by the calling user's account.
  3738. // The list provides metadata information for each vault.
  3739. type ListVaultsInput struct {
  3740. _ struct{} `type:"structure"`
  3741. // The AccountId value is the AWS account ID. This value must match the AWS
  3742. // account ID associated with the credentials used to sign the request. You
  3743. // can either specify an AWS account ID or optionally a single apos-apos (hyphen),
  3744. // in which case Amazon Glacier uses the AWS account ID associated with the
  3745. // credentials used to sign the request. If you specify your account ID, do
  3746. // not include any hyphens (apos-apos) in the ID.
  3747. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  3748. // The maximum number of items returned in the response. If you don't specify
  3749. // a value, the List Vaults operation returns up to 1,000 items.
  3750. Limit *string `location:"querystring" locationName:"limit" type:"string"`
  3751. // A string used for pagination. The marker specifies the vault ARN after which
  3752. // the listing of vaults should begin.
  3753. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  3754. }
  3755. // String returns the string representation
  3756. func (s ListVaultsInput) String() string {
  3757. return awsutil.Prettify(s)
  3758. }
  3759. // GoString returns the string representation
  3760. func (s ListVaultsInput) GoString() string {
  3761. return s.String()
  3762. }
  3763. // Validate inspects the fields of the type to determine if they are valid.
  3764. func (s *ListVaultsInput) Validate() error {
  3765. invalidParams := request.ErrInvalidParams{Context: "ListVaultsInput"}
  3766. if s.AccountId == nil {
  3767. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3768. }
  3769. if invalidParams.Len() > 0 {
  3770. return invalidParams
  3771. }
  3772. return nil
  3773. }
  3774. // Contains the Amazon Glacier response to your request.
  3775. type ListVaultsOutput struct {
  3776. _ struct{} `type:"structure"`
  3777. // The vault ARN at which to continue pagination of the results. You use the
  3778. // marker in another List Vaults request to obtain more vaults in the list.
  3779. Marker *string `type:"string"`
  3780. // List of vaults.
  3781. VaultList []*DescribeVaultOutput `type:"list"`
  3782. }
  3783. // String returns the string representation
  3784. func (s ListVaultsOutput) String() string {
  3785. return awsutil.Prettify(s)
  3786. }
  3787. // GoString returns the string representation
  3788. func (s ListVaultsOutput) GoString() string {
  3789. return s.String()
  3790. }
  3791. // A list of the part sizes of the multipart upload.
  3792. type PartListElement struct {
  3793. _ struct{} `type:"structure"`
  3794. // The byte range of a part, inclusive of the upper value of the range.
  3795. RangeInBytes *string `type:"string"`
  3796. // The SHA256 tree hash value that Amazon Glacier calculated for the part. This
  3797. // field is never null.
  3798. SHA256TreeHash *string `type:"string"`
  3799. }
  3800. // String returns the string representation
  3801. func (s PartListElement) String() string {
  3802. return awsutil.Prettify(s)
  3803. }
  3804. // GoString returns the string representation
  3805. func (s PartListElement) GoString() string {
  3806. return s.String()
  3807. }
  3808. // The input value for RemoveTagsFromVaultInput.
  3809. type RemoveTagsFromVaultInput struct {
  3810. _ struct{} `type:"structure"`
  3811. // The AccountId value is the AWS account ID of the account that owns the vault.
  3812. // You can either specify an AWS account ID or optionally a single apos-apos
  3813. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  3814. // with the credentials used to sign the request. If you use an account ID,
  3815. // do not include any hyphens (apos-apos) in the ID.
  3816. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  3817. // A list of tag keys. Each corresponding tag is removed from the vault.
  3818. TagKeys []*string `type:"list"`
  3819. // The name of the vault.
  3820. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  3821. }
  3822. // String returns the string representation
  3823. func (s RemoveTagsFromVaultInput) String() string {
  3824. return awsutil.Prettify(s)
  3825. }
  3826. // GoString returns the string representation
  3827. func (s RemoveTagsFromVaultInput) GoString() string {
  3828. return s.String()
  3829. }
  3830. // Validate inspects the fields of the type to determine if they are valid.
  3831. func (s *RemoveTagsFromVaultInput) Validate() error {
  3832. invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromVaultInput"}
  3833. if s.AccountId == nil {
  3834. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3835. }
  3836. if s.VaultName == nil {
  3837. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  3838. }
  3839. if invalidParams.Len() > 0 {
  3840. return invalidParams
  3841. }
  3842. return nil
  3843. }
  3844. type RemoveTagsFromVaultOutput struct {
  3845. _ struct{} `type:"structure"`
  3846. }
  3847. // String returns the string representation
  3848. func (s RemoveTagsFromVaultOutput) String() string {
  3849. return awsutil.Prettify(s)
  3850. }
  3851. // GoString returns the string representation
  3852. func (s RemoveTagsFromVaultOutput) GoString() string {
  3853. return s.String()
  3854. }
  3855. // SetDataRetrievalPolicy input.
  3856. type SetDataRetrievalPolicyInput struct {
  3857. _ struct{} `type:"structure"`
  3858. // The AccountId value is the AWS account ID. This value must match the AWS
  3859. // account ID associated with the credentials used to sign the request. You
  3860. // can either specify an AWS account ID or optionally a single apos-apos (hyphen),
  3861. // in which case Amazon Glacier uses the AWS account ID associated with the
  3862. // credentials used to sign the request. If you specify your account ID, do
  3863. // not include any hyphens (apos-apos) in the ID.
  3864. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  3865. // The data retrieval policy in JSON format.
  3866. Policy *DataRetrievalPolicy `type:"structure"`
  3867. }
  3868. // String returns the string representation
  3869. func (s SetDataRetrievalPolicyInput) String() string {
  3870. return awsutil.Prettify(s)
  3871. }
  3872. // GoString returns the string representation
  3873. func (s SetDataRetrievalPolicyInput) GoString() string {
  3874. return s.String()
  3875. }
  3876. // Validate inspects the fields of the type to determine if they are valid.
  3877. func (s *SetDataRetrievalPolicyInput) Validate() error {
  3878. invalidParams := request.ErrInvalidParams{Context: "SetDataRetrievalPolicyInput"}
  3879. if s.AccountId == nil {
  3880. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3881. }
  3882. if invalidParams.Len() > 0 {
  3883. return invalidParams
  3884. }
  3885. return nil
  3886. }
  3887. type SetDataRetrievalPolicyOutput struct {
  3888. _ struct{} `type:"structure"`
  3889. }
  3890. // String returns the string representation
  3891. func (s SetDataRetrievalPolicyOutput) String() string {
  3892. return awsutil.Prettify(s)
  3893. }
  3894. // GoString returns the string representation
  3895. func (s SetDataRetrievalPolicyOutput) GoString() string {
  3896. return s.String()
  3897. }
  3898. // SetVaultAccessPolicy input.
  3899. type SetVaultAccessPolicyInput struct {
  3900. _ struct{} `type:"structure" payload:"Policy"`
  3901. // The AccountId value is the AWS account ID of the account that owns the vault.
  3902. // You can either specify an AWS account ID or optionally a single apos-apos
  3903. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  3904. // with the credentials used to sign the request. If you use an account ID,
  3905. // do not include any hyphens (apos-apos) in the ID.
  3906. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  3907. // The vault access policy as a JSON string.
  3908. Policy *VaultAccessPolicy `locationName:"policy" type:"structure"`
  3909. // The name of the vault.
  3910. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  3911. }
  3912. // String returns the string representation
  3913. func (s SetVaultAccessPolicyInput) String() string {
  3914. return awsutil.Prettify(s)
  3915. }
  3916. // GoString returns the string representation
  3917. func (s SetVaultAccessPolicyInput) GoString() string {
  3918. return s.String()
  3919. }
  3920. // Validate inspects the fields of the type to determine if they are valid.
  3921. func (s *SetVaultAccessPolicyInput) Validate() error {
  3922. invalidParams := request.ErrInvalidParams{Context: "SetVaultAccessPolicyInput"}
  3923. if s.AccountId == nil {
  3924. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3925. }
  3926. if s.VaultName == nil {
  3927. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  3928. }
  3929. if invalidParams.Len() > 0 {
  3930. return invalidParams
  3931. }
  3932. return nil
  3933. }
  3934. type SetVaultAccessPolicyOutput struct {
  3935. _ struct{} `type:"structure"`
  3936. }
  3937. // String returns the string representation
  3938. func (s SetVaultAccessPolicyOutput) String() string {
  3939. return awsutil.Prettify(s)
  3940. }
  3941. // GoString returns the string representation
  3942. func (s SetVaultAccessPolicyOutput) GoString() string {
  3943. return s.String()
  3944. }
  3945. // Provides options to configure notifications that will be sent when specific
  3946. // events happen to a vault.
  3947. type SetVaultNotificationsInput struct {
  3948. _ struct{} `type:"structure" payload:"VaultNotificationConfig"`
  3949. // The AccountId value is the AWS account ID of the account that owns the vault.
  3950. // You can either specify an AWS account ID or optionally a single apos-apos
  3951. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  3952. // with the credentials used to sign the request. If you use an account ID,
  3953. // do not include any hyphens (apos-apos) in the ID.
  3954. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  3955. // The name of the vault.
  3956. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  3957. // Provides options for specifying notification configuration.
  3958. VaultNotificationConfig *VaultNotificationConfig `locationName:"vaultNotificationConfig" type:"structure"`
  3959. }
  3960. // String returns the string representation
  3961. func (s SetVaultNotificationsInput) String() string {
  3962. return awsutil.Prettify(s)
  3963. }
  3964. // GoString returns the string representation
  3965. func (s SetVaultNotificationsInput) GoString() string {
  3966. return s.String()
  3967. }
  3968. // Validate inspects the fields of the type to determine if they are valid.
  3969. func (s *SetVaultNotificationsInput) Validate() error {
  3970. invalidParams := request.ErrInvalidParams{Context: "SetVaultNotificationsInput"}
  3971. if s.AccountId == nil {
  3972. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  3973. }
  3974. if s.VaultName == nil {
  3975. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  3976. }
  3977. if invalidParams.Len() > 0 {
  3978. return invalidParams
  3979. }
  3980. return nil
  3981. }
  3982. type SetVaultNotificationsOutput struct {
  3983. _ struct{} `type:"structure"`
  3984. }
  3985. // String returns the string representation
  3986. func (s SetVaultNotificationsOutput) String() string {
  3987. return awsutil.Prettify(s)
  3988. }
  3989. // GoString returns the string representation
  3990. func (s SetVaultNotificationsOutput) GoString() string {
  3991. return s.String()
  3992. }
  3993. // Provides options to add an archive to a vault.
  3994. type UploadArchiveInput struct {
  3995. _ struct{} `type:"structure" payload:"Body"`
  3996. // The AccountId value is the AWS account ID of the account that owns the vault.
  3997. // You can either specify an AWS account ID or optionally a single apos-apos
  3998. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  3999. // with the credentials used to sign the request. If you use an account ID,
  4000. // do not include any hyphens (apos-apos) in the ID.
  4001. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  4002. // The optional description of the archive you are uploading.
  4003. ArchiveDescription *string `location:"header" locationName:"x-amz-archive-description" type:"string"`
  4004. // The data to upload.
  4005. Body io.ReadSeeker `locationName:"body" type:"blob"`
  4006. // The SHA256 tree hash of the data being uploaded.
  4007. Checksum *string `location:"header" locationName:"x-amz-sha256-tree-hash" type:"string"`
  4008. // The name of the vault.
  4009. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  4010. }
  4011. // String returns the string representation
  4012. func (s UploadArchiveInput) String() string {
  4013. return awsutil.Prettify(s)
  4014. }
  4015. // GoString returns the string representation
  4016. func (s UploadArchiveInput) GoString() string {
  4017. return s.String()
  4018. }
  4019. // Validate inspects the fields of the type to determine if they are valid.
  4020. func (s *UploadArchiveInput) Validate() error {
  4021. invalidParams := request.ErrInvalidParams{Context: "UploadArchiveInput"}
  4022. if s.AccountId == nil {
  4023. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  4024. }
  4025. if s.VaultName == nil {
  4026. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  4027. }
  4028. if invalidParams.Len() > 0 {
  4029. return invalidParams
  4030. }
  4031. return nil
  4032. }
  4033. // A list of in-progress multipart uploads for a vault.
  4034. type UploadListElement struct {
  4035. _ struct{} `type:"structure"`
  4036. // The description of the archive that was specified in the Initiate Multipart
  4037. // Upload request.
  4038. ArchiveDescription *string `type:"string"`
  4039. // The UTC time at which the multipart upload was initiated.
  4040. CreationDate *string `type:"string"`
  4041. // The ID of a multipart upload.
  4042. MultipartUploadId *string `type:"string"`
  4043. // The part size, in bytes, specified in the Initiate Multipart Upload request.
  4044. // This is the size of all the parts in the upload except the last part, which
  4045. // may be smaller than this size.
  4046. PartSizeInBytes *int64 `type:"long"`
  4047. // The Amazon Resource Name (ARN) of the vault that contains the archive.
  4048. VaultARN *string `type:"string"`
  4049. }
  4050. // String returns the string representation
  4051. func (s UploadListElement) String() string {
  4052. return awsutil.Prettify(s)
  4053. }
  4054. // GoString returns the string representation
  4055. func (s UploadListElement) GoString() string {
  4056. return s.String()
  4057. }
  4058. // Provides options to upload a part of an archive in a multipart upload operation.
  4059. type UploadMultipartPartInput struct {
  4060. _ struct{} `type:"structure" payload:"Body"`
  4061. // The AccountId value is the AWS account ID of the account that owns the vault.
  4062. // You can either specify an AWS account ID or optionally a single apos-apos
  4063. // (hyphen), in which case Amazon Glacier uses the AWS account ID associated
  4064. // with the credentials used to sign the request. If you use an account ID,
  4065. // do not include any hyphens (apos-apos) in the ID.
  4066. AccountId *string `location:"uri" locationName:"accountId" type:"string" required:"true"`
  4067. // The data to upload.
  4068. Body io.ReadSeeker `locationName:"body" type:"blob"`
  4069. // The SHA256 tree hash of the data being uploaded.
  4070. Checksum *string `location:"header" locationName:"x-amz-sha256-tree-hash" type:"string"`
  4071. // Identifies the range of bytes in the assembled archive that will be uploaded
  4072. // in this part. Amazon Glacier uses this information to assemble the archive
  4073. // in the proper sequence. The format of this header follows RFC 2616. An example
  4074. // header is Content-Range:bytes 0-4194303/*.
  4075. Range *string `location:"header" locationName:"Content-Range" type:"string"`
  4076. // The upload ID of the multipart upload.
  4077. UploadId *string `location:"uri" locationName:"uploadId" type:"string" required:"true"`
  4078. // The name of the vault.
  4079. VaultName *string `location:"uri" locationName:"vaultName" type:"string" required:"true"`
  4080. }
  4081. // String returns the string representation
  4082. func (s UploadMultipartPartInput) String() string {
  4083. return awsutil.Prettify(s)
  4084. }
  4085. // GoString returns the string representation
  4086. func (s UploadMultipartPartInput) GoString() string {
  4087. return s.String()
  4088. }
  4089. // Validate inspects the fields of the type to determine if they are valid.
  4090. func (s *UploadMultipartPartInput) Validate() error {
  4091. invalidParams := request.ErrInvalidParams{Context: "UploadMultipartPartInput"}
  4092. if s.AccountId == nil {
  4093. invalidParams.Add(request.NewErrParamRequired("AccountId"))
  4094. }
  4095. if s.UploadId == nil {
  4096. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  4097. }
  4098. if s.VaultName == nil {
  4099. invalidParams.Add(request.NewErrParamRequired("VaultName"))
  4100. }
  4101. if invalidParams.Len() > 0 {
  4102. return invalidParams
  4103. }
  4104. return nil
  4105. }
  4106. // Contains the Amazon Glacier response to your request.
  4107. type UploadMultipartPartOutput struct {
  4108. _ struct{} `type:"structure"`
  4109. // The SHA256 tree hash that Amazon Glacier computed for the uploaded part.
  4110. Checksum *string `location:"header" locationName:"x-amz-sha256-tree-hash" type:"string"`
  4111. }
  4112. // String returns the string representation
  4113. func (s UploadMultipartPartOutput) String() string {
  4114. return awsutil.Prettify(s)
  4115. }
  4116. // GoString returns the string representation
  4117. func (s UploadMultipartPartOutput) GoString() string {
  4118. return s.String()
  4119. }
  4120. // Contains the vault access policy.
  4121. type VaultAccessPolicy struct {
  4122. _ struct{} `type:"structure"`
  4123. // The vault access policy.
  4124. Policy *string `type:"string"`
  4125. }
  4126. // String returns the string representation
  4127. func (s VaultAccessPolicy) String() string {
  4128. return awsutil.Prettify(s)
  4129. }
  4130. // GoString returns the string representation
  4131. func (s VaultAccessPolicy) GoString() string {
  4132. return s.String()
  4133. }
  4134. // Contains the vault lock policy.
  4135. type VaultLockPolicy struct {
  4136. _ struct{} `type:"structure"`
  4137. // The vault lock policy.
  4138. Policy *string `type:"string"`
  4139. }
  4140. // String returns the string representation
  4141. func (s VaultLockPolicy) String() string {
  4142. return awsutil.Prettify(s)
  4143. }
  4144. // GoString returns the string representation
  4145. func (s VaultLockPolicy) GoString() string {
  4146. return s.String()
  4147. }
  4148. // Represents a vault's notification configuration.
  4149. type VaultNotificationConfig struct {
  4150. _ struct{} `type:"structure"`
  4151. // A list of one or more events for which Amazon Glacier will send a notification
  4152. // to the specified Amazon SNS topic.
  4153. Events []*string `type:"list"`
  4154. // The Amazon Simple Notification Service (Amazon SNS) topic Amazon Resource
  4155. // Name (ARN).
  4156. SNSTopic *string `type:"string"`
  4157. }
  4158. // String returns the string representation
  4159. func (s VaultNotificationConfig) String() string {
  4160. return awsutil.Prettify(s)
  4161. }
  4162. // GoString returns the string representation
  4163. func (s VaultNotificationConfig) GoString() string {
  4164. return s.String()
  4165. }
  4166. const (
  4167. // @enum ActionCode
  4168. ActionCodeArchiveRetrieval = "ArchiveRetrieval"
  4169. // @enum ActionCode
  4170. ActionCodeInventoryRetrieval = "InventoryRetrieval"
  4171. )
  4172. const (
  4173. // @enum StatusCode
  4174. StatusCodeInProgress = "InProgress"
  4175. // @enum StatusCode
  4176. StatusCodeSucceeded = "Succeeded"
  4177. // @enum StatusCode
  4178. StatusCodeFailed = "Failed"
  4179. )