api.go 384 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package backup
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/restjson"
  11. )
  12. const opCreateBackupPlan = "CreateBackupPlan"
  13. // CreateBackupPlanRequest generates a "aws/request.Request" representing the
  14. // client's request for the CreateBackupPlan operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See CreateBackupPlan for more information on using the CreateBackupPlan
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. //
  28. // // Example sending a request using the CreateBackupPlanRequest method.
  29. // req, resp := client.CreateBackupPlanRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupPlan
  37. func (c *Backup) CreateBackupPlanRequest(input *CreateBackupPlanInput) (req *request.Request, output *CreateBackupPlanOutput) {
  38. op := &request.Operation{
  39. Name: opCreateBackupPlan,
  40. HTTPMethod: "PUT",
  41. HTTPPath: "/backup/plans/",
  42. }
  43. if input == nil {
  44. input = &CreateBackupPlanInput{}
  45. }
  46. output = &CreateBackupPlanOutput{}
  47. req = c.newRequest(op, input, output)
  48. return
  49. }
  50. // CreateBackupPlan API operation for AWS Backup.
  51. //
  52. // Backup plans are documents that contain information that AWS Backup uses
  53. // to schedule tasks that create recovery points of resources.
  54. //
  55. // If you call CreateBackupPlan with a plan that already exists, the existing
  56. // backupPlanId is returned.
  57. //
  58. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  59. // with awserr.Error's Code and Message methods to get detailed information about
  60. // the error.
  61. //
  62. // See the AWS API reference guide for AWS Backup's
  63. // API operation CreateBackupPlan for usage and error information.
  64. //
  65. // Returned Error Codes:
  66. // * ErrCodeLimitExceededException "LimitExceededException"
  67. // A limit in the request has been exceeded; for example, a maximum number of
  68. // items allowed in a request.
  69. //
  70. // * ErrCodeAlreadyExistsException "AlreadyExistsException"
  71. // The required resource already exists.
  72. //
  73. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  74. // Indicates that something is wrong with a parameter's value. For example,
  75. // the value is out of range.
  76. //
  77. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  78. // Indicates that a required parameter is missing.
  79. //
  80. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  81. // The request failed due to a temporary failure of the server.
  82. //
  83. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupPlan
  84. func (c *Backup) CreateBackupPlan(input *CreateBackupPlanInput) (*CreateBackupPlanOutput, error) {
  85. req, out := c.CreateBackupPlanRequest(input)
  86. return out, req.Send()
  87. }
  88. // CreateBackupPlanWithContext is the same as CreateBackupPlan with the addition of
  89. // the ability to pass a context and additional request options.
  90. //
  91. // See CreateBackupPlan for details on how to use this API operation.
  92. //
  93. // The context must be non-nil and will be used for request cancellation. If
  94. // the context is nil a panic will occur. In the future the SDK may create
  95. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  96. // for more information on using Contexts.
  97. func (c *Backup) CreateBackupPlanWithContext(ctx aws.Context, input *CreateBackupPlanInput, opts ...request.Option) (*CreateBackupPlanOutput, error) {
  98. req, out := c.CreateBackupPlanRequest(input)
  99. req.SetContext(ctx)
  100. req.ApplyOptions(opts...)
  101. return out, req.Send()
  102. }
  103. const opCreateBackupSelection = "CreateBackupSelection"
  104. // CreateBackupSelectionRequest generates a "aws/request.Request" representing the
  105. // client's request for the CreateBackupSelection operation. The "output" return
  106. // value will be populated with the request's response once the request completes
  107. // successfully.
  108. //
  109. // Use "Send" method on the returned Request to send the API call to the service.
  110. // the "output" return value is not valid until after Send returns without error.
  111. //
  112. // See CreateBackupSelection for more information on using the CreateBackupSelection
  113. // API call, and error handling.
  114. //
  115. // This method is useful when you want to inject custom logic or configuration
  116. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  117. //
  118. //
  119. // // Example sending a request using the CreateBackupSelectionRequest method.
  120. // req, resp := client.CreateBackupSelectionRequest(params)
  121. //
  122. // err := req.Send()
  123. // if err == nil { // resp is now filled
  124. // fmt.Println(resp)
  125. // }
  126. //
  127. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupSelection
  128. func (c *Backup) CreateBackupSelectionRequest(input *CreateBackupSelectionInput) (req *request.Request, output *CreateBackupSelectionOutput) {
  129. op := &request.Operation{
  130. Name: opCreateBackupSelection,
  131. HTTPMethod: "PUT",
  132. HTTPPath: "/backup/plans/{backupPlanId}/selections/",
  133. }
  134. if input == nil {
  135. input = &CreateBackupSelectionInput{}
  136. }
  137. output = &CreateBackupSelectionOutput{}
  138. req = c.newRequest(op, input, output)
  139. return
  140. }
  141. // CreateBackupSelection API operation for AWS Backup.
  142. //
  143. // Creates a JSON document that specifies a set of resources to assign to a
  144. // backup plan. Resources can be included by specifying patterns for a ListOfTags
  145. // and selected Resources.
  146. //
  147. // For example, consider the following patterns:
  148. //
  149. // * Resources: "arn:aws:ec2:region:account-id:volume/volume-id"
  150. //
  151. // * ConditionKey:"department"
  152. //
  153. // ConditionValue:"finance"
  154. //
  155. // ConditionType:"StringEquals"
  156. //
  157. // * ConditionKey:"importance"
  158. //
  159. // ConditionValue:"critical"
  160. //
  161. // ConditionType:"StringEquals"
  162. //
  163. // Using these patterns would back up all Amazon Elastic Block Store (Amazon
  164. // EBS) volumes that are tagged as "department=finance", "importance=critical",
  165. // in addition to an EBS volume with the specified volume Id.
  166. //
  167. // Resources and conditions are additive in that all resources that match the
  168. // pattern are selected. This shouldn't be confused with a logical AND, where
  169. // all conditions must match. The matching patterns are logically 'put together
  170. // using the OR operator. In other words, all patterns that match are selected
  171. // for backup.
  172. //
  173. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  174. // with awserr.Error's Code and Message methods to get detailed information about
  175. // the error.
  176. //
  177. // See the AWS API reference guide for AWS Backup's
  178. // API operation CreateBackupSelection for usage and error information.
  179. //
  180. // Returned Error Codes:
  181. // * ErrCodeLimitExceededException "LimitExceededException"
  182. // A limit in the request has been exceeded; for example, a maximum number of
  183. // items allowed in a request.
  184. //
  185. // * ErrCodeAlreadyExistsException "AlreadyExistsException"
  186. // The required resource already exists.
  187. //
  188. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  189. // Indicates that something is wrong with a parameter's value. For example,
  190. // the value is out of range.
  191. //
  192. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  193. // Indicates that a required parameter is missing.
  194. //
  195. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  196. // The request failed due to a temporary failure of the server.
  197. //
  198. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupSelection
  199. func (c *Backup) CreateBackupSelection(input *CreateBackupSelectionInput) (*CreateBackupSelectionOutput, error) {
  200. req, out := c.CreateBackupSelectionRequest(input)
  201. return out, req.Send()
  202. }
  203. // CreateBackupSelectionWithContext is the same as CreateBackupSelection with the addition of
  204. // the ability to pass a context and additional request options.
  205. //
  206. // See CreateBackupSelection for details on how to use this API operation.
  207. //
  208. // The context must be non-nil and will be used for request cancellation. If
  209. // the context is nil a panic will occur. In the future the SDK may create
  210. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  211. // for more information on using Contexts.
  212. func (c *Backup) CreateBackupSelectionWithContext(ctx aws.Context, input *CreateBackupSelectionInput, opts ...request.Option) (*CreateBackupSelectionOutput, error) {
  213. req, out := c.CreateBackupSelectionRequest(input)
  214. req.SetContext(ctx)
  215. req.ApplyOptions(opts...)
  216. return out, req.Send()
  217. }
  218. const opCreateBackupVault = "CreateBackupVault"
  219. // CreateBackupVaultRequest generates a "aws/request.Request" representing the
  220. // client's request for the CreateBackupVault operation. The "output" return
  221. // value will be populated with the request's response once the request completes
  222. // successfully.
  223. //
  224. // Use "Send" method on the returned Request to send the API call to the service.
  225. // the "output" return value is not valid until after Send returns without error.
  226. //
  227. // See CreateBackupVault for more information on using the CreateBackupVault
  228. // API call, and error handling.
  229. //
  230. // This method is useful when you want to inject custom logic or configuration
  231. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  232. //
  233. //
  234. // // Example sending a request using the CreateBackupVaultRequest method.
  235. // req, resp := client.CreateBackupVaultRequest(params)
  236. //
  237. // err := req.Send()
  238. // if err == nil { // resp is now filled
  239. // fmt.Println(resp)
  240. // }
  241. //
  242. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupVault
  243. func (c *Backup) CreateBackupVaultRequest(input *CreateBackupVaultInput) (req *request.Request, output *CreateBackupVaultOutput) {
  244. op := &request.Operation{
  245. Name: opCreateBackupVault,
  246. HTTPMethod: "PUT",
  247. HTTPPath: "/backup-vaults/{backupVaultName}",
  248. }
  249. if input == nil {
  250. input = &CreateBackupVaultInput{}
  251. }
  252. output = &CreateBackupVaultOutput{}
  253. req = c.newRequest(op, input, output)
  254. return
  255. }
  256. // CreateBackupVault API operation for AWS Backup.
  257. //
  258. // Creates a logical container where backups are stored. A CreateBackupVault
  259. // request includes a name, optionally one or more resource tags, an encryption
  260. // key, and a request ID.
  261. //
  262. // Sensitive data, such as passport numbers, should not be included the name
  263. // of a backup vault.
  264. //
  265. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  266. // with awserr.Error's Code and Message methods to get detailed information about
  267. // the error.
  268. //
  269. // See the AWS API reference guide for AWS Backup's
  270. // API operation CreateBackupVault for usage and error information.
  271. //
  272. // Returned Error Codes:
  273. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  274. // Indicates that something is wrong with a parameter's value. For example,
  275. // the value is out of range.
  276. //
  277. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  278. // Indicates that a required parameter is missing.
  279. //
  280. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  281. // The request failed due to a temporary failure of the server.
  282. //
  283. // * ErrCodeLimitExceededException "LimitExceededException"
  284. // A limit in the request has been exceeded; for example, a maximum number of
  285. // items allowed in a request.
  286. //
  287. // * ErrCodeAlreadyExistsException "AlreadyExistsException"
  288. // The required resource already exists.
  289. //
  290. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupVault
  291. func (c *Backup) CreateBackupVault(input *CreateBackupVaultInput) (*CreateBackupVaultOutput, error) {
  292. req, out := c.CreateBackupVaultRequest(input)
  293. return out, req.Send()
  294. }
  295. // CreateBackupVaultWithContext is the same as CreateBackupVault with the addition of
  296. // the ability to pass a context and additional request options.
  297. //
  298. // See CreateBackupVault for details on how to use this API operation.
  299. //
  300. // The context must be non-nil and will be used for request cancellation. If
  301. // the context is nil a panic will occur. In the future the SDK may create
  302. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  303. // for more information on using Contexts.
  304. func (c *Backup) CreateBackupVaultWithContext(ctx aws.Context, input *CreateBackupVaultInput, opts ...request.Option) (*CreateBackupVaultOutput, error) {
  305. req, out := c.CreateBackupVaultRequest(input)
  306. req.SetContext(ctx)
  307. req.ApplyOptions(opts...)
  308. return out, req.Send()
  309. }
  310. const opDeleteBackupPlan = "DeleteBackupPlan"
  311. // DeleteBackupPlanRequest generates a "aws/request.Request" representing the
  312. // client's request for the DeleteBackupPlan operation. The "output" return
  313. // value will be populated with the request's response once the request completes
  314. // successfully.
  315. //
  316. // Use "Send" method on the returned Request to send the API call to the service.
  317. // the "output" return value is not valid until after Send returns without error.
  318. //
  319. // See DeleteBackupPlan for more information on using the DeleteBackupPlan
  320. // API call, and error handling.
  321. //
  322. // This method is useful when you want to inject custom logic or configuration
  323. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  324. //
  325. //
  326. // // Example sending a request using the DeleteBackupPlanRequest method.
  327. // req, resp := client.DeleteBackupPlanRequest(params)
  328. //
  329. // err := req.Send()
  330. // if err == nil { // resp is now filled
  331. // fmt.Println(resp)
  332. // }
  333. //
  334. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupPlan
  335. func (c *Backup) DeleteBackupPlanRequest(input *DeleteBackupPlanInput) (req *request.Request, output *DeleteBackupPlanOutput) {
  336. op := &request.Operation{
  337. Name: opDeleteBackupPlan,
  338. HTTPMethod: "DELETE",
  339. HTTPPath: "/backup/plans/{backupPlanId}",
  340. }
  341. if input == nil {
  342. input = &DeleteBackupPlanInput{}
  343. }
  344. output = &DeleteBackupPlanOutput{}
  345. req = c.newRequest(op, input, output)
  346. return
  347. }
  348. // DeleteBackupPlan API operation for AWS Backup.
  349. //
  350. // Deletes a backup plan. A backup plan can only be deleted after all associated
  351. // selections of resources have been deleted. Deleting a backup plan deletes
  352. // the current version of a backup plan. Previous versions, if any, will still
  353. // exist.
  354. //
  355. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  356. // with awserr.Error's Code and Message methods to get detailed information about
  357. // the error.
  358. //
  359. // See the AWS API reference guide for AWS Backup's
  360. // API operation DeleteBackupPlan for usage and error information.
  361. //
  362. // Returned Error Codes:
  363. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  364. // A resource that is required for the action doesn't exist.
  365. //
  366. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  367. // Indicates that something is wrong with a parameter's value. For example,
  368. // the value is out of range.
  369. //
  370. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  371. // Indicates that a required parameter is missing.
  372. //
  373. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  374. // The request failed due to a temporary failure of the server.
  375. //
  376. // * ErrCodeInvalidRequestException "InvalidRequestException"
  377. // Indicates that something is wrong with the input to the request. For example,
  378. // a parameter is of the wrong type.
  379. //
  380. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupPlan
  381. func (c *Backup) DeleteBackupPlan(input *DeleteBackupPlanInput) (*DeleteBackupPlanOutput, error) {
  382. req, out := c.DeleteBackupPlanRequest(input)
  383. return out, req.Send()
  384. }
  385. // DeleteBackupPlanWithContext is the same as DeleteBackupPlan with the addition of
  386. // the ability to pass a context and additional request options.
  387. //
  388. // See DeleteBackupPlan for details on how to use this API operation.
  389. //
  390. // The context must be non-nil and will be used for request cancellation. If
  391. // the context is nil a panic will occur. In the future the SDK may create
  392. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  393. // for more information on using Contexts.
  394. func (c *Backup) DeleteBackupPlanWithContext(ctx aws.Context, input *DeleteBackupPlanInput, opts ...request.Option) (*DeleteBackupPlanOutput, error) {
  395. req, out := c.DeleteBackupPlanRequest(input)
  396. req.SetContext(ctx)
  397. req.ApplyOptions(opts...)
  398. return out, req.Send()
  399. }
  400. const opDeleteBackupSelection = "DeleteBackupSelection"
  401. // DeleteBackupSelectionRequest generates a "aws/request.Request" representing the
  402. // client's request for the DeleteBackupSelection operation. The "output" return
  403. // value will be populated with the request's response once the request completes
  404. // successfully.
  405. //
  406. // Use "Send" method on the returned Request to send the API call to the service.
  407. // the "output" return value is not valid until after Send returns without error.
  408. //
  409. // See DeleteBackupSelection for more information on using the DeleteBackupSelection
  410. // API call, and error handling.
  411. //
  412. // This method is useful when you want to inject custom logic or configuration
  413. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  414. //
  415. //
  416. // // Example sending a request using the DeleteBackupSelectionRequest method.
  417. // req, resp := client.DeleteBackupSelectionRequest(params)
  418. //
  419. // err := req.Send()
  420. // if err == nil { // resp is now filled
  421. // fmt.Println(resp)
  422. // }
  423. //
  424. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupSelection
  425. func (c *Backup) DeleteBackupSelectionRequest(input *DeleteBackupSelectionInput) (req *request.Request, output *DeleteBackupSelectionOutput) {
  426. op := &request.Operation{
  427. Name: opDeleteBackupSelection,
  428. HTTPMethod: "DELETE",
  429. HTTPPath: "/backup/plans/{backupPlanId}/selections/{selectionId}",
  430. }
  431. if input == nil {
  432. input = &DeleteBackupSelectionInput{}
  433. }
  434. output = &DeleteBackupSelectionOutput{}
  435. req = c.newRequest(op, input, output)
  436. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  437. return
  438. }
  439. // DeleteBackupSelection API operation for AWS Backup.
  440. //
  441. // Deletes the resource selection associated with a backup plan that is specified
  442. // by the SelectionId.
  443. //
  444. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  445. // with awserr.Error's Code and Message methods to get detailed information about
  446. // the error.
  447. //
  448. // See the AWS API reference guide for AWS Backup's
  449. // API operation DeleteBackupSelection for usage and error information.
  450. //
  451. // Returned Error Codes:
  452. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  453. // A resource that is required for the action doesn't exist.
  454. //
  455. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  456. // Indicates that something is wrong with a parameter's value. For example,
  457. // the value is out of range.
  458. //
  459. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  460. // Indicates that a required parameter is missing.
  461. //
  462. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  463. // The request failed due to a temporary failure of the server.
  464. //
  465. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupSelection
  466. func (c *Backup) DeleteBackupSelection(input *DeleteBackupSelectionInput) (*DeleteBackupSelectionOutput, error) {
  467. req, out := c.DeleteBackupSelectionRequest(input)
  468. return out, req.Send()
  469. }
  470. // DeleteBackupSelectionWithContext is the same as DeleteBackupSelection with the addition of
  471. // the ability to pass a context and additional request options.
  472. //
  473. // See DeleteBackupSelection for details on how to use this API operation.
  474. //
  475. // The context must be non-nil and will be used for request cancellation. If
  476. // the context is nil a panic will occur. In the future the SDK may create
  477. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  478. // for more information on using Contexts.
  479. func (c *Backup) DeleteBackupSelectionWithContext(ctx aws.Context, input *DeleteBackupSelectionInput, opts ...request.Option) (*DeleteBackupSelectionOutput, error) {
  480. req, out := c.DeleteBackupSelectionRequest(input)
  481. req.SetContext(ctx)
  482. req.ApplyOptions(opts...)
  483. return out, req.Send()
  484. }
  485. const opDeleteBackupVault = "DeleteBackupVault"
  486. // DeleteBackupVaultRequest generates a "aws/request.Request" representing the
  487. // client's request for the DeleteBackupVault operation. The "output" return
  488. // value will be populated with the request's response once the request completes
  489. // successfully.
  490. //
  491. // Use "Send" method on the returned Request to send the API call to the service.
  492. // the "output" return value is not valid until after Send returns without error.
  493. //
  494. // See DeleteBackupVault for more information on using the DeleteBackupVault
  495. // API call, and error handling.
  496. //
  497. // This method is useful when you want to inject custom logic or configuration
  498. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  499. //
  500. //
  501. // // Example sending a request using the DeleteBackupVaultRequest method.
  502. // req, resp := client.DeleteBackupVaultRequest(params)
  503. //
  504. // err := req.Send()
  505. // if err == nil { // resp is now filled
  506. // fmt.Println(resp)
  507. // }
  508. //
  509. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVault
  510. func (c *Backup) DeleteBackupVaultRequest(input *DeleteBackupVaultInput) (req *request.Request, output *DeleteBackupVaultOutput) {
  511. op := &request.Operation{
  512. Name: opDeleteBackupVault,
  513. HTTPMethod: "DELETE",
  514. HTTPPath: "/backup-vaults/{backupVaultName}",
  515. }
  516. if input == nil {
  517. input = &DeleteBackupVaultInput{}
  518. }
  519. output = &DeleteBackupVaultOutput{}
  520. req = c.newRequest(op, input, output)
  521. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  522. return
  523. }
  524. // DeleteBackupVault API operation for AWS Backup.
  525. //
  526. // Deletes the backup vault identified by its name. A vault can be deleted only
  527. // if it is empty.
  528. //
  529. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  530. // with awserr.Error's Code and Message methods to get detailed information about
  531. // the error.
  532. //
  533. // See the AWS API reference guide for AWS Backup's
  534. // API operation DeleteBackupVault for usage and error information.
  535. //
  536. // Returned Error Codes:
  537. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  538. // A resource that is required for the action doesn't exist.
  539. //
  540. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  541. // Indicates that something is wrong with a parameter's value. For example,
  542. // the value is out of range.
  543. //
  544. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  545. // Indicates that a required parameter is missing.
  546. //
  547. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  548. // The request failed due to a temporary failure of the server.
  549. //
  550. // * ErrCodeInvalidRequestException "InvalidRequestException"
  551. // Indicates that something is wrong with the input to the request. For example,
  552. // a parameter is of the wrong type.
  553. //
  554. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVault
  555. func (c *Backup) DeleteBackupVault(input *DeleteBackupVaultInput) (*DeleteBackupVaultOutput, error) {
  556. req, out := c.DeleteBackupVaultRequest(input)
  557. return out, req.Send()
  558. }
  559. // DeleteBackupVaultWithContext is the same as DeleteBackupVault with the addition of
  560. // the ability to pass a context and additional request options.
  561. //
  562. // See DeleteBackupVault for details on how to use this API operation.
  563. //
  564. // The context must be non-nil and will be used for request cancellation. If
  565. // the context is nil a panic will occur. In the future the SDK may create
  566. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  567. // for more information on using Contexts.
  568. func (c *Backup) DeleteBackupVaultWithContext(ctx aws.Context, input *DeleteBackupVaultInput, opts ...request.Option) (*DeleteBackupVaultOutput, error) {
  569. req, out := c.DeleteBackupVaultRequest(input)
  570. req.SetContext(ctx)
  571. req.ApplyOptions(opts...)
  572. return out, req.Send()
  573. }
  574. const opDeleteBackupVaultAccessPolicy = "DeleteBackupVaultAccessPolicy"
  575. // DeleteBackupVaultAccessPolicyRequest generates a "aws/request.Request" representing the
  576. // client's request for the DeleteBackupVaultAccessPolicy operation. The "output" return
  577. // value will be populated with the request's response once the request completes
  578. // successfully.
  579. //
  580. // Use "Send" method on the returned Request to send the API call to the service.
  581. // the "output" return value is not valid until after Send returns without error.
  582. //
  583. // See DeleteBackupVaultAccessPolicy for more information on using the DeleteBackupVaultAccessPolicy
  584. // API call, and error handling.
  585. //
  586. // This method is useful when you want to inject custom logic or configuration
  587. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  588. //
  589. //
  590. // // Example sending a request using the DeleteBackupVaultAccessPolicyRequest method.
  591. // req, resp := client.DeleteBackupVaultAccessPolicyRequest(params)
  592. //
  593. // err := req.Send()
  594. // if err == nil { // resp is now filled
  595. // fmt.Println(resp)
  596. // }
  597. //
  598. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultAccessPolicy
  599. func (c *Backup) DeleteBackupVaultAccessPolicyRequest(input *DeleteBackupVaultAccessPolicyInput) (req *request.Request, output *DeleteBackupVaultAccessPolicyOutput) {
  600. op := &request.Operation{
  601. Name: opDeleteBackupVaultAccessPolicy,
  602. HTTPMethod: "DELETE",
  603. HTTPPath: "/backup-vaults/{backupVaultName}/access-policy",
  604. }
  605. if input == nil {
  606. input = &DeleteBackupVaultAccessPolicyInput{}
  607. }
  608. output = &DeleteBackupVaultAccessPolicyOutput{}
  609. req = c.newRequest(op, input, output)
  610. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  611. return
  612. }
  613. // DeleteBackupVaultAccessPolicy API operation for AWS Backup.
  614. //
  615. // Deletes the policy document that manages permissions on a backup vault.
  616. //
  617. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  618. // with awserr.Error's Code and Message methods to get detailed information about
  619. // the error.
  620. //
  621. // See the AWS API reference guide for AWS Backup's
  622. // API operation DeleteBackupVaultAccessPolicy for usage and error information.
  623. //
  624. // Returned Error Codes:
  625. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  626. // A resource that is required for the action doesn't exist.
  627. //
  628. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  629. // Indicates that something is wrong with a parameter's value. For example,
  630. // the value is out of range.
  631. //
  632. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  633. // Indicates that a required parameter is missing.
  634. //
  635. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  636. // The request failed due to a temporary failure of the server.
  637. //
  638. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultAccessPolicy
  639. func (c *Backup) DeleteBackupVaultAccessPolicy(input *DeleteBackupVaultAccessPolicyInput) (*DeleteBackupVaultAccessPolicyOutput, error) {
  640. req, out := c.DeleteBackupVaultAccessPolicyRequest(input)
  641. return out, req.Send()
  642. }
  643. // DeleteBackupVaultAccessPolicyWithContext is the same as DeleteBackupVaultAccessPolicy with the addition of
  644. // the ability to pass a context and additional request options.
  645. //
  646. // See DeleteBackupVaultAccessPolicy for details on how to use this API operation.
  647. //
  648. // The context must be non-nil and will be used for request cancellation. If
  649. // the context is nil a panic will occur. In the future the SDK may create
  650. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  651. // for more information on using Contexts.
  652. func (c *Backup) DeleteBackupVaultAccessPolicyWithContext(ctx aws.Context, input *DeleteBackupVaultAccessPolicyInput, opts ...request.Option) (*DeleteBackupVaultAccessPolicyOutput, error) {
  653. req, out := c.DeleteBackupVaultAccessPolicyRequest(input)
  654. req.SetContext(ctx)
  655. req.ApplyOptions(opts...)
  656. return out, req.Send()
  657. }
  658. const opDeleteBackupVaultNotifications = "DeleteBackupVaultNotifications"
  659. // DeleteBackupVaultNotificationsRequest generates a "aws/request.Request" representing the
  660. // client's request for the DeleteBackupVaultNotifications operation. The "output" return
  661. // value will be populated with the request's response once the request completes
  662. // successfully.
  663. //
  664. // Use "Send" method on the returned Request to send the API call to the service.
  665. // the "output" return value is not valid until after Send returns without error.
  666. //
  667. // See DeleteBackupVaultNotifications for more information on using the DeleteBackupVaultNotifications
  668. // API call, and error handling.
  669. //
  670. // This method is useful when you want to inject custom logic or configuration
  671. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  672. //
  673. //
  674. // // Example sending a request using the DeleteBackupVaultNotificationsRequest method.
  675. // req, resp := client.DeleteBackupVaultNotificationsRequest(params)
  676. //
  677. // err := req.Send()
  678. // if err == nil { // resp is now filled
  679. // fmt.Println(resp)
  680. // }
  681. //
  682. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultNotifications
  683. func (c *Backup) DeleteBackupVaultNotificationsRequest(input *DeleteBackupVaultNotificationsInput) (req *request.Request, output *DeleteBackupVaultNotificationsOutput) {
  684. op := &request.Operation{
  685. Name: opDeleteBackupVaultNotifications,
  686. HTTPMethod: "DELETE",
  687. HTTPPath: "/backup-vaults/{backupVaultName}/notification-configuration",
  688. }
  689. if input == nil {
  690. input = &DeleteBackupVaultNotificationsInput{}
  691. }
  692. output = &DeleteBackupVaultNotificationsOutput{}
  693. req = c.newRequest(op, input, output)
  694. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  695. return
  696. }
  697. // DeleteBackupVaultNotifications API operation for AWS Backup.
  698. //
  699. // Deletes event notifications for the specified backup vault.
  700. //
  701. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  702. // with awserr.Error's Code and Message methods to get detailed information about
  703. // the error.
  704. //
  705. // See the AWS API reference guide for AWS Backup's
  706. // API operation DeleteBackupVaultNotifications for usage and error information.
  707. //
  708. // Returned Error Codes:
  709. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  710. // A resource that is required for the action doesn't exist.
  711. //
  712. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  713. // Indicates that something is wrong with a parameter's value. For example,
  714. // the value is out of range.
  715. //
  716. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  717. // Indicates that a required parameter is missing.
  718. //
  719. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  720. // The request failed due to a temporary failure of the server.
  721. //
  722. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultNotifications
  723. func (c *Backup) DeleteBackupVaultNotifications(input *DeleteBackupVaultNotificationsInput) (*DeleteBackupVaultNotificationsOutput, error) {
  724. req, out := c.DeleteBackupVaultNotificationsRequest(input)
  725. return out, req.Send()
  726. }
  727. // DeleteBackupVaultNotificationsWithContext is the same as DeleteBackupVaultNotifications with the addition of
  728. // the ability to pass a context and additional request options.
  729. //
  730. // See DeleteBackupVaultNotifications for details on how to use this API operation.
  731. //
  732. // The context must be non-nil and will be used for request cancellation. If
  733. // the context is nil a panic will occur. In the future the SDK may create
  734. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  735. // for more information on using Contexts.
  736. func (c *Backup) DeleteBackupVaultNotificationsWithContext(ctx aws.Context, input *DeleteBackupVaultNotificationsInput, opts ...request.Option) (*DeleteBackupVaultNotificationsOutput, error) {
  737. req, out := c.DeleteBackupVaultNotificationsRequest(input)
  738. req.SetContext(ctx)
  739. req.ApplyOptions(opts...)
  740. return out, req.Send()
  741. }
  742. const opDeleteRecoveryPoint = "DeleteRecoveryPoint"
  743. // DeleteRecoveryPointRequest generates a "aws/request.Request" representing the
  744. // client's request for the DeleteRecoveryPoint operation. The "output" return
  745. // value will be populated with the request's response once the request completes
  746. // successfully.
  747. //
  748. // Use "Send" method on the returned Request to send the API call to the service.
  749. // the "output" return value is not valid until after Send returns without error.
  750. //
  751. // See DeleteRecoveryPoint for more information on using the DeleteRecoveryPoint
  752. // API call, and error handling.
  753. //
  754. // This method is useful when you want to inject custom logic or configuration
  755. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  756. //
  757. //
  758. // // Example sending a request using the DeleteRecoveryPointRequest method.
  759. // req, resp := client.DeleteRecoveryPointRequest(params)
  760. //
  761. // err := req.Send()
  762. // if err == nil { // resp is now filled
  763. // fmt.Println(resp)
  764. // }
  765. //
  766. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteRecoveryPoint
  767. func (c *Backup) DeleteRecoveryPointRequest(input *DeleteRecoveryPointInput) (req *request.Request, output *DeleteRecoveryPointOutput) {
  768. op := &request.Operation{
  769. Name: opDeleteRecoveryPoint,
  770. HTTPMethod: "DELETE",
  771. HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}",
  772. }
  773. if input == nil {
  774. input = &DeleteRecoveryPointInput{}
  775. }
  776. output = &DeleteRecoveryPointOutput{}
  777. req = c.newRequest(op, input, output)
  778. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  779. return
  780. }
  781. // DeleteRecoveryPoint API operation for AWS Backup.
  782. //
  783. // Deletes the recovery point specified by a recovery point ID.
  784. //
  785. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  786. // with awserr.Error's Code and Message methods to get detailed information about
  787. // the error.
  788. //
  789. // See the AWS API reference guide for AWS Backup's
  790. // API operation DeleteRecoveryPoint for usage and error information.
  791. //
  792. // Returned Error Codes:
  793. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  794. // A resource that is required for the action doesn't exist.
  795. //
  796. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  797. // Indicates that something is wrong with a parameter's value. For example,
  798. // the value is out of range.
  799. //
  800. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  801. // Indicates that a required parameter is missing.
  802. //
  803. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  804. // The request failed due to a temporary failure of the server.
  805. //
  806. // * ErrCodeInvalidRequestException "InvalidRequestException"
  807. // Indicates that something is wrong with the input to the request. For example,
  808. // a parameter is of the wrong type.
  809. //
  810. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteRecoveryPoint
  811. func (c *Backup) DeleteRecoveryPoint(input *DeleteRecoveryPointInput) (*DeleteRecoveryPointOutput, error) {
  812. req, out := c.DeleteRecoveryPointRequest(input)
  813. return out, req.Send()
  814. }
  815. // DeleteRecoveryPointWithContext is the same as DeleteRecoveryPoint with the addition of
  816. // the ability to pass a context and additional request options.
  817. //
  818. // See DeleteRecoveryPoint for details on how to use this API operation.
  819. //
  820. // The context must be non-nil and will be used for request cancellation. If
  821. // the context is nil a panic will occur. In the future the SDK may create
  822. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  823. // for more information on using Contexts.
  824. func (c *Backup) DeleteRecoveryPointWithContext(ctx aws.Context, input *DeleteRecoveryPointInput, opts ...request.Option) (*DeleteRecoveryPointOutput, error) {
  825. req, out := c.DeleteRecoveryPointRequest(input)
  826. req.SetContext(ctx)
  827. req.ApplyOptions(opts...)
  828. return out, req.Send()
  829. }
  830. const opDescribeBackupJob = "DescribeBackupJob"
  831. // DescribeBackupJobRequest generates a "aws/request.Request" representing the
  832. // client's request for the DescribeBackupJob operation. The "output" return
  833. // value will be populated with the request's response once the request completes
  834. // successfully.
  835. //
  836. // Use "Send" method on the returned Request to send the API call to the service.
  837. // the "output" return value is not valid until after Send returns without error.
  838. //
  839. // See DescribeBackupJob for more information on using the DescribeBackupJob
  840. // API call, and error handling.
  841. //
  842. // This method is useful when you want to inject custom logic or configuration
  843. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  844. //
  845. //
  846. // // Example sending a request using the DescribeBackupJobRequest method.
  847. // req, resp := client.DescribeBackupJobRequest(params)
  848. //
  849. // err := req.Send()
  850. // if err == nil { // resp is now filled
  851. // fmt.Println(resp)
  852. // }
  853. //
  854. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupJob
  855. func (c *Backup) DescribeBackupJobRequest(input *DescribeBackupJobInput) (req *request.Request, output *DescribeBackupJobOutput) {
  856. op := &request.Operation{
  857. Name: opDescribeBackupJob,
  858. HTTPMethod: "GET",
  859. HTTPPath: "/backup-jobs/{backupJobId}",
  860. }
  861. if input == nil {
  862. input = &DescribeBackupJobInput{}
  863. }
  864. output = &DescribeBackupJobOutput{}
  865. req = c.newRequest(op, input, output)
  866. return
  867. }
  868. // DescribeBackupJob API operation for AWS Backup.
  869. //
  870. // Returns metadata associated with creating a backup of a resource.
  871. //
  872. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  873. // with awserr.Error's Code and Message methods to get detailed information about
  874. // the error.
  875. //
  876. // See the AWS API reference guide for AWS Backup's
  877. // API operation DescribeBackupJob for usage and error information.
  878. //
  879. // Returned Error Codes:
  880. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  881. // A resource that is required for the action doesn't exist.
  882. //
  883. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  884. // Indicates that something is wrong with a parameter's value. For example,
  885. // the value is out of range.
  886. //
  887. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  888. // Indicates that a required parameter is missing.
  889. //
  890. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  891. // The request failed due to a temporary failure of the server.
  892. //
  893. // * ErrCodeDependencyFailureException "DependencyFailureException"
  894. // A dependent AWS service or resource returned an error to the AWS Backup service,
  895. // and the action cannot be completed.
  896. //
  897. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupJob
  898. func (c *Backup) DescribeBackupJob(input *DescribeBackupJobInput) (*DescribeBackupJobOutput, error) {
  899. req, out := c.DescribeBackupJobRequest(input)
  900. return out, req.Send()
  901. }
  902. // DescribeBackupJobWithContext is the same as DescribeBackupJob with the addition of
  903. // the ability to pass a context and additional request options.
  904. //
  905. // See DescribeBackupJob for details on how to use this API operation.
  906. //
  907. // The context must be non-nil and will be used for request cancellation. If
  908. // the context is nil a panic will occur. In the future the SDK may create
  909. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  910. // for more information on using Contexts.
  911. func (c *Backup) DescribeBackupJobWithContext(ctx aws.Context, input *DescribeBackupJobInput, opts ...request.Option) (*DescribeBackupJobOutput, error) {
  912. req, out := c.DescribeBackupJobRequest(input)
  913. req.SetContext(ctx)
  914. req.ApplyOptions(opts...)
  915. return out, req.Send()
  916. }
  917. const opDescribeBackupVault = "DescribeBackupVault"
  918. // DescribeBackupVaultRequest generates a "aws/request.Request" representing the
  919. // client's request for the DescribeBackupVault operation. The "output" return
  920. // value will be populated with the request's response once the request completes
  921. // successfully.
  922. //
  923. // Use "Send" method on the returned Request to send the API call to the service.
  924. // the "output" return value is not valid until after Send returns without error.
  925. //
  926. // See DescribeBackupVault for more information on using the DescribeBackupVault
  927. // API call, and error handling.
  928. //
  929. // This method is useful when you want to inject custom logic or configuration
  930. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  931. //
  932. //
  933. // // Example sending a request using the DescribeBackupVaultRequest method.
  934. // req, resp := client.DescribeBackupVaultRequest(params)
  935. //
  936. // err := req.Send()
  937. // if err == nil { // resp is now filled
  938. // fmt.Println(resp)
  939. // }
  940. //
  941. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupVault
  942. func (c *Backup) DescribeBackupVaultRequest(input *DescribeBackupVaultInput) (req *request.Request, output *DescribeBackupVaultOutput) {
  943. op := &request.Operation{
  944. Name: opDescribeBackupVault,
  945. HTTPMethod: "GET",
  946. HTTPPath: "/backup-vaults/{backupVaultName}",
  947. }
  948. if input == nil {
  949. input = &DescribeBackupVaultInput{}
  950. }
  951. output = &DescribeBackupVaultOutput{}
  952. req = c.newRequest(op, input, output)
  953. return
  954. }
  955. // DescribeBackupVault API operation for AWS Backup.
  956. //
  957. // Returns metadata about a backup vault specified by its name.
  958. //
  959. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  960. // with awserr.Error's Code and Message methods to get detailed information about
  961. // the error.
  962. //
  963. // See the AWS API reference guide for AWS Backup's
  964. // API operation DescribeBackupVault for usage and error information.
  965. //
  966. // Returned Error Codes:
  967. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  968. // A resource that is required for the action doesn't exist.
  969. //
  970. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  971. // Indicates that something is wrong with a parameter's value. For example,
  972. // the value is out of range.
  973. //
  974. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  975. // Indicates that a required parameter is missing.
  976. //
  977. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  978. // The request failed due to a temporary failure of the server.
  979. //
  980. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupVault
  981. func (c *Backup) DescribeBackupVault(input *DescribeBackupVaultInput) (*DescribeBackupVaultOutput, error) {
  982. req, out := c.DescribeBackupVaultRequest(input)
  983. return out, req.Send()
  984. }
  985. // DescribeBackupVaultWithContext is the same as DescribeBackupVault with the addition of
  986. // the ability to pass a context and additional request options.
  987. //
  988. // See DescribeBackupVault for details on how to use this API operation.
  989. //
  990. // The context must be non-nil and will be used for request cancellation. If
  991. // the context is nil a panic will occur. In the future the SDK may create
  992. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  993. // for more information on using Contexts.
  994. func (c *Backup) DescribeBackupVaultWithContext(ctx aws.Context, input *DescribeBackupVaultInput, opts ...request.Option) (*DescribeBackupVaultOutput, error) {
  995. req, out := c.DescribeBackupVaultRequest(input)
  996. req.SetContext(ctx)
  997. req.ApplyOptions(opts...)
  998. return out, req.Send()
  999. }
  1000. const opDescribeProtectedResource = "DescribeProtectedResource"
  1001. // DescribeProtectedResourceRequest generates a "aws/request.Request" representing the
  1002. // client's request for the DescribeProtectedResource operation. The "output" return
  1003. // value will be populated with the request's response once the request completes
  1004. // successfully.
  1005. //
  1006. // Use "Send" method on the returned Request to send the API call to the service.
  1007. // the "output" return value is not valid until after Send returns without error.
  1008. //
  1009. // See DescribeProtectedResource for more information on using the DescribeProtectedResource
  1010. // API call, and error handling.
  1011. //
  1012. // This method is useful when you want to inject custom logic or configuration
  1013. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1014. //
  1015. //
  1016. // // Example sending a request using the DescribeProtectedResourceRequest method.
  1017. // req, resp := client.DescribeProtectedResourceRequest(params)
  1018. //
  1019. // err := req.Send()
  1020. // if err == nil { // resp is now filled
  1021. // fmt.Println(resp)
  1022. // }
  1023. //
  1024. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeProtectedResource
  1025. func (c *Backup) DescribeProtectedResourceRequest(input *DescribeProtectedResourceInput) (req *request.Request, output *DescribeProtectedResourceOutput) {
  1026. op := &request.Operation{
  1027. Name: opDescribeProtectedResource,
  1028. HTTPMethod: "GET",
  1029. HTTPPath: "/resources/{resourceArn}",
  1030. }
  1031. if input == nil {
  1032. input = &DescribeProtectedResourceInput{}
  1033. }
  1034. output = &DescribeProtectedResourceOutput{}
  1035. req = c.newRequest(op, input, output)
  1036. return
  1037. }
  1038. // DescribeProtectedResource API operation for AWS Backup.
  1039. //
  1040. // Returns information about a saved resource, including the last time it was
  1041. // backed-up, its Amazon Resource Name (ARN), and the AWS service type of the
  1042. // saved resource.
  1043. //
  1044. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1045. // with awserr.Error's Code and Message methods to get detailed information about
  1046. // the error.
  1047. //
  1048. // See the AWS API reference guide for AWS Backup's
  1049. // API operation DescribeProtectedResource for usage and error information.
  1050. //
  1051. // Returned Error Codes:
  1052. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  1053. // Indicates that a required parameter is missing.
  1054. //
  1055. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1056. // Indicates that something is wrong with a parameter's value. For example,
  1057. // the value is out of range.
  1058. //
  1059. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1060. // The request failed due to a temporary failure of the server.
  1061. //
  1062. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1063. // A resource that is required for the action doesn't exist.
  1064. //
  1065. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeProtectedResource
  1066. func (c *Backup) DescribeProtectedResource(input *DescribeProtectedResourceInput) (*DescribeProtectedResourceOutput, error) {
  1067. req, out := c.DescribeProtectedResourceRequest(input)
  1068. return out, req.Send()
  1069. }
  1070. // DescribeProtectedResourceWithContext is the same as DescribeProtectedResource with the addition of
  1071. // the ability to pass a context and additional request options.
  1072. //
  1073. // See DescribeProtectedResource for details on how to use this API operation.
  1074. //
  1075. // The context must be non-nil and will be used for request cancellation. If
  1076. // the context is nil a panic will occur. In the future the SDK may create
  1077. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1078. // for more information on using Contexts.
  1079. func (c *Backup) DescribeProtectedResourceWithContext(ctx aws.Context, input *DescribeProtectedResourceInput, opts ...request.Option) (*DescribeProtectedResourceOutput, error) {
  1080. req, out := c.DescribeProtectedResourceRequest(input)
  1081. req.SetContext(ctx)
  1082. req.ApplyOptions(opts...)
  1083. return out, req.Send()
  1084. }
  1085. const opDescribeRecoveryPoint = "DescribeRecoveryPoint"
  1086. // DescribeRecoveryPointRequest generates a "aws/request.Request" representing the
  1087. // client's request for the DescribeRecoveryPoint operation. The "output" return
  1088. // value will be populated with the request's response once the request completes
  1089. // successfully.
  1090. //
  1091. // Use "Send" method on the returned Request to send the API call to the service.
  1092. // the "output" return value is not valid until after Send returns without error.
  1093. //
  1094. // See DescribeRecoveryPoint for more information on using the DescribeRecoveryPoint
  1095. // API call, and error handling.
  1096. //
  1097. // This method is useful when you want to inject custom logic or configuration
  1098. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1099. //
  1100. //
  1101. // // Example sending a request using the DescribeRecoveryPointRequest method.
  1102. // req, resp := client.DescribeRecoveryPointRequest(params)
  1103. //
  1104. // err := req.Send()
  1105. // if err == nil { // resp is now filled
  1106. // fmt.Println(resp)
  1107. // }
  1108. //
  1109. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRecoveryPoint
  1110. func (c *Backup) DescribeRecoveryPointRequest(input *DescribeRecoveryPointInput) (req *request.Request, output *DescribeRecoveryPointOutput) {
  1111. op := &request.Operation{
  1112. Name: opDescribeRecoveryPoint,
  1113. HTTPMethod: "GET",
  1114. HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}",
  1115. }
  1116. if input == nil {
  1117. input = &DescribeRecoveryPointInput{}
  1118. }
  1119. output = &DescribeRecoveryPointOutput{}
  1120. req = c.newRequest(op, input, output)
  1121. return
  1122. }
  1123. // DescribeRecoveryPoint API operation for AWS Backup.
  1124. //
  1125. // Returns metadata associated with a recovery point, including ID, status,
  1126. // encryption, and lifecycle.
  1127. //
  1128. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1129. // with awserr.Error's Code and Message methods to get detailed information about
  1130. // the error.
  1131. //
  1132. // See the AWS API reference guide for AWS Backup's
  1133. // API operation DescribeRecoveryPoint for usage and error information.
  1134. //
  1135. // Returned Error Codes:
  1136. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1137. // A resource that is required for the action doesn't exist.
  1138. //
  1139. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1140. // Indicates that something is wrong with a parameter's value. For example,
  1141. // the value is out of range.
  1142. //
  1143. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  1144. // Indicates that a required parameter is missing.
  1145. //
  1146. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1147. // The request failed due to a temporary failure of the server.
  1148. //
  1149. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRecoveryPoint
  1150. func (c *Backup) DescribeRecoveryPoint(input *DescribeRecoveryPointInput) (*DescribeRecoveryPointOutput, error) {
  1151. req, out := c.DescribeRecoveryPointRequest(input)
  1152. return out, req.Send()
  1153. }
  1154. // DescribeRecoveryPointWithContext is the same as DescribeRecoveryPoint with the addition of
  1155. // the ability to pass a context and additional request options.
  1156. //
  1157. // See DescribeRecoveryPoint for details on how to use this API operation.
  1158. //
  1159. // The context must be non-nil and will be used for request cancellation. If
  1160. // the context is nil a panic will occur. In the future the SDK may create
  1161. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1162. // for more information on using Contexts.
  1163. func (c *Backup) DescribeRecoveryPointWithContext(ctx aws.Context, input *DescribeRecoveryPointInput, opts ...request.Option) (*DescribeRecoveryPointOutput, error) {
  1164. req, out := c.DescribeRecoveryPointRequest(input)
  1165. req.SetContext(ctx)
  1166. req.ApplyOptions(opts...)
  1167. return out, req.Send()
  1168. }
  1169. const opDescribeRestoreJob = "DescribeRestoreJob"
  1170. // DescribeRestoreJobRequest generates a "aws/request.Request" representing the
  1171. // client's request for the DescribeRestoreJob operation. The "output" return
  1172. // value will be populated with the request's response once the request completes
  1173. // successfully.
  1174. //
  1175. // Use "Send" method on the returned Request to send the API call to the service.
  1176. // the "output" return value is not valid until after Send returns without error.
  1177. //
  1178. // See DescribeRestoreJob for more information on using the DescribeRestoreJob
  1179. // API call, and error handling.
  1180. //
  1181. // This method is useful when you want to inject custom logic or configuration
  1182. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1183. //
  1184. //
  1185. // // Example sending a request using the DescribeRestoreJobRequest method.
  1186. // req, resp := client.DescribeRestoreJobRequest(params)
  1187. //
  1188. // err := req.Send()
  1189. // if err == nil { // resp is now filled
  1190. // fmt.Println(resp)
  1191. // }
  1192. //
  1193. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRestoreJob
  1194. func (c *Backup) DescribeRestoreJobRequest(input *DescribeRestoreJobInput) (req *request.Request, output *DescribeRestoreJobOutput) {
  1195. op := &request.Operation{
  1196. Name: opDescribeRestoreJob,
  1197. HTTPMethod: "GET",
  1198. HTTPPath: "/restore-jobs/{restoreJobId}",
  1199. }
  1200. if input == nil {
  1201. input = &DescribeRestoreJobInput{}
  1202. }
  1203. output = &DescribeRestoreJobOutput{}
  1204. req = c.newRequest(op, input, output)
  1205. return
  1206. }
  1207. // DescribeRestoreJob API operation for AWS Backup.
  1208. //
  1209. // Returns metadata associated with a restore job that is specified by a job
  1210. // ID.
  1211. //
  1212. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1213. // with awserr.Error's Code and Message methods to get detailed information about
  1214. // the error.
  1215. //
  1216. // See the AWS API reference guide for AWS Backup's
  1217. // API operation DescribeRestoreJob for usage and error information.
  1218. //
  1219. // Returned Error Codes:
  1220. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1221. // A resource that is required for the action doesn't exist.
  1222. //
  1223. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1224. // Indicates that something is wrong with a parameter's value. For example,
  1225. // the value is out of range.
  1226. //
  1227. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  1228. // Indicates that a required parameter is missing.
  1229. //
  1230. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1231. // The request failed due to a temporary failure of the server.
  1232. //
  1233. // * ErrCodeDependencyFailureException "DependencyFailureException"
  1234. // A dependent AWS service or resource returned an error to the AWS Backup service,
  1235. // and the action cannot be completed.
  1236. //
  1237. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRestoreJob
  1238. func (c *Backup) DescribeRestoreJob(input *DescribeRestoreJobInput) (*DescribeRestoreJobOutput, error) {
  1239. req, out := c.DescribeRestoreJobRequest(input)
  1240. return out, req.Send()
  1241. }
  1242. // DescribeRestoreJobWithContext is the same as DescribeRestoreJob with the addition of
  1243. // the ability to pass a context and additional request options.
  1244. //
  1245. // See DescribeRestoreJob for details on how to use this API operation.
  1246. //
  1247. // The context must be non-nil and will be used for request cancellation. If
  1248. // the context is nil a panic will occur. In the future the SDK may create
  1249. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1250. // for more information on using Contexts.
  1251. func (c *Backup) DescribeRestoreJobWithContext(ctx aws.Context, input *DescribeRestoreJobInput, opts ...request.Option) (*DescribeRestoreJobOutput, error) {
  1252. req, out := c.DescribeRestoreJobRequest(input)
  1253. req.SetContext(ctx)
  1254. req.ApplyOptions(opts...)
  1255. return out, req.Send()
  1256. }
  1257. const opExportBackupPlanTemplate = "ExportBackupPlanTemplate"
  1258. // ExportBackupPlanTemplateRequest generates a "aws/request.Request" representing the
  1259. // client's request for the ExportBackupPlanTemplate operation. The "output" return
  1260. // value will be populated with the request's response once the request completes
  1261. // successfully.
  1262. //
  1263. // Use "Send" method on the returned Request to send the API call to the service.
  1264. // the "output" return value is not valid until after Send returns without error.
  1265. //
  1266. // See ExportBackupPlanTemplate for more information on using the ExportBackupPlanTemplate
  1267. // API call, and error handling.
  1268. //
  1269. // This method is useful when you want to inject custom logic or configuration
  1270. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1271. //
  1272. //
  1273. // // Example sending a request using the ExportBackupPlanTemplateRequest method.
  1274. // req, resp := client.ExportBackupPlanTemplateRequest(params)
  1275. //
  1276. // err := req.Send()
  1277. // if err == nil { // resp is now filled
  1278. // fmt.Println(resp)
  1279. // }
  1280. //
  1281. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ExportBackupPlanTemplate
  1282. func (c *Backup) ExportBackupPlanTemplateRequest(input *ExportBackupPlanTemplateInput) (req *request.Request, output *ExportBackupPlanTemplateOutput) {
  1283. op := &request.Operation{
  1284. Name: opExportBackupPlanTemplate,
  1285. HTTPMethod: "GET",
  1286. HTTPPath: "/backup/plans/{backupPlanId}/toTemplate/",
  1287. }
  1288. if input == nil {
  1289. input = &ExportBackupPlanTemplateInput{}
  1290. }
  1291. output = &ExportBackupPlanTemplateOutput{}
  1292. req = c.newRequest(op, input, output)
  1293. return
  1294. }
  1295. // ExportBackupPlanTemplate API operation for AWS Backup.
  1296. //
  1297. // Returns the backup plan that is specified by the plan ID as a backup template.
  1298. //
  1299. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1300. // with awserr.Error's Code and Message methods to get detailed information about
  1301. // the error.
  1302. //
  1303. // See the AWS API reference guide for AWS Backup's
  1304. // API operation ExportBackupPlanTemplate for usage and error information.
  1305. //
  1306. // Returned Error Codes:
  1307. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1308. // Indicates that something is wrong with a parameter's value. For example,
  1309. // the value is out of range.
  1310. //
  1311. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  1312. // Indicates that a required parameter is missing.
  1313. //
  1314. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1315. // The request failed due to a temporary failure of the server.
  1316. //
  1317. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1318. // A resource that is required for the action doesn't exist.
  1319. //
  1320. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ExportBackupPlanTemplate
  1321. func (c *Backup) ExportBackupPlanTemplate(input *ExportBackupPlanTemplateInput) (*ExportBackupPlanTemplateOutput, error) {
  1322. req, out := c.ExportBackupPlanTemplateRequest(input)
  1323. return out, req.Send()
  1324. }
  1325. // ExportBackupPlanTemplateWithContext is the same as ExportBackupPlanTemplate with the addition of
  1326. // the ability to pass a context and additional request options.
  1327. //
  1328. // See ExportBackupPlanTemplate for details on how to use this API operation.
  1329. //
  1330. // The context must be non-nil and will be used for request cancellation. If
  1331. // the context is nil a panic will occur. In the future the SDK may create
  1332. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1333. // for more information on using Contexts.
  1334. func (c *Backup) ExportBackupPlanTemplateWithContext(ctx aws.Context, input *ExportBackupPlanTemplateInput, opts ...request.Option) (*ExportBackupPlanTemplateOutput, error) {
  1335. req, out := c.ExportBackupPlanTemplateRequest(input)
  1336. req.SetContext(ctx)
  1337. req.ApplyOptions(opts...)
  1338. return out, req.Send()
  1339. }
  1340. const opGetBackupPlan = "GetBackupPlan"
  1341. // GetBackupPlanRequest generates a "aws/request.Request" representing the
  1342. // client's request for the GetBackupPlan operation. The "output" return
  1343. // value will be populated with the request's response once the request completes
  1344. // successfully.
  1345. //
  1346. // Use "Send" method on the returned Request to send the API call to the service.
  1347. // the "output" return value is not valid until after Send returns without error.
  1348. //
  1349. // See GetBackupPlan for more information on using the GetBackupPlan
  1350. // API call, and error handling.
  1351. //
  1352. // This method is useful when you want to inject custom logic or configuration
  1353. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1354. //
  1355. //
  1356. // // Example sending a request using the GetBackupPlanRequest method.
  1357. // req, resp := client.GetBackupPlanRequest(params)
  1358. //
  1359. // err := req.Send()
  1360. // if err == nil { // resp is now filled
  1361. // fmt.Println(resp)
  1362. // }
  1363. //
  1364. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlan
  1365. func (c *Backup) GetBackupPlanRequest(input *GetBackupPlanInput) (req *request.Request, output *GetBackupPlanOutput) {
  1366. op := &request.Operation{
  1367. Name: opGetBackupPlan,
  1368. HTTPMethod: "GET",
  1369. HTTPPath: "/backup/plans/{backupPlanId}/",
  1370. }
  1371. if input == nil {
  1372. input = &GetBackupPlanInput{}
  1373. }
  1374. output = &GetBackupPlanOutput{}
  1375. req = c.newRequest(op, input, output)
  1376. return
  1377. }
  1378. // GetBackupPlan API operation for AWS Backup.
  1379. //
  1380. // Returns the body of a backup plan in JSON format, in addition to plan metadata.
  1381. //
  1382. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1383. // with awserr.Error's Code and Message methods to get detailed information about
  1384. // the error.
  1385. //
  1386. // See the AWS API reference guide for AWS Backup's
  1387. // API operation GetBackupPlan for usage and error information.
  1388. //
  1389. // Returned Error Codes:
  1390. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1391. // A resource that is required for the action doesn't exist.
  1392. //
  1393. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1394. // Indicates that something is wrong with a parameter's value. For example,
  1395. // the value is out of range.
  1396. //
  1397. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  1398. // Indicates that a required parameter is missing.
  1399. //
  1400. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1401. // The request failed due to a temporary failure of the server.
  1402. //
  1403. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlan
  1404. func (c *Backup) GetBackupPlan(input *GetBackupPlanInput) (*GetBackupPlanOutput, error) {
  1405. req, out := c.GetBackupPlanRequest(input)
  1406. return out, req.Send()
  1407. }
  1408. // GetBackupPlanWithContext is the same as GetBackupPlan with the addition of
  1409. // the ability to pass a context and additional request options.
  1410. //
  1411. // See GetBackupPlan for details on how to use this API operation.
  1412. //
  1413. // The context must be non-nil and will be used for request cancellation. If
  1414. // the context is nil a panic will occur. In the future the SDK may create
  1415. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1416. // for more information on using Contexts.
  1417. func (c *Backup) GetBackupPlanWithContext(ctx aws.Context, input *GetBackupPlanInput, opts ...request.Option) (*GetBackupPlanOutput, error) {
  1418. req, out := c.GetBackupPlanRequest(input)
  1419. req.SetContext(ctx)
  1420. req.ApplyOptions(opts...)
  1421. return out, req.Send()
  1422. }
  1423. const opGetBackupPlanFromJSON = "GetBackupPlanFromJSON"
  1424. // GetBackupPlanFromJSONRequest generates a "aws/request.Request" representing the
  1425. // client's request for the GetBackupPlanFromJSON operation. The "output" return
  1426. // value will be populated with the request's response once the request completes
  1427. // successfully.
  1428. //
  1429. // Use "Send" method on the returned Request to send the API call to the service.
  1430. // the "output" return value is not valid until after Send returns without error.
  1431. //
  1432. // See GetBackupPlanFromJSON for more information on using the GetBackupPlanFromJSON
  1433. // API call, and error handling.
  1434. //
  1435. // This method is useful when you want to inject custom logic or configuration
  1436. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1437. //
  1438. //
  1439. // // Example sending a request using the GetBackupPlanFromJSONRequest method.
  1440. // req, resp := client.GetBackupPlanFromJSONRequest(params)
  1441. //
  1442. // err := req.Send()
  1443. // if err == nil { // resp is now filled
  1444. // fmt.Println(resp)
  1445. // }
  1446. //
  1447. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromJSON
  1448. func (c *Backup) GetBackupPlanFromJSONRequest(input *GetBackupPlanFromJSONInput) (req *request.Request, output *GetBackupPlanFromJSONOutput) {
  1449. op := &request.Operation{
  1450. Name: opGetBackupPlanFromJSON,
  1451. HTTPMethod: "POST",
  1452. HTTPPath: "/backup/template/json/toPlan",
  1453. }
  1454. if input == nil {
  1455. input = &GetBackupPlanFromJSONInput{}
  1456. }
  1457. output = &GetBackupPlanFromJSONOutput{}
  1458. req = c.newRequest(op, input, output)
  1459. return
  1460. }
  1461. // GetBackupPlanFromJSON API operation for AWS Backup.
  1462. //
  1463. // Returns a valid JSON document specifying a backup plan or an error.
  1464. //
  1465. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1466. // with awserr.Error's Code and Message methods to get detailed information about
  1467. // the error.
  1468. //
  1469. // See the AWS API reference guide for AWS Backup's
  1470. // API operation GetBackupPlanFromJSON for usage and error information.
  1471. //
  1472. // Returned Error Codes:
  1473. // * ErrCodeLimitExceededException "LimitExceededException"
  1474. // A limit in the request has been exceeded; for example, a maximum number of
  1475. // items allowed in a request.
  1476. //
  1477. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1478. // Indicates that something is wrong with a parameter's value. For example,
  1479. // the value is out of range.
  1480. //
  1481. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  1482. // Indicates that a required parameter is missing.
  1483. //
  1484. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1485. // The request failed due to a temporary failure of the server.
  1486. //
  1487. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1488. // Indicates that something is wrong with the input to the request. For example,
  1489. // a parameter is of the wrong type.
  1490. //
  1491. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromJSON
  1492. func (c *Backup) GetBackupPlanFromJSON(input *GetBackupPlanFromJSONInput) (*GetBackupPlanFromJSONOutput, error) {
  1493. req, out := c.GetBackupPlanFromJSONRequest(input)
  1494. return out, req.Send()
  1495. }
  1496. // GetBackupPlanFromJSONWithContext is the same as GetBackupPlanFromJSON with the addition of
  1497. // the ability to pass a context and additional request options.
  1498. //
  1499. // See GetBackupPlanFromJSON for details on how to use this API operation.
  1500. //
  1501. // The context must be non-nil and will be used for request cancellation. If
  1502. // the context is nil a panic will occur. In the future the SDK may create
  1503. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1504. // for more information on using Contexts.
  1505. func (c *Backup) GetBackupPlanFromJSONWithContext(ctx aws.Context, input *GetBackupPlanFromJSONInput, opts ...request.Option) (*GetBackupPlanFromJSONOutput, error) {
  1506. req, out := c.GetBackupPlanFromJSONRequest(input)
  1507. req.SetContext(ctx)
  1508. req.ApplyOptions(opts...)
  1509. return out, req.Send()
  1510. }
  1511. const opGetBackupPlanFromTemplate = "GetBackupPlanFromTemplate"
  1512. // GetBackupPlanFromTemplateRequest generates a "aws/request.Request" representing the
  1513. // client's request for the GetBackupPlanFromTemplate operation. The "output" return
  1514. // value will be populated with the request's response once the request completes
  1515. // successfully.
  1516. //
  1517. // Use "Send" method on the returned Request to send the API call to the service.
  1518. // the "output" return value is not valid until after Send returns without error.
  1519. //
  1520. // See GetBackupPlanFromTemplate for more information on using the GetBackupPlanFromTemplate
  1521. // API call, and error handling.
  1522. //
  1523. // This method is useful when you want to inject custom logic or configuration
  1524. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1525. //
  1526. //
  1527. // // Example sending a request using the GetBackupPlanFromTemplateRequest method.
  1528. // req, resp := client.GetBackupPlanFromTemplateRequest(params)
  1529. //
  1530. // err := req.Send()
  1531. // if err == nil { // resp is now filled
  1532. // fmt.Println(resp)
  1533. // }
  1534. //
  1535. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromTemplate
  1536. func (c *Backup) GetBackupPlanFromTemplateRequest(input *GetBackupPlanFromTemplateInput) (req *request.Request, output *GetBackupPlanFromTemplateOutput) {
  1537. op := &request.Operation{
  1538. Name: opGetBackupPlanFromTemplate,
  1539. HTTPMethod: "GET",
  1540. HTTPPath: "/backup/template/plans/{templateId}/toPlan",
  1541. }
  1542. if input == nil {
  1543. input = &GetBackupPlanFromTemplateInput{}
  1544. }
  1545. output = &GetBackupPlanFromTemplateOutput{}
  1546. req = c.newRequest(op, input, output)
  1547. return
  1548. }
  1549. // GetBackupPlanFromTemplate API operation for AWS Backup.
  1550. //
  1551. // Returns the template specified by its templateId as a backup plan.
  1552. //
  1553. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1554. // with awserr.Error's Code and Message methods to get detailed information about
  1555. // the error.
  1556. //
  1557. // See the AWS API reference guide for AWS Backup's
  1558. // API operation GetBackupPlanFromTemplate for usage and error information.
  1559. //
  1560. // Returned Error Codes:
  1561. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1562. // Indicates that something is wrong with a parameter's value. For example,
  1563. // the value is out of range.
  1564. //
  1565. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  1566. // Indicates that a required parameter is missing.
  1567. //
  1568. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1569. // The request failed due to a temporary failure of the server.
  1570. //
  1571. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1572. // A resource that is required for the action doesn't exist.
  1573. //
  1574. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromTemplate
  1575. func (c *Backup) GetBackupPlanFromTemplate(input *GetBackupPlanFromTemplateInput) (*GetBackupPlanFromTemplateOutput, error) {
  1576. req, out := c.GetBackupPlanFromTemplateRequest(input)
  1577. return out, req.Send()
  1578. }
  1579. // GetBackupPlanFromTemplateWithContext is the same as GetBackupPlanFromTemplate with the addition of
  1580. // the ability to pass a context and additional request options.
  1581. //
  1582. // See GetBackupPlanFromTemplate for details on how to use this API operation.
  1583. //
  1584. // The context must be non-nil and will be used for request cancellation. If
  1585. // the context is nil a panic will occur. In the future the SDK may create
  1586. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1587. // for more information on using Contexts.
  1588. func (c *Backup) GetBackupPlanFromTemplateWithContext(ctx aws.Context, input *GetBackupPlanFromTemplateInput, opts ...request.Option) (*GetBackupPlanFromTemplateOutput, error) {
  1589. req, out := c.GetBackupPlanFromTemplateRequest(input)
  1590. req.SetContext(ctx)
  1591. req.ApplyOptions(opts...)
  1592. return out, req.Send()
  1593. }
  1594. const opGetBackupSelection = "GetBackupSelection"
  1595. // GetBackupSelectionRequest generates a "aws/request.Request" representing the
  1596. // client's request for the GetBackupSelection operation. The "output" return
  1597. // value will be populated with the request's response once the request completes
  1598. // successfully.
  1599. //
  1600. // Use "Send" method on the returned Request to send the API call to the service.
  1601. // the "output" return value is not valid until after Send returns without error.
  1602. //
  1603. // See GetBackupSelection for more information on using the GetBackupSelection
  1604. // API call, and error handling.
  1605. //
  1606. // This method is useful when you want to inject custom logic or configuration
  1607. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1608. //
  1609. //
  1610. // // Example sending a request using the GetBackupSelectionRequest method.
  1611. // req, resp := client.GetBackupSelectionRequest(params)
  1612. //
  1613. // err := req.Send()
  1614. // if err == nil { // resp is now filled
  1615. // fmt.Println(resp)
  1616. // }
  1617. //
  1618. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupSelection
  1619. func (c *Backup) GetBackupSelectionRequest(input *GetBackupSelectionInput) (req *request.Request, output *GetBackupSelectionOutput) {
  1620. op := &request.Operation{
  1621. Name: opGetBackupSelection,
  1622. HTTPMethod: "GET",
  1623. HTTPPath: "/backup/plans/{backupPlanId}/selections/{selectionId}",
  1624. }
  1625. if input == nil {
  1626. input = &GetBackupSelectionInput{}
  1627. }
  1628. output = &GetBackupSelectionOutput{}
  1629. req = c.newRequest(op, input, output)
  1630. return
  1631. }
  1632. // GetBackupSelection API operation for AWS Backup.
  1633. //
  1634. // Returns selection metadata and a document in JSON format that specifies a
  1635. // list of resources that are associated with a backup plan.
  1636. //
  1637. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1638. // with awserr.Error's Code and Message methods to get detailed information about
  1639. // the error.
  1640. //
  1641. // See the AWS API reference guide for AWS Backup's
  1642. // API operation GetBackupSelection for usage and error information.
  1643. //
  1644. // Returned Error Codes:
  1645. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1646. // A resource that is required for the action doesn't exist.
  1647. //
  1648. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1649. // Indicates that something is wrong with a parameter's value. For example,
  1650. // the value is out of range.
  1651. //
  1652. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  1653. // Indicates that a required parameter is missing.
  1654. //
  1655. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1656. // The request failed due to a temporary failure of the server.
  1657. //
  1658. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupSelection
  1659. func (c *Backup) GetBackupSelection(input *GetBackupSelectionInput) (*GetBackupSelectionOutput, error) {
  1660. req, out := c.GetBackupSelectionRequest(input)
  1661. return out, req.Send()
  1662. }
  1663. // GetBackupSelectionWithContext is the same as GetBackupSelection with the addition of
  1664. // the ability to pass a context and additional request options.
  1665. //
  1666. // See GetBackupSelection for details on how to use this API operation.
  1667. //
  1668. // The context must be non-nil and will be used for request cancellation. If
  1669. // the context is nil a panic will occur. In the future the SDK may create
  1670. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1671. // for more information on using Contexts.
  1672. func (c *Backup) GetBackupSelectionWithContext(ctx aws.Context, input *GetBackupSelectionInput, opts ...request.Option) (*GetBackupSelectionOutput, error) {
  1673. req, out := c.GetBackupSelectionRequest(input)
  1674. req.SetContext(ctx)
  1675. req.ApplyOptions(opts...)
  1676. return out, req.Send()
  1677. }
  1678. const opGetBackupVaultAccessPolicy = "GetBackupVaultAccessPolicy"
  1679. // GetBackupVaultAccessPolicyRequest generates a "aws/request.Request" representing the
  1680. // client's request for the GetBackupVaultAccessPolicy operation. The "output" return
  1681. // value will be populated with the request's response once the request completes
  1682. // successfully.
  1683. //
  1684. // Use "Send" method on the returned Request to send the API call to the service.
  1685. // the "output" return value is not valid until after Send returns without error.
  1686. //
  1687. // See GetBackupVaultAccessPolicy for more information on using the GetBackupVaultAccessPolicy
  1688. // API call, and error handling.
  1689. //
  1690. // This method is useful when you want to inject custom logic or configuration
  1691. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1692. //
  1693. //
  1694. // // Example sending a request using the GetBackupVaultAccessPolicyRequest method.
  1695. // req, resp := client.GetBackupVaultAccessPolicyRequest(params)
  1696. //
  1697. // err := req.Send()
  1698. // if err == nil { // resp is now filled
  1699. // fmt.Println(resp)
  1700. // }
  1701. //
  1702. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultAccessPolicy
  1703. func (c *Backup) GetBackupVaultAccessPolicyRequest(input *GetBackupVaultAccessPolicyInput) (req *request.Request, output *GetBackupVaultAccessPolicyOutput) {
  1704. op := &request.Operation{
  1705. Name: opGetBackupVaultAccessPolicy,
  1706. HTTPMethod: "GET",
  1707. HTTPPath: "/backup-vaults/{backupVaultName}/access-policy",
  1708. }
  1709. if input == nil {
  1710. input = &GetBackupVaultAccessPolicyInput{}
  1711. }
  1712. output = &GetBackupVaultAccessPolicyOutput{}
  1713. req = c.newRequest(op, input, output)
  1714. return
  1715. }
  1716. // GetBackupVaultAccessPolicy API operation for AWS Backup.
  1717. //
  1718. // Returns the access policy document that is associated with the named backup
  1719. // vault.
  1720. //
  1721. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1722. // with awserr.Error's Code and Message methods to get detailed information about
  1723. // the error.
  1724. //
  1725. // See the AWS API reference guide for AWS Backup's
  1726. // API operation GetBackupVaultAccessPolicy for usage and error information.
  1727. //
  1728. // Returned Error Codes:
  1729. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1730. // A resource that is required for the action doesn't exist.
  1731. //
  1732. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1733. // Indicates that something is wrong with a parameter's value. For example,
  1734. // the value is out of range.
  1735. //
  1736. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  1737. // Indicates that a required parameter is missing.
  1738. //
  1739. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1740. // The request failed due to a temporary failure of the server.
  1741. //
  1742. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultAccessPolicy
  1743. func (c *Backup) GetBackupVaultAccessPolicy(input *GetBackupVaultAccessPolicyInput) (*GetBackupVaultAccessPolicyOutput, error) {
  1744. req, out := c.GetBackupVaultAccessPolicyRequest(input)
  1745. return out, req.Send()
  1746. }
  1747. // GetBackupVaultAccessPolicyWithContext is the same as GetBackupVaultAccessPolicy with the addition of
  1748. // the ability to pass a context and additional request options.
  1749. //
  1750. // See GetBackupVaultAccessPolicy for details on how to use this API operation.
  1751. //
  1752. // The context must be non-nil and will be used for request cancellation. If
  1753. // the context is nil a panic will occur. In the future the SDK may create
  1754. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1755. // for more information on using Contexts.
  1756. func (c *Backup) GetBackupVaultAccessPolicyWithContext(ctx aws.Context, input *GetBackupVaultAccessPolicyInput, opts ...request.Option) (*GetBackupVaultAccessPolicyOutput, error) {
  1757. req, out := c.GetBackupVaultAccessPolicyRequest(input)
  1758. req.SetContext(ctx)
  1759. req.ApplyOptions(opts...)
  1760. return out, req.Send()
  1761. }
  1762. const opGetBackupVaultNotifications = "GetBackupVaultNotifications"
  1763. // GetBackupVaultNotificationsRequest generates a "aws/request.Request" representing the
  1764. // client's request for the GetBackupVaultNotifications operation. The "output" return
  1765. // value will be populated with the request's response once the request completes
  1766. // successfully.
  1767. //
  1768. // Use "Send" method on the returned Request to send the API call to the service.
  1769. // the "output" return value is not valid until after Send returns without error.
  1770. //
  1771. // See GetBackupVaultNotifications for more information on using the GetBackupVaultNotifications
  1772. // API call, and error handling.
  1773. //
  1774. // This method is useful when you want to inject custom logic or configuration
  1775. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1776. //
  1777. //
  1778. // // Example sending a request using the GetBackupVaultNotificationsRequest method.
  1779. // req, resp := client.GetBackupVaultNotificationsRequest(params)
  1780. //
  1781. // err := req.Send()
  1782. // if err == nil { // resp is now filled
  1783. // fmt.Println(resp)
  1784. // }
  1785. //
  1786. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultNotifications
  1787. func (c *Backup) GetBackupVaultNotificationsRequest(input *GetBackupVaultNotificationsInput) (req *request.Request, output *GetBackupVaultNotificationsOutput) {
  1788. op := &request.Operation{
  1789. Name: opGetBackupVaultNotifications,
  1790. HTTPMethod: "GET",
  1791. HTTPPath: "/backup-vaults/{backupVaultName}/notification-configuration",
  1792. }
  1793. if input == nil {
  1794. input = &GetBackupVaultNotificationsInput{}
  1795. }
  1796. output = &GetBackupVaultNotificationsOutput{}
  1797. req = c.newRequest(op, input, output)
  1798. return
  1799. }
  1800. // GetBackupVaultNotifications API operation for AWS Backup.
  1801. //
  1802. // Returns event notifications for the specified backup vault.
  1803. //
  1804. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1805. // with awserr.Error's Code and Message methods to get detailed information about
  1806. // the error.
  1807. //
  1808. // See the AWS API reference guide for AWS Backup's
  1809. // API operation GetBackupVaultNotifications for usage and error information.
  1810. //
  1811. // Returned Error Codes:
  1812. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1813. // A resource that is required for the action doesn't exist.
  1814. //
  1815. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1816. // Indicates that something is wrong with a parameter's value. For example,
  1817. // the value is out of range.
  1818. //
  1819. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  1820. // Indicates that a required parameter is missing.
  1821. //
  1822. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1823. // The request failed due to a temporary failure of the server.
  1824. //
  1825. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultNotifications
  1826. func (c *Backup) GetBackupVaultNotifications(input *GetBackupVaultNotificationsInput) (*GetBackupVaultNotificationsOutput, error) {
  1827. req, out := c.GetBackupVaultNotificationsRequest(input)
  1828. return out, req.Send()
  1829. }
  1830. // GetBackupVaultNotificationsWithContext is the same as GetBackupVaultNotifications with the addition of
  1831. // the ability to pass a context and additional request options.
  1832. //
  1833. // See GetBackupVaultNotifications for details on how to use this API operation.
  1834. //
  1835. // The context must be non-nil and will be used for request cancellation. If
  1836. // the context is nil a panic will occur. In the future the SDK may create
  1837. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1838. // for more information on using Contexts.
  1839. func (c *Backup) GetBackupVaultNotificationsWithContext(ctx aws.Context, input *GetBackupVaultNotificationsInput, opts ...request.Option) (*GetBackupVaultNotificationsOutput, error) {
  1840. req, out := c.GetBackupVaultNotificationsRequest(input)
  1841. req.SetContext(ctx)
  1842. req.ApplyOptions(opts...)
  1843. return out, req.Send()
  1844. }
  1845. const opGetRecoveryPointRestoreMetadata = "GetRecoveryPointRestoreMetadata"
  1846. // GetRecoveryPointRestoreMetadataRequest generates a "aws/request.Request" representing the
  1847. // client's request for the GetRecoveryPointRestoreMetadata operation. The "output" return
  1848. // value will be populated with the request's response once the request completes
  1849. // successfully.
  1850. //
  1851. // Use "Send" method on the returned Request to send the API call to the service.
  1852. // the "output" return value is not valid until after Send returns without error.
  1853. //
  1854. // See GetRecoveryPointRestoreMetadata for more information on using the GetRecoveryPointRestoreMetadata
  1855. // API call, and error handling.
  1856. //
  1857. // This method is useful when you want to inject custom logic or configuration
  1858. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1859. //
  1860. //
  1861. // // Example sending a request using the GetRecoveryPointRestoreMetadataRequest method.
  1862. // req, resp := client.GetRecoveryPointRestoreMetadataRequest(params)
  1863. //
  1864. // err := req.Send()
  1865. // if err == nil { // resp is now filled
  1866. // fmt.Println(resp)
  1867. // }
  1868. //
  1869. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetRecoveryPointRestoreMetadata
  1870. func (c *Backup) GetRecoveryPointRestoreMetadataRequest(input *GetRecoveryPointRestoreMetadataInput) (req *request.Request, output *GetRecoveryPointRestoreMetadataOutput) {
  1871. op := &request.Operation{
  1872. Name: opGetRecoveryPointRestoreMetadata,
  1873. HTTPMethod: "GET",
  1874. HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}/restore-metadata",
  1875. }
  1876. if input == nil {
  1877. input = &GetRecoveryPointRestoreMetadataInput{}
  1878. }
  1879. output = &GetRecoveryPointRestoreMetadataOutput{}
  1880. req = c.newRequest(op, input, output)
  1881. return
  1882. }
  1883. // GetRecoveryPointRestoreMetadata API operation for AWS Backup.
  1884. //
  1885. // Returns two sets of metadata key-value pairs. The first set lists the metadata
  1886. // that the recovery point was created with. The second set lists the metadata
  1887. // key-value pairs that are required to restore the recovery point.
  1888. //
  1889. // These sets can be the same, or the restore metadata set can contain different
  1890. // values if the target service to be restored has changed since the recovery
  1891. // point was created and now requires additional or different information in
  1892. // order to be restored.
  1893. //
  1894. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1895. // with awserr.Error's Code and Message methods to get detailed information about
  1896. // the error.
  1897. //
  1898. // See the AWS API reference guide for AWS Backup's
  1899. // API operation GetRecoveryPointRestoreMetadata for usage and error information.
  1900. //
  1901. // Returned Error Codes:
  1902. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1903. // A resource that is required for the action doesn't exist.
  1904. //
  1905. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1906. // Indicates that something is wrong with a parameter's value. For example,
  1907. // the value is out of range.
  1908. //
  1909. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  1910. // Indicates that a required parameter is missing.
  1911. //
  1912. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1913. // The request failed due to a temporary failure of the server.
  1914. //
  1915. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetRecoveryPointRestoreMetadata
  1916. func (c *Backup) GetRecoveryPointRestoreMetadata(input *GetRecoveryPointRestoreMetadataInput) (*GetRecoveryPointRestoreMetadataOutput, error) {
  1917. req, out := c.GetRecoveryPointRestoreMetadataRequest(input)
  1918. return out, req.Send()
  1919. }
  1920. // GetRecoveryPointRestoreMetadataWithContext is the same as GetRecoveryPointRestoreMetadata with the addition of
  1921. // the ability to pass a context and additional request options.
  1922. //
  1923. // See GetRecoveryPointRestoreMetadata for details on how to use this API operation.
  1924. //
  1925. // The context must be non-nil and will be used for request cancellation. If
  1926. // the context is nil a panic will occur. In the future the SDK may create
  1927. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1928. // for more information on using Contexts.
  1929. func (c *Backup) GetRecoveryPointRestoreMetadataWithContext(ctx aws.Context, input *GetRecoveryPointRestoreMetadataInput, opts ...request.Option) (*GetRecoveryPointRestoreMetadataOutput, error) {
  1930. req, out := c.GetRecoveryPointRestoreMetadataRequest(input)
  1931. req.SetContext(ctx)
  1932. req.ApplyOptions(opts...)
  1933. return out, req.Send()
  1934. }
  1935. const opGetSupportedResourceTypes = "GetSupportedResourceTypes"
  1936. // GetSupportedResourceTypesRequest generates a "aws/request.Request" representing the
  1937. // client's request for the GetSupportedResourceTypes operation. The "output" return
  1938. // value will be populated with the request's response once the request completes
  1939. // successfully.
  1940. //
  1941. // Use "Send" method on the returned Request to send the API call to the service.
  1942. // the "output" return value is not valid until after Send returns without error.
  1943. //
  1944. // See GetSupportedResourceTypes for more information on using the GetSupportedResourceTypes
  1945. // API call, and error handling.
  1946. //
  1947. // This method is useful when you want to inject custom logic or configuration
  1948. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1949. //
  1950. //
  1951. // // Example sending a request using the GetSupportedResourceTypesRequest method.
  1952. // req, resp := client.GetSupportedResourceTypesRequest(params)
  1953. //
  1954. // err := req.Send()
  1955. // if err == nil { // resp is now filled
  1956. // fmt.Println(resp)
  1957. // }
  1958. //
  1959. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetSupportedResourceTypes
  1960. func (c *Backup) GetSupportedResourceTypesRequest(input *GetSupportedResourceTypesInput) (req *request.Request, output *GetSupportedResourceTypesOutput) {
  1961. op := &request.Operation{
  1962. Name: opGetSupportedResourceTypes,
  1963. HTTPMethod: "GET",
  1964. HTTPPath: "/supported-resource-types",
  1965. }
  1966. if input == nil {
  1967. input = &GetSupportedResourceTypesInput{}
  1968. }
  1969. output = &GetSupportedResourceTypesOutput{}
  1970. req = c.newRequest(op, input, output)
  1971. return
  1972. }
  1973. // GetSupportedResourceTypes API operation for AWS Backup.
  1974. //
  1975. // Returns the AWS resource types supported by AWS Backup.
  1976. //
  1977. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1978. // with awserr.Error's Code and Message methods to get detailed information about
  1979. // the error.
  1980. //
  1981. // See the AWS API reference guide for AWS Backup's
  1982. // API operation GetSupportedResourceTypes for usage and error information.
  1983. //
  1984. // Returned Error Codes:
  1985. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1986. // The request failed due to a temporary failure of the server.
  1987. //
  1988. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetSupportedResourceTypes
  1989. func (c *Backup) GetSupportedResourceTypes(input *GetSupportedResourceTypesInput) (*GetSupportedResourceTypesOutput, error) {
  1990. req, out := c.GetSupportedResourceTypesRequest(input)
  1991. return out, req.Send()
  1992. }
  1993. // GetSupportedResourceTypesWithContext is the same as GetSupportedResourceTypes with the addition of
  1994. // the ability to pass a context and additional request options.
  1995. //
  1996. // See GetSupportedResourceTypes for details on how to use this API operation.
  1997. //
  1998. // The context must be non-nil and will be used for request cancellation. If
  1999. // the context is nil a panic will occur. In the future the SDK may create
  2000. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2001. // for more information on using Contexts.
  2002. func (c *Backup) GetSupportedResourceTypesWithContext(ctx aws.Context, input *GetSupportedResourceTypesInput, opts ...request.Option) (*GetSupportedResourceTypesOutput, error) {
  2003. req, out := c.GetSupportedResourceTypesRequest(input)
  2004. req.SetContext(ctx)
  2005. req.ApplyOptions(opts...)
  2006. return out, req.Send()
  2007. }
  2008. const opListBackupJobs = "ListBackupJobs"
  2009. // ListBackupJobsRequest generates a "aws/request.Request" representing the
  2010. // client's request for the ListBackupJobs operation. The "output" return
  2011. // value will be populated with the request's response once the request completes
  2012. // successfully.
  2013. //
  2014. // Use "Send" method on the returned Request to send the API call to the service.
  2015. // the "output" return value is not valid until after Send returns without error.
  2016. //
  2017. // See ListBackupJobs for more information on using the ListBackupJobs
  2018. // API call, and error handling.
  2019. //
  2020. // This method is useful when you want to inject custom logic or configuration
  2021. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2022. //
  2023. //
  2024. // // Example sending a request using the ListBackupJobsRequest method.
  2025. // req, resp := client.ListBackupJobsRequest(params)
  2026. //
  2027. // err := req.Send()
  2028. // if err == nil { // resp is now filled
  2029. // fmt.Println(resp)
  2030. // }
  2031. //
  2032. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupJobs
  2033. func (c *Backup) ListBackupJobsRequest(input *ListBackupJobsInput) (req *request.Request, output *ListBackupJobsOutput) {
  2034. op := &request.Operation{
  2035. Name: opListBackupJobs,
  2036. HTTPMethod: "GET",
  2037. HTTPPath: "/backup-jobs/",
  2038. Paginator: &request.Paginator{
  2039. InputTokens: []string{"NextToken"},
  2040. OutputTokens: []string{"NextToken"},
  2041. LimitToken: "MaxResults",
  2042. TruncationToken: "",
  2043. },
  2044. }
  2045. if input == nil {
  2046. input = &ListBackupJobsInput{}
  2047. }
  2048. output = &ListBackupJobsOutput{}
  2049. req = c.newRequest(op, input, output)
  2050. return
  2051. }
  2052. // ListBackupJobs API operation for AWS Backup.
  2053. //
  2054. // Returns metadata about your backup jobs.
  2055. //
  2056. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2057. // with awserr.Error's Code and Message methods to get detailed information about
  2058. // the error.
  2059. //
  2060. // See the AWS API reference guide for AWS Backup's
  2061. // API operation ListBackupJobs for usage and error information.
  2062. //
  2063. // Returned Error Codes:
  2064. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2065. // Indicates that something is wrong with a parameter's value. For example,
  2066. // the value is out of range.
  2067. //
  2068. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2069. // The request failed due to a temporary failure of the server.
  2070. //
  2071. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupJobs
  2072. func (c *Backup) ListBackupJobs(input *ListBackupJobsInput) (*ListBackupJobsOutput, error) {
  2073. req, out := c.ListBackupJobsRequest(input)
  2074. return out, req.Send()
  2075. }
  2076. // ListBackupJobsWithContext is the same as ListBackupJobs with the addition of
  2077. // the ability to pass a context and additional request options.
  2078. //
  2079. // See ListBackupJobs for details on how to use this API operation.
  2080. //
  2081. // The context must be non-nil and will be used for request cancellation. If
  2082. // the context is nil a panic will occur. In the future the SDK may create
  2083. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2084. // for more information on using Contexts.
  2085. func (c *Backup) ListBackupJobsWithContext(ctx aws.Context, input *ListBackupJobsInput, opts ...request.Option) (*ListBackupJobsOutput, error) {
  2086. req, out := c.ListBackupJobsRequest(input)
  2087. req.SetContext(ctx)
  2088. req.ApplyOptions(opts...)
  2089. return out, req.Send()
  2090. }
  2091. // ListBackupJobsPages iterates over the pages of a ListBackupJobs operation,
  2092. // calling the "fn" function with the response data for each page. To stop
  2093. // iterating, return false from the fn function.
  2094. //
  2095. // See ListBackupJobs method for more information on how to use this operation.
  2096. //
  2097. // Note: This operation can generate multiple requests to a service.
  2098. //
  2099. // // Example iterating over at most 3 pages of a ListBackupJobs operation.
  2100. // pageNum := 0
  2101. // err := client.ListBackupJobsPages(params,
  2102. // func(page *ListBackupJobsOutput, lastPage bool) bool {
  2103. // pageNum++
  2104. // fmt.Println(page)
  2105. // return pageNum <= 3
  2106. // })
  2107. //
  2108. func (c *Backup) ListBackupJobsPages(input *ListBackupJobsInput, fn func(*ListBackupJobsOutput, bool) bool) error {
  2109. return c.ListBackupJobsPagesWithContext(aws.BackgroundContext(), input, fn)
  2110. }
  2111. // ListBackupJobsPagesWithContext same as ListBackupJobsPages except
  2112. // it takes a Context and allows setting request options on the pages.
  2113. //
  2114. // The context must be non-nil and will be used for request cancellation. If
  2115. // the context is nil a panic will occur. In the future the SDK may create
  2116. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2117. // for more information on using Contexts.
  2118. func (c *Backup) ListBackupJobsPagesWithContext(ctx aws.Context, input *ListBackupJobsInput, fn func(*ListBackupJobsOutput, bool) bool, opts ...request.Option) error {
  2119. p := request.Pagination{
  2120. NewRequest: func() (*request.Request, error) {
  2121. var inCpy *ListBackupJobsInput
  2122. if input != nil {
  2123. tmp := *input
  2124. inCpy = &tmp
  2125. }
  2126. req, _ := c.ListBackupJobsRequest(inCpy)
  2127. req.SetContext(ctx)
  2128. req.ApplyOptions(opts...)
  2129. return req, nil
  2130. },
  2131. }
  2132. cont := true
  2133. for p.Next() && cont {
  2134. cont = fn(p.Page().(*ListBackupJobsOutput), !p.HasNextPage())
  2135. }
  2136. return p.Err()
  2137. }
  2138. const opListBackupPlanTemplates = "ListBackupPlanTemplates"
  2139. // ListBackupPlanTemplatesRequest generates a "aws/request.Request" representing the
  2140. // client's request for the ListBackupPlanTemplates operation. The "output" return
  2141. // value will be populated with the request's response once the request completes
  2142. // successfully.
  2143. //
  2144. // Use "Send" method on the returned Request to send the API call to the service.
  2145. // the "output" return value is not valid until after Send returns without error.
  2146. //
  2147. // See ListBackupPlanTemplates for more information on using the ListBackupPlanTemplates
  2148. // API call, and error handling.
  2149. //
  2150. // This method is useful when you want to inject custom logic or configuration
  2151. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2152. //
  2153. //
  2154. // // Example sending a request using the ListBackupPlanTemplatesRequest method.
  2155. // req, resp := client.ListBackupPlanTemplatesRequest(params)
  2156. //
  2157. // err := req.Send()
  2158. // if err == nil { // resp is now filled
  2159. // fmt.Println(resp)
  2160. // }
  2161. //
  2162. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanTemplates
  2163. func (c *Backup) ListBackupPlanTemplatesRequest(input *ListBackupPlanTemplatesInput) (req *request.Request, output *ListBackupPlanTemplatesOutput) {
  2164. op := &request.Operation{
  2165. Name: opListBackupPlanTemplates,
  2166. HTTPMethod: "GET",
  2167. HTTPPath: "/backup/template/plans",
  2168. Paginator: &request.Paginator{
  2169. InputTokens: []string{"NextToken"},
  2170. OutputTokens: []string{"NextToken"},
  2171. LimitToken: "MaxResults",
  2172. TruncationToken: "",
  2173. },
  2174. }
  2175. if input == nil {
  2176. input = &ListBackupPlanTemplatesInput{}
  2177. }
  2178. output = &ListBackupPlanTemplatesOutput{}
  2179. req = c.newRequest(op, input, output)
  2180. return
  2181. }
  2182. // ListBackupPlanTemplates API operation for AWS Backup.
  2183. //
  2184. // Returns metadata of your saved backup plan templates, including the template
  2185. // ID, name, and the creation and deletion dates.
  2186. //
  2187. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2188. // with awserr.Error's Code and Message methods to get detailed information about
  2189. // the error.
  2190. //
  2191. // See the AWS API reference guide for AWS Backup's
  2192. // API operation ListBackupPlanTemplates for usage and error information.
  2193. //
  2194. // Returned Error Codes:
  2195. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2196. // Indicates that something is wrong with a parameter's value. For example,
  2197. // the value is out of range.
  2198. //
  2199. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  2200. // Indicates that a required parameter is missing.
  2201. //
  2202. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2203. // The request failed due to a temporary failure of the server.
  2204. //
  2205. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2206. // A resource that is required for the action doesn't exist.
  2207. //
  2208. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanTemplates
  2209. func (c *Backup) ListBackupPlanTemplates(input *ListBackupPlanTemplatesInput) (*ListBackupPlanTemplatesOutput, error) {
  2210. req, out := c.ListBackupPlanTemplatesRequest(input)
  2211. return out, req.Send()
  2212. }
  2213. // ListBackupPlanTemplatesWithContext is the same as ListBackupPlanTemplates with the addition of
  2214. // the ability to pass a context and additional request options.
  2215. //
  2216. // See ListBackupPlanTemplates for details on how to use this API operation.
  2217. //
  2218. // The context must be non-nil and will be used for request cancellation. If
  2219. // the context is nil a panic will occur. In the future the SDK may create
  2220. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2221. // for more information on using Contexts.
  2222. func (c *Backup) ListBackupPlanTemplatesWithContext(ctx aws.Context, input *ListBackupPlanTemplatesInput, opts ...request.Option) (*ListBackupPlanTemplatesOutput, error) {
  2223. req, out := c.ListBackupPlanTemplatesRequest(input)
  2224. req.SetContext(ctx)
  2225. req.ApplyOptions(opts...)
  2226. return out, req.Send()
  2227. }
  2228. // ListBackupPlanTemplatesPages iterates over the pages of a ListBackupPlanTemplates operation,
  2229. // calling the "fn" function with the response data for each page. To stop
  2230. // iterating, return false from the fn function.
  2231. //
  2232. // See ListBackupPlanTemplates method for more information on how to use this operation.
  2233. //
  2234. // Note: This operation can generate multiple requests to a service.
  2235. //
  2236. // // Example iterating over at most 3 pages of a ListBackupPlanTemplates operation.
  2237. // pageNum := 0
  2238. // err := client.ListBackupPlanTemplatesPages(params,
  2239. // func(page *ListBackupPlanTemplatesOutput, lastPage bool) bool {
  2240. // pageNum++
  2241. // fmt.Println(page)
  2242. // return pageNum <= 3
  2243. // })
  2244. //
  2245. func (c *Backup) ListBackupPlanTemplatesPages(input *ListBackupPlanTemplatesInput, fn func(*ListBackupPlanTemplatesOutput, bool) bool) error {
  2246. return c.ListBackupPlanTemplatesPagesWithContext(aws.BackgroundContext(), input, fn)
  2247. }
  2248. // ListBackupPlanTemplatesPagesWithContext same as ListBackupPlanTemplatesPages except
  2249. // it takes a Context and allows setting request options on the pages.
  2250. //
  2251. // The context must be non-nil and will be used for request cancellation. If
  2252. // the context is nil a panic will occur. In the future the SDK may create
  2253. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2254. // for more information on using Contexts.
  2255. func (c *Backup) ListBackupPlanTemplatesPagesWithContext(ctx aws.Context, input *ListBackupPlanTemplatesInput, fn func(*ListBackupPlanTemplatesOutput, bool) bool, opts ...request.Option) error {
  2256. p := request.Pagination{
  2257. NewRequest: func() (*request.Request, error) {
  2258. var inCpy *ListBackupPlanTemplatesInput
  2259. if input != nil {
  2260. tmp := *input
  2261. inCpy = &tmp
  2262. }
  2263. req, _ := c.ListBackupPlanTemplatesRequest(inCpy)
  2264. req.SetContext(ctx)
  2265. req.ApplyOptions(opts...)
  2266. return req, nil
  2267. },
  2268. }
  2269. cont := true
  2270. for p.Next() && cont {
  2271. cont = fn(p.Page().(*ListBackupPlanTemplatesOutput), !p.HasNextPage())
  2272. }
  2273. return p.Err()
  2274. }
  2275. const opListBackupPlanVersions = "ListBackupPlanVersions"
  2276. // ListBackupPlanVersionsRequest generates a "aws/request.Request" representing the
  2277. // client's request for the ListBackupPlanVersions operation. The "output" return
  2278. // value will be populated with the request's response once the request completes
  2279. // successfully.
  2280. //
  2281. // Use "Send" method on the returned Request to send the API call to the service.
  2282. // the "output" return value is not valid until after Send returns without error.
  2283. //
  2284. // See ListBackupPlanVersions for more information on using the ListBackupPlanVersions
  2285. // API call, and error handling.
  2286. //
  2287. // This method is useful when you want to inject custom logic or configuration
  2288. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2289. //
  2290. //
  2291. // // Example sending a request using the ListBackupPlanVersionsRequest method.
  2292. // req, resp := client.ListBackupPlanVersionsRequest(params)
  2293. //
  2294. // err := req.Send()
  2295. // if err == nil { // resp is now filled
  2296. // fmt.Println(resp)
  2297. // }
  2298. //
  2299. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanVersions
  2300. func (c *Backup) ListBackupPlanVersionsRequest(input *ListBackupPlanVersionsInput) (req *request.Request, output *ListBackupPlanVersionsOutput) {
  2301. op := &request.Operation{
  2302. Name: opListBackupPlanVersions,
  2303. HTTPMethod: "GET",
  2304. HTTPPath: "/backup/plans/{backupPlanId}/versions/",
  2305. Paginator: &request.Paginator{
  2306. InputTokens: []string{"NextToken"},
  2307. OutputTokens: []string{"NextToken"},
  2308. LimitToken: "MaxResults",
  2309. TruncationToken: "",
  2310. },
  2311. }
  2312. if input == nil {
  2313. input = &ListBackupPlanVersionsInput{}
  2314. }
  2315. output = &ListBackupPlanVersionsOutput{}
  2316. req = c.newRequest(op, input, output)
  2317. return
  2318. }
  2319. // ListBackupPlanVersions API operation for AWS Backup.
  2320. //
  2321. // Returns version metadata of your backup plans, including Amazon Resource
  2322. // Names (ARNs), backup plan IDs, creation and deletion dates, plan names, and
  2323. // version IDs.
  2324. //
  2325. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2326. // with awserr.Error's Code and Message methods to get detailed information about
  2327. // the error.
  2328. //
  2329. // See the AWS API reference guide for AWS Backup's
  2330. // API operation ListBackupPlanVersions for usage and error information.
  2331. //
  2332. // Returned Error Codes:
  2333. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2334. // A resource that is required for the action doesn't exist.
  2335. //
  2336. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2337. // Indicates that something is wrong with a parameter's value. For example,
  2338. // the value is out of range.
  2339. //
  2340. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  2341. // Indicates that a required parameter is missing.
  2342. //
  2343. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2344. // The request failed due to a temporary failure of the server.
  2345. //
  2346. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanVersions
  2347. func (c *Backup) ListBackupPlanVersions(input *ListBackupPlanVersionsInput) (*ListBackupPlanVersionsOutput, error) {
  2348. req, out := c.ListBackupPlanVersionsRequest(input)
  2349. return out, req.Send()
  2350. }
  2351. // ListBackupPlanVersionsWithContext is the same as ListBackupPlanVersions with the addition of
  2352. // the ability to pass a context and additional request options.
  2353. //
  2354. // See ListBackupPlanVersions for details on how to use this API operation.
  2355. //
  2356. // The context must be non-nil and will be used for request cancellation. If
  2357. // the context is nil a panic will occur. In the future the SDK may create
  2358. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2359. // for more information on using Contexts.
  2360. func (c *Backup) ListBackupPlanVersionsWithContext(ctx aws.Context, input *ListBackupPlanVersionsInput, opts ...request.Option) (*ListBackupPlanVersionsOutput, error) {
  2361. req, out := c.ListBackupPlanVersionsRequest(input)
  2362. req.SetContext(ctx)
  2363. req.ApplyOptions(opts...)
  2364. return out, req.Send()
  2365. }
  2366. // ListBackupPlanVersionsPages iterates over the pages of a ListBackupPlanVersions operation,
  2367. // calling the "fn" function with the response data for each page. To stop
  2368. // iterating, return false from the fn function.
  2369. //
  2370. // See ListBackupPlanVersions method for more information on how to use this operation.
  2371. //
  2372. // Note: This operation can generate multiple requests to a service.
  2373. //
  2374. // // Example iterating over at most 3 pages of a ListBackupPlanVersions operation.
  2375. // pageNum := 0
  2376. // err := client.ListBackupPlanVersionsPages(params,
  2377. // func(page *ListBackupPlanVersionsOutput, lastPage bool) bool {
  2378. // pageNum++
  2379. // fmt.Println(page)
  2380. // return pageNum <= 3
  2381. // })
  2382. //
  2383. func (c *Backup) ListBackupPlanVersionsPages(input *ListBackupPlanVersionsInput, fn func(*ListBackupPlanVersionsOutput, bool) bool) error {
  2384. return c.ListBackupPlanVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
  2385. }
  2386. // ListBackupPlanVersionsPagesWithContext same as ListBackupPlanVersionsPages except
  2387. // it takes a Context and allows setting request options on the pages.
  2388. //
  2389. // The context must be non-nil and will be used for request cancellation. If
  2390. // the context is nil a panic will occur. In the future the SDK may create
  2391. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2392. // for more information on using Contexts.
  2393. func (c *Backup) ListBackupPlanVersionsPagesWithContext(ctx aws.Context, input *ListBackupPlanVersionsInput, fn func(*ListBackupPlanVersionsOutput, bool) bool, opts ...request.Option) error {
  2394. p := request.Pagination{
  2395. NewRequest: func() (*request.Request, error) {
  2396. var inCpy *ListBackupPlanVersionsInput
  2397. if input != nil {
  2398. tmp := *input
  2399. inCpy = &tmp
  2400. }
  2401. req, _ := c.ListBackupPlanVersionsRequest(inCpy)
  2402. req.SetContext(ctx)
  2403. req.ApplyOptions(opts...)
  2404. return req, nil
  2405. },
  2406. }
  2407. cont := true
  2408. for p.Next() && cont {
  2409. cont = fn(p.Page().(*ListBackupPlanVersionsOutput), !p.HasNextPage())
  2410. }
  2411. return p.Err()
  2412. }
  2413. const opListBackupPlans = "ListBackupPlans"
  2414. // ListBackupPlansRequest generates a "aws/request.Request" representing the
  2415. // client's request for the ListBackupPlans operation. The "output" return
  2416. // value will be populated with the request's response once the request completes
  2417. // successfully.
  2418. //
  2419. // Use "Send" method on the returned Request to send the API call to the service.
  2420. // the "output" return value is not valid until after Send returns without error.
  2421. //
  2422. // See ListBackupPlans for more information on using the ListBackupPlans
  2423. // API call, and error handling.
  2424. //
  2425. // This method is useful when you want to inject custom logic or configuration
  2426. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2427. //
  2428. //
  2429. // // Example sending a request using the ListBackupPlansRequest method.
  2430. // req, resp := client.ListBackupPlansRequest(params)
  2431. //
  2432. // err := req.Send()
  2433. // if err == nil { // resp is now filled
  2434. // fmt.Println(resp)
  2435. // }
  2436. //
  2437. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlans
  2438. func (c *Backup) ListBackupPlansRequest(input *ListBackupPlansInput) (req *request.Request, output *ListBackupPlansOutput) {
  2439. op := &request.Operation{
  2440. Name: opListBackupPlans,
  2441. HTTPMethod: "GET",
  2442. HTTPPath: "/backup/plans/",
  2443. Paginator: &request.Paginator{
  2444. InputTokens: []string{"NextToken"},
  2445. OutputTokens: []string{"NextToken"},
  2446. LimitToken: "MaxResults",
  2447. TruncationToken: "",
  2448. },
  2449. }
  2450. if input == nil {
  2451. input = &ListBackupPlansInput{}
  2452. }
  2453. output = &ListBackupPlansOutput{}
  2454. req = c.newRequest(op, input, output)
  2455. return
  2456. }
  2457. // ListBackupPlans API operation for AWS Backup.
  2458. //
  2459. // Returns metadata of your saved backup plans, including Amazon Resource Names
  2460. // (ARNs), plan IDs, creation and deletion dates, version IDs, plan names, and
  2461. // creator request IDs.
  2462. //
  2463. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2464. // with awserr.Error's Code and Message methods to get detailed information about
  2465. // the error.
  2466. //
  2467. // See the AWS API reference guide for AWS Backup's
  2468. // API operation ListBackupPlans for usage and error information.
  2469. //
  2470. // Returned Error Codes:
  2471. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2472. // A resource that is required for the action doesn't exist.
  2473. //
  2474. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2475. // Indicates that something is wrong with a parameter's value. For example,
  2476. // the value is out of range.
  2477. //
  2478. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  2479. // Indicates that a required parameter is missing.
  2480. //
  2481. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2482. // The request failed due to a temporary failure of the server.
  2483. //
  2484. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlans
  2485. func (c *Backup) ListBackupPlans(input *ListBackupPlansInput) (*ListBackupPlansOutput, error) {
  2486. req, out := c.ListBackupPlansRequest(input)
  2487. return out, req.Send()
  2488. }
  2489. // ListBackupPlansWithContext is the same as ListBackupPlans with the addition of
  2490. // the ability to pass a context and additional request options.
  2491. //
  2492. // See ListBackupPlans for details on how to use this API operation.
  2493. //
  2494. // The context must be non-nil and will be used for request cancellation. If
  2495. // the context is nil a panic will occur. In the future the SDK may create
  2496. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2497. // for more information on using Contexts.
  2498. func (c *Backup) ListBackupPlansWithContext(ctx aws.Context, input *ListBackupPlansInput, opts ...request.Option) (*ListBackupPlansOutput, error) {
  2499. req, out := c.ListBackupPlansRequest(input)
  2500. req.SetContext(ctx)
  2501. req.ApplyOptions(opts...)
  2502. return out, req.Send()
  2503. }
  2504. // ListBackupPlansPages iterates over the pages of a ListBackupPlans operation,
  2505. // calling the "fn" function with the response data for each page. To stop
  2506. // iterating, return false from the fn function.
  2507. //
  2508. // See ListBackupPlans method for more information on how to use this operation.
  2509. //
  2510. // Note: This operation can generate multiple requests to a service.
  2511. //
  2512. // // Example iterating over at most 3 pages of a ListBackupPlans operation.
  2513. // pageNum := 0
  2514. // err := client.ListBackupPlansPages(params,
  2515. // func(page *ListBackupPlansOutput, lastPage bool) bool {
  2516. // pageNum++
  2517. // fmt.Println(page)
  2518. // return pageNum <= 3
  2519. // })
  2520. //
  2521. func (c *Backup) ListBackupPlansPages(input *ListBackupPlansInput, fn func(*ListBackupPlansOutput, bool) bool) error {
  2522. return c.ListBackupPlansPagesWithContext(aws.BackgroundContext(), input, fn)
  2523. }
  2524. // ListBackupPlansPagesWithContext same as ListBackupPlansPages except
  2525. // it takes a Context and allows setting request options on the pages.
  2526. //
  2527. // The context must be non-nil and will be used for request cancellation. If
  2528. // the context is nil a panic will occur. In the future the SDK may create
  2529. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2530. // for more information on using Contexts.
  2531. func (c *Backup) ListBackupPlansPagesWithContext(ctx aws.Context, input *ListBackupPlansInput, fn func(*ListBackupPlansOutput, bool) bool, opts ...request.Option) error {
  2532. p := request.Pagination{
  2533. NewRequest: func() (*request.Request, error) {
  2534. var inCpy *ListBackupPlansInput
  2535. if input != nil {
  2536. tmp := *input
  2537. inCpy = &tmp
  2538. }
  2539. req, _ := c.ListBackupPlansRequest(inCpy)
  2540. req.SetContext(ctx)
  2541. req.ApplyOptions(opts...)
  2542. return req, nil
  2543. },
  2544. }
  2545. cont := true
  2546. for p.Next() && cont {
  2547. cont = fn(p.Page().(*ListBackupPlansOutput), !p.HasNextPage())
  2548. }
  2549. return p.Err()
  2550. }
  2551. const opListBackupSelections = "ListBackupSelections"
  2552. // ListBackupSelectionsRequest generates a "aws/request.Request" representing the
  2553. // client's request for the ListBackupSelections operation. The "output" return
  2554. // value will be populated with the request's response once the request completes
  2555. // successfully.
  2556. //
  2557. // Use "Send" method on the returned Request to send the API call to the service.
  2558. // the "output" return value is not valid until after Send returns without error.
  2559. //
  2560. // See ListBackupSelections for more information on using the ListBackupSelections
  2561. // API call, and error handling.
  2562. //
  2563. // This method is useful when you want to inject custom logic or configuration
  2564. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2565. //
  2566. //
  2567. // // Example sending a request using the ListBackupSelectionsRequest method.
  2568. // req, resp := client.ListBackupSelectionsRequest(params)
  2569. //
  2570. // err := req.Send()
  2571. // if err == nil { // resp is now filled
  2572. // fmt.Println(resp)
  2573. // }
  2574. //
  2575. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupSelections
  2576. func (c *Backup) ListBackupSelectionsRequest(input *ListBackupSelectionsInput) (req *request.Request, output *ListBackupSelectionsOutput) {
  2577. op := &request.Operation{
  2578. Name: opListBackupSelections,
  2579. HTTPMethod: "GET",
  2580. HTTPPath: "/backup/plans/{backupPlanId}/selections/",
  2581. Paginator: &request.Paginator{
  2582. InputTokens: []string{"NextToken"},
  2583. OutputTokens: []string{"NextToken"},
  2584. LimitToken: "MaxResults",
  2585. TruncationToken: "",
  2586. },
  2587. }
  2588. if input == nil {
  2589. input = &ListBackupSelectionsInput{}
  2590. }
  2591. output = &ListBackupSelectionsOutput{}
  2592. req = c.newRequest(op, input, output)
  2593. return
  2594. }
  2595. // ListBackupSelections API operation for AWS Backup.
  2596. //
  2597. // Returns an array containing metadata of the resources associated with the
  2598. // target backup plan.
  2599. //
  2600. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2601. // with awserr.Error's Code and Message methods to get detailed information about
  2602. // the error.
  2603. //
  2604. // See the AWS API reference guide for AWS Backup's
  2605. // API operation ListBackupSelections for usage and error information.
  2606. //
  2607. // Returned Error Codes:
  2608. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2609. // A resource that is required for the action doesn't exist.
  2610. //
  2611. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2612. // Indicates that something is wrong with a parameter's value. For example,
  2613. // the value is out of range.
  2614. //
  2615. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  2616. // Indicates that a required parameter is missing.
  2617. //
  2618. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2619. // The request failed due to a temporary failure of the server.
  2620. //
  2621. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupSelections
  2622. func (c *Backup) ListBackupSelections(input *ListBackupSelectionsInput) (*ListBackupSelectionsOutput, error) {
  2623. req, out := c.ListBackupSelectionsRequest(input)
  2624. return out, req.Send()
  2625. }
  2626. // ListBackupSelectionsWithContext is the same as ListBackupSelections with the addition of
  2627. // the ability to pass a context and additional request options.
  2628. //
  2629. // See ListBackupSelections for details on how to use this API operation.
  2630. //
  2631. // The context must be non-nil and will be used for request cancellation. If
  2632. // the context is nil a panic will occur. In the future the SDK may create
  2633. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2634. // for more information on using Contexts.
  2635. func (c *Backup) ListBackupSelectionsWithContext(ctx aws.Context, input *ListBackupSelectionsInput, opts ...request.Option) (*ListBackupSelectionsOutput, error) {
  2636. req, out := c.ListBackupSelectionsRequest(input)
  2637. req.SetContext(ctx)
  2638. req.ApplyOptions(opts...)
  2639. return out, req.Send()
  2640. }
  2641. // ListBackupSelectionsPages iterates over the pages of a ListBackupSelections operation,
  2642. // calling the "fn" function with the response data for each page. To stop
  2643. // iterating, return false from the fn function.
  2644. //
  2645. // See ListBackupSelections method for more information on how to use this operation.
  2646. //
  2647. // Note: This operation can generate multiple requests to a service.
  2648. //
  2649. // // Example iterating over at most 3 pages of a ListBackupSelections operation.
  2650. // pageNum := 0
  2651. // err := client.ListBackupSelectionsPages(params,
  2652. // func(page *ListBackupSelectionsOutput, lastPage bool) bool {
  2653. // pageNum++
  2654. // fmt.Println(page)
  2655. // return pageNum <= 3
  2656. // })
  2657. //
  2658. func (c *Backup) ListBackupSelectionsPages(input *ListBackupSelectionsInput, fn func(*ListBackupSelectionsOutput, bool) bool) error {
  2659. return c.ListBackupSelectionsPagesWithContext(aws.BackgroundContext(), input, fn)
  2660. }
  2661. // ListBackupSelectionsPagesWithContext same as ListBackupSelectionsPages except
  2662. // it takes a Context and allows setting request options on the pages.
  2663. //
  2664. // The context must be non-nil and will be used for request cancellation. If
  2665. // the context is nil a panic will occur. In the future the SDK may create
  2666. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2667. // for more information on using Contexts.
  2668. func (c *Backup) ListBackupSelectionsPagesWithContext(ctx aws.Context, input *ListBackupSelectionsInput, fn func(*ListBackupSelectionsOutput, bool) bool, opts ...request.Option) error {
  2669. p := request.Pagination{
  2670. NewRequest: func() (*request.Request, error) {
  2671. var inCpy *ListBackupSelectionsInput
  2672. if input != nil {
  2673. tmp := *input
  2674. inCpy = &tmp
  2675. }
  2676. req, _ := c.ListBackupSelectionsRequest(inCpy)
  2677. req.SetContext(ctx)
  2678. req.ApplyOptions(opts...)
  2679. return req, nil
  2680. },
  2681. }
  2682. cont := true
  2683. for p.Next() && cont {
  2684. cont = fn(p.Page().(*ListBackupSelectionsOutput), !p.HasNextPage())
  2685. }
  2686. return p.Err()
  2687. }
  2688. const opListBackupVaults = "ListBackupVaults"
  2689. // ListBackupVaultsRequest generates a "aws/request.Request" representing the
  2690. // client's request for the ListBackupVaults operation. The "output" return
  2691. // value will be populated with the request's response once the request completes
  2692. // successfully.
  2693. //
  2694. // Use "Send" method on the returned Request to send the API call to the service.
  2695. // the "output" return value is not valid until after Send returns without error.
  2696. //
  2697. // See ListBackupVaults for more information on using the ListBackupVaults
  2698. // API call, and error handling.
  2699. //
  2700. // This method is useful when you want to inject custom logic or configuration
  2701. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2702. //
  2703. //
  2704. // // Example sending a request using the ListBackupVaultsRequest method.
  2705. // req, resp := client.ListBackupVaultsRequest(params)
  2706. //
  2707. // err := req.Send()
  2708. // if err == nil { // resp is now filled
  2709. // fmt.Println(resp)
  2710. // }
  2711. //
  2712. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupVaults
  2713. func (c *Backup) ListBackupVaultsRequest(input *ListBackupVaultsInput) (req *request.Request, output *ListBackupVaultsOutput) {
  2714. op := &request.Operation{
  2715. Name: opListBackupVaults,
  2716. HTTPMethod: "GET",
  2717. HTTPPath: "/backup-vaults/",
  2718. Paginator: &request.Paginator{
  2719. InputTokens: []string{"NextToken"},
  2720. OutputTokens: []string{"NextToken"},
  2721. LimitToken: "MaxResults",
  2722. TruncationToken: "",
  2723. },
  2724. }
  2725. if input == nil {
  2726. input = &ListBackupVaultsInput{}
  2727. }
  2728. output = &ListBackupVaultsOutput{}
  2729. req = c.newRequest(op, input, output)
  2730. return
  2731. }
  2732. // ListBackupVaults API operation for AWS Backup.
  2733. //
  2734. // Returns a list of recovery point storage containers along with information
  2735. // about them.
  2736. //
  2737. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2738. // with awserr.Error's Code and Message methods to get detailed information about
  2739. // the error.
  2740. //
  2741. // See the AWS API reference guide for AWS Backup's
  2742. // API operation ListBackupVaults for usage and error information.
  2743. //
  2744. // Returned Error Codes:
  2745. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2746. // A resource that is required for the action doesn't exist.
  2747. //
  2748. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2749. // Indicates that something is wrong with a parameter's value. For example,
  2750. // the value is out of range.
  2751. //
  2752. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  2753. // Indicates that a required parameter is missing.
  2754. //
  2755. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2756. // The request failed due to a temporary failure of the server.
  2757. //
  2758. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupVaults
  2759. func (c *Backup) ListBackupVaults(input *ListBackupVaultsInput) (*ListBackupVaultsOutput, error) {
  2760. req, out := c.ListBackupVaultsRequest(input)
  2761. return out, req.Send()
  2762. }
  2763. // ListBackupVaultsWithContext is the same as ListBackupVaults with the addition of
  2764. // the ability to pass a context and additional request options.
  2765. //
  2766. // See ListBackupVaults for details on how to use this API operation.
  2767. //
  2768. // The context must be non-nil and will be used for request cancellation. If
  2769. // the context is nil a panic will occur. In the future the SDK may create
  2770. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2771. // for more information on using Contexts.
  2772. func (c *Backup) ListBackupVaultsWithContext(ctx aws.Context, input *ListBackupVaultsInput, opts ...request.Option) (*ListBackupVaultsOutput, error) {
  2773. req, out := c.ListBackupVaultsRequest(input)
  2774. req.SetContext(ctx)
  2775. req.ApplyOptions(opts...)
  2776. return out, req.Send()
  2777. }
  2778. // ListBackupVaultsPages iterates over the pages of a ListBackupVaults operation,
  2779. // calling the "fn" function with the response data for each page. To stop
  2780. // iterating, return false from the fn function.
  2781. //
  2782. // See ListBackupVaults method for more information on how to use this operation.
  2783. //
  2784. // Note: This operation can generate multiple requests to a service.
  2785. //
  2786. // // Example iterating over at most 3 pages of a ListBackupVaults operation.
  2787. // pageNum := 0
  2788. // err := client.ListBackupVaultsPages(params,
  2789. // func(page *ListBackupVaultsOutput, lastPage bool) bool {
  2790. // pageNum++
  2791. // fmt.Println(page)
  2792. // return pageNum <= 3
  2793. // })
  2794. //
  2795. func (c *Backup) ListBackupVaultsPages(input *ListBackupVaultsInput, fn func(*ListBackupVaultsOutput, bool) bool) error {
  2796. return c.ListBackupVaultsPagesWithContext(aws.BackgroundContext(), input, fn)
  2797. }
  2798. // ListBackupVaultsPagesWithContext same as ListBackupVaultsPages except
  2799. // it takes a Context and allows setting request options on the pages.
  2800. //
  2801. // The context must be non-nil and will be used for request cancellation. If
  2802. // the context is nil a panic will occur. In the future the SDK may create
  2803. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2804. // for more information on using Contexts.
  2805. func (c *Backup) ListBackupVaultsPagesWithContext(ctx aws.Context, input *ListBackupVaultsInput, fn func(*ListBackupVaultsOutput, bool) bool, opts ...request.Option) error {
  2806. p := request.Pagination{
  2807. NewRequest: func() (*request.Request, error) {
  2808. var inCpy *ListBackupVaultsInput
  2809. if input != nil {
  2810. tmp := *input
  2811. inCpy = &tmp
  2812. }
  2813. req, _ := c.ListBackupVaultsRequest(inCpy)
  2814. req.SetContext(ctx)
  2815. req.ApplyOptions(opts...)
  2816. return req, nil
  2817. },
  2818. }
  2819. cont := true
  2820. for p.Next() && cont {
  2821. cont = fn(p.Page().(*ListBackupVaultsOutput), !p.HasNextPage())
  2822. }
  2823. return p.Err()
  2824. }
  2825. const opListProtectedResources = "ListProtectedResources"
  2826. // ListProtectedResourcesRequest generates a "aws/request.Request" representing the
  2827. // client's request for the ListProtectedResources operation. The "output" return
  2828. // value will be populated with the request's response once the request completes
  2829. // successfully.
  2830. //
  2831. // Use "Send" method on the returned Request to send the API call to the service.
  2832. // the "output" return value is not valid until after Send returns without error.
  2833. //
  2834. // See ListProtectedResources for more information on using the ListProtectedResources
  2835. // API call, and error handling.
  2836. //
  2837. // This method is useful when you want to inject custom logic or configuration
  2838. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2839. //
  2840. //
  2841. // // Example sending a request using the ListProtectedResourcesRequest method.
  2842. // req, resp := client.ListProtectedResourcesRequest(params)
  2843. //
  2844. // err := req.Send()
  2845. // if err == nil { // resp is now filled
  2846. // fmt.Println(resp)
  2847. // }
  2848. //
  2849. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListProtectedResources
  2850. func (c *Backup) ListProtectedResourcesRequest(input *ListProtectedResourcesInput) (req *request.Request, output *ListProtectedResourcesOutput) {
  2851. op := &request.Operation{
  2852. Name: opListProtectedResources,
  2853. HTTPMethod: "GET",
  2854. HTTPPath: "/resources/",
  2855. Paginator: &request.Paginator{
  2856. InputTokens: []string{"NextToken"},
  2857. OutputTokens: []string{"NextToken"},
  2858. LimitToken: "MaxResults",
  2859. TruncationToken: "",
  2860. },
  2861. }
  2862. if input == nil {
  2863. input = &ListProtectedResourcesInput{}
  2864. }
  2865. output = &ListProtectedResourcesOutput{}
  2866. req = c.newRequest(op, input, output)
  2867. return
  2868. }
  2869. // ListProtectedResources API operation for AWS Backup.
  2870. //
  2871. // Returns an array of resources successfully backed up by AWS Backup, including
  2872. // the time the resource was saved, an Amazon Resource Name (ARN) of the resource,
  2873. // and a resource type.
  2874. //
  2875. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2876. // with awserr.Error's Code and Message methods to get detailed information about
  2877. // the error.
  2878. //
  2879. // See the AWS API reference guide for AWS Backup's
  2880. // API operation ListProtectedResources for usage and error information.
  2881. //
  2882. // Returned Error Codes:
  2883. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2884. // Indicates that something is wrong with a parameter's value. For example,
  2885. // the value is out of range.
  2886. //
  2887. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2888. // The request failed due to a temporary failure of the server.
  2889. //
  2890. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListProtectedResources
  2891. func (c *Backup) ListProtectedResources(input *ListProtectedResourcesInput) (*ListProtectedResourcesOutput, error) {
  2892. req, out := c.ListProtectedResourcesRequest(input)
  2893. return out, req.Send()
  2894. }
  2895. // ListProtectedResourcesWithContext is the same as ListProtectedResources with the addition of
  2896. // the ability to pass a context and additional request options.
  2897. //
  2898. // See ListProtectedResources for details on how to use this API operation.
  2899. //
  2900. // The context must be non-nil and will be used for request cancellation. If
  2901. // the context is nil a panic will occur. In the future the SDK may create
  2902. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2903. // for more information on using Contexts.
  2904. func (c *Backup) ListProtectedResourcesWithContext(ctx aws.Context, input *ListProtectedResourcesInput, opts ...request.Option) (*ListProtectedResourcesOutput, error) {
  2905. req, out := c.ListProtectedResourcesRequest(input)
  2906. req.SetContext(ctx)
  2907. req.ApplyOptions(opts...)
  2908. return out, req.Send()
  2909. }
  2910. // ListProtectedResourcesPages iterates over the pages of a ListProtectedResources operation,
  2911. // calling the "fn" function with the response data for each page. To stop
  2912. // iterating, return false from the fn function.
  2913. //
  2914. // See ListProtectedResources method for more information on how to use this operation.
  2915. //
  2916. // Note: This operation can generate multiple requests to a service.
  2917. //
  2918. // // Example iterating over at most 3 pages of a ListProtectedResources operation.
  2919. // pageNum := 0
  2920. // err := client.ListProtectedResourcesPages(params,
  2921. // func(page *ListProtectedResourcesOutput, lastPage bool) bool {
  2922. // pageNum++
  2923. // fmt.Println(page)
  2924. // return pageNum <= 3
  2925. // })
  2926. //
  2927. func (c *Backup) ListProtectedResourcesPages(input *ListProtectedResourcesInput, fn func(*ListProtectedResourcesOutput, bool) bool) error {
  2928. return c.ListProtectedResourcesPagesWithContext(aws.BackgroundContext(), input, fn)
  2929. }
  2930. // ListProtectedResourcesPagesWithContext same as ListProtectedResourcesPages except
  2931. // it takes a Context and allows setting request options on the pages.
  2932. //
  2933. // The context must be non-nil and will be used for request cancellation. If
  2934. // the context is nil a panic will occur. In the future the SDK may create
  2935. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2936. // for more information on using Contexts.
  2937. func (c *Backup) ListProtectedResourcesPagesWithContext(ctx aws.Context, input *ListProtectedResourcesInput, fn func(*ListProtectedResourcesOutput, bool) bool, opts ...request.Option) error {
  2938. p := request.Pagination{
  2939. NewRequest: func() (*request.Request, error) {
  2940. var inCpy *ListProtectedResourcesInput
  2941. if input != nil {
  2942. tmp := *input
  2943. inCpy = &tmp
  2944. }
  2945. req, _ := c.ListProtectedResourcesRequest(inCpy)
  2946. req.SetContext(ctx)
  2947. req.ApplyOptions(opts...)
  2948. return req, nil
  2949. },
  2950. }
  2951. cont := true
  2952. for p.Next() && cont {
  2953. cont = fn(p.Page().(*ListProtectedResourcesOutput), !p.HasNextPage())
  2954. }
  2955. return p.Err()
  2956. }
  2957. const opListRecoveryPointsByBackupVault = "ListRecoveryPointsByBackupVault"
  2958. // ListRecoveryPointsByBackupVaultRequest generates a "aws/request.Request" representing the
  2959. // client's request for the ListRecoveryPointsByBackupVault operation. The "output" return
  2960. // value will be populated with the request's response once the request completes
  2961. // successfully.
  2962. //
  2963. // Use "Send" method on the returned Request to send the API call to the service.
  2964. // the "output" return value is not valid until after Send returns without error.
  2965. //
  2966. // See ListRecoveryPointsByBackupVault for more information on using the ListRecoveryPointsByBackupVault
  2967. // API call, and error handling.
  2968. //
  2969. // This method is useful when you want to inject custom logic or configuration
  2970. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2971. //
  2972. //
  2973. // // Example sending a request using the ListRecoveryPointsByBackupVaultRequest method.
  2974. // req, resp := client.ListRecoveryPointsByBackupVaultRequest(params)
  2975. //
  2976. // err := req.Send()
  2977. // if err == nil { // resp is now filled
  2978. // fmt.Println(resp)
  2979. // }
  2980. //
  2981. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByBackupVault
  2982. func (c *Backup) ListRecoveryPointsByBackupVaultRequest(input *ListRecoveryPointsByBackupVaultInput) (req *request.Request, output *ListRecoveryPointsByBackupVaultOutput) {
  2983. op := &request.Operation{
  2984. Name: opListRecoveryPointsByBackupVault,
  2985. HTTPMethod: "GET",
  2986. HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/",
  2987. Paginator: &request.Paginator{
  2988. InputTokens: []string{"NextToken"},
  2989. OutputTokens: []string{"NextToken"},
  2990. LimitToken: "MaxResults",
  2991. TruncationToken: "",
  2992. },
  2993. }
  2994. if input == nil {
  2995. input = &ListRecoveryPointsByBackupVaultInput{}
  2996. }
  2997. output = &ListRecoveryPointsByBackupVaultOutput{}
  2998. req = c.newRequest(op, input, output)
  2999. return
  3000. }
  3001. // ListRecoveryPointsByBackupVault API operation for AWS Backup.
  3002. //
  3003. // Returns detailed information about the recovery points stored in a backup
  3004. // vault.
  3005. //
  3006. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3007. // with awserr.Error's Code and Message methods to get detailed information about
  3008. // the error.
  3009. //
  3010. // See the AWS API reference guide for AWS Backup's
  3011. // API operation ListRecoveryPointsByBackupVault for usage and error information.
  3012. //
  3013. // Returned Error Codes:
  3014. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3015. // A resource that is required for the action doesn't exist.
  3016. //
  3017. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3018. // Indicates that something is wrong with a parameter's value. For example,
  3019. // the value is out of range.
  3020. //
  3021. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  3022. // Indicates that a required parameter is missing.
  3023. //
  3024. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3025. // The request failed due to a temporary failure of the server.
  3026. //
  3027. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByBackupVault
  3028. func (c *Backup) ListRecoveryPointsByBackupVault(input *ListRecoveryPointsByBackupVaultInput) (*ListRecoveryPointsByBackupVaultOutput, error) {
  3029. req, out := c.ListRecoveryPointsByBackupVaultRequest(input)
  3030. return out, req.Send()
  3031. }
  3032. // ListRecoveryPointsByBackupVaultWithContext is the same as ListRecoveryPointsByBackupVault with the addition of
  3033. // the ability to pass a context and additional request options.
  3034. //
  3035. // See ListRecoveryPointsByBackupVault for details on how to use this API operation.
  3036. //
  3037. // The context must be non-nil and will be used for request cancellation. If
  3038. // the context is nil a panic will occur. In the future the SDK may create
  3039. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3040. // for more information on using Contexts.
  3041. func (c *Backup) ListRecoveryPointsByBackupVaultWithContext(ctx aws.Context, input *ListRecoveryPointsByBackupVaultInput, opts ...request.Option) (*ListRecoveryPointsByBackupVaultOutput, error) {
  3042. req, out := c.ListRecoveryPointsByBackupVaultRequest(input)
  3043. req.SetContext(ctx)
  3044. req.ApplyOptions(opts...)
  3045. return out, req.Send()
  3046. }
  3047. // ListRecoveryPointsByBackupVaultPages iterates over the pages of a ListRecoveryPointsByBackupVault operation,
  3048. // calling the "fn" function with the response data for each page. To stop
  3049. // iterating, return false from the fn function.
  3050. //
  3051. // See ListRecoveryPointsByBackupVault method for more information on how to use this operation.
  3052. //
  3053. // Note: This operation can generate multiple requests to a service.
  3054. //
  3055. // // Example iterating over at most 3 pages of a ListRecoveryPointsByBackupVault operation.
  3056. // pageNum := 0
  3057. // err := client.ListRecoveryPointsByBackupVaultPages(params,
  3058. // func(page *ListRecoveryPointsByBackupVaultOutput, lastPage bool) bool {
  3059. // pageNum++
  3060. // fmt.Println(page)
  3061. // return pageNum <= 3
  3062. // })
  3063. //
  3064. func (c *Backup) ListRecoveryPointsByBackupVaultPages(input *ListRecoveryPointsByBackupVaultInput, fn func(*ListRecoveryPointsByBackupVaultOutput, bool) bool) error {
  3065. return c.ListRecoveryPointsByBackupVaultPagesWithContext(aws.BackgroundContext(), input, fn)
  3066. }
  3067. // ListRecoveryPointsByBackupVaultPagesWithContext same as ListRecoveryPointsByBackupVaultPages except
  3068. // it takes a Context and allows setting request options on the pages.
  3069. //
  3070. // The context must be non-nil and will be used for request cancellation. If
  3071. // the context is nil a panic will occur. In the future the SDK may create
  3072. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3073. // for more information on using Contexts.
  3074. func (c *Backup) ListRecoveryPointsByBackupVaultPagesWithContext(ctx aws.Context, input *ListRecoveryPointsByBackupVaultInput, fn func(*ListRecoveryPointsByBackupVaultOutput, bool) bool, opts ...request.Option) error {
  3075. p := request.Pagination{
  3076. NewRequest: func() (*request.Request, error) {
  3077. var inCpy *ListRecoveryPointsByBackupVaultInput
  3078. if input != nil {
  3079. tmp := *input
  3080. inCpy = &tmp
  3081. }
  3082. req, _ := c.ListRecoveryPointsByBackupVaultRequest(inCpy)
  3083. req.SetContext(ctx)
  3084. req.ApplyOptions(opts...)
  3085. return req, nil
  3086. },
  3087. }
  3088. cont := true
  3089. for p.Next() && cont {
  3090. cont = fn(p.Page().(*ListRecoveryPointsByBackupVaultOutput), !p.HasNextPage())
  3091. }
  3092. return p.Err()
  3093. }
  3094. const opListRecoveryPointsByResource = "ListRecoveryPointsByResource"
  3095. // ListRecoveryPointsByResourceRequest generates a "aws/request.Request" representing the
  3096. // client's request for the ListRecoveryPointsByResource operation. The "output" return
  3097. // value will be populated with the request's response once the request completes
  3098. // successfully.
  3099. //
  3100. // Use "Send" method on the returned Request to send the API call to the service.
  3101. // the "output" return value is not valid until after Send returns without error.
  3102. //
  3103. // See ListRecoveryPointsByResource for more information on using the ListRecoveryPointsByResource
  3104. // API call, and error handling.
  3105. //
  3106. // This method is useful when you want to inject custom logic or configuration
  3107. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3108. //
  3109. //
  3110. // // Example sending a request using the ListRecoveryPointsByResourceRequest method.
  3111. // req, resp := client.ListRecoveryPointsByResourceRequest(params)
  3112. //
  3113. // err := req.Send()
  3114. // if err == nil { // resp is now filled
  3115. // fmt.Println(resp)
  3116. // }
  3117. //
  3118. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByResource
  3119. func (c *Backup) ListRecoveryPointsByResourceRequest(input *ListRecoveryPointsByResourceInput) (req *request.Request, output *ListRecoveryPointsByResourceOutput) {
  3120. op := &request.Operation{
  3121. Name: opListRecoveryPointsByResource,
  3122. HTTPMethod: "GET",
  3123. HTTPPath: "/resources/{resourceArn}/recovery-points/",
  3124. Paginator: &request.Paginator{
  3125. InputTokens: []string{"NextToken"},
  3126. OutputTokens: []string{"NextToken"},
  3127. LimitToken: "MaxResults",
  3128. TruncationToken: "",
  3129. },
  3130. }
  3131. if input == nil {
  3132. input = &ListRecoveryPointsByResourceInput{}
  3133. }
  3134. output = &ListRecoveryPointsByResourceOutput{}
  3135. req = c.newRequest(op, input, output)
  3136. return
  3137. }
  3138. // ListRecoveryPointsByResource API operation for AWS Backup.
  3139. //
  3140. // Returns detailed information about recovery points of the type specified
  3141. // by a resource Amazon Resource Name (ARN).
  3142. //
  3143. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3144. // with awserr.Error's Code and Message methods to get detailed information about
  3145. // the error.
  3146. //
  3147. // See the AWS API reference guide for AWS Backup's
  3148. // API operation ListRecoveryPointsByResource for usage and error information.
  3149. //
  3150. // Returned Error Codes:
  3151. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3152. // A resource that is required for the action doesn't exist.
  3153. //
  3154. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3155. // Indicates that something is wrong with a parameter's value. For example,
  3156. // the value is out of range.
  3157. //
  3158. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  3159. // Indicates that a required parameter is missing.
  3160. //
  3161. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3162. // The request failed due to a temporary failure of the server.
  3163. //
  3164. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByResource
  3165. func (c *Backup) ListRecoveryPointsByResource(input *ListRecoveryPointsByResourceInput) (*ListRecoveryPointsByResourceOutput, error) {
  3166. req, out := c.ListRecoveryPointsByResourceRequest(input)
  3167. return out, req.Send()
  3168. }
  3169. // ListRecoveryPointsByResourceWithContext is the same as ListRecoveryPointsByResource with the addition of
  3170. // the ability to pass a context and additional request options.
  3171. //
  3172. // See ListRecoveryPointsByResource for details on how to use this API operation.
  3173. //
  3174. // The context must be non-nil and will be used for request cancellation. If
  3175. // the context is nil a panic will occur. In the future the SDK may create
  3176. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3177. // for more information on using Contexts.
  3178. func (c *Backup) ListRecoveryPointsByResourceWithContext(ctx aws.Context, input *ListRecoveryPointsByResourceInput, opts ...request.Option) (*ListRecoveryPointsByResourceOutput, error) {
  3179. req, out := c.ListRecoveryPointsByResourceRequest(input)
  3180. req.SetContext(ctx)
  3181. req.ApplyOptions(opts...)
  3182. return out, req.Send()
  3183. }
  3184. // ListRecoveryPointsByResourcePages iterates over the pages of a ListRecoveryPointsByResource operation,
  3185. // calling the "fn" function with the response data for each page. To stop
  3186. // iterating, return false from the fn function.
  3187. //
  3188. // See ListRecoveryPointsByResource method for more information on how to use this operation.
  3189. //
  3190. // Note: This operation can generate multiple requests to a service.
  3191. //
  3192. // // Example iterating over at most 3 pages of a ListRecoveryPointsByResource operation.
  3193. // pageNum := 0
  3194. // err := client.ListRecoveryPointsByResourcePages(params,
  3195. // func(page *ListRecoveryPointsByResourceOutput, lastPage bool) bool {
  3196. // pageNum++
  3197. // fmt.Println(page)
  3198. // return pageNum <= 3
  3199. // })
  3200. //
  3201. func (c *Backup) ListRecoveryPointsByResourcePages(input *ListRecoveryPointsByResourceInput, fn func(*ListRecoveryPointsByResourceOutput, bool) bool) error {
  3202. return c.ListRecoveryPointsByResourcePagesWithContext(aws.BackgroundContext(), input, fn)
  3203. }
  3204. // ListRecoveryPointsByResourcePagesWithContext same as ListRecoveryPointsByResourcePages except
  3205. // it takes a Context and allows setting request options on the pages.
  3206. //
  3207. // The context must be non-nil and will be used for request cancellation. If
  3208. // the context is nil a panic will occur. In the future the SDK may create
  3209. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3210. // for more information on using Contexts.
  3211. func (c *Backup) ListRecoveryPointsByResourcePagesWithContext(ctx aws.Context, input *ListRecoveryPointsByResourceInput, fn func(*ListRecoveryPointsByResourceOutput, bool) bool, opts ...request.Option) error {
  3212. p := request.Pagination{
  3213. NewRequest: func() (*request.Request, error) {
  3214. var inCpy *ListRecoveryPointsByResourceInput
  3215. if input != nil {
  3216. tmp := *input
  3217. inCpy = &tmp
  3218. }
  3219. req, _ := c.ListRecoveryPointsByResourceRequest(inCpy)
  3220. req.SetContext(ctx)
  3221. req.ApplyOptions(opts...)
  3222. return req, nil
  3223. },
  3224. }
  3225. cont := true
  3226. for p.Next() && cont {
  3227. cont = fn(p.Page().(*ListRecoveryPointsByResourceOutput), !p.HasNextPage())
  3228. }
  3229. return p.Err()
  3230. }
  3231. const opListRestoreJobs = "ListRestoreJobs"
  3232. // ListRestoreJobsRequest generates a "aws/request.Request" representing the
  3233. // client's request for the ListRestoreJobs operation. The "output" return
  3234. // value will be populated with the request's response once the request completes
  3235. // successfully.
  3236. //
  3237. // Use "Send" method on the returned Request to send the API call to the service.
  3238. // the "output" return value is not valid until after Send returns without error.
  3239. //
  3240. // See ListRestoreJobs for more information on using the ListRestoreJobs
  3241. // API call, and error handling.
  3242. //
  3243. // This method is useful when you want to inject custom logic or configuration
  3244. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3245. //
  3246. //
  3247. // // Example sending a request using the ListRestoreJobsRequest method.
  3248. // req, resp := client.ListRestoreJobsRequest(params)
  3249. //
  3250. // err := req.Send()
  3251. // if err == nil { // resp is now filled
  3252. // fmt.Println(resp)
  3253. // }
  3254. //
  3255. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRestoreJobs
  3256. func (c *Backup) ListRestoreJobsRequest(input *ListRestoreJobsInput) (req *request.Request, output *ListRestoreJobsOutput) {
  3257. op := &request.Operation{
  3258. Name: opListRestoreJobs,
  3259. HTTPMethod: "GET",
  3260. HTTPPath: "/restore-jobs/",
  3261. Paginator: &request.Paginator{
  3262. InputTokens: []string{"NextToken"},
  3263. OutputTokens: []string{"NextToken"},
  3264. LimitToken: "MaxResults",
  3265. TruncationToken: "",
  3266. },
  3267. }
  3268. if input == nil {
  3269. input = &ListRestoreJobsInput{}
  3270. }
  3271. output = &ListRestoreJobsOutput{}
  3272. req = c.newRequest(op, input, output)
  3273. return
  3274. }
  3275. // ListRestoreJobs API operation for AWS Backup.
  3276. //
  3277. // Returns a list of jobs that AWS Backup initiated to restore a saved resource,
  3278. // including metadata about the recovery process.
  3279. //
  3280. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3281. // with awserr.Error's Code and Message methods to get detailed information about
  3282. // the error.
  3283. //
  3284. // See the AWS API reference guide for AWS Backup's
  3285. // API operation ListRestoreJobs for usage and error information.
  3286. //
  3287. // Returned Error Codes:
  3288. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3289. // A resource that is required for the action doesn't exist.
  3290. //
  3291. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3292. // Indicates that something is wrong with a parameter's value. For example,
  3293. // the value is out of range.
  3294. //
  3295. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  3296. // Indicates that a required parameter is missing.
  3297. //
  3298. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3299. // The request failed due to a temporary failure of the server.
  3300. //
  3301. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRestoreJobs
  3302. func (c *Backup) ListRestoreJobs(input *ListRestoreJobsInput) (*ListRestoreJobsOutput, error) {
  3303. req, out := c.ListRestoreJobsRequest(input)
  3304. return out, req.Send()
  3305. }
  3306. // ListRestoreJobsWithContext is the same as ListRestoreJobs with the addition of
  3307. // the ability to pass a context and additional request options.
  3308. //
  3309. // See ListRestoreJobs for details on how to use this API operation.
  3310. //
  3311. // The context must be non-nil and will be used for request cancellation. If
  3312. // the context is nil a panic will occur. In the future the SDK may create
  3313. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3314. // for more information on using Contexts.
  3315. func (c *Backup) ListRestoreJobsWithContext(ctx aws.Context, input *ListRestoreJobsInput, opts ...request.Option) (*ListRestoreJobsOutput, error) {
  3316. req, out := c.ListRestoreJobsRequest(input)
  3317. req.SetContext(ctx)
  3318. req.ApplyOptions(opts...)
  3319. return out, req.Send()
  3320. }
  3321. // ListRestoreJobsPages iterates over the pages of a ListRestoreJobs operation,
  3322. // calling the "fn" function with the response data for each page. To stop
  3323. // iterating, return false from the fn function.
  3324. //
  3325. // See ListRestoreJobs method for more information on how to use this operation.
  3326. //
  3327. // Note: This operation can generate multiple requests to a service.
  3328. //
  3329. // // Example iterating over at most 3 pages of a ListRestoreJobs operation.
  3330. // pageNum := 0
  3331. // err := client.ListRestoreJobsPages(params,
  3332. // func(page *ListRestoreJobsOutput, lastPage bool) bool {
  3333. // pageNum++
  3334. // fmt.Println(page)
  3335. // return pageNum <= 3
  3336. // })
  3337. //
  3338. func (c *Backup) ListRestoreJobsPages(input *ListRestoreJobsInput, fn func(*ListRestoreJobsOutput, bool) bool) error {
  3339. return c.ListRestoreJobsPagesWithContext(aws.BackgroundContext(), input, fn)
  3340. }
  3341. // ListRestoreJobsPagesWithContext same as ListRestoreJobsPages except
  3342. // it takes a Context and allows setting request options on the pages.
  3343. //
  3344. // The context must be non-nil and will be used for request cancellation. If
  3345. // the context is nil a panic will occur. In the future the SDK may create
  3346. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3347. // for more information on using Contexts.
  3348. func (c *Backup) ListRestoreJobsPagesWithContext(ctx aws.Context, input *ListRestoreJobsInput, fn func(*ListRestoreJobsOutput, bool) bool, opts ...request.Option) error {
  3349. p := request.Pagination{
  3350. NewRequest: func() (*request.Request, error) {
  3351. var inCpy *ListRestoreJobsInput
  3352. if input != nil {
  3353. tmp := *input
  3354. inCpy = &tmp
  3355. }
  3356. req, _ := c.ListRestoreJobsRequest(inCpy)
  3357. req.SetContext(ctx)
  3358. req.ApplyOptions(opts...)
  3359. return req, nil
  3360. },
  3361. }
  3362. cont := true
  3363. for p.Next() && cont {
  3364. cont = fn(p.Page().(*ListRestoreJobsOutput), !p.HasNextPage())
  3365. }
  3366. return p.Err()
  3367. }
  3368. const opListTags = "ListTags"
  3369. // ListTagsRequest generates a "aws/request.Request" representing the
  3370. // client's request for the ListTags operation. The "output" return
  3371. // value will be populated with the request's response once the request completes
  3372. // successfully.
  3373. //
  3374. // Use "Send" method on the returned Request to send the API call to the service.
  3375. // the "output" return value is not valid until after Send returns without error.
  3376. //
  3377. // See ListTags for more information on using the ListTags
  3378. // API call, and error handling.
  3379. //
  3380. // This method is useful when you want to inject custom logic or configuration
  3381. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3382. //
  3383. //
  3384. // // Example sending a request using the ListTagsRequest method.
  3385. // req, resp := client.ListTagsRequest(params)
  3386. //
  3387. // err := req.Send()
  3388. // if err == nil { // resp is now filled
  3389. // fmt.Println(resp)
  3390. // }
  3391. //
  3392. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListTags
  3393. func (c *Backup) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) {
  3394. op := &request.Operation{
  3395. Name: opListTags,
  3396. HTTPMethod: "GET",
  3397. HTTPPath: "/tags/{resourceArn}/",
  3398. Paginator: &request.Paginator{
  3399. InputTokens: []string{"NextToken"},
  3400. OutputTokens: []string{"NextToken"},
  3401. LimitToken: "MaxResults",
  3402. TruncationToken: "",
  3403. },
  3404. }
  3405. if input == nil {
  3406. input = &ListTagsInput{}
  3407. }
  3408. output = &ListTagsOutput{}
  3409. req = c.newRequest(op, input, output)
  3410. return
  3411. }
  3412. // ListTags API operation for AWS Backup.
  3413. //
  3414. // Returns a list of key-value pairs assigned to a target recovery point, backup
  3415. // plan, or backup vault.
  3416. //
  3417. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3418. // with awserr.Error's Code and Message methods to get detailed information about
  3419. // the error.
  3420. //
  3421. // See the AWS API reference guide for AWS Backup's
  3422. // API operation ListTags for usage and error information.
  3423. //
  3424. // Returned Error Codes:
  3425. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3426. // A resource that is required for the action doesn't exist.
  3427. //
  3428. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3429. // Indicates that something is wrong with a parameter's value. For example,
  3430. // the value is out of range.
  3431. //
  3432. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  3433. // Indicates that a required parameter is missing.
  3434. //
  3435. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3436. // The request failed due to a temporary failure of the server.
  3437. //
  3438. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListTags
  3439. func (c *Backup) ListTags(input *ListTagsInput) (*ListTagsOutput, error) {
  3440. req, out := c.ListTagsRequest(input)
  3441. return out, req.Send()
  3442. }
  3443. // ListTagsWithContext is the same as ListTags with the addition of
  3444. // the ability to pass a context and additional request options.
  3445. //
  3446. // See ListTags for details on how to use this API operation.
  3447. //
  3448. // The context must be non-nil and will be used for request cancellation. If
  3449. // the context is nil a panic will occur. In the future the SDK may create
  3450. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3451. // for more information on using Contexts.
  3452. func (c *Backup) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) {
  3453. req, out := c.ListTagsRequest(input)
  3454. req.SetContext(ctx)
  3455. req.ApplyOptions(opts...)
  3456. return out, req.Send()
  3457. }
  3458. // ListTagsPages iterates over the pages of a ListTags operation,
  3459. // calling the "fn" function with the response data for each page. To stop
  3460. // iterating, return false from the fn function.
  3461. //
  3462. // See ListTags method for more information on how to use this operation.
  3463. //
  3464. // Note: This operation can generate multiple requests to a service.
  3465. //
  3466. // // Example iterating over at most 3 pages of a ListTags operation.
  3467. // pageNum := 0
  3468. // err := client.ListTagsPages(params,
  3469. // func(page *ListTagsOutput, lastPage bool) bool {
  3470. // pageNum++
  3471. // fmt.Println(page)
  3472. // return pageNum <= 3
  3473. // })
  3474. //
  3475. func (c *Backup) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error {
  3476. return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn)
  3477. }
  3478. // ListTagsPagesWithContext same as ListTagsPages except
  3479. // it takes a Context and allows setting request options on the pages.
  3480. //
  3481. // The context must be non-nil and will be used for request cancellation. If
  3482. // the context is nil a panic will occur. In the future the SDK may create
  3483. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3484. // for more information on using Contexts.
  3485. func (c *Backup) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error {
  3486. p := request.Pagination{
  3487. NewRequest: func() (*request.Request, error) {
  3488. var inCpy *ListTagsInput
  3489. if input != nil {
  3490. tmp := *input
  3491. inCpy = &tmp
  3492. }
  3493. req, _ := c.ListTagsRequest(inCpy)
  3494. req.SetContext(ctx)
  3495. req.ApplyOptions(opts...)
  3496. return req, nil
  3497. },
  3498. }
  3499. cont := true
  3500. for p.Next() && cont {
  3501. cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage())
  3502. }
  3503. return p.Err()
  3504. }
  3505. const opPutBackupVaultAccessPolicy = "PutBackupVaultAccessPolicy"
  3506. // PutBackupVaultAccessPolicyRequest generates a "aws/request.Request" representing the
  3507. // client's request for the PutBackupVaultAccessPolicy operation. The "output" return
  3508. // value will be populated with the request's response once the request completes
  3509. // successfully.
  3510. //
  3511. // Use "Send" method on the returned Request to send the API call to the service.
  3512. // the "output" return value is not valid until after Send returns without error.
  3513. //
  3514. // See PutBackupVaultAccessPolicy for more information on using the PutBackupVaultAccessPolicy
  3515. // API call, and error handling.
  3516. //
  3517. // This method is useful when you want to inject custom logic or configuration
  3518. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3519. //
  3520. //
  3521. // // Example sending a request using the PutBackupVaultAccessPolicyRequest method.
  3522. // req, resp := client.PutBackupVaultAccessPolicyRequest(params)
  3523. //
  3524. // err := req.Send()
  3525. // if err == nil { // resp is now filled
  3526. // fmt.Println(resp)
  3527. // }
  3528. //
  3529. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultAccessPolicy
  3530. func (c *Backup) PutBackupVaultAccessPolicyRequest(input *PutBackupVaultAccessPolicyInput) (req *request.Request, output *PutBackupVaultAccessPolicyOutput) {
  3531. op := &request.Operation{
  3532. Name: opPutBackupVaultAccessPolicy,
  3533. HTTPMethod: "PUT",
  3534. HTTPPath: "/backup-vaults/{backupVaultName}/access-policy",
  3535. }
  3536. if input == nil {
  3537. input = &PutBackupVaultAccessPolicyInput{}
  3538. }
  3539. output = &PutBackupVaultAccessPolicyOutput{}
  3540. req = c.newRequest(op, input, output)
  3541. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3542. return
  3543. }
  3544. // PutBackupVaultAccessPolicy API operation for AWS Backup.
  3545. //
  3546. // Sets a resource-based policy that is used to manage access permissions on
  3547. // the target backup vault. Requires a backup vault name and an access policy
  3548. // document in JSON format.
  3549. //
  3550. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3551. // with awserr.Error's Code and Message methods to get detailed information about
  3552. // the error.
  3553. //
  3554. // See the AWS API reference guide for AWS Backup's
  3555. // API operation PutBackupVaultAccessPolicy for usage and error information.
  3556. //
  3557. // Returned Error Codes:
  3558. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3559. // A resource that is required for the action doesn't exist.
  3560. //
  3561. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3562. // Indicates that something is wrong with a parameter's value. For example,
  3563. // the value is out of range.
  3564. //
  3565. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  3566. // Indicates that a required parameter is missing.
  3567. //
  3568. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3569. // The request failed due to a temporary failure of the server.
  3570. //
  3571. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultAccessPolicy
  3572. func (c *Backup) PutBackupVaultAccessPolicy(input *PutBackupVaultAccessPolicyInput) (*PutBackupVaultAccessPolicyOutput, error) {
  3573. req, out := c.PutBackupVaultAccessPolicyRequest(input)
  3574. return out, req.Send()
  3575. }
  3576. // PutBackupVaultAccessPolicyWithContext is the same as PutBackupVaultAccessPolicy with the addition of
  3577. // the ability to pass a context and additional request options.
  3578. //
  3579. // See PutBackupVaultAccessPolicy for details on how to use this API operation.
  3580. //
  3581. // The context must be non-nil and will be used for request cancellation. If
  3582. // the context is nil a panic will occur. In the future the SDK may create
  3583. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3584. // for more information on using Contexts.
  3585. func (c *Backup) PutBackupVaultAccessPolicyWithContext(ctx aws.Context, input *PutBackupVaultAccessPolicyInput, opts ...request.Option) (*PutBackupVaultAccessPolicyOutput, error) {
  3586. req, out := c.PutBackupVaultAccessPolicyRequest(input)
  3587. req.SetContext(ctx)
  3588. req.ApplyOptions(opts...)
  3589. return out, req.Send()
  3590. }
  3591. const opPutBackupVaultNotifications = "PutBackupVaultNotifications"
  3592. // PutBackupVaultNotificationsRequest generates a "aws/request.Request" representing the
  3593. // client's request for the PutBackupVaultNotifications operation. The "output" return
  3594. // value will be populated with the request's response once the request completes
  3595. // successfully.
  3596. //
  3597. // Use "Send" method on the returned Request to send the API call to the service.
  3598. // the "output" return value is not valid until after Send returns without error.
  3599. //
  3600. // See PutBackupVaultNotifications for more information on using the PutBackupVaultNotifications
  3601. // API call, and error handling.
  3602. //
  3603. // This method is useful when you want to inject custom logic or configuration
  3604. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3605. //
  3606. //
  3607. // // Example sending a request using the PutBackupVaultNotificationsRequest method.
  3608. // req, resp := client.PutBackupVaultNotificationsRequest(params)
  3609. //
  3610. // err := req.Send()
  3611. // if err == nil { // resp is now filled
  3612. // fmt.Println(resp)
  3613. // }
  3614. //
  3615. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultNotifications
  3616. func (c *Backup) PutBackupVaultNotificationsRequest(input *PutBackupVaultNotificationsInput) (req *request.Request, output *PutBackupVaultNotificationsOutput) {
  3617. op := &request.Operation{
  3618. Name: opPutBackupVaultNotifications,
  3619. HTTPMethod: "PUT",
  3620. HTTPPath: "/backup-vaults/{backupVaultName}/notification-configuration",
  3621. }
  3622. if input == nil {
  3623. input = &PutBackupVaultNotificationsInput{}
  3624. }
  3625. output = &PutBackupVaultNotificationsOutput{}
  3626. req = c.newRequest(op, input, output)
  3627. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3628. return
  3629. }
  3630. // PutBackupVaultNotifications API operation for AWS Backup.
  3631. //
  3632. // Turns on notifications on a backup vault for the specified topic and events.
  3633. //
  3634. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3635. // with awserr.Error's Code and Message methods to get detailed information about
  3636. // the error.
  3637. //
  3638. // See the AWS API reference guide for AWS Backup's
  3639. // API operation PutBackupVaultNotifications for usage and error information.
  3640. //
  3641. // Returned Error Codes:
  3642. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3643. // A resource that is required for the action doesn't exist.
  3644. //
  3645. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3646. // Indicates that something is wrong with a parameter's value. For example,
  3647. // the value is out of range.
  3648. //
  3649. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  3650. // Indicates that a required parameter is missing.
  3651. //
  3652. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3653. // The request failed due to a temporary failure of the server.
  3654. //
  3655. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultNotifications
  3656. func (c *Backup) PutBackupVaultNotifications(input *PutBackupVaultNotificationsInput) (*PutBackupVaultNotificationsOutput, error) {
  3657. req, out := c.PutBackupVaultNotificationsRequest(input)
  3658. return out, req.Send()
  3659. }
  3660. // PutBackupVaultNotificationsWithContext is the same as PutBackupVaultNotifications with the addition of
  3661. // the ability to pass a context and additional request options.
  3662. //
  3663. // See PutBackupVaultNotifications for details on how to use this API operation.
  3664. //
  3665. // The context must be non-nil and will be used for request cancellation. If
  3666. // the context is nil a panic will occur. In the future the SDK may create
  3667. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3668. // for more information on using Contexts.
  3669. func (c *Backup) PutBackupVaultNotificationsWithContext(ctx aws.Context, input *PutBackupVaultNotificationsInput, opts ...request.Option) (*PutBackupVaultNotificationsOutput, error) {
  3670. req, out := c.PutBackupVaultNotificationsRequest(input)
  3671. req.SetContext(ctx)
  3672. req.ApplyOptions(opts...)
  3673. return out, req.Send()
  3674. }
  3675. const opStartBackupJob = "StartBackupJob"
  3676. // StartBackupJobRequest generates a "aws/request.Request" representing the
  3677. // client's request for the StartBackupJob operation. The "output" return
  3678. // value will be populated with the request's response once the request completes
  3679. // successfully.
  3680. //
  3681. // Use "Send" method on the returned Request to send the API call to the service.
  3682. // the "output" return value is not valid until after Send returns without error.
  3683. //
  3684. // See StartBackupJob for more information on using the StartBackupJob
  3685. // API call, and error handling.
  3686. //
  3687. // This method is useful when you want to inject custom logic or configuration
  3688. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3689. //
  3690. //
  3691. // // Example sending a request using the StartBackupJobRequest method.
  3692. // req, resp := client.StartBackupJobRequest(params)
  3693. //
  3694. // err := req.Send()
  3695. // if err == nil { // resp is now filled
  3696. // fmt.Println(resp)
  3697. // }
  3698. //
  3699. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartBackupJob
  3700. func (c *Backup) StartBackupJobRequest(input *StartBackupJobInput) (req *request.Request, output *StartBackupJobOutput) {
  3701. op := &request.Operation{
  3702. Name: opStartBackupJob,
  3703. HTTPMethod: "PUT",
  3704. HTTPPath: "/backup-jobs",
  3705. }
  3706. if input == nil {
  3707. input = &StartBackupJobInput{}
  3708. }
  3709. output = &StartBackupJobOutput{}
  3710. req = c.newRequest(op, input, output)
  3711. return
  3712. }
  3713. // StartBackupJob API operation for AWS Backup.
  3714. //
  3715. // Starts a job to create a one-time backup of the specified resource.
  3716. //
  3717. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3718. // with awserr.Error's Code and Message methods to get detailed information about
  3719. // the error.
  3720. //
  3721. // See the AWS API reference guide for AWS Backup's
  3722. // API operation StartBackupJob for usage and error information.
  3723. //
  3724. // Returned Error Codes:
  3725. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3726. // A resource that is required for the action doesn't exist.
  3727. //
  3728. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3729. // Indicates that something is wrong with a parameter's value. For example,
  3730. // the value is out of range.
  3731. //
  3732. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  3733. // Indicates that a required parameter is missing.
  3734. //
  3735. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3736. // The request failed due to a temporary failure of the server.
  3737. //
  3738. // * ErrCodeLimitExceededException "LimitExceededException"
  3739. // A limit in the request has been exceeded; for example, a maximum number of
  3740. // items allowed in a request.
  3741. //
  3742. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartBackupJob
  3743. func (c *Backup) StartBackupJob(input *StartBackupJobInput) (*StartBackupJobOutput, error) {
  3744. req, out := c.StartBackupJobRequest(input)
  3745. return out, req.Send()
  3746. }
  3747. // StartBackupJobWithContext is the same as StartBackupJob with the addition of
  3748. // the ability to pass a context and additional request options.
  3749. //
  3750. // See StartBackupJob for details on how to use this API operation.
  3751. //
  3752. // The context must be non-nil and will be used for request cancellation. If
  3753. // the context is nil a panic will occur. In the future the SDK may create
  3754. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3755. // for more information on using Contexts.
  3756. func (c *Backup) StartBackupJobWithContext(ctx aws.Context, input *StartBackupJobInput, opts ...request.Option) (*StartBackupJobOutput, error) {
  3757. req, out := c.StartBackupJobRequest(input)
  3758. req.SetContext(ctx)
  3759. req.ApplyOptions(opts...)
  3760. return out, req.Send()
  3761. }
  3762. const opStartRestoreJob = "StartRestoreJob"
  3763. // StartRestoreJobRequest generates a "aws/request.Request" representing the
  3764. // client's request for the StartRestoreJob operation. The "output" return
  3765. // value will be populated with the request's response once the request completes
  3766. // successfully.
  3767. //
  3768. // Use "Send" method on the returned Request to send the API call to the service.
  3769. // the "output" return value is not valid until after Send returns without error.
  3770. //
  3771. // See StartRestoreJob for more information on using the StartRestoreJob
  3772. // API call, and error handling.
  3773. //
  3774. // This method is useful when you want to inject custom logic or configuration
  3775. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3776. //
  3777. //
  3778. // // Example sending a request using the StartRestoreJobRequest method.
  3779. // req, resp := client.StartRestoreJobRequest(params)
  3780. //
  3781. // err := req.Send()
  3782. // if err == nil { // resp is now filled
  3783. // fmt.Println(resp)
  3784. // }
  3785. //
  3786. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartRestoreJob
  3787. func (c *Backup) StartRestoreJobRequest(input *StartRestoreJobInput) (req *request.Request, output *StartRestoreJobOutput) {
  3788. op := &request.Operation{
  3789. Name: opStartRestoreJob,
  3790. HTTPMethod: "PUT",
  3791. HTTPPath: "/restore-jobs",
  3792. }
  3793. if input == nil {
  3794. input = &StartRestoreJobInput{}
  3795. }
  3796. output = &StartRestoreJobOutput{}
  3797. req = c.newRequest(op, input, output)
  3798. return
  3799. }
  3800. // StartRestoreJob API operation for AWS Backup.
  3801. //
  3802. // Recovers the saved resource identified by an Amazon Resource Name (ARN).
  3803. //
  3804. // If the resource ARN is included in the request, then the last complete backup
  3805. // of that resource is recovered. If the ARN of a recovery point is supplied,
  3806. // then that recovery point is restored.
  3807. //
  3808. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3809. // with awserr.Error's Code and Message methods to get detailed information about
  3810. // the error.
  3811. //
  3812. // See the AWS API reference guide for AWS Backup's
  3813. // API operation StartRestoreJob for usage and error information.
  3814. //
  3815. // Returned Error Codes:
  3816. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3817. // A resource that is required for the action doesn't exist.
  3818. //
  3819. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3820. // Indicates that something is wrong with a parameter's value. For example,
  3821. // the value is out of range.
  3822. //
  3823. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  3824. // Indicates that a required parameter is missing.
  3825. //
  3826. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3827. // The request failed due to a temporary failure of the server.
  3828. //
  3829. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartRestoreJob
  3830. func (c *Backup) StartRestoreJob(input *StartRestoreJobInput) (*StartRestoreJobOutput, error) {
  3831. req, out := c.StartRestoreJobRequest(input)
  3832. return out, req.Send()
  3833. }
  3834. // StartRestoreJobWithContext is the same as StartRestoreJob with the addition of
  3835. // the ability to pass a context and additional request options.
  3836. //
  3837. // See StartRestoreJob for details on how to use this API operation.
  3838. //
  3839. // The context must be non-nil and will be used for request cancellation. If
  3840. // the context is nil a panic will occur. In the future the SDK may create
  3841. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3842. // for more information on using Contexts.
  3843. func (c *Backup) StartRestoreJobWithContext(ctx aws.Context, input *StartRestoreJobInput, opts ...request.Option) (*StartRestoreJobOutput, error) {
  3844. req, out := c.StartRestoreJobRequest(input)
  3845. req.SetContext(ctx)
  3846. req.ApplyOptions(opts...)
  3847. return out, req.Send()
  3848. }
  3849. const opStopBackupJob = "StopBackupJob"
  3850. // StopBackupJobRequest generates a "aws/request.Request" representing the
  3851. // client's request for the StopBackupJob operation. The "output" return
  3852. // value will be populated with the request's response once the request completes
  3853. // successfully.
  3854. //
  3855. // Use "Send" method on the returned Request to send the API call to the service.
  3856. // the "output" return value is not valid until after Send returns without error.
  3857. //
  3858. // See StopBackupJob for more information on using the StopBackupJob
  3859. // API call, and error handling.
  3860. //
  3861. // This method is useful when you want to inject custom logic or configuration
  3862. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3863. //
  3864. //
  3865. // // Example sending a request using the StopBackupJobRequest method.
  3866. // req, resp := client.StopBackupJobRequest(params)
  3867. //
  3868. // err := req.Send()
  3869. // if err == nil { // resp is now filled
  3870. // fmt.Println(resp)
  3871. // }
  3872. //
  3873. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StopBackupJob
  3874. func (c *Backup) StopBackupJobRequest(input *StopBackupJobInput) (req *request.Request, output *StopBackupJobOutput) {
  3875. op := &request.Operation{
  3876. Name: opStopBackupJob,
  3877. HTTPMethod: "POST",
  3878. HTTPPath: "/backup-jobs/{backupJobId}",
  3879. }
  3880. if input == nil {
  3881. input = &StopBackupJobInput{}
  3882. }
  3883. output = &StopBackupJobOutput{}
  3884. req = c.newRequest(op, input, output)
  3885. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3886. return
  3887. }
  3888. // StopBackupJob API operation for AWS Backup.
  3889. //
  3890. // Attempts to cancel a job to create a one-time backup of a resource.
  3891. //
  3892. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3893. // with awserr.Error's Code and Message methods to get detailed information about
  3894. // the error.
  3895. //
  3896. // See the AWS API reference guide for AWS Backup's
  3897. // API operation StopBackupJob for usage and error information.
  3898. //
  3899. // Returned Error Codes:
  3900. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  3901. // Indicates that a required parameter is missing.
  3902. //
  3903. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3904. // A resource that is required for the action doesn't exist.
  3905. //
  3906. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3907. // Indicates that something is wrong with a parameter's value. For example,
  3908. // the value is out of range.
  3909. //
  3910. // * ErrCodeInvalidRequestException "InvalidRequestException"
  3911. // Indicates that something is wrong with the input to the request. For example,
  3912. // a parameter is of the wrong type.
  3913. //
  3914. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3915. // The request failed due to a temporary failure of the server.
  3916. //
  3917. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StopBackupJob
  3918. func (c *Backup) StopBackupJob(input *StopBackupJobInput) (*StopBackupJobOutput, error) {
  3919. req, out := c.StopBackupJobRequest(input)
  3920. return out, req.Send()
  3921. }
  3922. // StopBackupJobWithContext is the same as StopBackupJob with the addition of
  3923. // the ability to pass a context and additional request options.
  3924. //
  3925. // See StopBackupJob for details on how to use this API operation.
  3926. //
  3927. // The context must be non-nil and will be used for request cancellation. If
  3928. // the context is nil a panic will occur. In the future the SDK may create
  3929. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3930. // for more information on using Contexts.
  3931. func (c *Backup) StopBackupJobWithContext(ctx aws.Context, input *StopBackupJobInput, opts ...request.Option) (*StopBackupJobOutput, error) {
  3932. req, out := c.StopBackupJobRequest(input)
  3933. req.SetContext(ctx)
  3934. req.ApplyOptions(opts...)
  3935. return out, req.Send()
  3936. }
  3937. const opTagResource = "TagResource"
  3938. // TagResourceRequest generates a "aws/request.Request" representing the
  3939. // client's request for the TagResource operation. The "output" return
  3940. // value will be populated with the request's response once the request completes
  3941. // successfully.
  3942. //
  3943. // Use "Send" method on the returned Request to send the API call to the service.
  3944. // the "output" return value is not valid until after Send returns without error.
  3945. //
  3946. // See TagResource for more information on using the TagResource
  3947. // API call, and error handling.
  3948. //
  3949. // This method is useful when you want to inject custom logic or configuration
  3950. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3951. //
  3952. //
  3953. // // Example sending a request using the TagResourceRequest method.
  3954. // req, resp := client.TagResourceRequest(params)
  3955. //
  3956. // err := req.Send()
  3957. // if err == nil { // resp is now filled
  3958. // fmt.Println(resp)
  3959. // }
  3960. //
  3961. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/TagResource
  3962. func (c *Backup) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
  3963. op := &request.Operation{
  3964. Name: opTagResource,
  3965. HTTPMethod: "POST",
  3966. HTTPPath: "/tags/{resourceArn}",
  3967. }
  3968. if input == nil {
  3969. input = &TagResourceInput{}
  3970. }
  3971. output = &TagResourceOutput{}
  3972. req = c.newRequest(op, input, output)
  3973. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3974. return
  3975. }
  3976. // TagResource API operation for AWS Backup.
  3977. //
  3978. // Assigns a set of key-value pairs to a recovery point, backup plan, or backup
  3979. // vault identified by an Amazon Resource Name (ARN).
  3980. //
  3981. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3982. // with awserr.Error's Code and Message methods to get detailed information about
  3983. // the error.
  3984. //
  3985. // See the AWS API reference guide for AWS Backup's
  3986. // API operation TagResource for usage and error information.
  3987. //
  3988. // Returned Error Codes:
  3989. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3990. // A resource that is required for the action doesn't exist.
  3991. //
  3992. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3993. // Indicates that something is wrong with a parameter's value. For example,
  3994. // the value is out of range.
  3995. //
  3996. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  3997. // Indicates that a required parameter is missing.
  3998. //
  3999. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  4000. // The request failed due to a temporary failure of the server.
  4001. //
  4002. // * ErrCodeLimitExceededException "LimitExceededException"
  4003. // A limit in the request has been exceeded; for example, a maximum number of
  4004. // items allowed in a request.
  4005. //
  4006. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/TagResource
  4007. func (c *Backup) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
  4008. req, out := c.TagResourceRequest(input)
  4009. return out, req.Send()
  4010. }
  4011. // TagResourceWithContext is the same as TagResource with the addition of
  4012. // the ability to pass a context and additional request options.
  4013. //
  4014. // See TagResource for details on how to use this API operation.
  4015. //
  4016. // The context must be non-nil and will be used for request cancellation. If
  4017. // the context is nil a panic will occur. In the future the SDK may create
  4018. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4019. // for more information on using Contexts.
  4020. func (c *Backup) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
  4021. req, out := c.TagResourceRequest(input)
  4022. req.SetContext(ctx)
  4023. req.ApplyOptions(opts...)
  4024. return out, req.Send()
  4025. }
  4026. const opUntagResource = "UntagResource"
  4027. // UntagResourceRequest generates a "aws/request.Request" representing the
  4028. // client's request for the UntagResource operation. The "output" return
  4029. // value will be populated with the request's response once the request completes
  4030. // successfully.
  4031. //
  4032. // Use "Send" method on the returned Request to send the API call to the service.
  4033. // the "output" return value is not valid until after Send returns without error.
  4034. //
  4035. // See UntagResource for more information on using the UntagResource
  4036. // API call, and error handling.
  4037. //
  4038. // This method is useful when you want to inject custom logic or configuration
  4039. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4040. //
  4041. //
  4042. // // Example sending a request using the UntagResourceRequest method.
  4043. // req, resp := client.UntagResourceRequest(params)
  4044. //
  4045. // err := req.Send()
  4046. // if err == nil { // resp is now filled
  4047. // fmt.Println(resp)
  4048. // }
  4049. //
  4050. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UntagResource
  4051. func (c *Backup) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
  4052. op := &request.Operation{
  4053. Name: opUntagResource,
  4054. HTTPMethod: "POST",
  4055. HTTPPath: "/untag/{resourceArn}",
  4056. }
  4057. if input == nil {
  4058. input = &UntagResourceInput{}
  4059. }
  4060. output = &UntagResourceOutput{}
  4061. req = c.newRequest(op, input, output)
  4062. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4063. return
  4064. }
  4065. // UntagResource API operation for AWS Backup.
  4066. //
  4067. // Removes a set of key-value pairs from a recovery point, backup plan, or backup
  4068. // vault identified by an Amazon Resource Name (ARN)
  4069. //
  4070. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4071. // with awserr.Error's Code and Message methods to get detailed information about
  4072. // the error.
  4073. //
  4074. // See the AWS API reference guide for AWS Backup's
  4075. // API operation UntagResource for usage and error information.
  4076. //
  4077. // Returned Error Codes:
  4078. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  4079. // A resource that is required for the action doesn't exist.
  4080. //
  4081. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  4082. // Indicates that something is wrong with a parameter's value. For example,
  4083. // the value is out of range.
  4084. //
  4085. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  4086. // Indicates that a required parameter is missing.
  4087. //
  4088. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  4089. // The request failed due to a temporary failure of the server.
  4090. //
  4091. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UntagResource
  4092. func (c *Backup) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  4093. req, out := c.UntagResourceRequest(input)
  4094. return out, req.Send()
  4095. }
  4096. // UntagResourceWithContext is the same as UntagResource with the addition of
  4097. // the ability to pass a context and additional request options.
  4098. //
  4099. // See UntagResource for details on how to use this API operation.
  4100. //
  4101. // The context must be non-nil and will be used for request cancellation. If
  4102. // the context is nil a panic will occur. In the future the SDK may create
  4103. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4104. // for more information on using Contexts.
  4105. func (c *Backup) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
  4106. req, out := c.UntagResourceRequest(input)
  4107. req.SetContext(ctx)
  4108. req.ApplyOptions(opts...)
  4109. return out, req.Send()
  4110. }
  4111. const opUpdateBackupPlan = "UpdateBackupPlan"
  4112. // UpdateBackupPlanRequest generates a "aws/request.Request" representing the
  4113. // client's request for the UpdateBackupPlan operation. The "output" return
  4114. // value will be populated with the request's response once the request completes
  4115. // successfully.
  4116. //
  4117. // Use "Send" method on the returned Request to send the API call to the service.
  4118. // the "output" return value is not valid until after Send returns without error.
  4119. //
  4120. // See UpdateBackupPlan for more information on using the UpdateBackupPlan
  4121. // API call, and error handling.
  4122. //
  4123. // This method is useful when you want to inject custom logic or configuration
  4124. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4125. //
  4126. //
  4127. // // Example sending a request using the UpdateBackupPlanRequest method.
  4128. // req, resp := client.UpdateBackupPlanRequest(params)
  4129. //
  4130. // err := req.Send()
  4131. // if err == nil { // resp is now filled
  4132. // fmt.Println(resp)
  4133. // }
  4134. //
  4135. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateBackupPlan
  4136. func (c *Backup) UpdateBackupPlanRequest(input *UpdateBackupPlanInput) (req *request.Request, output *UpdateBackupPlanOutput) {
  4137. op := &request.Operation{
  4138. Name: opUpdateBackupPlan,
  4139. HTTPMethod: "POST",
  4140. HTTPPath: "/backup/plans/{backupPlanId}",
  4141. }
  4142. if input == nil {
  4143. input = &UpdateBackupPlanInput{}
  4144. }
  4145. output = &UpdateBackupPlanOutput{}
  4146. req = c.newRequest(op, input, output)
  4147. return
  4148. }
  4149. // UpdateBackupPlan API operation for AWS Backup.
  4150. //
  4151. // Replaces the body of a saved backup plan identified by its backupPlanId with
  4152. // the input document in JSON format. The new version is uniquely identified
  4153. // by a VersionId.
  4154. //
  4155. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4156. // with awserr.Error's Code and Message methods to get detailed information about
  4157. // the error.
  4158. //
  4159. // See the AWS API reference guide for AWS Backup's
  4160. // API operation UpdateBackupPlan for usage and error information.
  4161. //
  4162. // Returned Error Codes:
  4163. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  4164. // A resource that is required for the action doesn't exist.
  4165. //
  4166. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  4167. // Indicates that something is wrong with a parameter's value. For example,
  4168. // the value is out of range.
  4169. //
  4170. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  4171. // Indicates that a required parameter is missing.
  4172. //
  4173. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  4174. // The request failed due to a temporary failure of the server.
  4175. //
  4176. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateBackupPlan
  4177. func (c *Backup) UpdateBackupPlan(input *UpdateBackupPlanInput) (*UpdateBackupPlanOutput, error) {
  4178. req, out := c.UpdateBackupPlanRequest(input)
  4179. return out, req.Send()
  4180. }
  4181. // UpdateBackupPlanWithContext is the same as UpdateBackupPlan with the addition of
  4182. // the ability to pass a context and additional request options.
  4183. //
  4184. // See UpdateBackupPlan for details on how to use this API operation.
  4185. //
  4186. // The context must be non-nil and will be used for request cancellation. If
  4187. // the context is nil a panic will occur. In the future the SDK may create
  4188. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4189. // for more information on using Contexts.
  4190. func (c *Backup) UpdateBackupPlanWithContext(ctx aws.Context, input *UpdateBackupPlanInput, opts ...request.Option) (*UpdateBackupPlanOutput, error) {
  4191. req, out := c.UpdateBackupPlanRequest(input)
  4192. req.SetContext(ctx)
  4193. req.ApplyOptions(opts...)
  4194. return out, req.Send()
  4195. }
  4196. const opUpdateRecoveryPointLifecycle = "UpdateRecoveryPointLifecycle"
  4197. // UpdateRecoveryPointLifecycleRequest generates a "aws/request.Request" representing the
  4198. // client's request for the UpdateRecoveryPointLifecycle operation. The "output" return
  4199. // value will be populated with the request's response once the request completes
  4200. // successfully.
  4201. //
  4202. // Use "Send" method on the returned Request to send the API call to the service.
  4203. // the "output" return value is not valid until after Send returns without error.
  4204. //
  4205. // See UpdateRecoveryPointLifecycle for more information on using the UpdateRecoveryPointLifecycle
  4206. // API call, and error handling.
  4207. //
  4208. // This method is useful when you want to inject custom logic or configuration
  4209. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4210. //
  4211. //
  4212. // // Example sending a request using the UpdateRecoveryPointLifecycleRequest method.
  4213. // req, resp := client.UpdateRecoveryPointLifecycleRequest(params)
  4214. //
  4215. // err := req.Send()
  4216. // if err == nil { // resp is now filled
  4217. // fmt.Println(resp)
  4218. // }
  4219. //
  4220. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateRecoveryPointLifecycle
  4221. func (c *Backup) UpdateRecoveryPointLifecycleRequest(input *UpdateRecoveryPointLifecycleInput) (req *request.Request, output *UpdateRecoveryPointLifecycleOutput) {
  4222. op := &request.Operation{
  4223. Name: opUpdateRecoveryPointLifecycle,
  4224. HTTPMethod: "POST",
  4225. HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}",
  4226. }
  4227. if input == nil {
  4228. input = &UpdateRecoveryPointLifecycleInput{}
  4229. }
  4230. output = &UpdateRecoveryPointLifecycleOutput{}
  4231. req = c.newRequest(op, input, output)
  4232. return
  4233. }
  4234. // UpdateRecoveryPointLifecycle API operation for AWS Backup.
  4235. //
  4236. // Sets the transition lifecycle of a recovery point.
  4237. //
  4238. // The lifecycle defines when a protected resource is transitioned to cold storage
  4239. // and when it expires. AWS Backup transitions and expires backups automatically
  4240. // according to the lifecycle that you define.
  4241. //
  4242. // Backups transitioned to cold storage must be stored in cold storage for a
  4243. // minimum of 90 days. Therefore, the “expire after days” setting must be 90
  4244. // days greater than the “transition to cold after days” setting. The “transition
  4245. // to cold after days” setting cannot be changed after a backup has been transitioned
  4246. // to cold.
  4247. //
  4248. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4249. // with awserr.Error's Code and Message methods to get detailed information about
  4250. // the error.
  4251. //
  4252. // See the AWS API reference guide for AWS Backup's
  4253. // API operation UpdateRecoveryPointLifecycle for usage and error information.
  4254. //
  4255. // Returned Error Codes:
  4256. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  4257. // A resource that is required for the action doesn't exist.
  4258. //
  4259. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  4260. // Indicates that something is wrong with a parameter's value. For example,
  4261. // the value is out of range.
  4262. //
  4263. // * ErrCodeMissingParameterValueException "MissingParameterValueException"
  4264. // Indicates that a required parameter is missing.
  4265. //
  4266. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  4267. // The request failed due to a temporary failure of the server.
  4268. //
  4269. // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateRecoveryPointLifecycle
  4270. func (c *Backup) UpdateRecoveryPointLifecycle(input *UpdateRecoveryPointLifecycleInput) (*UpdateRecoveryPointLifecycleOutput, error) {
  4271. req, out := c.UpdateRecoveryPointLifecycleRequest(input)
  4272. return out, req.Send()
  4273. }
  4274. // UpdateRecoveryPointLifecycleWithContext is the same as UpdateRecoveryPointLifecycle with the addition of
  4275. // the ability to pass a context and additional request options.
  4276. //
  4277. // See UpdateRecoveryPointLifecycle for details on how to use this API operation.
  4278. //
  4279. // The context must be non-nil and will be used for request cancellation. If
  4280. // the context is nil a panic will occur. In the future the SDK may create
  4281. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4282. // for more information on using Contexts.
  4283. func (c *Backup) UpdateRecoveryPointLifecycleWithContext(ctx aws.Context, input *UpdateRecoveryPointLifecycleInput, opts ...request.Option) (*UpdateRecoveryPointLifecycleOutput, error) {
  4284. req, out := c.UpdateRecoveryPointLifecycleRequest(input)
  4285. req.SetContext(ctx)
  4286. req.ApplyOptions(opts...)
  4287. return out, req.Send()
  4288. }
  4289. // Contains DeleteAt and MoveToColdStorageAt timestamps, which are used to specify
  4290. // a lifecycle for a recovery point.
  4291. //
  4292. // The lifecycle defines when a protected resource is transitioned to cold storage
  4293. // and when it expires. AWS Backup transitions and expires backups automatically
  4294. // according to the lifecycle that you define.
  4295. //
  4296. // Backups transitioned to cold storage must be stored in cold storage for a
  4297. // minimum of 90 days. Therefore, the “expire after days” setting must be 90
  4298. // days greater than the “transition to cold after days” setting. The “transition
  4299. // to cold after days” setting cannot be changed after a backup has been transitioned
  4300. // to cold.
  4301. type CalculatedLifecycle struct {
  4302. _ struct{} `type:"structure"`
  4303. // A timestamp that specifies when to delete a recovery point.
  4304. DeleteAt *time.Time `type:"timestamp"`
  4305. // A timestamp that specifies when to transition a recovery point to cold storage.
  4306. MoveToColdStorageAt *time.Time `type:"timestamp"`
  4307. }
  4308. // String returns the string representation
  4309. func (s CalculatedLifecycle) String() string {
  4310. return awsutil.Prettify(s)
  4311. }
  4312. // GoString returns the string representation
  4313. func (s CalculatedLifecycle) GoString() string {
  4314. return s.String()
  4315. }
  4316. // SetDeleteAt sets the DeleteAt field's value.
  4317. func (s *CalculatedLifecycle) SetDeleteAt(v time.Time) *CalculatedLifecycle {
  4318. s.DeleteAt = &v
  4319. return s
  4320. }
  4321. // SetMoveToColdStorageAt sets the MoveToColdStorageAt field's value.
  4322. func (s *CalculatedLifecycle) SetMoveToColdStorageAt(v time.Time) *CalculatedLifecycle {
  4323. s.MoveToColdStorageAt = &v
  4324. return s
  4325. }
  4326. // Contains an array of triplets made up of a condition type (such as StringEquals),
  4327. // a key, and a value. Conditions are used to filter resources in a selection
  4328. // that is assigned to a backup plan.
  4329. type Condition struct {
  4330. _ struct{} `type:"structure"`
  4331. // The key in a key-value pair. For example, in "ec2:ResourceTag/Department":
  4332. // "accounting", "ec2:ResourceTag/Department" is the key.
  4333. //
  4334. // ConditionKey is a required field
  4335. ConditionKey *string `type:"string" required:"true"`
  4336. // An operation, such as StringEquals, that is applied to a key-value pair used
  4337. // to filter resources in a selection.
  4338. //
  4339. // ConditionType is a required field
  4340. ConditionType *string `type:"string" required:"true" enum:"ConditionType"`
  4341. // The value in a key-value pair. For example, in "ec2:ResourceTag/Department":
  4342. // "accounting", "accounting" is the value.
  4343. //
  4344. // ConditionValue is a required field
  4345. ConditionValue *string `type:"string" required:"true"`
  4346. }
  4347. // String returns the string representation
  4348. func (s Condition) String() string {
  4349. return awsutil.Prettify(s)
  4350. }
  4351. // GoString returns the string representation
  4352. func (s Condition) GoString() string {
  4353. return s.String()
  4354. }
  4355. // Validate inspects the fields of the type to determine if they are valid.
  4356. func (s *Condition) Validate() error {
  4357. invalidParams := request.ErrInvalidParams{Context: "Condition"}
  4358. if s.ConditionKey == nil {
  4359. invalidParams.Add(request.NewErrParamRequired("ConditionKey"))
  4360. }
  4361. if s.ConditionType == nil {
  4362. invalidParams.Add(request.NewErrParamRequired("ConditionType"))
  4363. }
  4364. if s.ConditionValue == nil {
  4365. invalidParams.Add(request.NewErrParamRequired("ConditionValue"))
  4366. }
  4367. if invalidParams.Len() > 0 {
  4368. return invalidParams
  4369. }
  4370. return nil
  4371. }
  4372. // SetConditionKey sets the ConditionKey field's value.
  4373. func (s *Condition) SetConditionKey(v string) *Condition {
  4374. s.ConditionKey = &v
  4375. return s
  4376. }
  4377. // SetConditionType sets the ConditionType field's value.
  4378. func (s *Condition) SetConditionType(v string) *Condition {
  4379. s.ConditionType = &v
  4380. return s
  4381. }
  4382. // SetConditionValue sets the ConditionValue field's value.
  4383. func (s *Condition) SetConditionValue(v string) *Condition {
  4384. s.ConditionValue = &v
  4385. return s
  4386. }
  4387. type CreateBackupPlanInput struct {
  4388. _ struct{} `type:"structure"`
  4389. // Specifies the body of a backup plan. Includes a BackupPlanName and one or
  4390. // more sets of Rules.
  4391. //
  4392. // BackupPlan is a required field
  4393. BackupPlan *PlanInput `type:"structure" required:"true"`
  4394. // To help organize your resources, you can assign your own metadata to the
  4395. // resources that you create. Each tag is a key-value pair. The specified tags
  4396. // are assigned to all backups created with this plan.
  4397. BackupPlanTags map[string]*string `type:"map" sensitive:"true"`
  4398. // Identifies the request and allows failed requests to be retried without the
  4399. // risk of executing the operation twice. If the request includes a CreatorRequestId
  4400. // that matches an existing backup plan, that plan is returned. This parameter
  4401. // is optional.
  4402. CreatorRequestId *string `type:"string"`
  4403. }
  4404. // String returns the string representation
  4405. func (s CreateBackupPlanInput) String() string {
  4406. return awsutil.Prettify(s)
  4407. }
  4408. // GoString returns the string representation
  4409. func (s CreateBackupPlanInput) GoString() string {
  4410. return s.String()
  4411. }
  4412. // Validate inspects the fields of the type to determine if they are valid.
  4413. func (s *CreateBackupPlanInput) Validate() error {
  4414. invalidParams := request.ErrInvalidParams{Context: "CreateBackupPlanInput"}
  4415. if s.BackupPlan == nil {
  4416. invalidParams.Add(request.NewErrParamRequired("BackupPlan"))
  4417. }
  4418. if s.BackupPlan != nil {
  4419. if err := s.BackupPlan.Validate(); err != nil {
  4420. invalidParams.AddNested("BackupPlan", err.(request.ErrInvalidParams))
  4421. }
  4422. }
  4423. if invalidParams.Len() > 0 {
  4424. return invalidParams
  4425. }
  4426. return nil
  4427. }
  4428. // SetBackupPlan sets the BackupPlan field's value.
  4429. func (s *CreateBackupPlanInput) SetBackupPlan(v *PlanInput) *CreateBackupPlanInput {
  4430. s.BackupPlan = v
  4431. return s
  4432. }
  4433. // SetBackupPlanTags sets the BackupPlanTags field's value.
  4434. func (s *CreateBackupPlanInput) SetBackupPlanTags(v map[string]*string) *CreateBackupPlanInput {
  4435. s.BackupPlanTags = v
  4436. return s
  4437. }
  4438. // SetCreatorRequestId sets the CreatorRequestId field's value.
  4439. func (s *CreateBackupPlanInput) SetCreatorRequestId(v string) *CreateBackupPlanInput {
  4440. s.CreatorRequestId = &v
  4441. return s
  4442. }
  4443. type CreateBackupPlanOutput struct {
  4444. _ struct{} `type:"structure"`
  4445. // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for
  4446. // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50.
  4447. BackupPlanArn *string `type:"string"`
  4448. // Uniquely identifies a backup plan.
  4449. BackupPlanId *string `type:"string"`
  4450. // The date and time that a backup plan is created, in Unix format and Coordinated
  4451. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  4452. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  4453. // 12:11:30.087 AM.
  4454. CreationDate *time.Time `type:"timestamp"`
  4455. // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most
  4456. // 1024 bytes long. They cannot be edited.
  4457. VersionId *string `type:"string"`
  4458. }
  4459. // String returns the string representation
  4460. func (s CreateBackupPlanOutput) String() string {
  4461. return awsutil.Prettify(s)
  4462. }
  4463. // GoString returns the string representation
  4464. func (s CreateBackupPlanOutput) GoString() string {
  4465. return s.String()
  4466. }
  4467. // SetBackupPlanArn sets the BackupPlanArn field's value.
  4468. func (s *CreateBackupPlanOutput) SetBackupPlanArn(v string) *CreateBackupPlanOutput {
  4469. s.BackupPlanArn = &v
  4470. return s
  4471. }
  4472. // SetBackupPlanId sets the BackupPlanId field's value.
  4473. func (s *CreateBackupPlanOutput) SetBackupPlanId(v string) *CreateBackupPlanOutput {
  4474. s.BackupPlanId = &v
  4475. return s
  4476. }
  4477. // SetCreationDate sets the CreationDate field's value.
  4478. func (s *CreateBackupPlanOutput) SetCreationDate(v time.Time) *CreateBackupPlanOutput {
  4479. s.CreationDate = &v
  4480. return s
  4481. }
  4482. // SetVersionId sets the VersionId field's value.
  4483. func (s *CreateBackupPlanOutput) SetVersionId(v string) *CreateBackupPlanOutput {
  4484. s.VersionId = &v
  4485. return s
  4486. }
  4487. type CreateBackupSelectionInput struct {
  4488. _ struct{} `type:"structure"`
  4489. // Uniquely identifies the backup plan to be associated with the selection of
  4490. // resources.
  4491. //
  4492. // BackupPlanId is a required field
  4493. BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
  4494. // Specifies the body of a request to assign a set of resources to a backup
  4495. // plan.
  4496. //
  4497. // It includes an array of resources, an optional array of patterns to exclude
  4498. // resources, an optional role to provide access to the AWS service the resource
  4499. // belongs to, and an optional array of tags used to identify a set of resources.
  4500. //
  4501. // BackupSelection is a required field
  4502. BackupSelection *Selection `type:"structure" required:"true"`
  4503. // A unique string that identifies the request and allows failed requests to
  4504. // be retried without the risk of executing the operation twice.
  4505. CreatorRequestId *string `type:"string"`
  4506. }
  4507. // String returns the string representation
  4508. func (s CreateBackupSelectionInput) String() string {
  4509. return awsutil.Prettify(s)
  4510. }
  4511. // GoString returns the string representation
  4512. func (s CreateBackupSelectionInput) GoString() string {
  4513. return s.String()
  4514. }
  4515. // Validate inspects the fields of the type to determine if they are valid.
  4516. func (s *CreateBackupSelectionInput) Validate() error {
  4517. invalidParams := request.ErrInvalidParams{Context: "CreateBackupSelectionInput"}
  4518. if s.BackupPlanId == nil {
  4519. invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
  4520. }
  4521. if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
  4522. invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
  4523. }
  4524. if s.BackupSelection == nil {
  4525. invalidParams.Add(request.NewErrParamRequired("BackupSelection"))
  4526. }
  4527. if s.BackupSelection != nil {
  4528. if err := s.BackupSelection.Validate(); err != nil {
  4529. invalidParams.AddNested("BackupSelection", err.(request.ErrInvalidParams))
  4530. }
  4531. }
  4532. if invalidParams.Len() > 0 {
  4533. return invalidParams
  4534. }
  4535. return nil
  4536. }
  4537. // SetBackupPlanId sets the BackupPlanId field's value.
  4538. func (s *CreateBackupSelectionInput) SetBackupPlanId(v string) *CreateBackupSelectionInput {
  4539. s.BackupPlanId = &v
  4540. return s
  4541. }
  4542. // SetBackupSelection sets the BackupSelection field's value.
  4543. func (s *CreateBackupSelectionInput) SetBackupSelection(v *Selection) *CreateBackupSelectionInput {
  4544. s.BackupSelection = v
  4545. return s
  4546. }
  4547. // SetCreatorRequestId sets the CreatorRequestId field's value.
  4548. func (s *CreateBackupSelectionInput) SetCreatorRequestId(v string) *CreateBackupSelectionInput {
  4549. s.CreatorRequestId = &v
  4550. return s
  4551. }
  4552. type CreateBackupSelectionOutput struct {
  4553. _ struct{} `type:"structure"`
  4554. // Uniquely identifies a backup plan.
  4555. BackupPlanId *string `type:"string"`
  4556. // The date and time a backup selection is created, in Unix format and Coordinated
  4557. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  4558. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  4559. // 12:11:30.087 AM.
  4560. CreationDate *time.Time `type:"timestamp"`
  4561. // Uniquely identifies the body of a request to assign a set of resources to
  4562. // a backup plan.
  4563. SelectionId *string `type:"string"`
  4564. }
  4565. // String returns the string representation
  4566. func (s CreateBackupSelectionOutput) String() string {
  4567. return awsutil.Prettify(s)
  4568. }
  4569. // GoString returns the string representation
  4570. func (s CreateBackupSelectionOutput) GoString() string {
  4571. return s.String()
  4572. }
  4573. // SetBackupPlanId sets the BackupPlanId field's value.
  4574. func (s *CreateBackupSelectionOutput) SetBackupPlanId(v string) *CreateBackupSelectionOutput {
  4575. s.BackupPlanId = &v
  4576. return s
  4577. }
  4578. // SetCreationDate sets the CreationDate field's value.
  4579. func (s *CreateBackupSelectionOutput) SetCreationDate(v time.Time) *CreateBackupSelectionOutput {
  4580. s.CreationDate = &v
  4581. return s
  4582. }
  4583. // SetSelectionId sets the SelectionId field's value.
  4584. func (s *CreateBackupSelectionOutput) SetSelectionId(v string) *CreateBackupSelectionOutput {
  4585. s.SelectionId = &v
  4586. return s
  4587. }
  4588. type CreateBackupVaultInput struct {
  4589. _ struct{} `type:"structure"`
  4590. // The name of a logical container where backups are stored. Backup vaults are
  4591. // identified by names that are unique to the account used to create them and
  4592. // the AWS Region where they are created. They consist of lowercase letters,
  4593. // numbers, and hyphens.
  4594. //
  4595. // BackupVaultName is a required field
  4596. BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
  4597. // Metadata that you can assign to help organize the resources that you create.
  4598. // Each tag is a key-value pair.
  4599. BackupVaultTags map[string]*string `type:"map" sensitive:"true"`
  4600. // A unique string that identifies the request and allows failed requests to
  4601. // be retried without the risk of executing the operation twice.
  4602. CreatorRequestId *string `type:"string"`
  4603. // The server-side encryption key that is used to protect your backups; for
  4604. // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
  4605. EncryptionKeyArn *string `type:"string"`
  4606. }
  4607. // String returns the string representation
  4608. func (s CreateBackupVaultInput) String() string {
  4609. return awsutil.Prettify(s)
  4610. }
  4611. // GoString returns the string representation
  4612. func (s CreateBackupVaultInput) GoString() string {
  4613. return s.String()
  4614. }
  4615. // Validate inspects the fields of the type to determine if they are valid.
  4616. func (s *CreateBackupVaultInput) Validate() error {
  4617. invalidParams := request.ErrInvalidParams{Context: "CreateBackupVaultInput"}
  4618. if s.BackupVaultName == nil {
  4619. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  4620. }
  4621. if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
  4622. invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
  4623. }
  4624. if invalidParams.Len() > 0 {
  4625. return invalidParams
  4626. }
  4627. return nil
  4628. }
  4629. // SetBackupVaultName sets the BackupVaultName field's value.
  4630. func (s *CreateBackupVaultInput) SetBackupVaultName(v string) *CreateBackupVaultInput {
  4631. s.BackupVaultName = &v
  4632. return s
  4633. }
  4634. // SetBackupVaultTags sets the BackupVaultTags field's value.
  4635. func (s *CreateBackupVaultInput) SetBackupVaultTags(v map[string]*string) *CreateBackupVaultInput {
  4636. s.BackupVaultTags = v
  4637. return s
  4638. }
  4639. // SetCreatorRequestId sets the CreatorRequestId field's value.
  4640. func (s *CreateBackupVaultInput) SetCreatorRequestId(v string) *CreateBackupVaultInput {
  4641. s.CreatorRequestId = &v
  4642. return s
  4643. }
  4644. // SetEncryptionKeyArn sets the EncryptionKeyArn field's value.
  4645. func (s *CreateBackupVaultInput) SetEncryptionKeyArn(v string) *CreateBackupVaultInput {
  4646. s.EncryptionKeyArn = &v
  4647. return s
  4648. }
  4649. type CreateBackupVaultOutput struct {
  4650. _ struct{} `type:"structure"`
  4651. // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for
  4652. // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
  4653. BackupVaultArn *string `type:"string"`
  4654. // The name of a logical container where backups are stored. Backup vaults are
  4655. // identified by names that are unique to the account used to create them and
  4656. // the Region where they are created. They consist of lowercase letters, numbers,
  4657. // and hyphens.
  4658. BackupVaultName *string `type:"string"`
  4659. // The date and time a backup vault is created, in Unix format and Coordinated
  4660. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  4661. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  4662. // 12:11:30.087 AM.
  4663. CreationDate *time.Time `type:"timestamp"`
  4664. }
  4665. // String returns the string representation
  4666. func (s CreateBackupVaultOutput) String() string {
  4667. return awsutil.Prettify(s)
  4668. }
  4669. // GoString returns the string representation
  4670. func (s CreateBackupVaultOutput) GoString() string {
  4671. return s.String()
  4672. }
  4673. // SetBackupVaultArn sets the BackupVaultArn field's value.
  4674. func (s *CreateBackupVaultOutput) SetBackupVaultArn(v string) *CreateBackupVaultOutput {
  4675. s.BackupVaultArn = &v
  4676. return s
  4677. }
  4678. // SetBackupVaultName sets the BackupVaultName field's value.
  4679. func (s *CreateBackupVaultOutput) SetBackupVaultName(v string) *CreateBackupVaultOutput {
  4680. s.BackupVaultName = &v
  4681. return s
  4682. }
  4683. // SetCreationDate sets the CreationDate field's value.
  4684. func (s *CreateBackupVaultOutput) SetCreationDate(v time.Time) *CreateBackupVaultOutput {
  4685. s.CreationDate = &v
  4686. return s
  4687. }
  4688. type DeleteBackupPlanInput struct {
  4689. _ struct{} `type:"structure"`
  4690. // Uniquely identifies a backup plan.
  4691. //
  4692. // BackupPlanId is a required field
  4693. BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
  4694. }
  4695. // String returns the string representation
  4696. func (s DeleteBackupPlanInput) String() string {
  4697. return awsutil.Prettify(s)
  4698. }
  4699. // GoString returns the string representation
  4700. func (s DeleteBackupPlanInput) GoString() string {
  4701. return s.String()
  4702. }
  4703. // Validate inspects the fields of the type to determine if they are valid.
  4704. func (s *DeleteBackupPlanInput) Validate() error {
  4705. invalidParams := request.ErrInvalidParams{Context: "DeleteBackupPlanInput"}
  4706. if s.BackupPlanId == nil {
  4707. invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
  4708. }
  4709. if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
  4710. invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
  4711. }
  4712. if invalidParams.Len() > 0 {
  4713. return invalidParams
  4714. }
  4715. return nil
  4716. }
  4717. // SetBackupPlanId sets the BackupPlanId field's value.
  4718. func (s *DeleteBackupPlanInput) SetBackupPlanId(v string) *DeleteBackupPlanInput {
  4719. s.BackupPlanId = &v
  4720. return s
  4721. }
  4722. type DeleteBackupPlanOutput struct {
  4723. _ struct{} `type:"structure"`
  4724. // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for
  4725. // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50.
  4726. BackupPlanArn *string `type:"string"`
  4727. // Uniquely identifies a backup plan.
  4728. BackupPlanId *string `type:"string"`
  4729. // The date and time a backup plan is deleted, in Unix format and Coordinated
  4730. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  4731. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  4732. // 12:11:30.087 AM.
  4733. DeletionDate *time.Time `type:"timestamp"`
  4734. // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most
  4735. // 1,024 bytes long. Version Ids cannot be edited.
  4736. VersionId *string `type:"string"`
  4737. }
  4738. // String returns the string representation
  4739. func (s DeleteBackupPlanOutput) String() string {
  4740. return awsutil.Prettify(s)
  4741. }
  4742. // GoString returns the string representation
  4743. func (s DeleteBackupPlanOutput) GoString() string {
  4744. return s.String()
  4745. }
  4746. // SetBackupPlanArn sets the BackupPlanArn field's value.
  4747. func (s *DeleteBackupPlanOutput) SetBackupPlanArn(v string) *DeleteBackupPlanOutput {
  4748. s.BackupPlanArn = &v
  4749. return s
  4750. }
  4751. // SetBackupPlanId sets the BackupPlanId field's value.
  4752. func (s *DeleteBackupPlanOutput) SetBackupPlanId(v string) *DeleteBackupPlanOutput {
  4753. s.BackupPlanId = &v
  4754. return s
  4755. }
  4756. // SetDeletionDate sets the DeletionDate field's value.
  4757. func (s *DeleteBackupPlanOutput) SetDeletionDate(v time.Time) *DeleteBackupPlanOutput {
  4758. s.DeletionDate = &v
  4759. return s
  4760. }
  4761. // SetVersionId sets the VersionId field's value.
  4762. func (s *DeleteBackupPlanOutput) SetVersionId(v string) *DeleteBackupPlanOutput {
  4763. s.VersionId = &v
  4764. return s
  4765. }
  4766. type DeleteBackupSelectionInput struct {
  4767. _ struct{} `type:"structure"`
  4768. // Uniquely identifies a backup plan.
  4769. //
  4770. // BackupPlanId is a required field
  4771. BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
  4772. // Uniquely identifies the body of a request to assign a set of resources to
  4773. // a backup plan.
  4774. //
  4775. // SelectionId is a required field
  4776. SelectionId *string `location:"uri" locationName:"selectionId" type:"string" required:"true"`
  4777. }
  4778. // String returns the string representation
  4779. func (s DeleteBackupSelectionInput) String() string {
  4780. return awsutil.Prettify(s)
  4781. }
  4782. // GoString returns the string representation
  4783. func (s DeleteBackupSelectionInput) GoString() string {
  4784. return s.String()
  4785. }
  4786. // Validate inspects the fields of the type to determine if they are valid.
  4787. func (s *DeleteBackupSelectionInput) Validate() error {
  4788. invalidParams := request.ErrInvalidParams{Context: "DeleteBackupSelectionInput"}
  4789. if s.BackupPlanId == nil {
  4790. invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
  4791. }
  4792. if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
  4793. invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
  4794. }
  4795. if s.SelectionId == nil {
  4796. invalidParams.Add(request.NewErrParamRequired("SelectionId"))
  4797. }
  4798. if s.SelectionId != nil && len(*s.SelectionId) < 1 {
  4799. invalidParams.Add(request.NewErrParamMinLen("SelectionId", 1))
  4800. }
  4801. if invalidParams.Len() > 0 {
  4802. return invalidParams
  4803. }
  4804. return nil
  4805. }
  4806. // SetBackupPlanId sets the BackupPlanId field's value.
  4807. func (s *DeleteBackupSelectionInput) SetBackupPlanId(v string) *DeleteBackupSelectionInput {
  4808. s.BackupPlanId = &v
  4809. return s
  4810. }
  4811. // SetSelectionId sets the SelectionId field's value.
  4812. func (s *DeleteBackupSelectionInput) SetSelectionId(v string) *DeleteBackupSelectionInput {
  4813. s.SelectionId = &v
  4814. return s
  4815. }
  4816. type DeleteBackupSelectionOutput struct {
  4817. _ struct{} `type:"structure"`
  4818. }
  4819. // String returns the string representation
  4820. func (s DeleteBackupSelectionOutput) String() string {
  4821. return awsutil.Prettify(s)
  4822. }
  4823. // GoString returns the string representation
  4824. func (s DeleteBackupSelectionOutput) GoString() string {
  4825. return s.String()
  4826. }
  4827. type DeleteBackupVaultAccessPolicyInput struct {
  4828. _ struct{} `type:"structure"`
  4829. // The name of a logical container where backups are stored. Backup vaults are
  4830. // identified by names that are unique to the account used to create them and
  4831. // the AWS Region where they are created. They consist of lowercase letters,
  4832. // numbers, and hyphens.
  4833. //
  4834. // BackupVaultName is a required field
  4835. BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
  4836. }
  4837. // String returns the string representation
  4838. func (s DeleteBackupVaultAccessPolicyInput) String() string {
  4839. return awsutil.Prettify(s)
  4840. }
  4841. // GoString returns the string representation
  4842. func (s DeleteBackupVaultAccessPolicyInput) GoString() string {
  4843. return s.String()
  4844. }
  4845. // Validate inspects the fields of the type to determine if they are valid.
  4846. func (s *DeleteBackupVaultAccessPolicyInput) Validate() error {
  4847. invalidParams := request.ErrInvalidParams{Context: "DeleteBackupVaultAccessPolicyInput"}
  4848. if s.BackupVaultName == nil {
  4849. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  4850. }
  4851. if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
  4852. invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
  4853. }
  4854. if invalidParams.Len() > 0 {
  4855. return invalidParams
  4856. }
  4857. return nil
  4858. }
  4859. // SetBackupVaultName sets the BackupVaultName field's value.
  4860. func (s *DeleteBackupVaultAccessPolicyInput) SetBackupVaultName(v string) *DeleteBackupVaultAccessPolicyInput {
  4861. s.BackupVaultName = &v
  4862. return s
  4863. }
  4864. type DeleteBackupVaultAccessPolicyOutput struct {
  4865. _ struct{} `type:"structure"`
  4866. }
  4867. // String returns the string representation
  4868. func (s DeleteBackupVaultAccessPolicyOutput) String() string {
  4869. return awsutil.Prettify(s)
  4870. }
  4871. // GoString returns the string representation
  4872. func (s DeleteBackupVaultAccessPolicyOutput) GoString() string {
  4873. return s.String()
  4874. }
  4875. type DeleteBackupVaultInput struct {
  4876. _ struct{} `type:"structure"`
  4877. // The name of a logical container where backups are stored. Backup vaults are
  4878. // identified by names that are unique to the account used to create them and
  4879. // theAWS Region where they are created. They consist of lowercase letters,
  4880. // numbers, and hyphens.
  4881. //
  4882. // BackupVaultName is a required field
  4883. BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
  4884. }
  4885. // String returns the string representation
  4886. func (s DeleteBackupVaultInput) String() string {
  4887. return awsutil.Prettify(s)
  4888. }
  4889. // GoString returns the string representation
  4890. func (s DeleteBackupVaultInput) GoString() string {
  4891. return s.String()
  4892. }
  4893. // Validate inspects the fields of the type to determine if they are valid.
  4894. func (s *DeleteBackupVaultInput) Validate() error {
  4895. invalidParams := request.ErrInvalidParams{Context: "DeleteBackupVaultInput"}
  4896. if s.BackupVaultName == nil {
  4897. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  4898. }
  4899. if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
  4900. invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
  4901. }
  4902. if invalidParams.Len() > 0 {
  4903. return invalidParams
  4904. }
  4905. return nil
  4906. }
  4907. // SetBackupVaultName sets the BackupVaultName field's value.
  4908. func (s *DeleteBackupVaultInput) SetBackupVaultName(v string) *DeleteBackupVaultInput {
  4909. s.BackupVaultName = &v
  4910. return s
  4911. }
  4912. type DeleteBackupVaultNotificationsInput struct {
  4913. _ struct{} `type:"structure"`
  4914. // The name of a logical container where backups are stored. Backup vaults are
  4915. // identified by names that are unique to the account used to create them and
  4916. // the Region where they are created. They consist of lowercase letters, numbers,
  4917. // and hyphens.
  4918. //
  4919. // BackupVaultName is a required field
  4920. BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
  4921. }
  4922. // String returns the string representation
  4923. func (s DeleteBackupVaultNotificationsInput) String() string {
  4924. return awsutil.Prettify(s)
  4925. }
  4926. // GoString returns the string representation
  4927. func (s DeleteBackupVaultNotificationsInput) GoString() string {
  4928. return s.String()
  4929. }
  4930. // Validate inspects the fields of the type to determine if they are valid.
  4931. func (s *DeleteBackupVaultNotificationsInput) Validate() error {
  4932. invalidParams := request.ErrInvalidParams{Context: "DeleteBackupVaultNotificationsInput"}
  4933. if s.BackupVaultName == nil {
  4934. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  4935. }
  4936. if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
  4937. invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
  4938. }
  4939. if invalidParams.Len() > 0 {
  4940. return invalidParams
  4941. }
  4942. return nil
  4943. }
  4944. // SetBackupVaultName sets the BackupVaultName field's value.
  4945. func (s *DeleteBackupVaultNotificationsInput) SetBackupVaultName(v string) *DeleteBackupVaultNotificationsInput {
  4946. s.BackupVaultName = &v
  4947. return s
  4948. }
  4949. type DeleteBackupVaultNotificationsOutput struct {
  4950. _ struct{} `type:"structure"`
  4951. }
  4952. // String returns the string representation
  4953. func (s DeleteBackupVaultNotificationsOutput) String() string {
  4954. return awsutil.Prettify(s)
  4955. }
  4956. // GoString returns the string representation
  4957. func (s DeleteBackupVaultNotificationsOutput) GoString() string {
  4958. return s.String()
  4959. }
  4960. type DeleteBackupVaultOutput struct {
  4961. _ struct{} `type:"structure"`
  4962. }
  4963. // String returns the string representation
  4964. func (s DeleteBackupVaultOutput) String() string {
  4965. return awsutil.Prettify(s)
  4966. }
  4967. // GoString returns the string representation
  4968. func (s DeleteBackupVaultOutput) GoString() string {
  4969. return s.String()
  4970. }
  4971. type DeleteRecoveryPointInput struct {
  4972. _ struct{} `type:"structure"`
  4973. // The name of a logical container where backups are stored. Backup vaults are
  4974. // identified by names that are unique to the account used to create them and
  4975. // the AWS Region where they are created. They consist of lowercase letters,
  4976. // numbers, and hyphens.
  4977. //
  4978. // BackupVaultName is a required field
  4979. BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
  4980. // An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
  4981. // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  4982. //
  4983. // RecoveryPointArn is a required field
  4984. RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"`
  4985. }
  4986. // String returns the string representation
  4987. func (s DeleteRecoveryPointInput) String() string {
  4988. return awsutil.Prettify(s)
  4989. }
  4990. // GoString returns the string representation
  4991. func (s DeleteRecoveryPointInput) GoString() string {
  4992. return s.String()
  4993. }
  4994. // Validate inspects the fields of the type to determine if they are valid.
  4995. func (s *DeleteRecoveryPointInput) Validate() error {
  4996. invalidParams := request.ErrInvalidParams{Context: "DeleteRecoveryPointInput"}
  4997. if s.BackupVaultName == nil {
  4998. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  4999. }
  5000. if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
  5001. invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
  5002. }
  5003. if s.RecoveryPointArn == nil {
  5004. invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn"))
  5005. }
  5006. if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 {
  5007. invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1))
  5008. }
  5009. if invalidParams.Len() > 0 {
  5010. return invalidParams
  5011. }
  5012. return nil
  5013. }
  5014. // SetBackupVaultName sets the BackupVaultName field's value.
  5015. func (s *DeleteRecoveryPointInput) SetBackupVaultName(v string) *DeleteRecoveryPointInput {
  5016. s.BackupVaultName = &v
  5017. return s
  5018. }
  5019. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  5020. func (s *DeleteRecoveryPointInput) SetRecoveryPointArn(v string) *DeleteRecoveryPointInput {
  5021. s.RecoveryPointArn = &v
  5022. return s
  5023. }
  5024. type DeleteRecoveryPointOutput struct {
  5025. _ struct{} `type:"structure"`
  5026. }
  5027. // String returns the string representation
  5028. func (s DeleteRecoveryPointOutput) String() string {
  5029. return awsutil.Prettify(s)
  5030. }
  5031. // GoString returns the string representation
  5032. func (s DeleteRecoveryPointOutput) GoString() string {
  5033. return s.String()
  5034. }
  5035. type DescribeBackupJobInput struct {
  5036. _ struct{} `type:"structure"`
  5037. // Uniquely identifies a request to AWS Backup to back up a resource.
  5038. //
  5039. // BackupJobId is a required field
  5040. BackupJobId *string `location:"uri" locationName:"backupJobId" type:"string" required:"true"`
  5041. }
  5042. // String returns the string representation
  5043. func (s DescribeBackupJobInput) String() string {
  5044. return awsutil.Prettify(s)
  5045. }
  5046. // GoString returns the string representation
  5047. func (s DescribeBackupJobInput) GoString() string {
  5048. return s.String()
  5049. }
  5050. // Validate inspects the fields of the type to determine if they are valid.
  5051. func (s *DescribeBackupJobInput) Validate() error {
  5052. invalidParams := request.ErrInvalidParams{Context: "DescribeBackupJobInput"}
  5053. if s.BackupJobId == nil {
  5054. invalidParams.Add(request.NewErrParamRequired("BackupJobId"))
  5055. }
  5056. if s.BackupJobId != nil && len(*s.BackupJobId) < 1 {
  5057. invalidParams.Add(request.NewErrParamMinLen("BackupJobId", 1))
  5058. }
  5059. if invalidParams.Len() > 0 {
  5060. return invalidParams
  5061. }
  5062. return nil
  5063. }
  5064. // SetBackupJobId sets the BackupJobId field's value.
  5065. func (s *DescribeBackupJobInput) SetBackupJobId(v string) *DescribeBackupJobInput {
  5066. s.BackupJobId = &v
  5067. return s
  5068. }
  5069. type DescribeBackupJobOutput struct {
  5070. _ struct{} `type:"structure"`
  5071. // Uniquely identifies a request to AWS Backup to back up a resource.
  5072. BackupJobId *string `type:"string"`
  5073. // The size, in bytes, of a backup.
  5074. BackupSizeInBytes *int64 `type:"long"`
  5075. // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for
  5076. // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
  5077. BackupVaultArn *string `type:"string"`
  5078. // The name of a logical container where backups are stored. Backup vaults are
  5079. // identified by names that are unique to the account used to create them and
  5080. // the AWS Region where they are created. They consist of lowercase letters,
  5081. // numbers, and hyphens.
  5082. BackupVaultName *string `type:"string"`
  5083. // The size in bytes transferred to a backup vault at the time that the job
  5084. // status was queried.
  5085. BytesTransferred *int64 `type:"long"`
  5086. // The date and time that a job to create a backup job is completed, in Unix
  5087. // format and Coordinated Universal Time (UTC). The value of CreationDate is
  5088. // accurate to milliseconds. For example, the value 1516925490.087 represents
  5089. // Friday, January 26, 2018 12:11:30.087 AM.
  5090. CompletionDate *time.Time `type:"timestamp"`
  5091. // Contains identifying information about the creation of a backup job, including
  5092. // the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId of the
  5093. // backup plan that is used to create it.
  5094. CreatedBy *RecoveryPointCreator `type:"structure"`
  5095. // The date and time that a backup job is created, in Unix format and Coordinated
  5096. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  5097. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  5098. // 12:11:30.087 AM.
  5099. CreationDate *time.Time `type:"timestamp"`
  5100. // The date and time that a job to back up resources is expected to be completed,
  5101. // in Unix format and Coordinated Universal Time (UTC). The value of ExpectedCompletionDate
  5102. // is accurate to milliseconds. For example, the value 1516925490.087 represents
  5103. // Friday, January 26, 2018 12:11:30.087 AM.
  5104. ExpectedCompletionDate *time.Time `type:"timestamp"`
  5105. // Specifies the IAM role ARN used to create the target recovery point; for
  5106. // example, arn:aws:iam::123456789012:role/S3Access.
  5107. IamRoleArn *string `type:"string"`
  5108. // Contains an estimated percentage that is complete of a job at the time the
  5109. // job status was queried.
  5110. PercentDone *string `type:"string"`
  5111. // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  5112. RecoveryPointArn *string `type:"string"`
  5113. // An ARN that uniquely identifies a saved resource. The format of the ARN depends
  5114. // on the resource type.
  5115. ResourceArn *string `type:"string"`
  5116. // The type of AWS resource to be backed-up; for example, an Amazon Elastic
  5117. // Block Store (Amazon EBS) volume or an Amazon Relational Database Service
  5118. // (Amazon RDS) database.
  5119. ResourceType *string `type:"string"`
  5120. // Specifies the time in Unix format and Coordinated Universal Time (UTC) when
  5121. // a backup job must be started before it is canceled. The value is calculated
  5122. // by adding the start window to the scheduled time. So if the scheduled time
  5123. // were 6:00 PM and the start window is 2 hours, the StartBy time would be 8:00
  5124. // PM on the date specified. The value of StartBy is accurate to milliseconds.
  5125. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  5126. // 12:11:30.087 AM.
  5127. StartBy *time.Time `type:"timestamp"`
  5128. // The current state of a resource recovery point.
  5129. State *string `type:"string" enum:"JobState"`
  5130. // A detailed message explaining the status of the job to back up a resource.
  5131. StatusMessage *string `type:"string"`
  5132. }
  5133. // String returns the string representation
  5134. func (s DescribeBackupJobOutput) String() string {
  5135. return awsutil.Prettify(s)
  5136. }
  5137. // GoString returns the string representation
  5138. func (s DescribeBackupJobOutput) GoString() string {
  5139. return s.String()
  5140. }
  5141. // SetBackupJobId sets the BackupJobId field's value.
  5142. func (s *DescribeBackupJobOutput) SetBackupJobId(v string) *DescribeBackupJobOutput {
  5143. s.BackupJobId = &v
  5144. return s
  5145. }
  5146. // SetBackupSizeInBytes sets the BackupSizeInBytes field's value.
  5147. func (s *DescribeBackupJobOutput) SetBackupSizeInBytes(v int64) *DescribeBackupJobOutput {
  5148. s.BackupSizeInBytes = &v
  5149. return s
  5150. }
  5151. // SetBackupVaultArn sets the BackupVaultArn field's value.
  5152. func (s *DescribeBackupJobOutput) SetBackupVaultArn(v string) *DescribeBackupJobOutput {
  5153. s.BackupVaultArn = &v
  5154. return s
  5155. }
  5156. // SetBackupVaultName sets the BackupVaultName field's value.
  5157. func (s *DescribeBackupJobOutput) SetBackupVaultName(v string) *DescribeBackupJobOutput {
  5158. s.BackupVaultName = &v
  5159. return s
  5160. }
  5161. // SetBytesTransferred sets the BytesTransferred field's value.
  5162. func (s *DescribeBackupJobOutput) SetBytesTransferred(v int64) *DescribeBackupJobOutput {
  5163. s.BytesTransferred = &v
  5164. return s
  5165. }
  5166. // SetCompletionDate sets the CompletionDate field's value.
  5167. func (s *DescribeBackupJobOutput) SetCompletionDate(v time.Time) *DescribeBackupJobOutput {
  5168. s.CompletionDate = &v
  5169. return s
  5170. }
  5171. // SetCreatedBy sets the CreatedBy field's value.
  5172. func (s *DescribeBackupJobOutput) SetCreatedBy(v *RecoveryPointCreator) *DescribeBackupJobOutput {
  5173. s.CreatedBy = v
  5174. return s
  5175. }
  5176. // SetCreationDate sets the CreationDate field's value.
  5177. func (s *DescribeBackupJobOutput) SetCreationDate(v time.Time) *DescribeBackupJobOutput {
  5178. s.CreationDate = &v
  5179. return s
  5180. }
  5181. // SetExpectedCompletionDate sets the ExpectedCompletionDate field's value.
  5182. func (s *DescribeBackupJobOutput) SetExpectedCompletionDate(v time.Time) *DescribeBackupJobOutput {
  5183. s.ExpectedCompletionDate = &v
  5184. return s
  5185. }
  5186. // SetIamRoleArn sets the IamRoleArn field's value.
  5187. func (s *DescribeBackupJobOutput) SetIamRoleArn(v string) *DescribeBackupJobOutput {
  5188. s.IamRoleArn = &v
  5189. return s
  5190. }
  5191. // SetPercentDone sets the PercentDone field's value.
  5192. func (s *DescribeBackupJobOutput) SetPercentDone(v string) *DescribeBackupJobOutput {
  5193. s.PercentDone = &v
  5194. return s
  5195. }
  5196. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  5197. func (s *DescribeBackupJobOutput) SetRecoveryPointArn(v string) *DescribeBackupJobOutput {
  5198. s.RecoveryPointArn = &v
  5199. return s
  5200. }
  5201. // SetResourceArn sets the ResourceArn field's value.
  5202. func (s *DescribeBackupJobOutput) SetResourceArn(v string) *DescribeBackupJobOutput {
  5203. s.ResourceArn = &v
  5204. return s
  5205. }
  5206. // SetResourceType sets the ResourceType field's value.
  5207. func (s *DescribeBackupJobOutput) SetResourceType(v string) *DescribeBackupJobOutput {
  5208. s.ResourceType = &v
  5209. return s
  5210. }
  5211. // SetStartBy sets the StartBy field's value.
  5212. func (s *DescribeBackupJobOutput) SetStartBy(v time.Time) *DescribeBackupJobOutput {
  5213. s.StartBy = &v
  5214. return s
  5215. }
  5216. // SetState sets the State field's value.
  5217. func (s *DescribeBackupJobOutput) SetState(v string) *DescribeBackupJobOutput {
  5218. s.State = &v
  5219. return s
  5220. }
  5221. // SetStatusMessage sets the StatusMessage field's value.
  5222. func (s *DescribeBackupJobOutput) SetStatusMessage(v string) *DescribeBackupJobOutput {
  5223. s.StatusMessage = &v
  5224. return s
  5225. }
  5226. type DescribeBackupVaultInput struct {
  5227. _ struct{} `type:"structure"`
  5228. // The name of a logical container where backups are stored. Backup vaults are
  5229. // identified by names that are unique to the account used to create them and
  5230. // the AWS Region where they are created. They consist of lowercase letters,
  5231. // numbers, and hyphens.
  5232. //
  5233. // BackupVaultName is a required field
  5234. BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
  5235. }
  5236. // String returns the string representation
  5237. func (s DescribeBackupVaultInput) String() string {
  5238. return awsutil.Prettify(s)
  5239. }
  5240. // GoString returns the string representation
  5241. func (s DescribeBackupVaultInput) GoString() string {
  5242. return s.String()
  5243. }
  5244. // Validate inspects the fields of the type to determine if they are valid.
  5245. func (s *DescribeBackupVaultInput) Validate() error {
  5246. invalidParams := request.ErrInvalidParams{Context: "DescribeBackupVaultInput"}
  5247. if s.BackupVaultName == nil {
  5248. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  5249. }
  5250. if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
  5251. invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
  5252. }
  5253. if invalidParams.Len() > 0 {
  5254. return invalidParams
  5255. }
  5256. return nil
  5257. }
  5258. // SetBackupVaultName sets the BackupVaultName field's value.
  5259. func (s *DescribeBackupVaultInput) SetBackupVaultName(v string) *DescribeBackupVaultInput {
  5260. s.BackupVaultName = &v
  5261. return s
  5262. }
  5263. type DescribeBackupVaultOutput struct {
  5264. _ struct{} `type:"structure"`
  5265. // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for
  5266. // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
  5267. BackupVaultArn *string `type:"string"`
  5268. // The name of a logical container where backups are stored. Backup vaults are
  5269. // identified by names that are unique to the account used to create them and
  5270. // the Region where they are created. They consist of lowercase letters, numbers,
  5271. // and hyphens.
  5272. BackupVaultName *string `type:"string"`
  5273. // The date and time that a backup vault is created, in Unix format and Coordinated
  5274. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  5275. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  5276. // 12:11:30.087 AM.
  5277. CreationDate *time.Time `type:"timestamp"`
  5278. // A unique string that identifies the request and allows failed requests to
  5279. // be retried without the risk of executing the operation twice.
  5280. CreatorRequestId *string `type:"string"`
  5281. // The server-side encryption key that is used to protect your backups; for
  5282. // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
  5283. EncryptionKeyArn *string `type:"string"`
  5284. // The number of recovery points that are stored in a backup vault.
  5285. NumberOfRecoveryPoints *int64 `type:"long"`
  5286. }
  5287. // String returns the string representation
  5288. func (s DescribeBackupVaultOutput) String() string {
  5289. return awsutil.Prettify(s)
  5290. }
  5291. // GoString returns the string representation
  5292. func (s DescribeBackupVaultOutput) GoString() string {
  5293. return s.String()
  5294. }
  5295. // SetBackupVaultArn sets the BackupVaultArn field's value.
  5296. func (s *DescribeBackupVaultOutput) SetBackupVaultArn(v string) *DescribeBackupVaultOutput {
  5297. s.BackupVaultArn = &v
  5298. return s
  5299. }
  5300. // SetBackupVaultName sets the BackupVaultName field's value.
  5301. func (s *DescribeBackupVaultOutput) SetBackupVaultName(v string) *DescribeBackupVaultOutput {
  5302. s.BackupVaultName = &v
  5303. return s
  5304. }
  5305. // SetCreationDate sets the CreationDate field's value.
  5306. func (s *DescribeBackupVaultOutput) SetCreationDate(v time.Time) *DescribeBackupVaultOutput {
  5307. s.CreationDate = &v
  5308. return s
  5309. }
  5310. // SetCreatorRequestId sets the CreatorRequestId field's value.
  5311. func (s *DescribeBackupVaultOutput) SetCreatorRequestId(v string) *DescribeBackupVaultOutput {
  5312. s.CreatorRequestId = &v
  5313. return s
  5314. }
  5315. // SetEncryptionKeyArn sets the EncryptionKeyArn field's value.
  5316. func (s *DescribeBackupVaultOutput) SetEncryptionKeyArn(v string) *DescribeBackupVaultOutput {
  5317. s.EncryptionKeyArn = &v
  5318. return s
  5319. }
  5320. // SetNumberOfRecoveryPoints sets the NumberOfRecoveryPoints field's value.
  5321. func (s *DescribeBackupVaultOutput) SetNumberOfRecoveryPoints(v int64) *DescribeBackupVaultOutput {
  5322. s.NumberOfRecoveryPoints = &v
  5323. return s
  5324. }
  5325. type DescribeProtectedResourceInput struct {
  5326. _ struct{} `type:"structure"`
  5327. // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format
  5328. // of the ARN depends on the resource type.
  5329. //
  5330. // ResourceArn is a required field
  5331. ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"`
  5332. }
  5333. // String returns the string representation
  5334. func (s DescribeProtectedResourceInput) String() string {
  5335. return awsutil.Prettify(s)
  5336. }
  5337. // GoString returns the string representation
  5338. func (s DescribeProtectedResourceInput) GoString() string {
  5339. return s.String()
  5340. }
  5341. // Validate inspects the fields of the type to determine if they are valid.
  5342. func (s *DescribeProtectedResourceInput) Validate() error {
  5343. invalidParams := request.ErrInvalidParams{Context: "DescribeProtectedResourceInput"}
  5344. if s.ResourceArn == nil {
  5345. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  5346. }
  5347. if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  5348. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  5349. }
  5350. if invalidParams.Len() > 0 {
  5351. return invalidParams
  5352. }
  5353. return nil
  5354. }
  5355. // SetResourceArn sets the ResourceArn field's value.
  5356. func (s *DescribeProtectedResourceInput) SetResourceArn(v string) *DescribeProtectedResourceInput {
  5357. s.ResourceArn = &v
  5358. return s
  5359. }
  5360. type DescribeProtectedResourceOutput struct {
  5361. _ struct{} `type:"structure"`
  5362. // The date and time that a resource was last backed up, in Unix format and
  5363. // Coordinated Universal Time (UTC). The value of LastBackupTime is accurate
  5364. // to milliseconds. For example, the value 1516925490.087 represents Friday,
  5365. // January 26, 2018 12:11:30.087 AM.
  5366. LastBackupTime *time.Time `type:"timestamp"`
  5367. // An ARN that uniquely identifies a resource. The format of the ARN depends
  5368. // on the resource type.
  5369. ResourceArn *string `type:"string"`
  5370. // The type of AWS resource saved as a recovery point; for example, an EBS volume
  5371. // or an Amazon RDS database.
  5372. ResourceType *string `type:"string"`
  5373. }
  5374. // String returns the string representation
  5375. func (s DescribeProtectedResourceOutput) String() string {
  5376. return awsutil.Prettify(s)
  5377. }
  5378. // GoString returns the string representation
  5379. func (s DescribeProtectedResourceOutput) GoString() string {
  5380. return s.String()
  5381. }
  5382. // SetLastBackupTime sets the LastBackupTime field's value.
  5383. func (s *DescribeProtectedResourceOutput) SetLastBackupTime(v time.Time) *DescribeProtectedResourceOutput {
  5384. s.LastBackupTime = &v
  5385. return s
  5386. }
  5387. // SetResourceArn sets the ResourceArn field's value.
  5388. func (s *DescribeProtectedResourceOutput) SetResourceArn(v string) *DescribeProtectedResourceOutput {
  5389. s.ResourceArn = &v
  5390. return s
  5391. }
  5392. // SetResourceType sets the ResourceType field's value.
  5393. func (s *DescribeProtectedResourceOutput) SetResourceType(v string) *DescribeProtectedResourceOutput {
  5394. s.ResourceType = &v
  5395. return s
  5396. }
  5397. type DescribeRecoveryPointInput struct {
  5398. _ struct{} `type:"structure"`
  5399. // The name of a logical container where backups are stored. Backup vaults are
  5400. // identified by names that are unique to the account used to create them and
  5401. // the AWS Region where they are created. They consist of lowercase letters,
  5402. // numbers, and hyphens.
  5403. //
  5404. // BackupVaultName is a required field
  5405. BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
  5406. // An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
  5407. // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  5408. //
  5409. // RecoveryPointArn is a required field
  5410. RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"`
  5411. }
  5412. // String returns the string representation
  5413. func (s DescribeRecoveryPointInput) String() string {
  5414. return awsutil.Prettify(s)
  5415. }
  5416. // GoString returns the string representation
  5417. func (s DescribeRecoveryPointInput) GoString() string {
  5418. return s.String()
  5419. }
  5420. // Validate inspects the fields of the type to determine if they are valid.
  5421. func (s *DescribeRecoveryPointInput) Validate() error {
  5422. invalidParams := request.ErrInvalidParams{Context: "DescribeRecoveryPointInput"}
  5423. if s.BackupVaultName == nil {
  5424. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  5425. }
  5426. if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
  5427. invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
  5428. }
  5429. if s.RecoveryPointArn == nil {
  5430. invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn"))
  5431. }
  5432. if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 {
  5433. invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1))
  5434. }
  5435. if invalidParams.Len() > 0 {
  5436. return invalidParams
  5437. }
  5438. return nil
  5439. }
  5440. // SetBackupVaultName sets the BackupVaultName field's value.
  5441. func (s *DescribeRecoveryPointInput) SetBackupVaultName(v string) *DescribeRecoveryPointInput {
  5442. s.BackupVaultName = &v
  5443. return s
  5444. }
  5445. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  5446. func (s *DescribeRecoveryPointInput) SetRecoveryPointArn(v string) *DescribeRecoveryPointInput {
  5447. s.RecoveryPointArn = &v
  5448. return s
  5449. }
  5450. type DescribeRecoveryPointOutput struct {
  5451. _ struct{} `type:"structure"`
  5452. // The size, in bytes, of a backup.
  5453. BackupSizeInBytes *int64 `type:"long"`
  5454. // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
  5455. BackupVaultArn *string `type:"string"`
  5456. // The name of a logical container where backups are stored. Backup vaults are
  5457. // identified by names that are unique to the account used to create them and
  5458. // the Region where they are created. They consist of lowercase letters, numbers,
  5459. // and hyphens.
  5460. BackupVaultName *string `type:"string"`
  5461. // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt
  5462. // timestamps.
  5463. CalculatedLifecycle *CalculatedLifecycle `type:"structure"`
  5464. // The date and time that a job to create a recovery point is completed, in
  5465. // Unix format and Coordinated Universal Time (UTC). The value of CompletionDate
  5466. // is accurate to milliseconds. For example, the value 1516925490.087 represents
  5467. // Friday, January 26, 2018 12:11:30.087 AM.
  5468. CompletionDate *time.Time `type:"timestamp"`
  5469. // Contains identifying information about the creation of a recovery point,
  5470. // including the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId
  5471. // of the backup plan used to create it.
  5472. CreatedBy *RecoveryPointCreator `type:"structure"`
  5473. // The date and time that a recovery point is created, in Unix format and Coordinated
  5474. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  5475. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  5476. // 12:11:30.087 AM.
  5477. CreationDate *time.Time `type:"timestamp"`
  5478. // The server-side encryption key used to protect your backups; for example,
  5479. // arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
  5480. EncryptionKeyArn *string `type:"string"`
  5481. // Specifies the IAM role ARN used to create the target recovery point; for
  5482. // example, arn:aws:iam::123456789012:role/S3Access.
  5483. IamRoleArn *string `type:"string"`
  5484. // A Boolean value that is returned as TRUE if the specified recovery point
  5485. // is encrypted, or FALSE if the recovery point is not encrypted.
  5486. IsEncrypted *bool `type:"boolean"`
  5487. // The date and time that a recovery point was last restored, in Unix format
  5488. // and Coordinated Universal Time (UTC). The value of LastRestoreTime is accurate
  5489. // to milliseconds. For example, the value 1516925490.087 represents Friday,
  5490. // January 26, 2018 12:11:30.087 AM.
  5491. LastRestoreTime *time.Time `type:"timestamp"`
  5492. // The lifecycle defines when a protected resource is transitioned to cold storage
  5493. // and when it expires. AWS Backup transitions and expires backups automatically
  5494. // according to the lifecycle that you define.
  5495. //
  5496. // Backups that are transitioned to cold storage must be stored in cold storage
  5497. // for a minimum of 90 days. Therefore, the “expire after days” setting must
  5498. // be 90 days greater than the “transition to cold after days” setting. The
  5499. // “transition to cold after days” setting cannot be changed after a backup
  5500. // has been transitioned to cold.
  5501. Lifecycle *Lifecycle `type:"structure"`
  5502. // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  5503. RecoveryPointArn *string `type:"string"`
  5504. // An ARN that uniquely identifies a saved resource. The format of the ARN depends
  5505. // on the resource type.
  5506. ResourceArn *string `type:"string"`
  5507. // The type of AWS resource to save as a recovery point; for example, an Amazon
  5508. // Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database
  5509. // Service (Amazon RDS) database.
  5510. ResourceType *string `type:"string"`
  5511. // A status code specifying the state of the recovery point.
  5512. //
  5513. // A partial status indicates that the recovery point was not successfully re-created
  5514. // and must be retried.
  5515. Status *string `type:"string" enum:"RecoveryPointStatus"`
  5516. // Specifies the storage class of the recovery point. Valid values are WARM
  5517. // or COLD.
  5518. StorageClass *string `type:"string" enum:"StorageClass"`
  5519. }
  5520. // String returns the string representation
  5521. func (s DescribeRecoveryPointOutput) String() string {
  5522. return awsutil.Prettify(s)
  5523. }
  5524. // GoString returns the string representation
  5525. func (s DescribeRecoveryPointOutput) GoString() string {
  5526. return s.String()
  5527. }
  5528. // SetBackupSizeInBytes sets the BackupSizeInBytes field's value.
  5529. func (s *DescribeRecoveryPointOutput) SetBackupSizeInBytes(v int64) *DescribeRecoveryPointOutput {
  5530. s.BackupSizeInBytes = &v
  5531. return s
  5532. }
  5533. // SetBackupVaultArn sets the BackupVaultArn field's value.
  5534. func (s *DescribeRecoveryPointOutput) SetBackupVaultArn(v string) *DescribeRecoveryPointOutput {
  5535. s.BackupVaultArn = &v
  5536. return s
  5537. }
  5538. // SetBackupVaultName sets the BackupVaultName field's value.
  5539. func (s *DescribeRecoveryPointOutput) SetBackupVaultName(v string) *DescribeRecoveryPointOutput {
  5540. s.BackupVaultName = &v
  5541. return s
  5542. }
  5543. // SetCalculatedLifecycle sets the CalculatedLifecycle field's value.
  5544. func (s *DescribeRecoveryPointOutput) SetCalculatedLifecycle(v *CalculatedLifecycle) *DescribeRecoveryPointOutput {
  5545. s.CalculatedLifecycle = v
  5546. return s
  5547. }
  5548. // SetCompletionDate sets the CompletionDate field's value.
  5549. func (s *DescribeRecoveryPointOutput) SetCompletionDate(v time.Time) *DescribeRecoveryPointOutput {
  5550. s.CompletionDate = &v
  5551. return s
  5552. }
  5553. // SetCreatedBy sets the CreatedBy field's value.
  5554. func (s *DescribeRecoveryPointOutput) SetCreatedBy(v *RecoveryPointCreator) *DescribeRecoveryPointOutput {
  5555. s.CreatedBy = v
  5556. return s
  5557. }
  5558. // SetCreationDate sets the CreationDate field's value.
  5559. func (s *DescribeRecoveryPointOutput) SetCreationDate(v time.Time) *DescribeRecoveryPointOutput {
  5560. s.CreationDate = &v
  5561. return s
  5562. }
  5563. // SetEncryptionKeyArn sets the EncryptionKeyArn field's value.
  5564. func (s *DescribeRecoveryPointOutput) SetEncryptionKeyArn(v string) *DescribeRecoveryPointOutput {
  5565. s.EncryptionKeyArn = &v
  5566. return s
  5567. }
  5568. // SetIamRoleArn sets the IamRoleArn field's value.
  5569. func (s *DescribeRecoveryPointOutput) SetIamRoleArn(v string) *DescribeRecoveryPointOutput {
  5570. s.IamRoleArn = &v
  5571. return s
  5572. }
  5573. // SetIsEncrypted sets the IsEncrypted field's value.
  5574. func (s *DescribeRecoveryPointOutput) SetIsEncrypted(v bool) *DescribeRecoveryPointOutput {
  5575. s.IsEncrypted = &v
  5576. return s
  5577. }
  5578. // SetLastRestoreTime sets the LastRestoreTime field's value.
  5579. func (s *DescribeRecoveryPointOutput) SetLastRestoreTime(v time.Time) *DescribeRecoveryPointOutput {
  5580. s.LastRestoreTime = &v
  5581. return s
  5582. }
  5583. // SetLifecycle sets the Lifecycle field's value.
  5584. func (s *DescribeRecoveryPointOutput) SetLifecycle(v *Lifecycle) *DescribeRecoveryPointOutput {
  5585. s.Lifecycle = v
  5586. return s
  5587. }
  5588. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  5589. func (s *DescribeRecoveryPointOutput) SetRecoveryPointArn(v string) *DescribeRecoveryPointOutput {
  5590. s.RecoveryPointArn = &v
  5591. return s
  5592. }
  5593. // SetResourceArn sets the ResourceArn field's value.
  5594. func (s *DescribeRecoveryPointOutput) SetResourceArn(v string) *DescribeRecoveryPointOutput {
  5595. s.ResourceArn = &v
  5596. return s
  5597. }
  5598. // SetResourceType sets the ResourceType field's value.
  5599. func (s *DescribeRecoveryPointOutput) SetResourceType(v string) *DescribeRecoveryPointOutput {
  5600. s.ResourceType = &v
  5601. return s
  5602. }
  5603. // SetStatus sets the Status field's value.
  5604. func (s *DescribeRecoveryPointOutput) SetStatus(v string) *DescribeRecoveryPointOutput {
  5605. s.Status = &v
  5606. return s
  5607. }
  5608. // SetStorageClass sets the StorageClass field's value.
  5609. func (s *DescribeRecoveryPointOutput) SetStorageClass(v string) *DescribeRecoveryPointOutput {
  5610. s.StorageClass = &v
  5611. return s
  5612. }
  5613. type DescribeRestoreJobInput struct {
  5614. _ struct{} `type:"structure"`
  5615. // Uniquely identifies the job that restores a recovery point.
  5616. //
  5617. // RestoreJobId is a required field
  5618. RestoreJobId *string `location:"uri" locationName:"restoreJobId" type:"string" required:"true"`
  5619. }
  5620. // String returns the string representation
  5621. func (s DescribeRestoreJobInput) String() string {
  5622. return awsutil.Prettify(s)
  5623. }
  5624. // GoString returns the string representation
  5625. func (s DescribeRestoreJobInput) GoString() string {
  5626. return s.String()
  5627. }
  5628. // Validate inspects the fields of the type to determine if they are valid.
  5629. func (s *DescribeRestoreJobInput) Validate() error {
  5630. invalidParams := request.ErrInvalidParams{Context: "DescribeRestoreJobInput"}
  5631. if s.RestoreJobId == nil {
  5632. invalidParams.Add(request.NewErrParamRequired("RestoreJobId"))
  5633. }
  5634. if s.RestoreJobId != nil && len(*s.RestoreJobId) < 1 {
  5635. invalidParams.Add(request.NewErrParamMinLen("RestoreJobId", 1))
  5636. }
  5637. if invalidParams.Len() > 0 {
  5638. return invalidParams
  5639. }
  5640. return nil
  5641. }
  5642. // SetRestoreJobId sets the RestoreJobId field's value.
  5643. func (s *DescribeRestoreJobInput) SetRestoreJobId(v string) *DescribeRestoreJobInput {
  5644. s.RestoreJobId = &v
  5645. return s
  5646. }
  5647. type DescribeRestoreJobOutput struct {
  5648. _ struct{} `type:"structure"`
  5649. // The size, in bytes, of the restored resource.
  5650. BackupSizeInBytes *int64 `type:"long"`
  5651. // The date and time that a job to restore a recovery point is completed, in
  5652. // Unix format and Coordinated Universal Time (UTC). The value of CompletionDate
  5653. // is accurate to milliseconds. For example, the value 1516925490.087 represents
  5654. // Friday, January 26, 2018 12:11:30.087 AM.
  5655. CompletionDate *time.Time `type:"timestamp"`
  5656. // An Amazon Resource Name (ARN) that uniquely identifies a resource whose recovery
  5657. // point is being restored. The format of the ARN depends on the resource type
  5658. // of the backed-up resource.
  5659. CreatedResourceArn *string `type:"string"`
  5660. // The date and time that a restore job is created, in Unix format and Coordinated
  5661. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  5662. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  5663. // 12:11:30.087 AM.
  5664. CreationDate *time.Time `type:"timestamp"`
  5665. // The amount of time in minutes that a job restoring a recovery point is expected
  5666. // to take.
  5667. ExpectedCompletionTimeMinutes *int64 `type:"long"`
  5668. // Specifies the IAM role ARN used to create the target recovery point; for
  5669. // example, arn:aws:iam::123456789012:role/S3Access.
  5670. IamRoleArn *string `type:"string"`
  5671. // Contains an estimated percentage that is complete of a job at the time the
  5672. // job status was queried.
  5673. PercentDone *string `type:"string"`
  5674. // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  5675. RecoveryPointArn *string `type:"string"`
  5676. // Uniquely identifies the job that restores a recovery point.
  5677. RestoreJobId *string `type:"string"`
  5678. // Status code specifying the state of the job that is initiated by AWS Backup
  5679. // to restore a recovery point.
  5680. Status *string `type:"string" enum:"RestoreJobStatus"`
  5681. // A detailed message explaining the status of a job to restore a recovery point.
  5682. StatusMessage *string `type:"string"`
  5683. }
  5684. // String returns the string representation
  5685. func (s DescribeRestoreJobOutput) String() string {
  5686. return awsutil.Prettify(s)
  5687. }
  5688. // GoString returns the string representation
  5689. func (s DescribeRestoreJobOutput) GoString() string {
  5690. return s.String()
  5691. }
  5692. // SetBackupSizeInBytes sets the BackupSizeInBytes field's value.
  5693. func (s *DescribeRestoreJobOutput) SetBackupSizeInBytes(v int64) *DescribeRestoreJobOutput {
  5694. s.BackupSizeInBytes = &v
  5695. return s
  5696. }
  5697. // SetCompletionDate sets the CompletionDate field's value.
  5698. func (s *DescribeRestoreJobOutput) SetCompletionDate(v time.Time) *DescribeRestoreJobOutput {
  5699. s.CompletionDate = &v
  5700. return s
  5701. }
  5702. // SetCreatedResourceArn sets the CreatedResourceArn field's value.
  5703. func (s *DescribeRestoreJobOutput) SetCreatedResourceArn(v string) *DescribeRestoreJobOutput {
  5704. s.CreatedResourceArn = &v
  5705. return s
  5706. }
  5707. // SetCreationDate sets the CreationDate field's value.
  5708. func (s *DescribeRestoreJobOutput) SetCreationDate(v time.Time) *DescribeRestoreJobOutput {
  5709. s.CreationDate = &v
  5710. return s
  5711. }
  5712. // SetExpectedCompletionTimeMinutes sets the ExpectedCompletionTimeMinutes field's value.
  5713. func (s *DescribeRestoreJobOutput) SetExpectedCompletionTimeMinutes(v int64) *DescribeRestoreJobOutput {
  5714. s.ExpectedCompletionTimeMinutes = &v
  5715. return s
  5716. }
  5717. // SetIamRoleArn sets the IamRoleArn field's value.
  5718. func (s *DescribeRestoreJobOutput) SetIamRoleArn(v string) *DescribeRestoreJobOutput {
  5719. s.IamRoleArn = &v
  5720. return s
  5721. }
  5722. // SetPercentDone sets the PercentDone field's value.
  5723. func (s *DescribeRestoreJobOutput) SetPercentDone(v string) *DescribeRestoreJobOutput {
  5724. s.PercentDone = &v
  5725. return s
  5726. }
  5727. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  5728. func (s *DescribeRestoreJobOutput) SetRecoveryPointArn(v string) *DescribeRestoreJobOutput {
  5729. s.RecoveryPointArn = &v
  5730. return s
  5731. }
  5732. // SetRestoreJobId sets the RestoreJobId field's value.
  5733. func (s *DescribeRestoreJobOutput) SetRestoreJobId(v string) *DescribeRestoreJobOutput {
  5734. s.RestoreJobId = &v
  5735. return s
  5736. }
  5737. // SetStatus sets the Status field's value.
  5738. func (s *DescribeRestoreJobOutput) SetStatus(v string) *DescribeRestoreJobOutput {
  5739. s.Status = &v
  5740. return s
  5741. }
  5742. // SetStatusMessage sets the StatusMessage field's value.
  5743. func (s *DescribeRestoreJobOutput) SetStatusMessage(v string) *DescribeRestoreJobOutput {
  5744. s.StatusMessage = &v
  5745. return s
  5746. }
  5747. type ExportBackupPlanTemplateInput struct {
  5748. _ struct{} `type:"structure"`
  5749. // Uniquely identifies a backup plan.
  5750. //
  5751. // BackupPlanId is a required field
  5752. BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
  5753. }
  5754. // String returns the string representation
  5755. func (s ExportBackupPlanTemplateInput) String() string {
  5756. return awsutil.Prettify(s)
  5757. }
  5758. // GoString returns the string representation
  5759. func (s ExportBackupPlanTemplateInput) GoString() string {
  5760. return s.String()
  5761. }
  5762. // Validate inspects the fields of the type to determine if they are valid.
  5763. func (s *ExportBackupPlanTemplateInput) Validate() error {
  5764. invalidParams := request.ErrInvalidParams{Context: "ExportBackupPlanTemplateInput"}
  5765. if s.BackupPlanId == nil {
  5766. invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
  5767. }
  5768. if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
  5769. invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
  5770. }
  5771. if invalidParams.Len() > 0 {
  5772. return invalidParams
  5773. }
  5774. return nil
  5775. }
  5776. // SetBackupPlanId sets the BackupPlanId field's value.
  5777. func (s *ExportBackupPlanTemplateInput) SetBackupPlanId(v string) *ExportBackupPlanTemplateInput {
  5778. s.BackupPlanId = &v
  5779. return s
  5780. }
  5781. type ExportBackupPlanTemplateOutput struct {
  5782. _ struct{} `type:"structure"`
  5783. // The body of a backup plan template in JSON format.
  5784. //
  5785. // This is a signed JSON document that cannot be modified before being passed
  5786. // to GetBackupPlanFromJSON.
  5787. BackupPlanTemplateJson *string `type:"string"`
  5788. }
  5789. // String returns the string representation
  5790. func (s ExportBackupPlanTemplateOutput) String() string {
  5791. return awsutil.Prettify(s)
  5792. }
  5793. // GoString returns the string representation
  5794. func (s ExportBackupPlanTemplateOutput) GoString() string {
  5795. return s.String()
  5796. }
  5797. // SetBackupPlanTemplateJson sets the BackupPlanTemplateJson field's value.
  5798. func (s *ExportBackupPlanTemplateOutput) SetBackupPlanTemplateJson(v string) *ExportBackupPlanTemplateOutput {
  5799. s.BackupPlanTemplateJson = &v
  5800. return s
  5801. }
  5802. type GetBackupPlanFromJSONInput struct {
  5803. _ struct{} `type:"structure"`
  5804. // A customer-supplied backup plan document in JSON format.
  5805. //
  5806. // BackupPlanTemplateJson is a required field
  5807. BackupPlanTemplateJson *string `type:"string" required:"true"`
  5808. }
  5809. // String returns the string representation
  5810. func (s GetBackupPlanFromJSONInput) String() string {
  5811. return awsutil.Prettify(s)
  5812. }
  5813. // GoString returns the string representation
  5814. func (s GetBackupPlanFromJSONInput) GoString() string {
  5815. return s.String()
  5816. }
  5817. // Validate inspects the fields of the type to determine if they are valid.
  5818. func (s *GetBackupPlanFromJSONInput) Validate() error {
  5819. invalidParams := request.ErrInvalidParams{Context: "GetBackupPlanFromJSONInput"}
  5820. if s.BackupPlanTemplateJson == nil {
  5821. invalidParams.Add(request.NewErrParamRequired("BackupPlanTemplateJson"))
  5822. }
  5823. if invalidParams.Len() > 0 {
  5824. return invalidParams
  5825. }
  5826. return nil
  5827. }
  5828. // SetBackupPlanTemplateJson sets the BackupPlanTemplateJson field's value.
  5829. func (s *GetBackupPlanFromJSONInput) SetBackupPlanTemplateJson(v string) *GetBackupPlanFromJSONInput {
  5830. s.BackupPlanTemplateJson = &v
  5831. return s
  5832. }
  5833. type GetBackupPlanFromJSONOutput struct {
  5834. _ struct{} `type:"structure"`
  5835. // Specifies the body of a backup plan. Includes a BackupPlanName and one or
  5836. // more sets of Rules.
  5837. BackupPlan *Plan `type:"structure"`
  5838. }
  5839. // String returns the string representation
  5840. func (s GetBackupPlanFromJSONOutput) String() string {
  5841. return awsutil.Prettify(s)
  5842. }
  5843. // GoString returns the string representation
  5844. func (s GetBackupPlanFromJSONOutput) GoString() string {
  5845. return s.String()
  5846. }
  5847. // SetBackupPlan sets the BackupPlan field's value.
  5848. func (s *GetBackupPlanFromJSONOutput) SetBackupPlan(v *Plan) *GetBackupPlanFromJSONOutput {
  5849. s.BackupPlan = v
  5850. return s
  5851. }
  5852. type GetBackupPlanFromTemplateInput struct {
  5853. _ struct{} `type:"structure"`
  5854. // Uniquely identifies a stored backup plan template.
  5855. //
  5856. // BackupPlanTemplateId is a required field
  5857. BackupPlanTemplateId *string `location:"uri" locationName:"templateId" type:"string" required:"true"`
  5858. }
  5859. // String returns the string representation
  5860. func (s GetBackupPlanFromTemplateInput) String() string {
  5861. return awsutil.Prettify(s)
  5862. }
  5863. // GoString returns the string representation
  5864. func (s GetBackupPlanFromTemplateInput) GoString() string {
  5865. return s.String()
  5866. }
  5867. // Validate inspects the fields of the type to determine if they are valid.
  5868. func (s *GetBackupPlanFromTemplateInput) Validate() error {
  5869. invalidParams := request.ErrInvalidParams{Context: "GetBackupPlanFromTemplateInput"}
  5870. if s.BackupPlanTemplateId == nil {
  5871. invalidParams.Add(request.NewErrParamRequired("BackupPlanTemplateId"))
  5872. }
  5873. if s.BackupPlanTemplateId != nil && len(*s.BackupPlanTemplateId) < 1 {
  5874. invalidParams.Add(request.NewErrParamMinLen("BackupPlanTemplateId", 1))
  5875. }
  5876. if invalidParams.Len() > 0 {
  5877. return invalidParams
  5878. }
  5879. return nil
  5880. }
  5881. // SetBackupPlanTemplateId sets the BackupPlanTemplateId field's value.
  5882. func (s *GetBackupPlanFromTemplateInput) SetBackupPlanTemplateId(v string) *GetBackupPlanFromTemplateInput {
  5883. s.BackupPlanTemplateId = &v
  5884. return s
  5885. }
  5886. type GetBackupPlanFromTemplateOutput struct {
  5887. _ struct{} `type:"structure"`
  5888. // Returns the body of a backup plan based on the target template, including
  5889. // the name, rules, and backup vault of the plan.
  5890. BackupPlanDocument *Plan `type:"structure"`
  5891. }
  5892. // String returns the string representation
  5893. func (s GetBackupPlanFromTemplateOutput) String() string {
  5894. return awsutil.Prettify(s)
  5895. }
  5896. // GoString returns the string representation
  5897. func (s GetBackupPlanFromTemplateOutput) GoString() string {
  5898. return s.String()
  5899. }
  5900. // SetBackupPlanDocument sets the BackupPlanDocument field's value.
  5901. func (s *GetBackupPlanFromTemplateOutput) SetBackupPlanDocument(v *Plan) *GetBackupPlanFromTemplateOutput {
  5902. s.BackupPlanDocument = v
  5903. return s
  5904. }
  5905. type GetBackupPlanInput struct {
  5906. _ struct{} `type:"structure"`
  5907. // Uniquely identifies a backup plan.
  5908. //
  5909. // BackupPlanId is a required field
  5910. BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
  5911. // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most
  5912. // 1,024 bytes long. Version IDs cannot be edited.
  5913. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  5914. }
  5915. // String returns the string representation
  5916. func (s GetBackupPlanInput) String() string {
  5917. return awsutil.Prettify(s)
  5918. }
  5919. // GoString returns the string representation
  5920. func (s GetBackupPlanInput) GoString() string {
  5921. return s.String()
  5922. }
  5923. // Validate inspects the fields of the type to determine if they are valid.
  5924. func (s *GetBackupPlanInput) Validate() error {
  5925. invalidParams := request.ErrInvalidParams{Context: "GetBackupPlanInput"}
  5926. if s.BackupPlanId == nil {
  5927. invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
  5928. }
  5929. if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
  5930. invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
  5931. }
  5932. if invalidParams.Len() > 0 {
  5933. return invalidParams
  5934. }
  5935. return nil
  5936. }
  5937. // SetBackupPlanId sets the BackupPlanId field's value.
  5938. func (s *GetBackupPlanInput) SetBackupPlanId(v string) *GetBackupPlanInput {
  5939. s.BackupPlanId = &v
  5940. return s
  5941. }
  5942. // SetVersionId sets the VersionId field's value.
  5943. func (s *GetBackupPlanInput) SetVersionId(v string) *GetBackupPlanInput {
  5944. s.VersionId = &v
  5945. return s
  5946. }
  5947. type GetBackupPlanOutput struct {
  5948. _ struct{} `type:"structure"`
  5949. // Specifies the body of a backup plan. Includes a BackupPlanName and one or
  5950. // more sets of Rules.
  5951. BackupPlan *Plan `type:"structure"`
  5952. // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for
  5953. // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50.
  5954. BackupPlanArn *string `type:"string"`
  5955. // Uniquely identifies a backup plan.
  5956. BackupPlanId *string `type:"string"`
  5957. // The date and time that a backup plan is created, in Unix format and Coordinated
  5958. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  5959. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  5960. // 12:11:30.087 AM.
  5961. CreationDate *time.Time `type:"timestamp"`
  5962. // A unique string that identifies the request and allows failed requests to
  5963. // be retried without the risk of executing the operation twice.
  5964. CreatorRequestId *string `type:"string"`
  5965. // The date and time that a backup plan is deleted, in Unix format and Coordinated
  5966. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  5967. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  5968. // 12:11:30.087 AM.
  5969. DeletionDate *time.Time `type:"timestamp"`
  5970. // The last time a job to back up resources was executed with this backup plan.
  5971. // A date and time, in Unix format and Coordinated Universal Time (UTC). The
  5972. // value of LastExecutionDate is accurate to milliseconds. For example, the
  5973. // value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
  5974. LastExecutionDate *time.Time `type:"timestamp"`
  5975. // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most
  5976. // 1,024 bytes long. Version IDs cannot be edited.
  5977. VersionId *string `type:"string"`
  5978. }
  5979. // String returns the string representation
  5980. func (s GetBackupPlanOutput) String() string {
  5981. return awsutil.Prettify(s)
  5982. }
  5983. // GoString returns the string representation
  5984. func (s GetBackupPlanOutput) GoString() string {
  5985. return s.String()
  5986. }
  5987. // SetBackupPlan sets the BackupPlan field's value.
  5988. func (s *GetBackupPlanOutput) SetBackupPlan(v *Plan) *GetBackupPlanOutput {
  5989. s.BackupPlan = v
  5990. return s
  5991. }
  5992. // SetBackupPlanArn sets the BackupPlanArn field's value.
  5993. func (s *GetBackupPlanOutput) SetBackupPlanArn(v string) *GetBackupPlanOutput {
  5994. s.BackupPlanArn = &v
  5995. return s
  5996. }
  5997. // SetBackupPlanId sets the BackupPlanId field's value.
  5998. func (s *GetBackupPlanOutput) SetBackupPlanId(v string) *GetBackupPlanOutput {
  5999. s.BackupPlanId = &v
  6000. return s
  6001. }
  6002. // SetCreationDate sets the CreationDate field's value.
  6003. func (s *GetBackupPlanOutput) SetCreationDate(v time.Time) *GetBackupPlanOutput {
  6004. s.CreationDate = &v
  6005. return s
  6006. }
  6007. // SetCreatorRequestId sets the CreatorRequestId field's value.
  6008. func (s *GetBackupPlanOutput) SetCreatorRequestId(v string) *GetBackupPlanOutput {
  6009. s.CreatorRequestId = &v
  6010. return s
  6011. }
  6012. // SetDeletionDate sets the DeletionDate field's value.
  6013. func (s *GetBackupPlanOutput) SetDeletionDate(v time.Time) *GetBackupPlanOutput {
  6014. s.DeletionDate = &v
  6015. return s
  6016. }
  6017. // SetLastExecutionDate sets the LastExecutionDate field's value.
  6018. func (s *GetBackupPlanOutput) SetLastExecutionDate(v time.Time) *GetBackupPlanOutput {
  6019. s.LastExecutionDate = &v
  6020. return s
  6021. }
  6022. // SetVersionId sets the VersionId field's value.
  6023. func (s *GetBackupPlanOutput) SetVersionId(v string) *GetBackupPlanOutput {
  6024. s.VersionId = &v
  6025. return s
  6026. }
  6027. type GetBackupSelectionInput struct {
  6028. _ struct{} `type:"structure"`
  6029. // Uniquely identifies a backup plan.
  6030. //
  6031. // BackupPlanId is a required field
  6032. BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
  6033. // Uniquely identifies the body of a request to assign a set of resources to
  6034. // a backup plan.
  6035. //
  6036. // SelectionId is a required field
  6037. SelectionId *string `location:"uri" locationName:"selectionId" type:"string" required:"true"`
  6038. }
  6039. // String returns the string representation
  6040. func (s GetBackupSelectionInput) String() string {
  6041. return awsutil.Prettify(s)
  6042. }
  6043. // GoString returns the string representation
  6044. func (s GetBackupSelectionInput) GoString() string {
  6045. return s.String()
  6046. }
  6047. // Validate inspects the fields of the type to determine if they are valid.
  6048. func (s *GetBackupSelectionInput) Validate() error {
  6049. invalidParams := request.ErrInvalidParams{Context: "GetBackupSelectionInput"}
  6050. if s.BackupPlanId == nil {
  6051. invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
  6052. }
  6053. if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
  6054. invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
  6055. }
  6056. if s.SelectionId == nil {
  6057. invalidParams.Add(request.NewErrParamRequired("SelectionId"))
  6058. }
  6059. if s.SelectionId != nil && len(*s.SelectionId) < 1 {
  6060. invalidParams.Add(request.NewErrParamMinLen("SelectionId", 1))
  6061. }
  6062. if invalidParams.Len() > 0 {
  6063. return invalidParams
  6064. }
  6065. return nil
  6066. }
  6067. // SetBackupPlanId sets the BackupPlanId field's value.
  6068. func (s *GetBackupSelectionInput) SetBackupPlanId(v string) *GetBackupSelectionInput {
  6069. s.BackupPlanId = &v
  6070. return s
  6071. }
  6072. // SetSelectionId sets the SelectionId field's value.
  6073. func (s *GetBackupSelectionInput) SetSelectionId(v string) *GetBackupSelectionInput {
  6074. s.SelectionId = &v
  6075. return s
  6076. }
  6077. type GetBackupSelectionOutput struct {
  6078. _ struct{} `type:"structure"`
  6079. // Uniquely identifies a backup plan.
  6080. BackupPlanId *string `type:"string"`
  6081. // Specifies the body of a request to assign a set of resources to a backup
  6082. // plan.
  6083. //
  6084. // It includes an array of resources, an optional array of patterns to exclude
  6085. // resources, an optional role to provide access to the AWS service that the
  6086. // resource belongs to, and an optional array of tags used to identify a set
  6087. // of resources.
  6088. BackupSelection *Selection `type:"structure"`
  6089. // The date and time a backup selection is created, in Unix format and Coordinated
  6090. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  6091. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  6092. // 12:11:30.087 AM.
  6093. CreationDate *time.Time `type:"timestamp"`
  6094. // A unique string that identifies the request and allows failed requests to
  6095. // be retried without the risk of executing the operation twice.
  6096. CreatorRequestId *string `type:"string"`
  6097. // Uniquely identifies the body of a request to assign a set of resources to
  6098. // a backup plan.
  6099. SelectionId *string `type:"string"`
  6100. }
  6101. // String returns the string representation
  6102. func (s GetBackupSelectionOutput) String() string {
  6103. return awsutil.Prettify(s)
  6104. }
  6105. // GoString returns the string representation
  6106. func (s GetBackupSelectionOutput) GoString() string {
  6107. return s.String()
  6108. }
  6109. // SetBackupPlanId sets the BackupPlanId field's value.
  6110. func (s *GetBackupSelectionOutput) SetBackupPlanId(v string) *GetBackupSelectionOutput {
  6111. s.BackupPlanId = &v
  6112. return s
  6113. }
  6114. // SetBackupSelection sets the BackupSelection field's value.
  6115. func (s *GetBackupSelectionOutput) SetBackupSelection(v *Selection) *GetBackupSelectionOutput {
  6116. s.BackupSelection = v
  6117. return s
  6118. }
  6119. // SetCreationDate sets the CreationDate field's value.
  6120. func (s *GetBackupSelectionOutput) SetCreationDate(v time.Time) *GetBackupSelectionOutput {
  6121. s.CreationDate = &v
  6122. return s
  6123. }
  6124. // SetCreatorRequestId sets the CreatorRequestId field's value.
  6125. func (s *GetBackupSelectionOutput) SetCreatorRequestId(v string) *GetBackupSelectionOutput {
  6126. s.CreatorRequestId = &v
  6127. return s
  6128. }
  6129. // SetSelectionId sets the SelectionId field's value.
  6130. func (s *GetBackupSelectionOutput) SetSelectionId(v string) *GetBackupSelectionOutput {
  6131. s.SelectionId = &v
  6132. return s
  6133. }
  6134. type GetBackupVaultAccessPolicyInput struct {
  6135. _ struct{} `type:"structure"`
  6136. // The name of a logical container where backups are stored. Backup vaults are
  6137. // identified by names that are unique to the account used to create them and
  6138. // the AWS Region where they are created. They consist of lowercase letters,
  6139. // numbers, and hyphens.
  6140. //
  6141. // BackupVaultName is a required field
  6142. BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
  6143. }
  6144. // String returns the string representation
  6145. func (s GetBackupVaultAccessPolicyInput) String() string {
  6146. return awsutil.Prettify(s)
  6147. }
  6148. // GoString returns the string representation
  6149. func (s GetBackupVaultAccessPolicyInput) GoString() string {
  6150. return s.String()
  6151. }
  6152. // Validate inspects the fields of the type to determine if they are valid.
  6153. func (s *GetBackupVaultAccessPolicyInput) Validate() error {
  6154. invalidParams := request.ErrInvalidParams{Context: "GetBackupVaultAccessPolicyInput"}
  6155. if s.BackupVaultName == nil {
  6156. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  6157. }
  6158. if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
  6159. invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
  6160. }
  6161. if invalidParams.Len() > 0 {
  6162. return invalidParams
  6163. }
  6164. return nil
  6165. }
  6166. // SetBackupVaultName sets the BackupVaultName field's value.
  6167. func (s *GetBackupVaultAccessPolicyInput) SetBackupVaultName(v string) *GetBackupVaultAccessPolicyInput {
  6168. s.BackupVaultName = &v
  6169. return s
  6170. }
  6171. type GetBackupVaultAccessPolicyOutput struct {
  6172. _ struct{} `type:"structure"`
  6173. // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for
  6174. // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
  6175. BackupVaultArn *string `type:"string"`
  6176. // The name of a logical container where backups are stored. Backup vaults are
  6177. // identified by names that are unique to the account used to create them and
  6178. // the Region where they are created. They consist of lowercase letters, numbers,
  6179. // and hyphens.
  6180. BackupVaultName *string `type:"string"`
  6181. // The backup vault access policy document in JSON format.
  6182. Policy *string `type:"string"`
  6183. }
  6184. // String returns the string representation
  6185. func (s GetBackupVaultAccessPolicyOutput) String() string {
  6186. return awsutil.Prettify(s)
  6187. }
  6188. // GoString returns the string representation
  6189. func (s GetBackupVaultAccessPolicyOutput) GoString() string {
  6190. return s.String()
  6191. }
  6192. // SetBackupVaultArn sets the BackupVaultArn field's value.
  6193. func (s *GetBackupVaultAccessPolicyOutput) SetBackupVaultArn(v string) *GetBackupVaultAccessPolicyOutput {
  6194. s.BackupVaultArn = &v
  6195. return s
  6196. }
  6197. // SetBackupVaultName sets the BackupVaultName field's value.
  6198. func (s *GetBackupVaultAccessPolicyOutput) SetBackupVaultName(v string) *GetBackupVaultAccessPolicyOutput {
  6199. s.BackupVaultName = &v
  6200. return s
  6201. }
  6202. // SetPolicy sets the Policy field's value.
  6203. func (s *GetBackupVaultAccessPolicyOutput) SetPolicy(v string) *GetBackupVaultAccessPolicyOutput {
  6204. s.Policy = &v
  6205. return s
  6206. }
  6207. type GetBackupVaultNotificationsInput struct {
  6208. _ struct{} `type:"structure"`
  6209. // The name of a logical container where backups are stored. Backup vaults are
  6210. // identified by names that are unique to the account used to create them and
  6211. // the AWS Region where they are created. They consist of lowercase letters,
  6212. // numbers, and hyphens.
  6213. //
  6214. // BackupVaultName is a required field
  6215. BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
  6216. }
  6217. // String returns the string representation
  6218. func (s GetBackupVaultNotificationsInput) String() string {
  6219. return awsutil.Prettify(s)
  6220. }
  6221. // GoString returns the string representation
  6222. func (s GetBackupVaultNotificationsInput) GoString() string {
  6223. return s.String()
  6224. }
  6225. // Validate inspects the fields of the type to determine if they are valid.
  6226. func (s *GetBackupVaultNotificationsInput) Validate() error {
  6227. invalidParams := request.ErrInvalidParams{Context: "GetBackupVaultNotificationsInput"}
  6228. if s.BackupVaultName == nil {
  6229. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  6230. }
  6231. if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
  6232. invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
  6233. }
  6234. if invalidParams.Len() > 0 {
  6235. return invalidParams
  6236. }
  6237. return nil
  6238. }
  6239. // SetBackupVaultName sets the BackupVaultName field's value.
  6240. func (s *GetBackupVaultNotificationsInput) SetBackupVaultName(v string) *GetBackupVaultNotificationsInput {
  6241. s.BackupVaultName = &v
  6242. return s
  6243. }
  6244. type GetBackupVaultNotificationsOutput struct {
  6245. _ struct{} `type:"structure"`
  6246. // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for
  6247. // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
  6248. BackupVaultArn *string `type:"string"`
  6249. // An array of events that indicate the status of jobs to back up resources
  6250. // to the backup vault.
  6251. BackupVaultEvents []*string `type:"list"`
  6252. // The name of a logical container where backups are stored. Backup vaults are
  6253. // identified by names that are unique to the account used to create them and
  6254. // the Region where they are created. They consist of lowercase letters, numbers,
  6255. // and hyphens.
  6256. BackupVaultName *string `type:"string"`
  6257. // An ARN that uniquely identifies an Amazon Simple Notification Service (Amazon
  6258. // SNS) topic; for example, arn:aws:sns:us-west-2:111122223333:MyTopic.
  6259. SNSTopicArn *string `type:"string"`
  6260. }
  6261. // String returns the string representation
  6262. func (s GetBackupVaultNotificationsOutput) String() string {
  6263. return awsutil.Prettify(s)
  6264. }
  6265. // GoString returns the string representation
  6266. func (s GetBackupVaultNotificationsOutput) GoString() string {
  6267. return s.String()
  6268. }
  6269. // SetBackupVaultArn sets the BackupVaultArn field's value.
  6270. func (s *GetBackupVaultNotificationsOutput) SetBackupVaultArn(v string) *GetBackupVaultNotificationsOutput {
  6271. s.BackupVaultArn = &v
  6272. return s
  6273. }
  6274. // SetBackupVaultEvents sets the BackupVaultEvents field's value.
  6275. func (s *GetBackupVaultNotificationsOutput) SetBackupVaultEvents(v []*string) *GetBackupVaultNotificationsOutput {
  6276. s.BackupVaultEvents = v
  6277. return s
  6278. }
  6279. // SetBackupVaultName sets the BackupVaultName field's value.
  6280. func (s *GetBackupVaultNotificationsOutput) SetBackupVaultName(v string) *GetBackupVaultNotificationsOutput {
  6281. s.BackupVaultName = &v
  6282. return s
  6283. }
  6284. // SetSNSTopicArn sets the SNSTopicArn field's value.
  6285. func (s *GetBackupVaultNotificationsOutput) SetSNSTopicArn(v string) *GetBackupVaultNotificationsOutput {
  6286. s.SNSTopicArn = &v
  6287. return s
  6288. }
  6289. type GetRecoveryPointRestoreMetadataInput struct {
  6290. _ struct{} `type:"structure"`
  6291. // The name of a logical container where backups are stored. Backup vaults are
  6292. // identified by names that are unique to the account used to create them and
  6293. // the AWS Region where they are created. They consist of lowercase letters,
  6294. // numbers, and hyphens.
  6295. //
  6296. // BackupVaultName is a required field
  6297. BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
  6298. // An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
  6299. // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  6300. //
  6301. // RecoveryPointArn is a required field
  6302. RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"`
  6303. }
  6304. // String returns the string representation
  6305. func (s GetRecoveryPointRestoreMetadataInput) String() string {
  6306. return awsutil.Prettify(s)
  6307. }
  6308. // GoString returns the string representation
  6309. func (s GetRecoveryPointRestoreMetadataInput) GoString() string {
  6310. return s.String()
  6311. }
  6312. // Validate inspects the fields of the type to determine if they are valid.
  6313. func (s *GetRecoveryPointRestoreMetadataInput) Validate() error {
  6314. invalidParams := request.ErrInvalidParams{Context: "GetRecoveryPointRestoreMetadataInput"}
  6315. if s.BackupVaultName == nil {
  6316. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  6317. }
  6318. if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
  6319. invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
  6320. }
  6321. if s.RecoveryPointArn == nil {
  6322. invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn"))
  6323. }
  6324. if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 {
  6325. invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1))
  6326. }
  6327. if invalidParams.Len() > 0 {
  6328. return invalidParams
  6329. }
  6330. return nil
  6331. }
  6332. // SetBackupVaultName sets the BackupVaultName field's value.
  6333. func (s *GetRecoveryPointRestoreMetadataInput) SetBackupVaultName(v string) *GetRecoveryPointRestoreMetadataInput {
  6334. s.BackupVaultName = &v
  6335. return s
  6336. }
  6337. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  6338. func (s *GetRecoveryPointRestoreMetadataInput) SetRecoveryPointArn(v string) *GetRecoveryPointRestoreMetadataInput {
  6339. s.RecoveryPointArn = &v
  6340. return s
  6341. }
  6342. type GetRecoveryPointRestoreMetadataOutput struct {
  6343. _ struct{} `type:"structure"`
  6344. // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
  6345. BackupVaultArn *string `type:"string"`
  6346. // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  6347. RecoveryPointArn *string `type:"string"`
  6348. // A set of metadata key-value pairs that lists the metadata key-value pairs
  6349. // that are required to restore the recovery point.
  6350. RestoreMetadata map[string]*string `type:"map"`
  6351. }
  6352. // String returns the string representation
  6353. func (s GetRecoveryPointRestoreMetadataOutput) String() string {
  6354. return awsutil.Prettify(s)
  6355. }
  6356. // GoString returns the string representation
  6357. func (s GetRecoveryPointRestoreMetadataOutput) GoString() string {
  6358. return s.String()
  6359. }
  6360. // SetBackupVaultArn sets the BackupVaultArn field's value.
  6361. func (s *GetRecoveryPointRestoreMetadataOutput) SetBackupVaultArn(v string) *GetRecoveryPointRestoreMetadataOutput {
  6362. s.BackupVaultArn = &v
  6363. return s
  6364. }
  6365. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  6366. func (s *GetRecoveryPointRestoreMetadataOutput) SetRecoveryPointArn(v string) *GetRecoveryPointRestoreMetadataOutput {
  6367. s.RecoveryPointArn = &v
  6368. return s
  6369. }
  6370. // SetRestoreMetadata sets the RestoreMetadata field's value.
  6371. func (s *GetRecoveryPointRestoreMetadataOutput) SetRestoreMetadata(v map[string]*string) *GetRecoveryPointRestoreMetadataOutput {
  6372. s.RestoreMetadata = v
  6373. return s
  6374. }
  6375. type GetSupportedResourceTypesInput struct {
  6376. _ struct{} `type:"structure"`
  6377. }
  6378. // String returns the string representation
  6379. func (s GetSupportedResourceTypesInput) String() string {
  6380. return awsutil.Prettify(s)
  6381. }
  6382. // GoString returns the string representation
  6383. func (s GetSupportedResourceTypesInput) GoString() string {
  6384. return s.String()
  6385. }
  6386. type GetSupportedResourceTypesOutput struct {
  6387. _ struct{} `type:"structure"`
  6388. // Contains a string with the supported AWS resource types:
  6389. //
  6390. // * EBS for Amazon Elastic Block Store
  6391. //
  6392. // * SGW for AWS Storage Gateway
  6393. //
  6394. // * RDS for Amazon Relational Database Service
  6395. //
  6396. // * DDB for Amazon DynamoDB
  6397. //
  6398. // * EFS for Amazon Elastic File System
  6399. ResourceTypes []*string `type:"list"`
  6400. }
  6401. // String returns the string representation
  6402. func (s GetSupportedResourceTypesOutput) String() string {
  6403. return awsutil.Prettify(s)
  6404. }
  6405. // GoString returns the string representation
  6406. func (s GetSupportedResourceTypesOutput) GoString() string {
  6407. return s.String()
  6408. }
  6409. // SetResourceTypes sets the ResourceTypes field's value.
  6410. func (s *GetSupportedResourceTypesOutput) SetResourceTypes(v []*string) *GetSupportedResourceTypesOutput {
  6411. s.ResourceTypes = v
  6412. return s
  6413. }
  6414. // Contains detailed information about a backup job.
  6415. type Job struct {
  6416. _ struct{} `type:"structure"`
  6417. // Uniquely identifies a request to AWS Backup to back up a resource.
  6418. BackupJobId *string `type:"string"`
  6419. // The size, in bytes, of a backup.
  6420. BackupSizeInBytes *int64 `type:"long"`
  6421. // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for
  6422. // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
  6423. BackupVaultArn *string `type:"string"`
  6424. // The name of a logical container where backups are stored. Backup vaults are
  6425. // identified by names that are unique to the account used to create them and
  6426. // the AWS Region where they are created. They consist of lowercase letters,
  6427. // numbers, and hyphens.
  6428. BackupVaultName *string `type:"string"`
  6429. // The size in bytes transferred to a backup vault at the time that the job
  6430. // status was queried.
  6431. BytesTransferred *int64 `type:"long"`
  6432. // The date and time a job to create a backup job is completed, in Unix format
  6433. // and Coordinated Universal Time (UTC). The value of CompletionDate is accurate
  6434. // to milliseconds. For example, the value 1516925490.087 represents Friday,
  6435. // January 26, 2018 12:11:30.087 AM.
  6436. CompletionDate *time.Time `type:"timestamp"`
  6437. // Contains identifying information about the creation of a backup job, including
  6438. // the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId of the
  6439. // backup plan used to create it.
  6440. CreatedBy *RecoveryPointCreator `type:"structure"`
  6441. // The date and time a backup job is created, in Unix format and Coordinated
  6442. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  6443. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  6444. // 12:11:30.087 AM.
  6445. CreationDate *time.Time `type:"timestamp"`
  6446. // The date and time a job to back up resources is expected to be completed,
  6447. // in Unix format and Coordinated Universal Time (UTC). The value of ExpectedCompletionDate
  6448. // is accurate to milliseconds. For example, the value 1516925490.087 represents
  6449. // Friday, January 26, 2018 12:11:30.087 AM.
  6450. ExpectedCompletionDate *time.Time `type:"timestamp"`
  6451. // Specifies the IAM role ARN used to create the target recovery point; for
  6452. // example, arn:aws:iam::123456789012:role/S3Access.
  6453. IamRoleArn *string `type:"string"`
  6454. // Contains an estimated percentage complete of a job at the time the job status
  6455. // was queried.
  6456. PercentDone *string `type:"string"`
  6457. // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  6458. RecoveryPointArn *string `type:"string"`
  6459. // An ARN that uniquely identifies a resource. The format of the ARN depends
  6460. // on the resource type.
  6461. ResourceArn *string `type:"string"`
  6462. // The type of AWS resource to be backed-up; for example, an Amazon Elastic
  6463. // Block Store (Amazon EBS) volume or an Amazon Relational Database Service
  6464. // (Amazon RDS) database.
  6465. ResourceType *string `type:"string"`
  6466. // Specifies the time in Unix format and Coordinated Universal Time (UTC) when
  6467. // a backup job must be started before it is canceled. The value is calculated
  6468. // by adding the start window to the scheduled time. So if the scheduled time
  6469. // were 6:00 PM and the start window is 2 hours, the StartBy time would be 8:00
  6470. // PM on the date specified. The value of StartBy is accurate to milliseconds.
  6471. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  6472. // 12:11:30.087 AM.
  6473. StartBy *time.Time `type:"timestamp"`
  6474. // The current state of a resource recovery point.
  6475. State *string `type:"string" enum:"JobState"`
  6476. // A detailed message explaining the status of the job to back up a resource.
  6477. StatusMessage *string `type:"string"`
  6478. }
  6479. // String returns the string representation
  6480. func (s Job) String() string {
  6481. return awsutil.Prettify(s)
  6482. }
  6483. // GoString returns the string representation
  6484. func (s Job) GoString() string {
  6485. return s.String()
  6486. }
  6487. // SetBackupJobId sets the BackupJobId field's value.
  6488. func (s *Job) SetBackupJobId(v string) *Job {
  6489. s.BackupJobId = &v
  6490. return s
  6491. }
  6492. // SetBackupSizeInBytes sets the BackupSizeInBytes field's value.
  6493. func (s *Job) SetBackupSizeInBytes(v int64) *Job {
  6494. s.BackupSizeInBytes = &v
  6495. return s
  6496. }
  6497. // SetBackupVaultArn sets the BackupVaultArn field's value.
  6498. func (s *Job) SetBackupVaultArn(v string) *Job {
  6499. s.BackupVaultArn = &v
  6500. return s
  6501. }
  6502. // SetBackupVaultName sets the BackupVaultName field's value.
  6503. func (s *Job) SetBackupVaultName(v string) *Job {
  6504. s.BackupVaultName = &v
  6505. return s
  6506. }
  6507. // SetBytesTransferred sets the BytesTransferred field's value.
  6508. func (s *Job) SetBytesTransferred(v int64) *Job {
  6509. s.BytesTransferred = &v
  6510. return s
  6511. }
  6512. // SetCompletionDate sets the CompletionDate field's value.
  6513. func (s *Job) SetCompletionDate(v time.Time) *Job {
  6514. s.CompletionDate = &v
  6515. return s
  6516. }
  6517. // SetCreatedBy sets the CreatedBy field's value.
  6518. func (s *Job) SetCreatedBy(v *RecoveryPointCreator) *Job {
  6519. s.CreatedBy = v
  6520. return s
  6521. }
  6522. // SetCreationDate sets the CreationDate field's value.
  6523. func (s *Job) SetCreationDate(v time.Time) *Job {
  6524. s.CreationDate = &v
  6525. return s
  6526. }
  6527. // SetExpectedCompletionDate sets the ExpectedCompletionDate field's value.
  6528. func (s *Job) SetExpectedCompletionDate(v time.Time) *Job {
  6529. s.ExpectedCompletionDate = &v
  6530. return s
  6531. }
  6532. // SetIamRoleArn sets the IamRoleArn field's value.
  6533. func (s *Job) SetIamRoleArn(v string) *Job {
  6534. s.IamRoleArn = &v
  6535. return s
  6536. }
  6537. // SetPercentDone sets the PercentDone field's value.
  6538. func (s *Job) SetPercentDone(v string) *Job {
  6539. s.PercentDone = &v
  6540. return s
  6541. }
  6542. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  6543. func (s *Job) SetRecoveryPointArn(v string) *Job {
  6544. s.RecoveryPointArn = &v
  6545. return s
  6546. }
  6547. // SetResourceArn sets the ResourceArn field's value.
  6548. func (s *Job) SetResourceArn(v string) *Job {
  6549. s.ResourceArn = &v
  6550. return s
  6551. }
  6552. // SetResourceType sets the ResourceType field's value.
  6553. func (s *Job) SetResourceType(v string) *Job {
  6554. s.ResourceType = &v
  6555. return s
  6556. }
  6557. // SetStartBy sets the StartBy field's value.
  6558. func (s *Job) SetStartBy(v time.Time) *Job {
  6559. s.StartBy = &v
  6560. return s
  6561. }
  6562. // SetState sets the State field's value.
  6563. func (s *Job) SetState(v string) *Job {
  6564. s.State = &v
  6565. return s
  6566. }
  6567. // SetStatusMessage sets the StatusMessage field's value.
  6568. func (s *Job) SetStatusMessage(v string) *Job {
  6569. s.StatusMessage = &v
  6570. return s
  6571. }
  6572. // Contains an array of Transition objects specifying how long in days before
  6573. // a recovery point transitions to cold storage or is deleted.
  6574. type Lifecycle struct {
  6575. _ struct{} `type:"structure"`
  6576. // Specifies the number of days after creation that a recovery point is deleted.
  6577. // Must be greater than MoveToColdStorageAfterDays.
  6578. DeleteAfterDays *int64 `type:"long"`
  6579. // Specifies the number of days after creation that a recovery point is moved
  6580. // to cold storage.
  6581. MoveToColdStorageAfterDays *int64 `type:"long"`
  6582. }
  6583. // String returns the string representation
  6584. func (s Lifecycle) String() string {
  6585. return awsutil.Prettify(s)
  6586. }
  6587. // GoString returns the string representation
  6588. func (s Lifecycle) GoString() string {
  6589. return s.String()
  6590. }
  6591. // SetDeleteAfterDays sets the DeleteAfterDays field's value.
  6592. func (s *Lifecycle) SetDeleteAfterDays(v int64) *Lifecycle {
  6593. s.DeleteAfterDays = &v
  6594. return s
  6595. }
  6596. // SetMoveToColdStorageAfterDays sets the MoveToColdStorageAfterDays field's value.
  6597. func (s *Lifecycle) SetMoveToColdStorageAfterDays(v int64) *Lifecycle {
  6598. s.MoveToColdStorageAfterDays = &v
  6599. return s
  6600. }
  6601. type ListBackupJobsInput struct {
  6602. _ struct{} `type:"structure"`
  6603. // Returns only backup jobs that will be stored in the specified backup vault.
  6604. // Backup vaults are identified by names that are unique to the account used
  6605. // to create them and the AWS Region where they are created. They consist of
  6606. // lowercase letters, numbers, and hyphens.
  6607. ByBackupVaultName *string `location:"querystring" locationName:"backupVaultName" type:"string"`
  6608. // Returns only backup jobs that were created after the specified date.
  6609. ByCreatedAfter *time.Time `location:"querystring" locationName:"createdAfter" type:"timestamp"`
  6610. // Returns only backup jobs that were created before the specified date.
  6611. ByCreatedBefore *time.Time `location:"querystring" locationName:"createdBefore" type:"timestamp"`
  6612. // Returns only backup jobs that match the specified resource Amazon Resource
  6613. // Name (ARN).
  6614. ByResourceArn *string `location:"querystring" locationName:"resourceArn" type:"string"`
  6615. // Returns only backup jobs for the specified resources:
  6616. //
  6617. // * EBS for Amazon Elastic Block Store
  6618. //
  6619. // * SGW for AWS Storage Gateway
  6620. //
  6621. // * RDS for Amazon Relational Database Service
  6622. //
  6623. // * DDB for Amazon DynamoDB
  6624. //
  6625. // * EFS for Amazon Elastic File System
  6626. ByResourceType *string `location:"querystring" locationName:"resourceType" type:"string"`
  6627. // Returns only backup jobs that are in the specified state.
  6628. ByState *string `location:"querystring" locationName:"state" type:"string" enum:"JobState"`
  6629. // The maximum number of items to be returned.
  6630. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  6631. // The next item following a partial list of returned items. For example, if
  6632. // a request is made to return maxResults number of items, NextToken allows
  6633. // you to return more items in your list starting at the location pointed to
  6634. // by the next token.
  6635. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  6636. }
  6637. // String returns the string representation
  6638. func (s ListBackupJobsInput) String() string {
  6639. return awsutil.Prettify(s)
  6640. }
  6641. // GoString returns the string representation
  6642. func (s ListBackupJobsInput) GoString() string {
  6643. return s.String()
  6644. }
  6645. // Validate inspects the fields of the type to determine if they are valid.
  6646. func (s *ListBackupJobsInput) Validate() error {
  6647. invalidParams := request.ErrInvalidParams{Context: "ListBackupJobsInput"}
  6648. if s.MaxResults != nil && *s.MaxResults < 1 {
  6649. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  6650. }
  6651. if invalidParams.Len() > 0 {
  6652. return invalidParams
  6653. }
  6654. return nil
  6655. }
  6656. // SetByBackupVaultName sets the ByBackupVaultName field's value.
  6657. func (s *ListBackupJobsInput) SetByBackupVaultName(v string) *ListBackupJobsInput {
  6658. s.ByBackupVaultName = &v
  6659. return s
  6660. }
  6661. // SetByCreatedAfter sets the ByCreatedAfter field's value.
  6662. func (s *ListBackupJobsInput) SetByCreatedAfter(v time.Time) *ListBackupJobsInput {
  6663. s.ByCreatedAfter = &v
  6664. return s
  6665. }
  6666. // SetByCreatedBefore sets the ByCreatedBefore field's value.
  6667. func (s *ListBackupJobsInput) SetByCreatedBefore(v time.Time) *ListBackupJobsInput {
  6668. s.ByCreatedBefore = &v
  6669. return s
  6670. }
  6671. // SetByResourceArn sets the ByResourceArn field's value.
  6672. func (s *ListBackupJobsInput) SetByResourceArn(v string) *ListBackupJobsInput {
  6673. s.ByResourceArn = &v
  6674. return s
  6675. }
  6676. // SetByResourceType sets the ByResourceType field's value.
  6677. func (s *ListBackupJobsInput) SetByResourceType(v string) *ListBackupJobsInput {
  6678. s.ByResourceType = &v
  6679. return s
  6680. }
  6681. // SetByState sets the ByState field's value.
  6682. func (s *ListBackupJobsInput) SetByState(v string) *ListBackupJobsInput {
  6683. s.ByState = &v
  6684. return s
  6685. }
  6686. // SetMaxResults sets the MaxResults field's value.
  6687. func (s *ListBackupJobsInput) SetMaxResults(v int64) *ListBackupJobsInput {
  6688. s.MaxResults = &v
  6689. return s
  6690. }
  6691. // SetNextToken sets the NextToken field's value.
  6692. func (s *ListBackupJobsInput) SetNextToken(v string) *ListBackupJobsInput {
  6693. s.NextToken = &v
  6694. return s
  6695. }
  6696. type ListBackupJobsOutput struct {
  6697. _ struct{} `type:"structure"`
  6698. // An array of structures containing metadata about your backup jobs returned
  6699. // in JSON format.
  6700. BackupJobs []*Job `type:"list"`
  6701. // The next item following a partial list of returned items. For example, if
  6702. // a request is made to return maxResults number of items, NextToken allows
  6703. // you to return more items in your list starting at the location pointed to
  6704. // by the next token.
  6705. NextToken *string `type:"string"`
  6706. }
  6707. // String returns the string representation
  6708. func (s ListBackupJobsOutput) String() string {
  6709. return awsutil.Prettify(s)
  6710. }
  6711. // GoString returns the string representation
  6712. func (s ListBackupJobsOutput) GoString() string {
  6713. return s.String()
  6714. }
  6715. // SetBackupJobs sets the BackupJobs field's value.
  6716. func (s *ListBackupJobsOutput) SetBackupJobs(v []*Job) *ListBackupJobsOutput {
  6717. s.BackupJobs = v
  6718. return s
  6719. }
  6720. // SetNextToken sets the NextToken field's value.
  6721. func (s *ListBackupJobsOutput) SetNextToken(v string) *ListBackupJobsOutput {
  6722. s.NextToken = &v
  6723. return s
  6724. }
  6725. type ListBackupPlanTemplatesInput struct {
  6726. _ struct{} `type:"structure"`
  6727. // The maximum number of items to be returned.
  6728. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  6729. // The next item following a partial list of returned items. For example, if
  6730. // a request is made to return maxResults number of items, NextToken allows
  6731. // you to return more items in your list starting at the location pointed to
  6732. // by the next token.
  6733. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  6734. }
  6735. // String returns the string representation
  6736. func (s ListBackupPlanTemplatesInput) String() string {
  6737. return awsutil.Prettify(s)
  6738. }
  6739. // GoString returns the string representation
  6740. func (s ListBackupPlanTemplatesInput) GoString() string {
  6741. return s.String()
  6742. }
  6743. // Validate inspects the fields of the type to determine if they are valid.
  6744. func (s *ListBackupPlanTemplatesInput) Validate() error {
  6745. invalidParams := request.ErrInvalidParams{Context: "ListBackupPlanTemplatesInput"}
  6746. if s.MaxResults != nil && *s.MaxResults < 1 {
  6747. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  6748. }
  6749. if invalidParams.Len() > 0 {
  6750. return invalidParams
  6751. }
  6752. return nil
  6753. }
  6754. // SetMaxResults sets the MaxResults field's value.
  6755. func (s *ListBackupPlanTemplatesInput) SetMaxResults(v int64) *ListBackupPlanTemplatesInput {
  6756. s.MaxResults = &v
  6757. return s
  6758. }
  6759. // SetNextToken sets the NextToken field's value.
  6760. func (s *ListBackupPlanTemplatesInput) SetNextToken(v string) *ListBackupPlanTemplatesInput {
  6761. s.NextToken = &v
  6762. return s
  6763. }
  6764. type ListBackupPlanTemplatesOutput struct {
  6765. _ struct{} `type:"structure"`
  6766. // An array of template list items containing metadata about your saved templates.
  6767. BackupPlanTemplatesList []*PlanTemplatesListMember `type:"list"`
  6768. // The next item following a partial list of returned items. For example, if
  6769. // a request is made to return maxResults number of items, NextToken allows
  6770. // you to return more items in your list starting at the location pointed to
  6771. // by the next token.
  6772. NextToken *string `type:"string"`
  6773. }
  6774. // String returns the string representation
  6775. func (s ListBackupPlanTemplatesOutput) String() string {
  6776. return awsutil.Prettify(s)
  6777. }
  6778. // GoString returns the string representation
  6779. func (s ListBackupPlanTemplatesOutput) GoString() string {
  6780. return s.String()
  6781. }
  6782. // SetBackupPlanTemplatesList sets the BackupPlanTemplatesList field's value.
  6783. func (s *ListBackupPlanTemplatesOutput) SetBackupPlanTemplatesList(v []*PlanTemplatesListMember) *ListBackupPlanTemplatesOutput {
  6784. s.BackupPlanTemplatesList = v
  6785. return s
  6786. }
  6787. // SetNextToken sets the NextToken field's value.
  6788. func (s *ListBackupPlanTemplatesOutput) SetNextToken(v string) *ListBackupPlanTemplatesOutput {
  6789. s.NextToken = &v
  6790. return s
  6791. }
  6792. type ListBackupPlanVersionsInput struct {
  6793. _ struct{} `type:"structure"`
  6794. // Uniquely identifies a backup plan.
  6795. //
  6796. // BackupPlanId is a required field
  6797. BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
  6798. // The maximum number of items to be returned.
  6799. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  6800. // The next item following a partial list of returned items. For example, if
  6801. // a request is made to return maxResults number of items, NextToken allows
  6802. // you to return more items in your list starting at the location pointed to
  6803. // by the next token.
  6804. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  6805. }
  6806. // String returns the string representation
  6807. func (s ListBackupPlanVersionsInput) String() string {
  6808. return awsutil.Prettify(s)
  6809. }
  6810. // GoString returns the string representation
  6811. func (s ListBackupPlanVersionsInput) GoString() string {
  6812. return s.String()
  6813. }
  6814. // Validate inspects the fields of the type to determine if they are valid.
  6815. func (s *ListBackupPlanVersionsInput) Validate() error {
  6816. invalidParams := request.ErrInvalidParams{Context: "ListBackupPlanVersionsInput"}
  6817. if s.BackupPlanId == nil {
  6818. invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
  6819. }
  6820. if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
  6821. invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
  6822. }
  6823. if s.MaxResults != nil && *s.MaxResults < 1 {
  6824. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  6825. }
  6826. if invalidParams.Len() > 0 {
  6827. return invalidParams
  6828. }
  6829. return nil
  6830. }
  6831. // SetBackupPlanId sets the BackupPlanId field's value.
  6832. func (s *ListBackupPlanVersionsInput) SetBackupPlanId(v string) *ListBackupPlanVersionsInput {
  6833. s.BackupPlanId = &v
  6834. return s
  6835. }
  6836. // SetMaxResults sets the MaxResults field's value.
  6837. func (s *ListBackupPlanVersionsInput) SetMaxResults(v int64) *ListBackupPlanVersionsInput {
  6838. s.MaxResults = &v
  6839. return s
  6840. }
  6841. // SetNextToken sets the NextToken field's value.
  6842. func (s *ListBackupPlanVersionsInput) SetNextToken(v string) *ListBackupPlanVersionsInput {
  6843. s.NextToken = &v
  6844. return s
  6845. }
  6846. type ListBackupPlanVersionsOutput struct {
  6847. _ struct{} `type:"structure"`
  6848. // An array of version list items containing metadata about your backup plans.
  6849. BackupPlanVersionsList []*PlansListMember `type:"list"`
  6850. // The next item following a partial list of returned items. For example, if
  6851. // a request is made to return maxResults number of items, NextToken allows
  6852. // you to return more items in your list starting at the location pointed to
  6853. // by the next token.
  6854. NextToken *string `type:"string"`
  6855. }
  6856. // String returns the string representation
  6857. func (s ListBackupPlanVersionsOutput) String() string {
  6858. return awsutil.Prettify(s)
  6859. }
  6860. // GoString returns the string representation
  6861. func (s ListBackupPlanVersionsOutput) GoString() string {
  6862. return s.String()
  6863. }
  6864. // SetBackupPlanVersionsList sets the BackupPlanVersionsList field's value.
  6865. func (s *ListBackupPlanVersionsOutput) SetBackupPlanVersionsList(v []*PlansListMember) *ListBackupPlanVersionsOutput {
  6866. s.BackupPlanVersionsList = v
  6867. return s
  6868. }
  6869. // SetNextToken sets the NextToken field's value.
  6870. func (s *ListBackupPlanVersionsOutput) SetNextToken(v string) *ListBackupPlanVersionsOutput {
  6871. s.NextToken = &v
  6872. return s
  6873. }
  6874. type ListBackupPlansInput struct {
  6875. _ struct{} `type:"structure"`
  6876. // A Boolean value with a default value of FALSE that returns deleted backup
  6877. // plans when set to TRUE.
  6878. IncludeDeleted *bool `location:"querystring" locationName:"includeDeleted" type:"boolean"`
  6879. // The maximum number of items to be returned.
  6880. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  6881. // The next item following a partial list of returned items. For example, if
  6882. // a request is made to return maxResults number of items, NextToken allows
  6883. // you to return more items in your list starting at the location pointed to
  6884. // by the next token.
  6885. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  6886. }
  6887. // String returns the string representation
  6888. func (s ListBackupPlansInput) String() string {
  6889. return awsutil.Prettify(s)
  6890. }
  6891. // GoString returns the string representation
  6892. func (s ListBackupPlansInput) GoString() string {
  6893. return s.String()
  6894. }
  6895. // Validate inspects the fields of the type to determine if they are valid.
  6896. func (s *ListBackupPlansInput) Validate() error {
  6897. invalidParams := request.ErrInvalidParams{Context: "ListBackupPlansInput"}
  6898. if s.MaxResults != nil && *s.MaxResults < 1 {
  6899. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  6900. }
  6901. if invalidParams.Len() > 0 {
  6902. return invalidParams
  6903. }
  6904. return nil
  6905. }
  6906. // SetIncludeDeleted sets the IncludeDeleted field's value.
  6907. func (s *ListBackupPlansInput) SetIncludeDeleted(v bool) *ListBackupPlansInput {
  6908. s.IncludeDeleted = &v
  6909. return s
  6910. }
  6911. // SetMaxResults sets the MaxResults field's value.
  6912. func (s *ListBackupPlansInput) SetMaxResults(v int64) *ListBackupPlansInput {
  6913. s.MaxResults = &v
  6914. return s
  6915. }
  6916. // SetNextToken sets the NextToken field's value.
  6917. func (s *ListBackupPlansInput) SetNextToken(v string) *ListBackupPlansInput {
  6918. s.NextToken = &v
  6919. return s
  6920. }
  6921. type ListBackupPlansOutput struct {
  6922. _ struct{} `type:"structure"`
  6923. // An array of backup plan list items containing metadata about your saved backup
  6924. // plans.
  6925. BackupPlansList []*PlansListMember `type:"list"`
  6926. // The next item following a partial list of returned items. For example, if
  6927. // a request is made to return maxResults number of items, NextToken allows
  6928. // you to return more items in your list starting at the location pointed to
  6929. // by the next token.
  6930. NextToken *string `type:"string"`
  6931. }
  6932. // String returns the string representation
  6933. func (s ListBackupPlansOutput) String() string {
  6934. return awsutil.Prettify(s)
  6935. }
  6936. // GoString returns the string representation
  6937. func (s ListBackupPlansOutput) GoString() string {
  6938. return s.String()
  6939. }
  6940. // SetBackupPlansList sets the BackupPlansList field's value.
  6941. func (s *ListBackupPlansOutput) SetBackupPlansList(v []*PlansListMember) *ListBackupPlansOutput {
  6942. s.BackupPlansList = v
  6943. return s
  6944. }
  6945. // SetNextToken sets the NextToken field's value.
  6946. func (s *ListBackupPlansOutput) SetNextToken(v string) *ListBackupPlansOutput {
  6947. s.NextToken = &v
  6948. return s
  6949. }
  6950. type ListBackupSelectionsInput struct {
  6951. _ struct{} `type:"structure"`
  6952. // Uniquely identifies a backup plan.
  6953. //
  6954. // BackupPlanId is a required field
  6955. BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
  6956. // The maximum number of items to be returned.
  6957. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  6958. // The next item following a partial list of returned items. For example, if
  6959. // a request is made to return maxResults number of items, NextToken allows
  6960. // you to return more items in your list starting at the location pointed to
  6961. // by the next token.
  6962. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  6963. }
  6964. // String returns the string representation
  6965. func (s ListBackupSelectionsInput) String() string {
  6966. return awsutil.Prettify(s)
  6967. }
  6968. // GoString returns the string representation
  6969. func (s ListBackupSelectionsInput) GoString() string {
  6970. return s.String()
  6971. }
  6972. // Validate inspects the fields of the type to determine if they are valid.
  6973. func (s *ListBackupSelectionsInput) Validate() error {
  6974. invalidParams := request.ErrInvalidParams{Context: "ListBackupSelectionsInput"}
  6975. if s.BackupPlanId == nil {
  6976. invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
  6977. }
  6978. if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
  6979. invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
  6980. }
  6981. if s.MaxResults != nil && *s.MaxResults < 1 {
  6982. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  6983. }
  6984. if invalidParams.Len() > 0 {
  6985. return invalidParams
  6986. }
  6987. return nil
  6988. }
  6989. // SetBackupPlanId sets the BackupPlanId field's value.
  6990. func (s *ListBackupSelectionsInput) SetBackupPlanId(v string) *ListBackupSelectionsInput {
  6991. s.BackupPlanId = &v
  6992. return s
  6993. }
  6994. // SetMaxResults sets the MaxResults field's value.
  6995. func (s *ListBackupSelectionsInput) SetMaxResults(v int64) *ListBackupSelectionsInput {
  6996. s.MaxResults = &v
  6997. return s
  6998. }
  6999. // SetNextToken sets the NextToken field's value.
  7000. func (s *ListBackupSelectionsInput) SetNextToken(v string) *ListBackupSelectionsInput {
  7001. s.NextToken = &v
  7002. return s
  7003. }
  7004. type ListBackupSelectionsOutput struct {
  7005. _ struct{} `type:"structure"`
  7006. // An array of backup selection list items containing metadata about each resource
  7007. // in the list.
  7008. BackupSelectionsList []*SelectionsListMember `type:"list"`
  7009. // The next item following a partial list of returned items. For example, if
  7010. // a request is made to return maxResults number of items, NextToken allows
  7011. // you to return more items in your list starting at the location pointed to
  7012. // by the next token.
  7013. NextToken *string `type:"string"`
  7014. }
  7015. // String returns the string representation
  7016. func (s ListBackupSelectionsOutput) String() string {
  7017. return awsutil.Prettify(s)
  7018. }
  7019. // GoString returns the string representation
  7020. func (s ListBackupSelectionsOutput) GoString() string {
  7021. return s.String()
  7022. }
  7023. // SetBackupSelectionsList sets the BackupSelectionsList field's value.
  7024. func (s *ListBackupSelectionsOutput) SetBackupSelectionsList(v []*SelectionsListMember) *ListBackupSelectionsOutput {
  7025. s.BackupSelectionsList = v
  7026. return s
  7027. }
  7028. // SetNextToken sets the NextToken field's value.
  7029. func (s *ListBackupSelectionsOutput) SetNextToken(v string) *ListBackupSelectionsOutput {
  7030. s.NextToken = &v
  7031. return s
  7032. }
  7033. type ListBackupVaultsInput struct {
  7034. _ struct{} `type:"structure"`
  7035. // The maximum number of items to be returned.
  7036. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  7037. // The next item following a partial list of returned items. For example, if
  7038. // a request is made to return maxResults number of items, NextToken allows
  7039. // you to return more items in your list starting at the location pointed to
  7040. // by the next token.
  7041. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  7042. }
  7043. // String returns the string representation
  7044. func (s ListBackupVaultsInput) String() string {
  7045. return awsutil.Prettify(s)
  7046. }
  7047. // GoString returns the string representation
  7048. func (s ListBackupVaultsInput) GoString() string {
  7049. return s.String()
  7050. }
  7051. // Validate inspects the fields of the type to determine if they are valid.
  7052. func (s *ListBackupVaultsInput) Validate() error {
  7053. invalidParams := request.ErrInvalidParams{Context: "ListBackupVaultsInput"}
  7054. if s.MaxResults != nil && *s.MaxResults < 1 {
  7055. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  7056. }
  7057. if invalidParams.Len() > 0 {
  7058. return invalidParams
  7059. }
  7060. return nil
  7061. }
  7062. // SetMaxResults sets the MaxResults field's value.
  7063. func (s *ListBackupVaultsInput) SetMaxResults(v int64) *ListBackupVaultsInput {
  7064. s.MaxResults = &v
  7065. return s
  7066. }
  7067. // SetNextToken sets the NextToken field's value.
  7068. func (s *ListBackupVaultsInput) SetNextToken(v string) *ListBackupVaultsInput {
  7069. s.NextToken = &v
  7070. return s
  7071. }
  7072. type ListBackupVaultsOutput struct {
  7073. _ struct{} `type:"structure"`
  7074. // An array of backup vault list members containing vault metadata, including
  7075. // Amazon Resource Name (ARN), display name, creation date, number of saved
  7076. // recovery points, and encryption information if the resources saved in the
  7077. // backup vault are encrypted.
  7078. BackupVaultList []*VaultListMember `type:"list"`
  7079. // The next item following a partial list of returned items. For example, if
  7080. // a request is made to return maxResults number of items, NextToken allows
  7081. // you to return more items in your list starting at the location pointed to
  7082. // by the next token.
  7083. NextToken *string `type:"string"`
  7084. }
  7085. // String returns the string representation
  7086. func (s ListBackupVaultsOutput) String() string {
  7087. return awsutil.Prettify(s)
  7088. }
  7089. // GoString returns the string representation
  7090. func (s ListBackupVaultsOutput) GoString() string {
  7091. return s.String()
  7092. }
  7093. // SetBackupVaultList sets the BackupVaultList field's value.
  7094. func (s *ListBackupVaultsOutput) SetBackupVaultList(v []*VaultListMember) *ListBackupVaultsOutput {
  7095. s.BackupVaultList = v
  7096. return s
  7097. }
  7098. // SetNextToken sets the NextToken field's value.
  7099. func (s *ListBackupVaultsOutput) SetNextToken(v string) *ListBackupVaultsOutput {
  7100. s.NextToken = &v
  7101. return s
  7102. }
  7103. type ListProtectedResourcesInput struct {
  7104. _ struct{} `type:"structure"`
  7105. // The maximum number of items to be returned.
  7106. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  7107. // The next item following a partial list of returned items. For example, if
  7108. // a request is made to return maxResults number of items, NextToken allows
  7109. // you to return more items in your list starting at the location pointed to
  7110. // by the next token.
  7111. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  7112. }
  7113. // String returns the string representation
  7114. func (s ListProtectedResourcesInput) String() string {
  7115. return awsutil.Prettify(s)
  7116. }
  7117. // GoString returns the string representation
  7118. func (s ListProtectedResourcesInput) GoString() string {
  7119. return s.String()
  7120. }
  7121. // Validate inspects the fields of the type to determine if they are valid.
  7122. func (s *ListProtectedResourcesInput) Validate() error {
  7123. invalidParams := request.ErrInvalidParams{Context: "ListProtectedResourcesInput"}
  7124. if s.MaxResults != nil && *s.MaxResults < 1 {
  7125. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  7126. }
  7127. if invalidParams.Len() > 0 {
  7128. return invalidParams
  7129. }
  7130. return nil
  7131. }
  7132. // SetMaxResults sets the MaxResults field's value.
  7133. func (s *ListProtectedResourcesInput) SetMaxResults(v int64) *ListProtectedResourcesInput {
  7134. s.MaxResults = &v
  7135. return s
  7136. }
  7137. // SetNextToken sets the NextToken field's value.
  7138. func (s *ListProtectedResourcesInput) SetNextToken(v string) *ListProtectedResourcesInput {
  7139. s.NextToken = &v
  7140. return s
  7141. }
  7142. type ListProtectedResourcesOutput struct {
  7143. _ struct{} `type:"structure"`
  7144. // The next item following a partial list of returned items. For example, if
  7145. // a request is made to return maxResults number of items, NextToken allows
  7146. // you to return more items in your list starting at the location pointed to
  7147. // by the next token.
  7148. NextToken *string `type:"string"`
  7149. // An array of resources successfully backed up by AWS Backup including the
  7150. // time the resource was saved, an Amazon Resource Name (ARN) of the resource,
  7151. // and a resource type.
  7152. Results []*ProtectedResource `type:"list"`
  7153. }
  7154. // String returns the string representation
  7155. func (s ListProtectedResourcesOutput) String() string {
  7156. return awsutil.Prettify(s)
  7157. }
  7158. // GoString returns the string representation
  7159. func (s ListProtectedResourcesOutput) GoString() string {
  7160. return s.String()
  7161. }
  7162. // SetNextToken sets the NextToken field's value.
  7163. func (s *ListProtectedResourcesOutput) SetNextToken(v string) *ListProtectedResourcesOutput {
  7164. s.NextToken = &v
  7165. return s
  7166. }
  7167. // SetResults sets the Results field's value.
  7168. func (s *ListProtectedResourcesOutput) SetResults(v []*ProtectedResource) *ListProtectedResourcesOutput {
  7169. s.Results = v
  7170. return s
  7171. }
  7172. type ListRecoveryPointsByBackupVaultInput struct {
  7173. _ struct{} `type:"structure"`
  7174. // The name of a logical container where backups are stored. Backup vaults are
  7175. // identified by names that are unique to the account used to create them and
  7176. // the AWS Region where they are created. They consist of lowercase letters,
  7177. // numbers, and hyphens.
  7178. //
  7179. // BackupVaultName is a required field
  7180. BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
  7181. // Returns only recovery points that match the specified backup plan ID.
  7182. ByBackupPlanId *string `location:"querystring" locationName:"backupPlanId" type:"string"`
  7183. // Returns only recovery points that were created after the specified timestamp.
  7184. ByCreatedAfter *time.Time `location:"querystring" locationName:"createdAfter" type:"timestamp"`
  7185. // Returns only recovery points that were created before the specified timestamp.
  7186. ByCreatedBefore *time.Time `location:"querystring" locationName:"createdBefore" type:"timestamp"`
  7187. // Returns only recovery points that match the specified resource Amazon Resource
  7188. // Name (ARN).
  7189. ByResourceArn *string `location:"querystring" locationName:"resourceArn" type:"string"`
  7190. // Returns only recovery points that match the specified resource type.
  7191. ByResourceType *string `location:"querystring" locationName:"resourceType" type:"string"`
  7192. // The maximum number of items to be returned.
  7193. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  7194. // The next item following a partial list of returned items. For example, if
  7195. // a request is made to return maxResults number of items, NextToken allows
  7196. // you to return more items in your list starting at the location pointed to
  7197. // by the next token.
  7198. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  7199. }
  7200. // String returns the string representation
  7201. func (s ListRecoveryPointsByBackupVaultInput) String() string {
  7202. return awsutil.Prettify(s)
  7203. }
  7204. // GoString returns the string representation
  7205. func (s ListRecoveryPointsByBackupVaultInput) GoString() string {
  7206. return s.String()
  7207. }
  7208. // Validate inspects the fields of the type to determine if they are valid.
  7209. func (s *ListRecoveryPointsByBackupVaultInput) Validate() error {
  7210. invalidParams := request.ErrInvalidParams{Context: "ListRecoveryPointsByBackupVaultInput"}
  7211. if s.BackupVaultName == nil {
  7212. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  7213. }
  7214. if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
  7215. invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
  7216. }
  7217. if s.MaxResults != nil && *s.MaxResults < 1 {
  7218. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  7219. }
  7220. if invalidParams.Len() > 0 {
  7221. return invalidParams
  7222. }
  7223. return nil
  7224. }
  7225. // SetBackupVaultName sets the BackupVaultName field's value.
  7226. func (s *ListRecoveryPointsByBackupVaultInput) SetBackupVaultName(v string) *ListRecoveryPointsByBackupVaultInput {
  7227. s.BackupVaultName = &v
  7228. return s
  7229. }
  7230. // SetByBackupPlanId sets the ByBackupPlanId field's value.
  7231. func (s *ListRecoveryPointsByBackupVaultInput) SetByBackupPlanId(v string) *ListRecoveryPointsByBackupVaultInput {
  7232. s.ByBackupPlanId = &v
  7233. return s
  7234. }
  7235. // SetByCreatedAfter sets the ByCreatedAfter field's value.
  7236. func (s *ListRecoveryPointsByBackupVaultInput) SetByCreatedAfter(v time.Time) *ListRecoveryPointsByBackupVaultInput {
  7237. s.ByCreatedAfter = &v
  7238. return s
  7239. }
  7240. // SetByCreatedBefore sets the ByCreatedBefore field's value.
  7241. func (s *ListRecoveryPointsByBackupVaultInput) SetByCreatedBefore(v time.Time) *ListRecoveryPointsByBackupVaultInput {
  7242. s.ByCreatedBefore = &v
  7243. return s
  7244. }
  7245. // SetByResourceArn sets the ByResourceArn field's value.
  7246. func (s *ListRecoveryPointsByBackupVaultInput) SetByResourceArn(v string) *ListRecoveryPointsByBackupVaultInput {
  7247. s.ByResourceArn = &v
  7248. return s
  7249. }
  7250. // SetByResourceType sets the ByResourceType field's value.
  7251. func (s *ListRecoveryPointsByBackupVaultInput) SetByResourceType(v string) *ListRecoveryPointsByBackupVaultInput {
  7252. s.ByResourceType = &v
  7253. return s
  7254. }
  7255. // SetMaxResults sets the MaxResults field's value.
  7256. func (s *ListRecoveryPointsByBackupVaultInput) SetMaxResults(v int64) *ListRecoveryPointsByBackupVaultInput {
  7257. s.MaxResults = &v
  7258. return s
  7259. }
  7260. // SetNextToken sets the NextToken field's value.
  7261. func (s *ListRecoveryPointsByBackupVaultInput) SetNextToken(v string) *ListRecoveryPointsByBackupVaultInput {
  7262. s.NextToken = &v
  7263. return s
  7264. }
  7265. type ListRecoveryPointsByBackupVaultOutput struct {
  7266. _ struct{} `type:"structure"`
  7267. // The next item following a partial list of returned items. For example, if
  7268. // a request is made to return maxResults number of items, NextToken allows
  7269. // you to return more items in your list starting at the location pointed to
  7270. // by the next token.
  7271. NextToken *string `type:"string"`
  7272. // An array of objects that contain detailed information about recovery points
  7273. // saved in a backup vault.
  7274. RecoveryPoints []*RecoveryPointByBackupVault `type:"list"`
  7275. }
  7276. // String returns the string representation
  7277. func (s ListRecoveryPointsByBackupVaultOutput) String() string {
  7278. return awsutil.Prettify(s)
  7279. }
  7280. // GoString returns the string representation
  7281. func (s ListRecoveryPointsByBackupVaultOutput) GoString() string {
  7282. return s.String()
  7283. }
  7284. // SetNextToken sets the NextToken field's value.
  7285. func (s *ListRecoveryPointsByBackupVaultOutput) SetNextToken(v string) *ListRecoveryPointsByBackupVaultOutput {
  7286. s.NextToken = &v
  7287. return s
  7288. }
  7289. // SetRecoveryPoints sets the RecoveryPoints field's value.
  7290. func (s *ListRecoveryPointsByBackupVaultOutput) SetRecoveryPoints(v []*RecoveryPointByBackupVault) *ListRecoveryPointsByBackupVaultOutput {
  7291. s.RecoveryPoints = v
  7292. return s
  7293. }
  7294. type ListRecoveryPointsByResourceInput struct {
  7295. _ struct{} `type:"structure"`
  7296. // The maximum number of items to be returned.
  7297. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  7298. // The next item following a partial list of returned items. For example, if
  7299. // a request is made to return maxResults number of items, NextToken allows
  7300. // you to return more items in your list starting at the location pointed to
  7301. // by the next token.
  7302. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  7303. // An ARN that uniquely identifies a resource. The format of the ARN depends
  7304. // on the resource type.
  7305. //
  7306. // ResourceArn is a required field
  7307. ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"`
  7308. }
  7309. // String returns the string representation
  7310. func (s ListRecoveryPointsByResourceInput) String() string {
  7311. return awsutil.Prettify(s)
  7312. }
  7313. // GoString returns the string representation
  7314. func (s ListRecoveryPointsByResourceInput) GoString() string {
  7315. return s.String()
  7316. }
  7317. // Validate inspects the fields of the type to determine if they are valid.
  7318. func (s *ListRecoveryPointsByResourceInput) Validate() error {
  7319. invalidParams := request.ErrInvalidParams{Context: "ListRecoveryPointsByResourceInput"}
  7320. if s.MaxResults != nil && *s.MaxResults < 1 {
  7321. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  7322. }
  7323. if s.ResourceArn == nil {
  7324. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  7325. }
  7326. if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  7327. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  7328. }
  7329. if invalidParams.Len() > 0 {
  7330. return invalidParams
  7331. }
  7332. return nil
  7333. }
  7334. // SetMaxResults sets the MaxResults field's value.
  7335. func (s *ListRecoveryPointsByResourceInput) SetMaxResults(v int64) *ListRecoveryPointsByResourceInput {
  7336. s.MaxResults = &v
  7337. return s
  7338. }
  7339. // SetNextToken sets the NextToken field's value.
  7340. func (s *ListRecoveryPointsByResourceInput) SetNextToken(v string) *ListRecoveryPointsByResourceInput {
  7341. s.NextToken = &v
  7342. return s
  7343. }
  7344. // SetResourceArn sets the ResourceArn field's value.
  7345. func (s *ListRecoveryPointsByResourceInput) SetResourceArn(v string) *ListRecoveryPointsByResourceInput {
  7346. s.ResourceArn = &v
  7347. return s
  7348. }
  7349. type ListRecoveryPointsByResourceOutput struct {
  7350. _ struct{} `type:"structure"`
  7351. // The next item following a partial list of returned items. For example, if
  7352. // a request is made to return maxResults number of items, NextToken allows
  7353. // you to return more items in your list starting at the location pointed to
  7354. // by the next token.
  7355. NextToken *string `type:"string"`
  7356. // An array of objects that contain detailed information about recovery points
  7357. // of the specified resource type.
  7358. RecoveryPoints []*RecoveryPointByResource `type:"list"`
  7359. }
  7360. // String returns the string representation
  7361. func (s ListRecoveryPointsByResourceOutput) String() string {
  7362. return awsutil.Prettify(s)
  7363. }
  7364. // GoString returns the string representation
  7365. func (s ListRecoveryPointsByResourceOutput) GoString() string {
  7366. return s.String()
  7367. }
  7368. // SetNextToken sets the NextToken field's value.
  7369. func (s *ListRecoveryPointsByResourceOutput) SetNextToken(v string) *ListRecoveryPointsByResourceOutput {
  7370. s.NextToken = &v
  7371. return s
  7372. }
  7373. // SetRecoveryPoints sets the RecoveryPoints field's value.
  7374. func (s *ListRecoveryPointsByResourceOutput) SetRecoveryPoints(v []*RecoveryPointByResource) *ListRecoveryPointsByResourceOutput {
  7375. s.RecoveryPoints = v
  7376. return s
  7377. }
  7378. type ListRestoreJobsInput struct {
  7379. _ struct{} `type:"structure"`
  7380. // The maximum number of items to be returned.
  7381. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  7382. // The next item following a partial list of returned items. For example, if
  7383. // a request is made to return maxResults number of items, NextToken allows
  7384. // you to return more items in your list starting at the location pointed to
  7385. // by the next token.
  7386. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  7387. }
  7388. // String returns the string representation
  7389. func (s ListRestoreJobsInput) String() string {
  7390. return awsutil.Prettify(s)
  7391. }
  7392. // GoString returns the string representation
  7393. func (s ListRestoreJobsInput) GoString() string {
  7394. return s.String()
  7395. }
  7396. // Validate inspects the fields of the type to determine if they are valid.
  7397. func (s *ListRestoreJobsInput) Validate() error {
  7398. invalidParams := request.ErrInvalidParams{Context: "ListRestoreJobsInput"}
  7399. if s.MaxResults != nil && *s.MaxResults < 1 {
  7400. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  7401. }
  7402. if invalidParams.Len() > 0 {
  7403. return invalidParams
  7404. }
  7405. return nil
  7406. }
  7407. // SetMaxResults sets the MaxResults field's value.
  7408. func (s *ListRestoreJobsInput) SetMaxResults(v int64) *ListRestoreJobsInput {
  7409. s.MaxResults = &v
  7410. return s
  7411. }
  7412. // SetNextToken sets the NextToken field's value.
  7413. func (s *ListRestoreJobsInput) SetNextToken(v string) *ListRestoreJobsInput {
  7414. s.NextToken = &v
  7415. return s
  7416. }
  7417. type ListRestoreJobsOutput struct {
  7418. _ struct{} `type:"structure"`
  7419. // The next item following a partial list of returned items. For example, if
  7420. // a request is made to return maxResults number of items, NextToken allows
  7421. // you to return more items in your list starting at the location pointed to
  7422. // by the next token.
  7423. NextToken *string `type:"string"`
  7424. // An array of objects that contain detailed information about jobs to restore
  7425. // saved resources.
  7426. RestoreJobs []*RestoreJobsListMember `type:"list"`
  7427. }
  7428. // String returns the string representation
  7429. func (s ListRestoreJobsOutput) String() string {
  7430. return awsutil.Prettify(s)
  7431. }
  7432. // GoString returns the string representation
  7433. func (s ListRestoreJobsOutput) GoString() string {
  7434. return s.String()
  7435. }
  7436. // SetNextToken sets the NextToken field's value.
  7437. func (s *ListRestoreJobsOutput) SetNextToken(v string) *ListRestoreJobsOutput {
  7438. s.NextToken = &v
  7439. return s
  7440. }
  7441. // SetRestoreJobs sets the RestoreJobs field's value.
  7442. func (s *ListRestoreJobsOutput) SetRestoreJobs(v []*RestoreJobsListMember) *ListRestoreJobsOutput {
  7443. s.RestoreJobs = v
  7444. return s
  7445. }
  7446. type ListTagsInput struct {
  7447. _ struct{} `type:"structure"`
  7448. // The maximum number of items to be returned.
  7449. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  7450. // The next item following a partial list of returned items. For example, if
  7451. // a request is made to return maxResults number of items, NextToken allows
  7452. // you to return more items in your list starting at the location pointed to
  7453. // by the next token.
  7454. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  7455. // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format
  7456. // of the ARN depends on the type of resource. Valid targets for ListTags are
  7457. // recovery points, backup plans, and backup vaults.
  7458. //
  7459. // ResourceArn is a required field
  7460. ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"`
  7461. }
  7462. // String returns the string representation
  7463. func (s ListTagsInput) String() string {
  7464. return awsutil.Prettify(s)
  7465. }
  7466. // GoString returns the string representation
  7467. func (s ListTagsInput) GoString() string {
  7468. return s.String()
  7469. }
  7470. // Validate inspects the fields of the type to determine if they are valid.
  7471. func (s *ListTagsInput) Validate() error {
  7472. invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"}
  7473. if s.MaxResults != nil && *s.MaxResults < 1 {
  7474. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  7475. }
  7476. if s.ResourceArn == nil {
  7477. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  7478. }
  7479. if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  7480. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  7481. }
  7482. if invalidParams.Len() > 0 {
  7483. return invalidParams
  7484. }
  7485. return nil
  7486. }
  7487. // SetMaxResults sets the MaxResults field's value.
  7488. func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput {
  7489. s.MaxResults = &v
  7490. return s
  7491. }
  7492. // SetNextToken sets the NextToken field's value.
  7493. func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput {
  7494. s.NextToken = &v
  7495. return s
  7496. }
  7497. // SetResourceArn sets the ResourceArn field's value.
  7498. func (s *ListTagsInput) SetResourceArn(v string) *ListTagsInput {
  7499. s.ResourceArn = &v
  7500. return s
  7501. }
  7502. type ListTagsOutput struct {
  7503. _ struct{} `type:"structure"`
  7504. // The next item following a partial list of returned items. For example, if
  7505. // a request is made to return maxResults number of items, NextToken allows
  7506. // you to return more items in your list starting at the location pointed to
  7507. // by the next token.
  7508. NextToken *string `type:"string"`
  7509. // To help organize your resources, you can assign your own metadata to the
  7510. // resources you create. Each tag is a key-value pair.
  7511. Tags map[string]*string `type:"map" sensitive:"true"`
  7512. }
  7513. // String returns the string representation
  7514. func (s ListTagsOutput) String() string {
  7515. return awsutil.Prettify(s)
  7516. }
  7517. // GoString returns the string representation
  7518. func (s ListTagsOutput) GoString() string {
  7519. return s.String()
  7520. }
  7521. // SetNextToken sets the NextToken field's value.
  7522. func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput {
  7523. s.NextToken = &v
  7524. return s
  7525. }
  7526. // SetTags sets the Tags field's value.
  7527. func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput {
  7528. s.Tags = v
  7529. return s
  7530. }
  7531. // Contains an optional backup plan display name and an array of BackupRule
  7532. // objects, each of which specifies a backup rule. Each rule in a backup plan
  7533. // is a separate scheduled task and can back up a different selection of AWS
  7534. // resources.
  7535. type Plan struct {
  7536. _ struct{} `type:"structure"`
  7537. // The display name of a backup plan.
  7538. //
  7539. // BackupPlanName is a required field
  7540. BackupPlanName *string `type:"string" required:"true"`
  7541. // An array of BackupRule objects, each of which specifies a scheduled task
  7542. // that is used to back up a selection of resources.
  7543. //
  7544. // Rules is a required field
  7545. Rules []*Rule `type:"list" required:"true"`
  7546. }
  7547. // String returns the string representation
  7548. func (s Plan) String() string {
  7549. return awsutil.Prettify(s)
  7550. }
  7551. // GoString returns the string representation
  7552. func (s Plan) GoString() string {
  7553. return s.String()
  7554. }
  7555. // SetBackupPlanName sets the BackupPlanName field's value.
  7556. func (s *Plan) SetBackupPlanName(v string) *Plan {
  7557. s.BackupPlanName = &v
  7558. return s
  7559. }
  7560. // SetRules sets the Rules field's value.
  7561. func (s *Plan) SetRules(v []*Rule) *Plan {
  7562. s.Rules = v
  7563. return s
  7564. }
  7565. // Contains an optional backup plan display name and an array of BackupRule
  7566. // objects, each of which specifies a backup rule. Each rule in a backup plan
  7567. // is a separate scheduled task and can back up a different selection of AWS
  7568. // resources.
  7569. type PlanInput struct {
  7570. _ struct{} `type:"structure"`
  7571. // The display name of a backup plan.
  7572. //
  7573. // BackupPlanName is a required field
  7574. BackupPlanName *string `type:"string" required:"true"`
  7575. // An array of BackupRule objects, each of which specifies a scheduled task
  7576. // that is used to back up a selection of resources.
  7577. //
  7578. // Rules is a required field
  7579. Rules []*RuleInput `type:"list" required:"true"`
  7580. }
  7581. // String returns the string representation
  7582. func (s PlanInput) String() string {
  7583. return awsutil.Prettify(s)
  7584. }
  7585. // GoString returns the string representation
  7586. func (s PlanInput) GoString() string {
  7587. return s.String()
  7588. }
  7589. // Validate inspects the fields of the type to determine if they are valid.
  7590. func (s *PlanInput) Validate() error {
  7591. invalidParams := request.ErrInvalidParams{Context: "PlanInput"}
  7592. if s.BackupPlanName == nil {
  7593. invalidParams.Add(request.NewErrParamRequired("BackupPlanName"))
  7594. }
  7595. if s.Rules == nil {
  7596. invalidParams.Add(request.NewErrParamRequired("Rules"))
  7597. }
  7598. if s.Rules != nil {
  7599. for i, v := range s.Rules {
  7600. if v == nil {
  7601. continue
  7602. }
  7603. if err := v.Validate(); err != nil {
  7604. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  7605. }
  7606. }
  7607. }
  7608. if invalidParams.Len() > 0 {
  7609. return invalidParams
  7610. }
  7611. return nil
  7612. }
  7613. // SetBackupPlanName sets the BackupPlanName field's value.
  7614. func (s *PlanInput) SetBackupPlanName(v string) *PlanInput {
  7615. s.BackupPlanName = &v
  7616. return s
  7617. }
  7618. // SetRules sets the Rules field's value.
  7619. func (s *PlanInput) SetRules(v []*RuleInput) *PlanInput {
  7620. s.Rules = v
  7621. return s
  7622. }
  7623. // An object specifying metadata associated with a backup plan template.
  7624. type PlanTemplatesListMember struct {
  7625. _ struct{} `type:"structure"`
  7626. // Uniquely identifies a stored backup plan template.
  7627. BackupPlanTemplateId *string `type:"string"`
  7628. // The optional display name of a backup plan template.
  7629. BackupPlanTemplateName *string `type:"string"`
  7630. }
  7631. // String returns the string representation
  7632. func (s PlanTemplatesListMember) String() string {
  7633. return awsutil.Prettify(s)
  7634. }
  7635. // GoString returns the string representation
  7636. func (s PlanTemplatesListMember) GoString() string {
  7637. return s.String()
  7638. }
  7639. // SetBackupPlanTemplateId sets the BackupPlanTemplateId field's value.
  7640. func (s *PlanTemplatesListMember) SetBackupPlanTemplateId(v string) *PlanTemplatesListMember {
  7641. s.BackupPlanTemplateId = &v
  7642. return s
  7643. }
  7644. // SetBackupPlanTemplateName sets the BackupPlanTemplateName field's value.
  7645. func (s *PlanTemplatesListMember) SetBackupPlanTemplateName(v string) *PlanTemplatesListMember {
  7646. s.BackupPlanTemplateName = &v
  7647. return s
  7648. }
  7649. // Contains metadata about a backup plan.
  7650. type PlansListMember struct {
  7651. _ struct{} `type:"structure"`
  7652. // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for
  7653. // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50.
  7654. BackupPlanArn *string `type:"string"`
  7655. // Uniquely identifies a backup plan.
  7656. BackupPlanId *string `type:"string"`
  7657. // The display name of a saved backup plan.
  7658. BackupPlanName *string `type:"string"`
  7659. // The date and time a resource backup plan is created, in Unix format and Coordinated
  7660. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  7661. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  7662. // 12:11:30.087 AM.
  7663. CreationDate *time.Time `type:"timestamp"`
  7664. // A unique string that identifies the request and allows failed requests to
  7665. // be retried without the risk of executing the operation twice.
  7666. CreatorRequestId *string `type:"string"`
  7667. // The date and time a backup plan is deleted, in Unix format and Coordinated
  7668. // Universal Time (UTC). The value of DeletionDate is accurate to milliseconds.
  7669. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  7670. // 12:11:30.087 AM.
  7671. DeletionDate *time.Time `type:"timestamp"`
  7672. // The last time a job to back up resources was executed with this rule. A date
  7673. // and time, in Unix format and Coordinated Universal Time (UTC). The value
  7674. // of LastExecutionDate is accurate to milliseconds. For example, the value
  7675. // 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
  7676. LastExecutionDate *time.Time `type:"timestamp"`
  7677. // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most
  7678. // 1,024 bytes long. Version IDs cannot be edited.
  7679. VersionId *string `type:"string"`
  7680. }
  7681. // String returns the string representation
  7682. func (s PlansListMember) String() string {
  7683. return awsutil.Prettify(s)
  7684. }
  7685. // GoString returns the string representation
  7686. func (s PlansListMember) GoString() string {
  7687. return s.String()
  7688. }
  7689. // SetBackupPlanArn sets the BackupPlanArn field's value.
  7690. func (s *PlansListMember) SetBackupPlanArn(v string) *PlansListMember {
  7691. s.BackupPlanArn = &v
  7692. return s
  7693. }
  7694. // SetBackupPlanId sets the BackupPlanId field's value.
  7695. func (s *PlansListMember) SetBackupPlanId(v string) *PlansListMember {
  7696. s.BackupPlanId = &v
  7697. return s
  7698. }
  7699. // SetBackupPlanName sets the BackupPlanName field's value.
  7700. func (s *PlansListMember) SetBackupPlanName(v string) *PlansListMember {
  7701. s.BackupPlanName = &v
  7702. return s
  7703. }
  7704. // SetCreationDate sets the CreationDate field's value.
  7705. func (s *PlansListMember) SetCreationDate(v time.Time) *PlansListMember {
  7706. s.CreationDate = &v
  7707. return s
  7708. }
  7709. // SetCreatorRequestId sets the CreatorRequestId field's value.
  7710. func (s *PlansListMember) SetCreatorRequestId(v string) *PlansListMember {
  7711. s.CreatorRequestId = &v
  7712. return s
  7713. }
  7714. // SetDeletionDate sets the DeletionDate field's value.
  7715. func (s *PlansListMember) SetDeletionDate(v time.Time) *PlansListMember {
  7716. s.DeletionDate = &v
  7717. return s
  7718. }
  7719. // SetLastExecutionDate sets the LastExecutionDate field's value.
  7720. func (s *PlansListMember) SetLastExecutionDate(v time.Time) *PlansListMember {
  7721. s.LastExecutionDate = &v
  7722. return s
  7723. }
  7724. // SetVersionId sets the VersionId field's value.
  7725. func (s *PlansListMember) SetVersionId(v string) *PlansListMember {
  7726. s.VersionId = &v
  7727. return s
  7728. }
  7729. // A structure that contains information about a backed-up resource.
  7730. type ProtectedResource struct {
  7731. _ struct{} `type:"structure"`
  7732. // The date and time a resource was last backed up, in Unix format and Coordinated
  7733. // Universal Time (UTC). The value of LastBackupTime is accurate to milliseconds.
  7734. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  7735. // 12:11:30.087 AM.
  7736. LastBackupTime *time.Time `type:"timestamp"`
  7737. // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format
  7738. // of the ARN depends on the resource type.
  7739. ResourceArn *string `type:"string"`
  7740. // The type of AWS resource; for example, an Amazon Elastic Block Store (Amazon
  7741. // EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.
  7742. ResourceType *string `type:"string"`
  7743. }
  7744. // String returns the string representation
  7745. func (s ProtectedResource) String() string {
  7746. return awsutil.Prettify(s)
  7747. }
  7748. // GoString returns the string representation
  7749. func (s ProtectedResource) GoString() string {
  7750. return s.String()
  7751. }
  7752. // SetLastBackupTime sets the LastBackupTime field's value.
  7753. func (s *ProtectedResource) SetLastBackupTime(v time.Time) *ProtectedResource {
  7754. s.LastBackupTime = &v
  7755. return s
  7756. }
  7757. // SetResourceArn sets the ResourceArn field's value.
  7758. func (s *ProtectedResource) SetResourceArn(v string) *ProtectedResource {
  7759. s.ResourceArn = &v
  7760. return s
  7761. }
  7762. // SetResourceType sets the ResourceType field's value.
  7763. func (s *ProtectedResource) SetResourceType(v string) *ProtectedResource {
  7764. s.ResourceType = &v
  7765. return s
  7766. }
  7767. type PutBackupVaultAccessPolicyInput struct {
  7768. _ struct{} `type:"structure"`
  7769. // The name of a logical container where backups are stored. Backup vaults are
  7770. // identified by names that are unique to the account used to create them and
  7771. // the AWS Region where they are created. They consist of lowercase letters,
  7772. // numbers, and hyphens.
  7773. //
  7774. // BackupVaultName is a required field
  7775. BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
  7776. // The backup vault access policy document in JSON format.
  7777. Policy *string `type:"string"`
  7778. }
  7779. // String returns the string representation
  7780. func (s PutBackupVaultAccessPolicyInput) String() string {
  7781. return awsutil.Prettify(s)
  7782. }
  7783. // GoString returns the string representation
  7784. func (s PutBackupVaultAccessPolicyInput) GoString() string {
  7785. return s.String()
  7786. }
  7787. // Validate inspects the fields of the type to determine if they are valid.
  7788. func (s *PutBackupVaultAccessPolicyInput) Validate() error {
  7789. invalidParams := request.ErrInvalidParams{Context: "PutBackupVaultAccessPolicyInput"}
  7790. if s.BackupVaultName == nil {
  7791. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  7792. }
  7793. if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
  7794. invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
  7795. }
  7796. if invalidParams.Len() > 0 {
  7797. return invalidParams
  7798. }
  7799. return nil
  7800. }
  7801. // SetBackupVaultName sets the BackupVaultName field's value.
  7802. func (s *PutBackupVaultAccessPolicyInput) SetBackupVaultName(v string) *PutBackupVaultAccessPolicyInput {
  7803. s.BackupVaultName = &v
  7804. return s
  7805. }
  7806. // SetPolicy sets the Policy field's value.
  7807. func (s *PutBackupVaultAccessPolicyInput) SetPolicy(v string) *PutBackupVaultAccessPolicyInput {
  7808. s.Policy = &v
  7809. return s
  7810. }
  7811. type PutBackupVaultAccessPolicyOutput struct {
  7812. _ struct{} `type:"structure"`
  7813. }
  7814. // String returns the string representation
  7815. func (s PutBackupVaultAccessPolicyOutput) String() string {
  7816. return awsutil.Prettify(s)
  7817. }
  7818. // GoString returns the string representation
  7819. func (s PutBackupVaultAccessPolicyOutput) GoString() string {
  7820. return s.String()
  7821. }
  7822. type PutBackupVaultNotificationsInput struct {
  7823. _ struct{} `type:"structure"`
  7824. // An array of events that indicate the status of jobs to back up resources
  7825. // to the backup vault.
  7826. //
  7827. // BackupVaultEvents is a required field
  7828. BackupVaultEvents []*string `type:"list" required:"true"`
  7829. // The name of a logical container where backups are stored. Backup vaults are
  7830. // identified by names that are unique to the account used to create them and
  7831. // the AWS Region where they are created. They consist of lowercase letters,
  7832. // numbers, and hyphens.
  7833. //
  7834. // BackupVaultName is a required field
  7835. BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
  7836. // The Amazon Resource Name (ARN) that specifies the topic for a backup vault’s
  7837. // events; for example, arn:aws:sns:us-west-2:111122223333:MyVaultTopic.
  7838. //
  7839. // SNSTopicArn is a required field
  7840. SNSTopicArn *string `type:"string" required:"true"`
  7841. }
  7842. // String returns the string representation
  7843. func (s PutBackupVaultNotificationsInput) String() string {
  7844. return awsutil.Prettify(s)
  7845. }
  7846. // GoString returns the string representation
  7847. func (s PutBackupVaultNotificationsInput) GoString() string {
  7848. return s.String()
  7849. }
  7850. // Validate inspects the fields of the type to determine if they are valid.
  7851. func (s *PutBackupVaultNotificationsInput) Validate() error {
  7852. invalidParams := request.ErrInvalidParams{Context: "PutBackupVaultNotificationsInput"}
  7853. if s.BackupVaultEvents == nil {
  7854. invalidParams.Add(request.NewErrParamRequired("BackupVaultEvents"))
  7855. }
  7856. if s.BackupVaultName == nil {
  7857. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  7858. }
  7859. if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
  7860. invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
  7861. }
  7862. if s.SNSTopicArn == nil {
  7863. invalidParams.Add(request.NewErrParamRequired("SNSTopicArn"))
  7864. }
  7865. if invalidParams.Len() > 0 {
  7866. return invalidParams
  7867. }
  7868. return nil
  7869. }
  7870. // SetBackupVaultEvents sets the BackupVaultEvents field's value.
  7871. func (s *PutBackupVaultNotificationsInput) SetBackupVaultEvents(v []*string) *PutBackupVaultNotificationsInput {
  7872. s.BackupVaultEvents = v
  7873. return s
  7874. }
  7875. // SetBackupVaultName sets the BackupVaultName field's value.
  7876. func (s *PutBackupVaultNotificationsInput) SetBackupVaultName(v string) *PutBackupVaultNotificationsInput {
  7877. s.BackupVaultName = &v
  7878. return s
  7879. }
  7880. // SetSNSTopicArn sets the SNSTopicArn field's value.
  7881. func (s *PutBackupVaultNotificationsInput) SetSNSTopicArn(v string) *PutBackupVaultNotificationsInput {
  7882. s.SNSTopicArn = &v
  7883. return s
  7884. }
  7885. type PutBackupVaultNotificationsOutput struct {
  7886. _ struct{} `type:"structure"`
  7887. }
  7888. // String returns the string representation
  7889. func (s PutBackupVaultNotificationsOutput) String() string {
  7890. return awsutil.Prettify(s)
  7891. }
  7892. // GoString returns the string representation
  7893. func (s PutBackupVaultNotificationsOutput) GoString() string {
  7894. return s.String()
  7895. }
  7896. // Contains detailed information about the recovery points stored in a backup
  7897. // vault.
  7898. type RecoveryPointByBackupVault struct {
  7899. _ struct{} `type:"structure"`
  7900. // The size, in bytes, of a backup.
  7901. BackupSizeInBytes *int64 `type:"long"`
  7902. // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
  7903. BackupVaultArn *string `type:"string"`
  7904. // The name of a logical container where backups are stored. Backup vaults are
  7905. // identified by names that are unique to the account used to create them and
  7906. // the AWS Region where they are created. They consist of lowercase letters,
  7907. // numbers, and hyphens.
  7908. BackupVaultName *string `type:"string"`
  7909. // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt
  7910. // timestamps.
  7911. CalculatedLifecycle *CalculatedLifecycle `type:"structure"`
  7912. // The date and time a job to restore a recovery point is completed, in Unix
  7913. // format and Coordinated Universal Time (UTC). The value of CompletionDate
  7914. // is accurate to milliseconds. For example, the value 1516925490.087 represents
  7915. // Friday, January 26, 2018 12:11:30.087 AM.
  7916. CompletionDate *time.Time `type:"timestamp"`
  7917. // Contains identifying information about the creation of a recovery point,
  7918. // including the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId
  7919. // of the backup plan that is used to create it.
  7920. CreatedBy *RecoveryPointCreator `type:"structure"`
  7921. // The date and time a recovery point is created, in Unix format and Coordinated
  7922. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  7923. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  7924. // 12:11:30.087 AM.
  7925. CreationDate *time.Time `type:"timestamp"`
  7926. // The server-side encryption key that is used to protect your backups; for
  7927. // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
  7928. EncryptionKeyArn *string `type:"string"`
  7929. // Specifies the IAM role ARN used to create the target recovery point; for
  7930. // example, arn:aws:iam::123456789012:role/S3Access.
  7931. IamRoleArn *string `type:"string"`
  7932. // A Boolean value that is returned as TRUE if the specified recovery point
  7933. // is encrypted, or FALSE if the recovery point is not encrypted.
  7934. IsEncrypted *bool `type:"boolean"`
  7935. // The date and time a recovery point was last restored, in Unix format and
  7936. // Coordinated Universal Time (UTC). The value of LastRestoreTime is accurate
  7937. // to milliseconds. For example, the value 1516925490.087 represents Friday,
  7938. // January 26, 2018 12:11:30.087 AM.
  7939. LastRestoreTime *time.Time `type:"timestamp"`
  7940. // The lifecycle defines when a protected resource is transitioned to cold storage
  7941. // and when it expires. AWS Backup transitions and expires backups automatically
  7942. // according to the lifecycle that you define.
  7943. //
  7944. // Backups transitioned to cold storage must be stored in cold storage for a
  7945. // minimum of 90 days. Therefore, the “expire after days” setting must be 90
  7946. // days greater than the “transition to cold after days” setting. The “transition
  7947. // to cold after days” setting cannot be changed after a backup has been transitioned
  7948. // to cold.
  7949. Lifecycle *Lifecycle `type:"structure"`
  7950. // An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
  7951. // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  7952. RecoveryPointArn *string `type:"string"`
  7953. // An ARN that uniquely identifies a resource. The format of the ARN depends
  7954. // on the resource type.
  7955. ResourceArn *string `type:"string"`
  7956. // The type of AWS resource saved as a recovery point; for example, an Amazon
  7957. // Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database
  7958. // Service (Amazon RDS) database.
  7959. ResourceType *string `type:"string"`
  7960. // A status code specifying the state of the recovery point.
  7961. Status *string `type:"string" enum:"RecoveryPointStatus"`
  7962. }
  7963. // String returns the string representation
  7964. func (s RecoveryPointByBackupVault) String() string {
  7965. return awsutil.Prettify(s)
  7966. }
  7967. // GoString returns the string representation
  7968. func (s RecoveryPointByBackupVault) GoString() string {
  7969. return s.String()
  7970. }
  7971. // SetBackupSizeInBytes sets the BackupSizeInBytes field's value.
  7972. func (s *RecoveryPointByBackupVault) SetBackupSizeInBytes(v int64) *RecoveryPointByBackupVault {
  7973. s.BackupSizeInBytes = &v
  7974. return s
  7975. }
  7976. // SetBackupVaultArn sets the BackupVaultArn field's value.
  7977. func (s *RecoveryPointByBackupVault) SetBackupVaultArn(v string) *RecoveryPointByBackupVault {
  7978. s.BackupVaultArn = &v
  7979. return s
  7980. }
  7981. // SetBackupVaultName sets the BackupVaultName field's value.
  7982. func (s *RecoveryPointByBackupVault) SetBackupVaultName(v string) *RecoveryPointByBackupVault {
  7983. s.BackupVaultName = &v
  7984. return s
  7985. }
  7986. // SetCalculatedLifecycle sets the CalculatedLifecycle field's value.
  7987. func (s *RecoveryPointByBackupVault) SetCalculatedLifecycle(v *CalculatedLifecycle) *RecoveryPointByBackupVault {
  7988. s.CalculatedLifecycle = v
  7989. return s
  7990. }
  7991. // SetCompletionDate sets the CompletionDate field's value.
  7992. func (s *RecoveryPointByBackupVault) SetCompletionDate(v time.Time) *RecoveryPointByBackupVault {
  7993. s.CompletionDate = &v
  7994. return s
  7995. }
  7996. // SetCreatedBy sets the CreatedBy field's value.
  7997. func (s *RecoveryPointByBackupVault) SetCreatedBy(v *RecoveryPointCreator) *RecoveryPointByBackupVault {
  7998. s.CreatedBy = v
  7999. return s
  8000. }
  8001. // SetCreationDate sets the CreationDate field's value.
  8002. func (s *RecoveryPointByBackupVault) SetCreationDate(v time.Time) *RecoveryPointByBackupVault {
  8003. s.CreationDate = &v
  8004. return s
  8005. }
  8006. // SetEncryptionKeyArn sets the EncryptionKeyArn field's value.
  8007. func (s *RecoveryPointByBackupVault) SetEncryptionKeyArn(v string) *RecoveryPointByBackupVault {
  8008. s.EncryptionKeyArn = &v
  8009. return s
  8010. }
  8011. // SetIamRoleArn sets the IamRoleArn field's value.
  8012. func (s *RecoveryPointByBackupVault) SetIamRoleArn(v string) *RecoveryPointByBackupVault {
  8013. s.IamRoleArn = &v
  8014. return s
  8015. }
  8016. // SetIsEncrypted sets the IsEncrypted field's value.
  8017. func (s *RecoveryPointByBackupVault) SetIsEncrypted(v bool) *RecoveryPointByBackupVault {
  8018. s.IsEncrypted = &v
  8019. return s
  8020. }
  8021. // SetLastRestoreTime sets the LastRestoreTime field's value.
  8022. func (s *RecoveryPointByBackupVault) SetLastRestoreTime(v time.Time) *RecoveryPointByBackupVault {
  8023. s.LastRestoreTime = &v
  8024. return s
  8025. }
  8026. // SetLifecycle sets the Lifecycle field's value.
  8027. func (s *RecoveryPointByBackupVault) SetLifecycle(v *Lifecycle) *RecoveryPointByBackupVault {
  8028. s.Lifecycle = v
  8029. return s
  8030. }
  8031. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  8032. func (s *RecoveryPointByBackupVault) SetRecoveryPointArn(v string) *RecoveryPointByBackupVault {
  8033. s.RecoveryPointArn = &v
  8034. return s
  8035. }
  8036. // SetResourceArn sets the ResourceArn field's value.
  8037. func (s *RecoveryPointByBackupVault) SetResourceArn(v string) *RecoveryPointByBackupVault {
  8038. s.ResourceArn = &v
  8039. return s
  8040. }
  8041. // SetResourceType sets the ResourceType field's value.
  8042. func (s *RecoveryPointByBackupVault) SetResourceType(v string) *RecoveryPointByBackupVault {
  8043. s.ResourceType = &v
  8044. return s
  8045. }
  8046. // SetStatus sets the Status field's value.
  8047. func (s *RecoveryPointByBackupVault) SetStatus(v string) *RecoveryPointByBackupVault {
  8048. s.Status = &v
  8049. return s
  8050. }
  8051. // Contains detailed information about a saved recovery point.
  8052. type RecoveryPointByResource struct {
  8053. _ struct{} `type:"structure"`
  8054. // The size, in bytes, of a backup.
  8055. BackupSizeBytes *int64 `type:"long"`
  8056. // The name of a logical container where backups are stored. Backup vaults are
  8057. // identified by names that are unique to the account used to create them and
  8058. // the AWS Region where they are created. They consist of lowercase letters,
  8059. // numbers, and hyphens.
  8060. BackupVaultName *string `type:"string"`
  8061. // The date and time a recovery point is created, in Unix format and Coordinated
  8062. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  8063. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  8064. // 12:11:30.087 AM.
  8065. CreationDate *time.Time `type:"timestamp"`
  8066. // The server-side encryption key that is used to protect your backups; for
  8067. // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
  8068. EncryptionKeyArn *string `type:"string"`
  8069. // An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
  8070. // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  8071. RecoveryPointArn *string `type:"string"`
  8072. // A status code specifying the state of the recovery point.
  8073. Status *string `type:"string" enum:"RecoveryPointStatus"`
  8074. }
  8075. // String returns the string representation
  8076. func (s RecoveryPointByResource) String() string {
  8077. return awsutil.Prettify(s)
  8078. }
  8079. // GoString returns the string representation
  8080. func (s RecoveryPointByResource) GoString() string {
  8081. return s.String()
  8082. }
  8083. // SetBackupSizeBytes sets the BackupSizeBytes field's value.
  8084. func (s *RecoveryPointByResource) SetBackupSizeBytes(v int64) *RecoveryPointByResource {
  8085. s.BackupSizeBytes = &v
  8086. return s
  8087. }
  8088. // SetBackupVaultName sets the BackupVaultName field's value.
  8089. func (s *RecoveryPointByResource) SetBackupVaultName(v string) *RecoveryPointByResource {
  8090. s.BackupVaultName = &v
  8091. return s
  8092. }
  8093. // SetCreationDate sets the CreationDate field's value.
  8094. func (s *RecoveryPointByResource) SetCreationDate(v time.Time) *RecoveryPointByResource {
  8095. s.CreationDate = &v
  8096. return s
  8097. }
  8098. // SetEncryptionKeyArn sets the EncryptionKeyArn field's value.
  8099. func (s *RecoveryPointByResource) SetEncryptionKeyArn(v string) *RecoveryPointByResource {
  8100. s.EncryptionKeyArn = &v
  8101. return s
  8102. }
  8103. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  8104. func (s *RecoveryPointByResource) SetRecoveryPointArn(v string) *RecoveryPointByResource {
  8105. s.RecoveryPointArn = &v
  8106. return s
  8107. }
  8108. // SetStatus sets the Status field's value.
  8109. func (s *RecoveryPointByResource) SetStatus(v string) *RecoveryPointByResource {
  8110. s.Status = &v
  8111. return s
  8112. }
  8113. // Contains information about the backup plan and rule that AWS Backup used
  8114. // to initiate the recovery point backup.
  8115. type RecoveryPointCreator struct {
  8116. _ struct{} `type:"structure"`
  8117. // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for
  8118. // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50.
  8119. BackupPlanArn *string `type:"string"`
  8120. // Uniquely identifies a backup plan.
  8121. BackupPlanId *string `type:"string"`
  8122. // Version IDs are unique, randomly generated, Unicode, UTF-8 encoded strings
  8123. // that are at most 1,024 bytes long. They cannot be edited.
  8124. BackupPlanVersion *string `type:"string"`
  8125. // Uniquely identifies a rule used to schedule the backup of a selection of
  8126. // resources.
  8127. BackupRuleId *string `type:"string"`
  8128. }
  8129. // String returns the string representation
  8130. func (s RecoveryPointCreator) String() string {
  8131. return awsutil.Prettify(s)
  8132. }
  8133. // GoString returns the string representation
  8134. func (s RecoveryPointCreator) GoString() string {
  8135. return s.String()
  8136. }
  8137. // SetBackupPlanArn sets the BackupPlanArn field's value.
  8138. func (s *RecoveryPointCreator) SetBackupPlanArn(v string) *RecoveryPointCreator {
  8139. s.BackupPlanArn = &v
  8140. return s
  8141. }
  8142. // SetBackupPlanId sets the BackupPlanId field's value.
  8143. func (s *RecoveryPointCreator) SetBackupPlanId(v string) *RecoveryPointCreator {
  8144. s.BackupPlanId = &v
  8145. return s
  8146. }
  8147. // SetBackupPlanVersion sets the BackupPlanVersion field's value.
  8148. func (s *RecoveryPointCreator) SetBackupPlanVersion(v string) *RecoveryPointCreator {
  8149. s.BackupPlanVersion = &v
  8150. return s
  8151. }
  8152. // SetBackupRuleId sets the BackupRuleId field's value.
  8153. func (s *RecoveryPointCreator) SetBackupRuleId(v string) *RecoveryPointCreator {
  8154. s.BackupRuleId = &v
  8155. return s
  8156. }
  8157. // Contains metadata about a restore job.
  8158. type RestoreJobsListMember struct {
  8159. _ struct{} `type:"structure"`
  8160. // The size, in bytes, of the restored resource.
  8161. BackupSizeInBytes *int64 `type:"long"`
  8162. // The date and time a job to restore a recovery point is completed, in Unix
  8163. // format and Coordinated Universal Time (UTC). The value of CompletionDate
  8164. // is accurate to milliseconds. For example, the value 1516925490.087 represents
  8165. // Friday, January 26, 2018 12:11:30.087 AM.
  8166. CompletionDate *time.Time `type:"timestamp"`
  8167. // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format
  8168. // of the ARN depends on the resource type.
  8169. CreatedResourceArn *string `type:"string"`
  8170. // The date and time a restore job is created, in Unix format and Coordinated
  8171. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  8172. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  8173. // 12:11:30.087 AM.
  8174. CreationDate *time.Time `type:"timestamp"`
  8175. // The amount of time in minutes that a job restoring a recovery point is expected
  8176. // to take.
  8177. ExpectedCompletionTimeMinutes *int64 `type:"long"`
  8178. // Specifies the IAM role ARN used to create the target recovery point; for
  8179. // example, arn:aws:iam::123456789012:role/S3Access.
  8180. IamRoleArn *string `type:"string"`
  8181. // Contains an estimated percentage complete of a job at the time the job status
  8182. // was queried.
  8183. PercentDone *string `type:"string"`
  8184. // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  8185. RecoveryPointArn *string `type:"string"`
  8186. // Uniquely identifies the job that restores a recovery point.
  8187. RestoreJobId *string `type:"string"`
  8188. // A status code specifying the state of the job initiated by AWS Backup to
  8189. // restore a recovery point.
  8190. Status *string `type:"string" enum:"RestoreJobStatus"`
  8191. // A detailed message explaining the status of the job to restore a recovery
  8192. // point.
  8193. StatusMessage *string `type:"string"`
  8194. }
  8195. // String returns the string representation
  8196. func (s RestoreJobsListMember) String() string {
  8197. return awsutil.Prettify(s)
  8198. }
  8199. // GoString returns the string representation
  8200. func (s RestoreJobsListMember) GoString() string {
  8201. return s.String()
  8202. }
  8203. // SetBackupSizeInBytes sets the BackupSizeInBytes field's value.
  8204. func (s *RestoreJobsListMember) SetBackupSizeInBytes(v int64) *RestoreJobsListMember {
  8205. s.BackupSizeInBytes = &v
  8206. return s
  8207. }
  8208. // SetCompletionDate sets the CompletionDate field's value.
  8209. func (s *RestoreJobsListMember) SetCompletionDate(v time.Time) *RestoreJobsListMember {
  8210. s.CompletionDate = &v
  8211. return s
  8212. }
  8213. // SetCreatedResourceArn sets the CreatedResourceArn field's value.
  8214. func (s *RestoreJobsListMember) SetCreatedResourceArn(v string) *RestoreJobsListMember {
  8215. s.CreatedResourceArn = &v
  8216. return s
  8217. }
  8218. // SetCreationDate sets the CreationDate field's value.
  8219. func (s *RestoreJobsListMember) SetCreationDate(v time.Time) *RestoreJobsListMember {
  8220. s.CreationDate = &v
  8221. return s
  8222. }
  8223. // SetExpectedCompletionTimeMinutes sets the ExpectedCompletionTimeMinutes field's value.
  8224. func (s *RestoreJobsListMember) SetExpectedCompletionTimeMinutes(v int64) *RestoreJobsListMember {
  8225. s.ExpectedCompletionTimeMinutes = &v
  8226. return s
  8227. }
  8228. // SetIamRoleArn sets the IamRoleArn field's value.
  8229. func (s *RestoreJobsListMember) SetIamRoleArn(v string) *RestoreJobsListMember {
  8230. s.IamRoleArn = &v
  8231. return s
  8232. }
  8233. // SetPercentDone sets the PercentDone field's value.
  8234. func (s *RestoreJobsListMember) SetPercentDone(v string) *RestoreJobsListMember {
  8235. s.PercentDone = &v
  8236. return s
  8237. }
  8238. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  8239. func (s *RestoreJobsListMember) SetRecoveryPointArn(v string) *RestoreJobsListMember {
  8240. s.RecoveryPointArn = &v
  8241. return s
  8242. }
  8243. // SetRestoreJobId sets the RestoreJobId field's value.
  8244. func (s *RestoreJobsListMember) SetRestoreJobId(v string) *RestoreJobsListMember {
  8245. s.RestoreJobId = &v
  8246. return s
  8247. }
  8248. // SetStatus sets the Status field's value.
  8249. func (s *RestoreJobsListMember) SetStatus(v string) *RestoreJobsListMember {
  8250. s.Status = &v
  8251. return s
  8252. }
  8253. // SetStatusMessage sets the StatusMessage field's value.
  8254. func (s *RestoreJobsListMember) SetStatusMessage(v string) *RestoreJobsListMember {
  8255. s.StatusMessage = &v
  8256. return s
  8257. }
  8258. // Specifies a scheduled task used to back up a selection of resources.
  8259. type Rule struct {
  8260. _ struct{} `type:"structure"`
  8261. // A value in minutes after a backup job is successfully started before it must
  8262. // be completed or it is canceled by AWS Backup. This value is optional.
  8263. CompletionWindowMinutes *int64 `type:"long"`
  8264. // The lifecycle defines when a protected resource is transitioned to cold storage
  8265. // and when it expires. AWS Backup transitions and expires backups automatically
  8266. // according to the lifecycle that you define.
  8267. //
  8268. // Backups transitioned to cold storage must be stored in cold storage for a
  8269. // minimum of 90 days. Therefore, the “expire after days” setting must be 90
  8270. // days greater than the “transition to cold after days” setting. The “transition
  8271. // to cold after days” setting cannot be changed after a backup has been transitioned
  8272. // to cold.
  8273. Lifecycle *Lifecycle `type:"structure"`
  8274. // An array of key-value pair strings that are assigned to resources that are
  8275. // associated with this rule when restored from backup.
  8276. RecoveryPointTags map[string]*string `type:"map" sensitive:"true"`
  8277. // Uniquely identifies a rule that is used to schedule the backup of a selection
  8278. // of resources.
  8279. RuleId *string `type:"string"`
  8280. // An optional display name for a backup rule.
  8281. //
  8282. // RuleName is a required field
  8283. RuleName *string `type:"string" required:"true"`
  8284. // A CRON expression specifying when AWS Backup initiates a backup job.
  8285. ScheduleExpression *string `type:"string"`
  8286. // An optional value that specifies a period of time in minutes after a backup
  8287. // is scheduled before a job is canceled if it doesn't start successfully.
  8288. StartWindowMinutes *int64 `type:"long"`
  8289. // The name of a logical container where backups are stored. Backup vaults are
  8290. // identified by names that are unique to the account used to create them and
  8291. // the AWS Region where they are created. They consist of lowercase letters,
  8292. // numbers, and hyphens.
  8293. //
  8294. // TargetBackupVaultName is a required field
  8295. TargetBackupVaultName *string `type:"string" required:"true"`
  8296. }
  8297. // String returns the string representation
  8298. func (s Rule) String() string {
  8299. return awsutil.Prettify(s)
  8300. }
  8301. // GoString returns the string representation
  8302. func (s Rule) GoString() string {
  8303. return s.String()
  8304. }
  8305. // SetCompletionWindowMinutes sets the CompletionWindowMinutes field's value.
  8306. func (s *Rule) SetCompletionWindowMinutes(v int64) *Rule {
  8307. s.CompletionWindowMinutes = &v
  8308. return s
  8309. }
  8310. // SetLifecycle sets the Lifecycle field's value.
  8311. func (s *Rule) SetLifecycle(v *Lifecycle) *Rule {
  8312. s.Lifecycle = v
  8313. return s
  8314. }
  8315. // SetRecoveryPointTags sets the RecoveryPointTags field's value.
  8316. func (s *Rule) SetRecoveryPointTags(v map[string]*string) *Rule {
  8317. s.RecoveryPointTags = v
  8318. return s
  8319. }
  8320. // SetRuleId sets the RuleId field's value.
  8321. func (s *Rule) SetRuleId(v string) *Rule {
  8322. s.RuleId = &v
  8323. return s
  8324. }
  8325. // SetRuleName sets the RuleName field's value.
  8326. func (s *Rule) SetRuleName(v string) *Rule {
  8327. s.RuleName = &v
  8328. return s
  8329. }
  8330. // SetScheduleExpression sets the ScheduleExpression field's value.
  8331. func (s *Rule) SetScheduleExpression(v string) *Rule {
  8332. s.ScheduleExpression = &v
  8333. return s
  8334. }
  8335. // SetStartWindowMinutes sets the StartWindowMinutes field's value.
  8336. func (s *Rule) SetStartWindowMinutes(v int64) *Rule {
  8337. s.StartWindowMinutes = &v
  8338. return s
  8339. }
  8340. // SetTargetBackupVaultName sets the TargetBackupVaultName field's value.
  8341. func (s *Rule) SetTargetBackupVaultName(v string) *Rule {
  8342. s.TargetBackupVaultName = &v
  8343. return s
  8344. }
  8345. // Specifies a scheduled task used to back up a selection of resources.
  8346. type RuleInput struct {
  8347. _ struct{} `type:"structure"`
  8348. // The amount of time AWS Backup attempts a backup before canceling the job
  8349. // and returning an error.
  8350. CompletionWindowMinutes *int64 `type:"long"`
  8351. // The lifecycle defines when a protected resource is transitioned to cold storage
  8352. // and when it expires. AWS Backup will transition and expire backups automatically
  8353. // according to the lifecycle that you define.
  8354. //
  8355. // Backups transitioned to cold storage must be stored in cold storage for a
  8356. // minimum of 90 days. Therefore, the “expire after days” setting must be 90
  8357. // days greater than the “transition to cold after days”. The “transition to
  8358. // cold after days” setting cannot be changed after a backup has been transitioned
  8359. // to cold.
  8360. Lifecycle *Lifecycle `type:"structure"`
  8361. // To help organize your resources, you can assign your own metadata to the
  8362. // resources that you create. Each tag is a key-value pair.
  8363. RecoveryPointTags map[string]*string `type:"map" sensitive:"true"`
  8364. // >An optional display name for a backup rule.
  8365. //
  8366. // RuleName is a required field
  8367. RuleName *string `type:"string" required:"true"`
  8368. // A CRON expression specifying when AWS Backup initiates a backup job.
  8369. ScheduleExpression *string `type:"string"`
  8370. // The amount of time in minutes before beginning a backup.
  8371. StartWindowMinutes *int64 `type:"long"`
  8372. // The name of a logical container where backups are stored. Backup vaults are
  8373. // identified by names that are unique to the account used to create them and
  8374. // the AWS Region where they are created. They consist of lowercase letters,
  8375. // numbers, and hyphens.
  8376. //
  8377. // TargetBackupVaultName is a required field
  8378. TargetBackupVaultName *string `type:"string" required:"true"`
  8379. }
  8380. // String returns the string representation
  8381. func (s RuleInput) String() string {
  8382. return awsutil.Prettify(s)
  8383. }
  8384. // GoString returns the string representation
  8385. func (s RuleInput) GoString() string {
  8386. return s.String()
  8387. }
  8388. // Validate inspects the fields of the type to determine if they are valid.
  8389. func (s *RuleInput) Validate() error {
  8390. invalidParams := request.ErrInvalidParams{Context: "RuleInput"}
  8391. if s.RuleName == nil {
  8392. invalidParams.Add(request.NewErrParamRequired("RuleName"))
  8393. }
  8394. if s.TargetBackupVaultName == nil {
  8395. invalidParams.Add(request.NewErrParamRequired("TargetBackupVaultName"))
  8396. }
  8397. if invalidParams.Len() > 0 {
  8398. return invalidParams
  8399. }
  8400. return nil
  8401. }
  8402. // SetCompletionWindowMinutes sets the CompletionWindowMinutes field's value.
  8403. func (s *RuleInput) SetCompletionWindowMinutes(v int64) *RuleInput {
  8404. s.CompletionWindowMinutes = &v
  8405. return s
  8406. }
  8407. // SetLifecycle sets the Lifecycle field's value.
  8408. func (s *RuleInput) SetLifecycle(v *Lifecycle) *RuleInput {
  8409. s.Lifecycle = v
  8410. return s
  8411. }
  8412. // SetRecoveryPointTags sets the RecoveryPointTags field's value.
  8413. func (s *RuleInput) SetRecoveryPointTags(v map[string]*string) *RuleInput {
  8414. s.RecoveryPointTags = v
  8415. return s
  8416. }
  8417. // SetRuleName sets the RuleName field's value.
  8418. func (s *RuleInput) SetRuleName(v string) *RuleInput {
  8419. s.RuleName = &v
  8420. return s
  8421. }
  8422. // SetScheduleExpression sets the ScheduleExpression field's value.
  8423. func (s *RuleInput) SetScheduleExpression(v string) *RuleInput {
  8424. s.ScheduleExpression = &v
  8425. return s
  8426. }
  8427. // SetStartWindowMinutes sets the StartWindowMinutes field's value.
  8428. func (s *RuleInput) SetStartWindowMinutes(v int64) *RuleInput {
  8429. s.StartWindowMinutes = &v
  8430. return s
  8431. }
  8432. // SetTargetBackupVaultName sets the TargetBackupVaultName field's value.
  8433. func (s *RuleInput) SetTargetBackupVaultName(v string) *RuleInput {
  8434. s.TargetBackupVaultName = &v
  8435. return s
  8436. }
  8437. // Used to specify a set of resources to a backup plan.
  8438. type Selection struct {
  8439. _ struct{} `type:"structure"`
  8440. // The ARN of the IAM role that AWS Backup uses to authenticate when restoring
  8441. // the target resource; for example, arn:aws:iam::123456789012:role/S3Access.
  8442. //
  8443. // IamRoleArn is a required field
  8444. IamRoleArn *string `type:"string" required:"true"`
  8445. // An array of conditions used to specify a set of resources to assign to a
  8446. // backup plan; for example, "StringEquals": {"ec2:ResourceTag/Department":
  8447. // "accounting".
  8448. ListOfTags []*Condition `type:"list"`
  8449. // An array of strings that either contain Amazon Resource Names (ARNs) or match
  8450. // patterns such as "arn:aws:ec2:us-east-1:123456789012:volume/*" of resources
  8451. // to assign to a backup plan.
  8452. Resources []*string `type:"list"`
  8453. // The display name of a resource selection document.
  8454. //
  8455. // SelectionName is a required field
  8456. SelectionName *string `type:"string" required:"true"`
  8457. }
  8458. // String returns the string representation
  8459. func (s Selection) String() string {
  8460. return awsutil.Prettify(s)
  8461. }
  8462. // GoString returns the string representation
  8463. func (s Selection) GoString() string {
  8464. return s.String()
  8465. }
  8466. // Validate inspects the fields of the type to determine if they are valid.
  8467. func (s *Selection) Validate() error {
  8468. invalidParams := request.ErrInvalidParams{Context: "Selection"}
  8469. if s.IamRoleArn == nil {
  8470. invalidParams.Add(request.NewErrParamRequired("IamRoleArn"))
  8471. }
  8472. if s.SelectionName == nil {
  8473. invalidParams.Add(request.NewErrParamRequired("SelectionName"))
  8474. }
  8475. if s.ListOfTags != nil {
  8476. for i, v := range s.ListOfTags {
  8477. if v == nil {
  8478. continue
  8479. }
  8480. if err := v.Validate(); err != nil {
  8481. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ListOfTags", i), err.(request.ErrInvalidParams))
  8482. }
  8483. }
  8484. }
  8485. if invalidParams.Len() > 0 {
  8486. return invalidParams
  8487. }
  8488. return nil
  8489. }
  8490. // SetIamRoleArn sets the IamRoleArn field's value.
  8491. func (s *Selection) SetIamRoleArn(v string) *Selection {
  8492. s.IamRoleArn = &v
  8493. return s
  8494. }
  8495. // SetListOfTags sets the ListOfTags field's value.
  8496. func (s *Selection) SetListOfTags(v []*Condition) *Selection {
  8497. s.ListOfTags = v
  8498. return s
  8499. }
  8500. // SetResources sets the Resources field's value.
  8501. func (s *Selection) SetResources(v []*string) *Selection {
  8502. s.Resources = v
  8503. return s
  8504. }
  8505. // SetSelectionName sets the SelectionName field's value.
  8506. func (s *Selection) SetSelectionName(v string) *Selection {
  8507. s.SelectionName = &v
  8508. return s
  8509. }
  8510. // Contains metadata about a BackupSelection object.
  8511. type SelectionsListMember struct {
  8512. _ struct{} `type:"structure"`
  8513. // Uniquely identifies a backup plan.
  8514. BackupPlanId *string `type:"string"`
  8515. // The date and time a backup plan is created, in Unix format and Coordinated
  8516. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  8517. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  8518. // 12:11:30.087 AM.
  8519. CreationDate *time.Time `type:"timestamp"`
  8520. // A unique string that identifies the request and allows failed requests to
  8521. // be retried without the risk of executing the operation twice.
  8522. CreatorRequestId *string `type:"string"`
  8523. // Specifies the IAM role Amazon Resource Name (ARN) to create the target recovery
  8524. // point; for example, arn:aws:iam::123456789012:role/S3Access.
  8525. IamRoleArn *string `type:"string"`
  8526. // Uniquely identifies a request to assign a set of resources to a backup plan.
  8527. SelectionId *string `type:"string"`
  8528. // The display name of a resource selection document.
  8529. SelectionName *string `type:"string"`
  8530. }
  8531. // String returns the string representation
  8532. func (s SelectionsListMember) String() string {
  8533. return awsutil.Prettify(s)
  8534. }
  8535. // GoString returns the string representation
  8536. func (s SelectionsListMember) GoString() string {
  8537. return s.String()
  8538. }
  8539. // SetBackupPlanId sets the BackupPlanId field's value.
  8540. func (s *SelectionsListMember) SetBackupPlanId(v string) *SelectionsListMember {
  8541. s.BackupPlanId = &v
  8542. return s
  8543. }
  8544. // SetCreationDate sets the CreationDate field's value.
  8545. func (s *SelectionsListMember) SetCreationDate(v time.Time) *SelectionsListMember {
  8546. s.CreationDate = &v
  8547. return s
  8548. }
  8549. // SetCreatorRequestId sets the CreatorRequestId field's value.
  8550. func (s *SelectionsListMember) SetCreatorRequestId(v string) *SelectionsListMember {
  8551. s.CreatorRequestId = &v
  8552. return s
  8553. }
  8554. // SetIamRoleArn sets the IamRoleArn field's value.
  8555. func (s *SelectionsListMember) SetIamRoleArn(v string) *SelectionsListMember {
  8556. s.IamRoleArn = &v
  8557. return s
  8558. }
  8559. // SetSelectionId sets the SelectionId field's value.
  8560. func (s *SelectionsListMember) SetSelectionId(v string) *SelectionsListMember {
  8561. s.SelectionId = &v
  8562. return s
  8563. }
  8564. // SetSelectionName sets the SelectionName field's value.
  8565. func (s *SelectionsListMember) SetSelectionName(v string) *SelectionsListMember {
  8566. s.SelectionName = &v
  8567. return s
  8568. }
  8569. type StartBackupJobInput struct {
  8570. _ struct{} `type:"structure"`
  8571. // The name of a logical container where backups are stored. Backup vaults are
  8572. // identified by names that are unique to the account used to create them and
  8573. // the AWS Region where they are created. They consist of lowercase letters,
  8574. // numbers, and hyphens.
  8575. //
  8576. // BackupVaultName is a required field
  8577. BackupVaultName *string `type:"string" required:"true"`
  8578. // The amount of time AWS Backup attempts a backup before canceling the job
  8579. // and returning an error.
  8580. CompleteWindowMinutes *int64 `type:"long"`
  8581. // Specifies the IAM role ARN used to create the target recovery point; for
  8582. // example, arn:aws:iam::123456789012:role/S3Access.
  8583. //
  8584. // IamRoleArn is a required field
  8585. IamRoleArn *string `type:"string" required:"true"`
  8586. // A customer chosen string that can be used to distinguish between calls to
  8587. // StartBackupJob. Idempotency tokens time out after one hour. Therefore, if
  8588. // you call StartBackupJob multiple times with the same idempotency token within
  8589. // one hour, AWS Backup recognizes that you are requesting only one backup job
  8590. // and initiates only one. If you change the idempotency token for each call,
  8591. // AWS Backup recognizes that you are requesting to start multiple backups.
  8592. IdempotencyToken *string `type:"string"`
  8593. // The lifecycle defines when a protected resource is transitioned to cold storage
  8594. // and when it expires. AWS Backup will transition and expire backups automatically
  8595. // according to the lifecycle that you define.
  8596. //
  8597. // Backups transitioned to cold storage must be stored in cold storage for a
  8598. // minimum of 90 days. Therefore, the “expire after days” setting must be 90
  8599. // days greater than the “transition to cold after days” setting. The “transition
  8600. // to cold after days” setting cannot be changed after a backup has been transitioned
  8601. // to cold.
  8602. Lifecycle *Lifecycle `type:"structure"`
  8603. // To help organize your resources, you can assign your own metadata to the
  8604. // resources that you create. Each tag is a key-value pair.
  8605. RecoveryPointTags map[string]*string `type:"map" sensitive:"true"`
  8606. // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format
  8607. // of the ARN depends on the resource type.
  8608. //
  8609. // ResourceArn is a required field
  8610. ResourceArn *string `type:"string" required:"true"`
  8611. // The amount of time in minutes before beginning a backup.
  8612. StartWindowMinutes *int64 `type:"long"`
  8613. }
  8614. // String returns the string representation
  8615. func (s StartBackupJobInput) String() string {
  8616. return awsutil.Prettify(s)
  8617. }
  8618. // GoString returns the string representation
  8619. func (s StartBackupJobInput) GoString() string {
  8620. return s.String()
  8621. }
  8622. // Validate inspects the fields of the type to determine if they are valid.
  8623. func (s *StartBackupJobInput) Validate() error {
  8624. invalidParams := request.ErrInvalidParams{Context: "StartBackupJobInput"}
  8625. if s.BackupVaultName == nil {
  8626. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  8627. }
  8628. if s.IamRoleArn == nil {
  8629. invalidParams.Add(request.NewErrParamRequired("IamRoleArn"))
  8630. }
  8631. if s.ResourceArn == nil {
  8632. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  8633. }
  8634. if invalidParams.Len() > 0 {
  8635. return invalidParams
  8636. }
  8637. return nil
  8638. }
  8639. // SetBackupVaultName sets the BackupVaultName field's value.
  8640. func (s *StartBackupJobInput) SetBackupVaultName(v string) *StartBackupJobInput {
  8641. s.BackupVaultName = &v
  8642. return s
  8643. }
  8644. // SetCompleteWindowMinutes sets the CompleteWindowMinutes field's value.
  8645. func (s *StartBackupJobInput) SetCompleteWindowMinutes(v int64) *StartBackupJobInput {
  8646. s.CompleteWindowMinutes = &v
  8647. return s
  8648. }
  8649. // SetIamRoleArn sets the IamRoleArn field's value.
  8650. func (s *StartBackupJobInput) SetIamRoleArn(v string) *StartBackupJobInput {
  8651. s.IamRoleArn = &v
  8652. return s
  8653. }
  8654. // SetIdempotencyToken sets the IdempotencyToken field's value.
  8655. func (s *StartBackupJobInput) SetIdempotencyToken(v string) *StartBackupJobInput {
  8656. s.IdempotencyToken = &v
  8657. return s
  8658. }
  8659. // SetLifecycle sets the Lifecycle field's value.
  8660. func (s *StartBackupJobInput) SetLifecycle(v *Lifecycle) *StartBackupJobInput {
  8661. s.Lifecycle = v
  8662. return s
  8663. }
  8664. // SetRecoveryPointTags sets the RecoveryPointTags field's value.
  8665. func (s *StartBackupJobInput) SetRecoveryPointTags(v map[string]*string) *StartBackupJobInput {
  8666. s.RecoveryPointTags = v
  8667. return s
  8668. }
  8669. // SetResourceArn sets the ResourceArn field's value.
  8670. func (s *StartBackupJobInput) SetResourceArn(v string) *StartBackupJobInput {
  8671. s.ResourceArn = &v
  8672. return s
  8673. }
  8674. // SetStartWindowMinutes sets the StartWindowMinutes field's value.
  8675. func (s *StartBackupJobInput) SetStartWindowMinutes(v int64) *StartBackupJobInput {
  8676. s.StartWindowMinutes = &v
  8677. return s
  8678. }
  8679. type StartBackupJobOutput struct {
  8680. _ struct{} `type:"structure"`
  8681. // Uniquely identifies a request to AWS Backup to back up a resource.
  8682. BackupJobId *string `type:"string"`
  8683. // The date and time that a backup job is started, in Unix format and Coordinated
  8684. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  8685. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  8686. // 12:11:30.087 AM.
  8687. CreationDate *time.Time `type:"timestamp"`
  8688. // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  8689. RecoveryPointArn *string `type:"string"`
  8690. }
  8691. // String returns the string representation
  8692. func (s StartBackupJobOutput) String() string {
  8693. return awsutil.Prettify(s)
  8694. }
  8695. // GoString returns the string representation
  8696. func (s StartBackupJobOutput) GoString() string {
  8697. return s.String()
  8698. }
  8699. // SetBackupJobId sets the BackupJobId field's value.
  8700. func (s *StartBackupJobOutput) SetBackupJobId(v string) *StartBackupJobOutput {
  8701. s.BackupJobId = &v
  8702. return s
  8703. }
  8704. // SetCreationDate sets the CreationDate field's value.
  8705. func (s *StartBackupJobOutput) SetCreationDate(v time.Time) *StartBackupJobOutput {
  8706. s.CreationDate = &v
  8707. return s
  8708. }
  8709. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  8710. func (s *StartBackupJobOutput) SetRecoveryPointArn(v string) *StartBackupJobOutput {
  8711. s.RecoveryPointArn = &v
  8712. return s
  8713. }
  8714. type StartRestoreJobInput struct {
  8715. _ struct{} `type:"structure"`
  8716. // The Amazon Resource Name (ARN) of the IAM role that AWS Backup uses to create
  8717. // the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access.
  8718. //
  8719. // IamRoleArn is a required field
  8720. IamRoleArn *string `type:"string" required:"true"`
  8721. // A customer chosen string that can be used to distinguish between calls to
  8722. // StartRestoreJob. Idempotency tokens time out after one hour. Therefore, if
  8723. // you call StartRestoreJob multiple times with the same idempotency token within
  8724. // one hour, AWS Backup recognizes that you are requesting only one restore
  8725. // job and initiates only one. If you change the idempotency token for each
  8726. // call, AWS Backup recognizes that you are requesting to start multiple restores.
  8727. IdempotencyToken *string `type:"string"`
  8728. // A set of metadata key-value pairs. Lists the metadata that the recovery point
  8729. // was created with.
  8730. //
  8731. // Metadata is a required field
  8732. Metadata map[string]*string `type:"map" required:"true"`
  8733. // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  8734. //
  8735. // RecoveryPointArn is a required field
  8736. RecoveryPointArn *string `type:"string" required:"true"`
  8737. // Starts a job to restore a recovery point for one of the following resources:
  8738. //
  8739. // * EBS for Amazon Elastic Block Store
  8740. //
  8741. // * SGW for AWS Storage Gateway
  8742. //
  8743. // * RDS for Amazon Relational Database Service
  8744. //
  8745. // * DDB for Amazon DynamoDB
  8746. //
  8747. // * EFS for Amazon Elastic File System
  8748. ResourceType *string `type:"string"`
  8749. }
  8750. // String returns the string representation
  8751. func (s StartRestoreJobInput) String() string {
  8752. return awsutil.Prettify(s)
  8753. }
  8754. // GoString returns the string representation
  8755. func (s StartRestoreJobInput) GoString() string {
  8756. return s.String()
  8757. }
  8758. // Validate inspects the fields of the type to determine if they are valid.
  8759. func (s *StartRestoreJobInput) Validate() error {
  8760. invalidParams := request.ErrInvalidParams{Context: "StartRestoreJobInput"}
  8761. if s.IamRoleArn == nil {
  8762. invalidParams.Add(request.NewErrParamRequired("IamRoleArn"))
  8763. }
  8764. if s.Metadata == nil {
  8765. invalidParams.Add(request.NewErrParamRequired("Metadata"))
  8766. }
  8767. if s.RecoveryPointArn == nil {
  8768. invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn"))
  8769. }
  8770. if invalidParams.Len() > 0 {
  8771. return invalidParams
  8772. }
  8773. return nil
  8774. }
  8775. // SetIamRoleArn sets the IamRoleArn field's value.
  8776. func (s *StartRestoreJobInput) SetIamRoleArn(v string) *StartRestoreJobInput {
  8777. s.IamRoleArn = &v
  8778. return s
  8779. }
  8780. // SetIdempotencyToken sets the IdempotencyToken field's value.
  8781. func (s *StartRestoreJobInput) SetIdempotencyToken(v string) *StartRestoreJobInput {
  8782. s.IdempotencyToken = &v
  8783. return s
  8784. }
  8785. // SetMetadata sets the Metadata field's value.
  8786. func (s *StartRestoreJobInput) SetMetadata(v map[string]*string) *StartRestoreJobInput {
  8787. s.Metadata = v
  8788. return s
  8789. }
  8790. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  8791. func (s *StartRestoreJobInput) SetRecoveryPointArn(v string) *StartRestoreJobInput {
  8792. s.RecoveryPointArn = &v
  8793. return s
  8794. }
  8795. // SetResourceType sets the ResourceType field's value.
  8796. func (s *StartRestoreJobInput) SetResourceType(v string) *StartRestoreJobInput {
  8797. s.ResourceType = &v
  8798. return s
  8799. }
  8800. type StartRestoreJobOutput struct {
  8801. _ struct{} `type:"structure"`
  8802. // Uniquely identifies the job that restores a recovery point.
  8803. RestoreJobId *string `type:"string"`
  8804. }
  8805. // String returns the string representation
  8806. func (s StartRestoreJobOutput) String() string {
  8807. return awsutil.Prettify(s)
  8808. }
  8809. // GoString returns the string representation
  8810. func (s StartRestoreJobOutput) GoString() string {
  8811. return s.String()
  8812. }
  8813. // SetRestoreJobId sets the RestoreJobId field's value.
  8814. func (s *StartRestoreJobOutput) SetRestoreJobId(v string) *StartRestoreJobOutput {
  8815. s.RestoreJobId = &v
  8816. return s
  8817. }
  8818. type StopBackupJobInput struct {
  8819. _ struct{} `type:"structure"`
  8820. // Uniquely identifies a request to AWS Backup to back up a resource.
  8821. //
  8822. // BackupJobId is a required field
  8823. BackupJobId *string `location:"uri" locationName:"backupJobId" type:"string" required:"true"`
  8824. }
  8825. // String returns the string representation
  8826. func (s StopBackupJobInput) String() string {
  8827. return awsutil.Prettify(s)
  8828. }
  8829. // GoString returns the string representation
  8830. func (s StopBackupJobInput) GoString() string {
  8831. return s.String()
  8832. }
  8833. // Validate inspects the fields of the type to determine if they are valid.
  8834. func (s *StopBackupJobInput) Validate() error {
  8835. invalidParams := request.ErrInvalidParams{Context: "StopBackupJobInput"}
  8836. if s.BackupJobId == nil {
  8837. invalidParams.Add(request.NewErrParamRequired("BackupJobId"))
  8838. }
  8839. if s.BackupJobId != nil && len(*s.BackupJobId) < 1 {
  8840. invalidParams.Add(request.NewErrParamMinLen("BackupJobId", 1))
  8841. }
  8842. if invalidParams.Len() > 0 {
  8843. return invalidParams
  8844. }
  8845. return nil
  8846. }
  8847. // SetBackupJobId sets the BackupJobId field's value.
  8848. func (s *StopBackupJobInput) SetBackupJobId(v string) *StopBackupJobInput {
  8849. s.BackupJobId = &v
  8850. return s
  8851. }
  8852. type StopBackupJobOutput struct {
  8853. _ struct{} `type:"structure"`
  8854. }
  8855. // String returns the string representation
  8856. func (s StopBackupJobOutput) String() string {
  8857. return awsutil.Prettify(s)
  8858. }
  8859. // GoString returns the string representation
  8860. func (s StopBackupJobOutput) GoString() string {
  8861. return s.String()
  8862. }
  8863. type TagResourceInput struct {
  8864. _ struct{} `type:"structure"`
  8865. // An ARN that uniquely identifies a resource. The format of the ARN depends
  8866. // on the type of the tagged resource.
  8867. //
  8868. // ResourceArn is a required field
  8869. ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"`
  8870. // Key-value pairs that are used to help organize your resources. You can assign
  8871. // your own metadata to the resources you create.
  8872. //
  8873. // Tags is a required field
  8874. Tags map[string]*string `type:"map" required:"true" sensitive:"true"`
  8875. }
  8876. // String returns the string representation
  8877. func (s TagResourceInput) String() string {
  8878. return awsutil.Prettify(s)
  8879. }
  8880. // GoString returns the string representation
  8881. func (s TagResourceInput) GoString() string {
  8882. return s.String()
  8883. }
  8884. // Validate inspects the fields of the type to determine if they are valid.
  8885. func (s *TagResourceInput) Validate() error {
  8886. invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  8887. if s.ResourceArn == nil {
  8888. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  8889. }
  8890. if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  8891. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  8892. }
  8893. if s.Tags == nil {
  8894. invalidParams.Add(request.NewErrParamRequired("Tags"))
  8895. }
  8896. if invalidParams.Len() > 0 {
  8897. return invalidParams
  8898. }
  8899. return nil
  8900. }
  8901. // SetResourceArn sets the ResourceArn field's value.
  8902. func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput {
  8903. s.ResourceArn = &v
  8904. return s
  8905. }
  8906. // SetTags sets the Tags field's value.
  8907. func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput {
  8908. s.Tags = v
  8909. return s
  8910. }
  8911. type TagResourceOutput struct {
  8912. _ struct{} `type:"structure"`
  8913. }
  8914. // String returns the string representation
  8915. func (s TagResourceOutput) String() string {
  8916. return awsutil.Prettify(s)
  8917. }
  8918. // GoString returns the string representation
  8919. func (s TagResourceOutput) GoString() string {
  8920. return s.String()
  8921. }
  8922. type UntagResourceInput struct {
  8923. _ struct{} `type:"structure"`
  8924. // An ARN that uniquely identifies a resource. The format of the ARN depends
  8925. // on the type of the tagged resource.
  8926. //
  8927. // ResourceArn is a required field
  8928. ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"`
  8929. // A list of keys to identify which key-value tags to remove from a resource.
  8930. //
  8931. // TagKeyList is a required field
  8932. TagKeyList []*string `type:"list" required:"true" sensitive:"true"`
  8933. }
  8934. // String returns the string representation
  8935. func (s UntagResourceInput) String() string {
  8936. return awsutil.Prettify(s)
  8937. }
  8938. // GoString returns the string representation
  8939. func (s UntagResourceInput) GoString() string {
  8940. return s.String()
  8941. }
  8942. // Validate inspects the fields of the type to determine if they are valid.
  8943. func (s *UntagResourceInput) Validate() error {
  8944. invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  8945. if s.ResourceArn == nil {
  8946. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  8947. }
  8948. if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  8949. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  8950. }
  8951. if s.TagKeyList == nil {
  8952. invalidParams.Add(request.NewErrParamRequired("TagKeyList"))
  8953. }
  8954. if invalidParams.Len() > 0 {
  8955. return invalidParams
  8956. }
  8957. return nil
  8958. }
  8959. // SetResourceArn sets the ResourceArn field's value.
  8960. func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput {
  8961. s.ResourceArn = &v
  8962. return s
  8963. }
  8964. // SetTagKeyList sets the TagKeyList field's value.
  8965. func (s *UntagResourceInput) SetTagKeyList(v []*string) *UntagResourceInput {
  8966. s.TagKeyList = v
  8967. return s
  8968. }
  8969. type UntagResourceOutput struct {
  8970. _ struct{} `type:"structure"`
  8971. }
  8972. // String returns the string representation
  8973. func (s UntagResourceOutput) String() string {
  8974. return awsutil.Prettify(s)
  8975. }
  8976. // GoString returns the string representation
  8977. func (s UntagResourceOutput) GoString() string {
  8978. return s.String()
  8979. }
  8980. type UpdateBackupPlanInput struct {
  8981. _ struct{} `type:"structure"`
  8982. // Specifies the body of a backup plan. Includes a BackupPlanName and one or
  8983. // more sets of Rules.
  8984. //
  8985. // BackupPlan is a required field
  8986. BackupPlan *PlanInput `type:"structure" required:"true"`
  8987. // Uniquely identifies a backup plan.
  8988. //
  8989. // BackupPlanId is a required field
  8990. BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
  8991. }
  8992. // String returns the string representation
  8993. func (s UpdateBackupPlanInput) String() string {
  8994. return awsutil.Prettify(s)
  8995. }
  8996. // GoString returns the string representation
  8997. func (s UpdateBackupPlanInput) GoString() string {
  8998. return s.String()
  8999. }
  9000. // Validate inspects the fields of the type to determine if they are valid.
  9001. func (s *UpdateBackupPlanInput) Validate() error {
  9002. invalidParams := request.ErrInvalidParams{Context: "UpdateBackupPlanInput"}
  9003. if s.BackupPlan == nil {
  9004. invalidParams.Add(request.NewErrParamRequired("BackupPlan"))
  9005. }
  9006. if s.BackupPlanId == nil {
  9007. invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
  9008. }
  9009. if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
  9010. invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
  9011. }
  9012. if s.BackupPlan != nil {
  9013. if err := s.BackupPlan.Validate(); err != nil {
  9014. invalidParams.AddNested("BackupPlan", err.(request.ErrInvalidParams))
  9015. }
  9016. }
  9017. if invalidParams.Len() > 0 {
  9018. return invalidParams
  9019. }
  9020. return nil
  9021. }
  9022. // SetBackupPlan sets the BackupPlan field's value.
  9023. func (s *UpdateBackupPlanInput) SetBackupPlan(v *PlanInput) *UpdateBackupPlanInput {
  9024. s.BackupPlan = v
  9025. return s
  9026. }
  9027. // SetBackupPlanId sets the BackupPlanId field's value.
  9028. func (s *UpdateBackupPlanInput) SetBackupPlanId(v string) *UpdateBackupPlanInput {
  9029. s.BackupPlanId = &v
  9030. return s
  9031. }
  9032. type UpdateBackupPlanOutput struct {
  9033. _ struct{} `type:"structure"`
  9034. // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for
  9035. // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50.
  9036. BackupPlanArn *string `type:"string"`
  9037. // Uniquely identifies a backup plan.
  9038. BackupPlanId *string `type:"string"`
  9039. // The date and time a backup plan is updated, in Unix format and Coordinated
  9040. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  9041. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  9042. // 12:11:30.087 AM.
  9043. CreationDate *time.Time `type:"timestamp"`
  9044. // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most
  9045. // 1,024 bytes long. Version Ids cannot be edited.
  9046. VersionId *string `type:"string"`
  9047. }
  9048. // String returns the string representation
  9049. func (s UpdateBackupPlanOutput) String() string {
  9050. return awsutil.Prettify(s)
  9051. }
  9052. // GoString returns the string representation
  9053. func (s UpdateBackupPlanOutput) GoString() string {
  9054. return s.String()
  9055. }
  9056. // SetBackupPlanArn sets the BackupPlanArn field's value.
  9057. func (s *UpdateBackupPlanOutput) SetBackupPlanArn(v string) *UpdateBackupPlanOutput {
  9058. s.BackupPlanArn = &v
  9059. return s
  9060. }
  9061. // SetBackupPlanId sets the BackupPlanId field's value.
  9062. func (s *UpdateBackupPlanOutput) SetBackupPlanId(v string) *UpdateBackupPlanOutput {
  9063. s.BackupPlanId = &v
  9064. return s
  9065. }
  9066. // SetCreationDate sets the CreationDate field's value.
  9067. func (s *UpdateBackupPlanOutput) SetCreationDate(v time.Time) *UpdateBackupPlanOutput {
  9068. s.CreationDate = &v
  9069. return s
  9070. }
  9071. // SetVersionId sets the VersionId field's value.
  9072. func (s *UpdateBackupPlanOutput) SetVersionId(v string) *UpdateBackupPlanOutput {
  9073. s.VersionId = &v
  9074. return s
  9075. }
  9076. type UpdateRecoveryPointLifecycleInput struct {
  9077. _ struct{} `type:"structure"`
  9078. // The name of a logical container where backups are stored. Backup vaults are
  9079. // identified by names that are unique to the account used to create them and
  9080. // the AWS Region where they are created. They consist of lowercase letters,
  9081. // numbers, and hyphens.
  9082. //
  9083. // BackupVaultName is a required field
  9084. BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
  9085. // The lifecycle defines when a protected resource is transitioned to cold storage
  9086. // and when it expires. AWS Backup transitions and expires backups automatically
  9087. // according to the lifecycle that you define.
  9088. //
  9089. // Backups transitioned to cold storage must be stored in cold storage for a
  9090. // minimum of 90 days. Therefore, the “expire after days” setting must be 90
  9091. // days greater than the “transition to cold after days” setting. The “transition
  9092. // to cold after days” setting cannot be changed after a backup has been transitioned
  9093. // to cold.
  9094. Lifecycle *Lifecycle `type:"structure"`
  9095. // An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
  9096. // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  9097. //
  9098. // RecoveryPointArn is a required field
  9099. RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"`
  9100. }
  9101. // String returns the string representation
  9102. func (s UpdateRecoveryPointLifecycleInput) String() string {
  9103. return awsutil.Prettify(s)
  9104. }
  9105. // GoString returns the string representation
  9106. func (s UpdateRecoveryPointLifecycleInput) GoString() string {
  9107. return s.String()
  9108. }
  9109. // Validate inspects the fields of the type to determine if they are valid.
  9110. func (s *UpdateRecoveryPointLifecycleInput) Validate() error {
  9111. invalidParams := request.ErrInvalidParams{Context: "UpdateRecoveryPointLifecycleInput"}
  9112. if s.BackupVaultName == nil {
  9113. invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
  9114. }
  9115. if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
  9116. invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
  9117. }
  9118. if s.RecoveryPointArn == nil {
  9119. invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn"))
  9120. }
  9121. if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 {
  9122. invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1))
  9123. }
  9124. if invalidParams.Len() > 0 {
  9125. return invalidParams
  9126. }
  9127. return nil
  9128. }
  9129. // SetBackupVaultName sets the BackupVaultName field's value.
  9130. func (s *UpdateRecoveryPointLifecycleInput) SetBackupVaultName(v string) *UpdateRecoveryPointLifecycleInput {
  9131. s.BackupVaultName = &v
  9132. return s
  9133. }
  9134. // SetLifecycle sets the Lifecycle field's value.
  9135. func (s *UpdateRecoveryPointLifecycleInput) SetLifecycle(v *Lifecycle) *UpdateRecoveryPointLifecycleInput {
  9136. s.Lifecycle = v
  9137. return s
  9138. }
  9139. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  9140. func (s *UpdateRecoveryPointLifecycleInput) SetRecoveryPointArn(v string) *UpdateRecoveryPointLifecycleInput {
  9141. s.RecoveryPointArn = &v
  9142. return s
  9143. }
  9144. type UpdateRecoveryPointLifecycleOutput struct {
  9145. _ struct{} `type:"structure"`
  9146. // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
  9147. BackupVaultArn *string `type:"string"`
  9148. // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt
  9149. // timestamps.
  9150. CalculatedLifecycle *CalculatedLifecycle `type:"structure"`
  9151. // The lifecycle defines when a protected resource is transitioned to cold storage
  9152. // and when it expires. AWS Backup transitions and expires backups automatically
  9153. // according to the lifecycle that you define.
  9154. //
  9155. // Backups transitioned to cold storage must be stored in cold storage for a
  9156. // minimum of 90 days. Therefore, the “expire after days” setting must be 90
  9157. // days greater than the “transition to cold after days” setting. The “transition
  9158. // to cold after days” setting cannot be changed after a backup has been transitioned
  9159. // to cold.
  9160. Lifecycle *Lifecycle `type:"structure"`
  9161. // An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
  9162. // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
  9163. RecoveryPointArn *string `type:"string"`
  9164. }
  9165. // String returns the string representation
  9166. func (s UpdateRecoveryPointLifecycleOutput) String() string {
  9167. return awsutil.Prettify(s)
  9168. }
  9169. // GoString returns the string representation
  9170. func (s UpdateRecoveryPointLifecycleOutput) GoString() string {
  9171. return s.String()
  9172. }
  9173. // SetBackupVaultArn sets the BackupVaultArn field's value.
  9174. func (s *UpdateRecoveryPointLifecycleOutput) SetBackupVaultArn(v string) *UpdateRecoveryPointLifecycleOutput {
  9175. s.BackupVaultArn = &v
  9176. return s
  9177. }
  9178. // SetCalculatedLifecycle sets the CalculatedLifecycle field's value.
  9179. func (s *UpdateRecoveryPointLifecycleOutput) SetCalculatedLifecycle(v *CalculatedLifecycle) *UpdateRecoveryPointLifecycleOutput {
  9180. s.CalculatedLifecycle = v
  9181. return s
  9182. }
  9183. // SetLifecycle sets the Lifecycle field's value.
  9184. func (s *UpdateRecoveryPointLifecycleOutput) SetLifecycle(v *Lifecycle) *UpdateRecoveryPointLifecycleOutput {
  9185. s.Lifecycle = v
  9186. return s
  9187. }
  9188. // SetRecoveryPointArn sets the RecoveryPointArn field's value.
  9189. func (s *UpdateRecoveryPointLifecycleOutput) SetRecoveryPointArn(v string) *UpdateRecoveryPointLifecycleOutput {
  9190. s.RecoveryPointArn = &v
  9191. return s
  9192. }
  9193. // Contains metadata about a backup vault.
  9194. type VaultListMember struct {
  9195. _ struct{} `type:"structure"`
  9196. // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for
  9197. // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
  9198. BackupVaultArn *string `type:"string"`
  9199. // The name of a logical container where backups are stored. Backup vaults are
  9200. // identified by names that are unique to the account used to create them and
  9201. // the AWS Region where they are created. They consist of lowercase letters,
  9202. // numbers, and hyphens.
  9203. BackupVaultName *string `type:"string"`
  9204. // The date and time a resource backup is created, in Unix format and Coordinated
  9205. // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
  9206. // For example, the value 1516925490.087 represents Friday, January 26, 2018
  9207. // 12:11:30.087 AM.
  9208. CreationDate *time.Time `type:"timestamp"`
  9209. // A unique string that identifies the request and allows failed requests to
  9210. // be retried without the risk of executing the operation twice.
  9211. CreatorRequestId *string `type:"string"`
  9212. // The server-side encryption key that is used to protect your backups; for
  9213. // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
  9214. EncryptionKeyArn *string `type:"string"`
  9215. // The number of recovery points that are stored in a backup vault.
  9216. NumberOfRecoveryPoints *int64 `type:"long"`
  9217. }
  9218. // String returns the string representation
  9219. func (s VaultListMember) String() string {
  9220. return awsutil.Prettify(s)
  9221. }
  9222. // GoString returns the string representation
  9223. func (s VaultListMember) GoString() string {
  9224. return s.String()
  9225. }
  9226. // SetBackupVaultArn sets the BackupVaultArn field's value.
  9227. func (s *VaultListMember) SetBackupVaultArn(v string) *VaultListMember {
  9228. s.BackupVaultArn = &v
  9229. return s
  9230. }
  9231. // SetBackupVaultName sets the BackupVaultName field's value.
  9232. func (s *VaultListMember) SetBackupVaultName(v string) *VaultListMember {
  9233. s.BackupVaultName = &v
  9234. return s
  9235. }
  9236. // SetCreationDate sets the CreationDate field's value.
  9237. func (s *VaultListMember) SetCreationDate(v time.Time) *VaultListMember {
  9238. s.CreationDate = &v
  9239. return s
  9240. }
  9241. // SetCreatorRequestId sets the CreatorRequestId field's value.
  9242. func (s *VaultListMember) SetCreatorRequestId(v string) *VaultListMember {
  9243. s.CreatorRequestId = &v
  9244. return s
  9245. }
  9246. // SetEncryptionKeyArn sets the EncryptionKeyArn field's value.
  9247. func (s *VaultListMember) SetEncryptionKeyArn(v string) *VaultListMember {
  9248. s.EncryptionKeyArn = &v
  9249. return s
  9250. }
  9251. // SetNumberOfRecoveryPoints sets the NumberOfRecoveryPoints field's value.
  9252. func (s *VaultListMember) SetNumberOfRecoveryPoints(v int64) *VaultListMember {
  9253. s.NumberOfRecoveryPoints = &v
  9254. return s
  9255. }
  9256. const (
  9257. // ConditionTypeStringequals is a ConditionType enum value
  9258. ConditionTypeStringequals = "STRINGEQUALS"
  9259. )
  9260. const (
  9261. // JobStateCreated is a JobState enum value
  9262. JobStateCreated = "CREATED"
  9263. // JobStatePending is a JobState enum value
  9264. JobStatePending = "PENDING"
  9265. // JobStateRunning is a JobState enum value
  9266. JobStateRunning = "RUNNING"
  9267. // JobStateAborting is a JobState enum value
  9268. JobStateAborting = "ABORTING"
  9269. // JobStateAborted is a JobState enum value
  9270. JobStateAborted = "ABORTED"
  9271. // JobStateCompleted is a JobState enum value
  9272. JobStateCompleted = "COMPLETED"
  9273. // JobStateFailed is a JobState enum value
  9274. JobStateFailed = "FAILED"
  9275. // JobStateExpired is a JobState enum value
  9276. JobStateExpired = "EXPIRED"
  9277. )
  9278. const (
  9279. // RecoveryPointStatusCompleted is a RecoveryPointStatus enum value
  9280. RecoveryPointStatusCompleted = "COMPLETED"
  9281. // RecoveryPointStatusPartial is a RecoveryPointStatus enum value
  9282. RecoveryPointStatusPartial = "PARTIAL"
  9283. // RecoveryPointStatusDeleting is a RecoveryPointStatus enum value
  9284. RecoveryPointStatusDeleting = "DELETING"
  9285. // RecoveryPointStatusExpired is a RecoveryPointStatus enum value
  9286. RecoveryPointStatusExpired = "EXPIRED"
  9287. )
  9288. const (
  9289. // RestoreJobStatusPending is a RestoreJobStatus enum value
  9290. RestoreJobStatusPending = "PENDING"
  9291. // RestoreJobStatusRunning is a RestoreJobStatus enum value
  9292. RestoreJobStatusRunning = "RUNNING"
  9293. // RestoreJobStatusCompleted is a RestoreJobStatus enum value
  9294. RestoreJobStatusCompleted = "COMPLETED"
  9295. // RestoreJobStatusAborted is a RestoreJobStatus enum value
  9296. RestoreJobStatusAborted = "ABORTED"
  9297. // RestoreJobStatusFailed is a RestoreJobStatus enum value
  9298. RestoreJobStatusFailed = "FAILED"
  9299. )
  9300. const (
  9301. // StorageClassWarm is a StorageClass enum value
  9302. StorageClassWarm = "WARM"
  9303. // StorageClassCold is a StorageClass enum value
  9304. StorageClassCold = "COLD"
  9305. // StorageClassDeleted is a StorageClass enum value
  9306. StorageClassDeleted = "DELETED"
  9307. )
  9308. const (
  9309. // VaultEventBackupJobStarted is a VaultEvent enum value
  9310. VaultEventBackupJobStarted = "BACKUP_JOB_STARTED"
  9311. // VaultEventBackupJobCompleted is a VaultEvent enum value
  9312. VaultEventBackupJobCompleted = "BACKUP_JOB_COMPLETED"
  9313. // VaultEventRestoreJobStarted is a VaultEvent enum value
  9314. VaultEventRestoreJobStarted = "RESTORE_JOB_STARTED"
  9315. // VaultEventRestoreJobCompleted is a VaultEvent enum value
  9316. VaultEventRestoreJobCompleted = "RESTORE_JOB_COMPLETED"
  9317. // VaultEventRecoveryPointModified is a VaultEvent enum value
  9318. VaultEventRecoveryPointModified = "RECOVERY_POINT_MODIFIED"
  9319. // VaultEventBackupPlanCreated is a VaultEvent enum value
  9320. VaultEventBackupPlanCreated = "BACKUP_PLAN_CREATED"
  9321. // VaultEventBackupPlanModified is a VaultEvent enum value
  9322. VaultEventBackupPlanModified = "BACKUP_PLAN_MODIFIED"
  9323. )