| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729 |
- // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
- package backup
- import (
- "fmt"
- "time"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/restjson"
- )
- const opCreateBackupPlan = "CreateBackupPlan"
- // CreateBackupPlanRequest generates a "aws/request.Request" representing the
- // client's request for the CreateBackupPlan operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See CreateBackupPlan for more information on using the CreateBackupPlan
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the CreateBackupPlanRequest method.
- // req, resp := client.CreateBackupPlanRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupPlan
- func (c *Backup) CreateBackupPlanRequest(input *CreateBackupPlanInput) (req *request.Request, output *CreateBackupPlanOutput) {
- op := &request.Operation{
- Name: opCreateBackupPlan,
- HTTPMethod: "PUT",
- HTTPPath: "/backup/plans/",
- }
- if input == nil {
- input = &CreateBackupPlanInput{}
- }
- output = &CreateBackupPlanOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // CreateBackupPlan API operation for AWS Backup.
- //
- // Backup plans are documents that contain information that AWS Backup uses
- // to schedule tasks that create recovery points of resources.
- //
- // If you call CreateBackupPlan with a plan that already exists, the existing
- // backupPlanId is returned.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation CreateBackupPlan for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeLimitExceededException "LimitExceededException"
- // A limit in the request has been exceeded; for example, a maximum number of
- // items allowed in a request.
- //
- // * ErrCodeAlreadyExistsException "AlreadyExistsException"
- // The required resource already exists.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupPlan
- func (c *Backup) CreateBackupPlan(input *CreateBackupPlanInput) (*CreateBackupPlanOutput, error) {
- req, out := c.CreateBackupPlanRequest(input)
- return out, req.Send()
- }
- // CreateBackupPlanWithContext is the same as CreateBackupPlan with the addition of
- // the ability to pass a context and additional request options.
- //
- // See CreateBackupPlan for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) CreateBackupPlanWithContext(ctx aws.Context, input *CreateBackupPlanInput, opts ...request.Option) (*CreateBackupPlanOutput, error) {
- req, out := c.CreateBackupPlanRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opCreateBackupSelection = "CreateBackupSelection"
- // CreateBackupSelectionRequest generates a "aws/request.Request" representing the
- // client's request for the CreateBackupSelection operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See CreateBackupSelection for more information on using the CreateBackupSelection
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the CreateBackupSelectionRequest method.
- // req, resp := client.CreateBackupSelectionRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupSelection
- func (c *Backup) CreateBackupSelectionRequest(input *CreateBackupSelectionInput) (req *request.Request, output *CreateBackupSelectionOutput) {
- op := &request.Operation{
- Name: opCreateBackupSelection,
- HTTPMethod: "PUT",
- HTTPPath: "/backup/plans/{backupPlanId}/selections/",
- }
- if input == nil {
- input = &CreateBackupSelectionInput{}
- }
- output = &CreateBackupSelectionOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // CreateBackupSelection API operation for AWS Backup.
- //
- // Creates a JSON document that specifies a set of resources to assign to a
- // backup plan. Resources can be included by specifying patterns for a ListOfTags
- // and selected Resources.
- //
- // For example, consider the following patterns:
- //
- // * Resources: "arn:aws:ec2:region:account-id:volume/volume-id"
- //
- // * ConditionKey:"department"
- //
- // ConditionValue:"finance"
- //
- // ConditionType:"StringEquals"
- //
- // * ConditionKey:"importance"
- //
- // ConditionValue:"critical"
- //
- // ConditionType:"StringEquals"
- //
- // Using these patterns would back up all Amazon Elastic Block Store (Amazon
- // EBS) volumes that are tagged as "department=finance", "importance=critical",
- // in addition to an EBS volume with the specified volume Id.
- //
- // Resources and conditions are additive in that all resources that match the
- // pattern are selected. This shouldn't be confused with a logical AND, where
- // all conditions must match. The matching patterns are logically 'put together
- // using the OR operator. In other words, all patterns that match are selected
- // for backup.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation CreateBackupSelection for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeLimitExceededException "LimitExceededException"
- // A limit in the request has been exceeded; for example, a maximum number of
- // items allowed in a request.
- //
- // * ErrCodeAlreadyExistsException "AlreadyExistsException"
- // The required resource already exists.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupSelection
- func (c *Backup) CreateBackupSelection(input *CreateBackupSelectionInput) (*CreateBackupSelectionOutput, error) {
- req, out := c.CreateBackupSelectionRequest(input)
- return out, req.Send()
- }
- // CreateBackupSelectionWithContext is the same as CreateBackupSelection with the addition of
- // the ability to pass a context and additional request options.
- //
- // See CreateBackupSelection for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) CreateBackupSelectionWithContext(ctx aws.Context, input *CreateBackupSelectionInput, opts ...request.Option) (*CreateBackupSelectionOutput, error) {
- req, out := c.CreateBackupSelectionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opCreateBackupVault = "CreateBackupVault"
- // CreateBackupVaultRequest generates a "aws/request.Request" representing the
- // client's request for the CreateBackupVault operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See CreateBackupVault for more information on using the CreateBackupVault
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the CreateBackupVaultRequest method.
- // req, resp := client.CreateBackupVaultRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupVault
- func (c *Backup) CreateBackupVaultRequest(input *CreateBackupVaultInput) (req *request.Request, output *CreateBackupVaultOutput) {
- op := &request.Operation{
- Name: opCreateBackupVault,
- HTTPMethod: "PUT",
- HTTPPath: "/backup-vaults/{backupVaultName}",
- }
- if input == nil {
- input = &CreateBackupVaultInput{}
- }
- output = &CreateBackupVaultOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // CreateBackupVault API operation for AWS Backup.
- //
- // Creates a logical container where backups are stored. A CreateBackupVault
- // request includes a name, optionally one or more resource tags, an encryption
- // key, and a request ID.
- //
- // Sensitive data, such as passport numbers, should not be included the name
- // of a backup vault.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation CreateBackupVault for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // * ErrCodeLimitExceededException "LimitExceededException"
- // A limit in the request has been exceeded; for example, a maximum number of
- // items allowed in a request.
- //
- // * ErrCodeAlreadyExistsException "AlreadyExistsException"
- // The required resource already exists.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupVault
- func (c *Backup) CreateBackupVault(input *CreateBackupVaultInput) (*CreateBackupVaultOutput, error) {
- req, out := c.CreateBackupVaultRequest(input)
- return out, req.Send()
- }
- // CreateBackupVaultWithContext is the same as CreateBackupVault with the addition of
- // the ability to pass a context and additional request options.
- //
- // See CreateBackupVault for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) CreateBackupVaultWithContext(ctx aws.Context, input *CreateBackupVaultInput, opts ...request.Option) (*CreateBackupVaultOutput, error) {
- req, out := c.CreateBackupVaultRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteBackupPlan = "DeleteBackupPlan"
- // DeleteBackupPlanRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteBackupPlan operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteBackupPlan for more information on using the DeleteBackupPlan
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteBackupPlanRequest method.
- // req, resp := client.DeleteBackupPlanRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupPlan
- func (c *Backup) DeleteBackupPlanRequest(input *DeleteBackupPlanInput) (req *request.Request, output *DeleteBackupPlanOutput) {
- op := &request.Operation{
- Name: opDeleteBackupPlan,
- HTTPMethod: "DELETE",
- HTTPPath: "/backup/plans/{backupPlanId}",
- }
- if input == nil {
- input = &DeleteBackupPlanInput{}
- }
- output = &DeleteBackupPlanOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DeleteBackupPlan API operation for AWS Backup.
- //
- // Deletes a backup plan. A backup plan can only be deleted after all associated
- // selections of resources have been deleted. Deleting a backup plan deletes
- // the current version of a backup plan. Previous versions, if any, will still
- // exist.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation DeleteBackupPlan for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // Indicates that something is wrong with the input to the request. For example,
- // a parameter is of the wrong type.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupPlan
- func (c *Backup) DeleteBackupPlan(input *DeleteBackupPlanInput) (*DeleteBackupPlanOutput, error) {
- req, out := c.DeleteBackupPlanRequest(input)
- return out, req.Send()
- }
- // DeleteBackupPlanWithContext is the same as DeleteBackupPlan with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteBackupPlan for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) DeleteBackupPlanWithContext(ctx aws.Context, input *DeleteBackupPlanInput, opts ...request.Option) (*DeleteBackupPlanOutput, error) {
- req, out := c.DeleteBackupPlanRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteBackupSelection = "DeleteBackupSelection"
- // DeleteBackupSelectionRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteBackupSelection operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteBackupSelection for more information on using the DeleteBackupSelection
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteBackupSelectionRequest method.
- // req, resp := client.DeleteBackupSelectionRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupSelection
- func (c *Backup) DeleteBackupSelectionRequest(input *DeleteBackupSelectionInput) (req *request.Request, output *DeleteBackupSelectionOutput) {
- op := &request.Operation{
- Name: opDeleteBackupSelection,
- HTTPMethod: "DELETE",
- HTTPPath: "/backup/plans/{backupPlanId}/selections/{selectionId}",
- }
- if input == nil {
- input = &DeleteBackupSelectionInput{}
- }
- output = &DeleteBackupSelectionOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteBackupSelection API operation for AWS Backup.
- //
- // Deletes the resource selection associated with a backup plan that is specified
- // by the SelectionId.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation DeleteBackupSelection for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupSelection
- func (c *Backup) DeleteBackupSelection(input *DeleteBackupSelectionInput) (*DeleteBackupSelectionOutput, error) {
- req, out := c.DeleteBackupSelectionRequest(input)
- return out, req.Send()
- }
- // DeleteBackupSelectionWithContext is the same as DeleteBackupSelection with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteBackupSelection for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) DeleteBackupSelectionWithContext(ctx aws.Context, input *DeleteBackupSelectionInput, opts ...request.Option) (*DeleteBackupSelectionOutput, error) {
- req, out := c.DeleteBackupSelectionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteBackupVault = "DeleteBackupVault"
- // DeleteBackupVaultRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteBackupVault operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteBackupVault for more information on using the DeleteBackupVault
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteBackupVaultRequest method.
- // req, resp := client.DeleteBackupVaultRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVault
- func (c *Backup) DeleteBackupVaultRequest(input *DeleteBackupVaultInput) (req *request.Request, output *DeleteBackupVaultOutput) {
- op := &request.Operation{
- Name: opDeleteBackupVault,
- HTTPMethod: "DELETE",
- HTTPPath: "/backup-vaults/{backupVaultName}",
- }
- if input == nil {
- input = &DeleteBackupVaultInput{}
- }
- output = &DeleteBackupVaultOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteBackupVault API operation for AWS Backup.
- //
- // Deletes the backup vault identified by its name. A vault can be deleted only
- // if it is empty.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation DeleteBackupVault for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // Indicates that something is wrong with the input to the request. For example,
- // a parameter is of the wrong type.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVault
- func (c *Backup) DeleteBackupVault(input *DeleteBackupVaultInput) (*DeleteBackupVaultOutput, error) {
- req, out := c.DeleteBackupVaultRequest(input)
- return out, req.Send()
- }
- // DeleteBackupVaultWithContext is the same as DeleteBackupVault with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteBackupVault for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) DeleteBackupVaultWithContext(ctx aws.Context, input *DeleteBackupVaultInput, opts ...request.Option) (*DeleteBackupVaultOutput, error) {
- req, out := c.DeleteBackupVaultRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteBackupVaultAccessPolicy = "DeleteBackupVaultAccessPolicy"
- // DeleteBackupVaultAccessPolicyRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteBackupVaultAccessPolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteBackupVaultAccessPolicy for more information on using the DeleteBackupVaultAccessPolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteBackupVaultAccessPolicyRequest method.
- // req, resp := client.DeleteBackupVaultAccessPolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultAccessPolicy
- func (c *Backup) DeleteBackupVaultAccessPolicyRequest(input *DeleteBackupVaultAccessPolicyInput) (req *request.Request, output *DeleteBackupVaultAccessPolicyOutput) {
- op := &request.Operation{
- Name: opDeleteBackupVaultAccessPolicy,
- HTTPMethod: "DELETE",
- HTTPPath: "/backup-vaults/{backupVaultName}/access-policy",
- }
- if input == nil {
- input = &DeleteBackupVaultAccessPolicyInput{}
- }
- output = &DeleteBackupVaultAccessPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteBackupVaultAccessPolicy API operation for AWS Backup.
- //
- // Deletes the policy document that manages permissions on a backup vault.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation DeleteBackupVaultAccessPolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultAccessPolicy
- func (c *Backup) DeleteBackupVaultAccessPolicy(input *DeleteBackupVaultAccessPolicyInput) (*DeleteBackupVaultAccessPolicyOutput, error) {
- req, out := c.DeleteBackupVaultAccessPolicyRequest(input)
- return out, req.Send()
- }
- // DeleteBackupVaultAccessPolicyWithContext is the same as DeleteBackupVaultAccessPolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteBackupVaultAccessPolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) DeleteBackupVaultAccessPolicyWithContext(ctx aws.Context, input *DeleteBackupVaultAccessPolicyInput, opts ...request.Option) (*DeleteBackupVaultAccessPolicyOutput, error) {
- req, out := c.DeleteBackupVaultAccessPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteBackupVaultNotifications = "DeleteBackupVaultNotifications"
- // DeleteBackupVaultNotificationsRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteBackupVaultNotifications operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteBackupVaultNotifications for more information on using the DeleteBackupVaultNotifications
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteBackupVaultNotificationsRequest method.
- // req, resp := client.DeleteBackupVaultNotificationsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultNotifications
- func (c *Backup) DeleteBackupVaultNotificationsRequest(input *DeleteBackupVaultNotificationsInput) (req *request.Request, output *DeleteBackupVaultNotificationsOutput) {
- op := &request.Operation{
- Name: opDeleteBackupVaultNotifications,
- HTTPMethod: "DELETE",
- HTTPPath: "/backup-vaults/{backupVaultName}/notification-configuration",
- }
- if input == nil {
- input = &DeleteBackupVaultNotificationsInput{}
- }
- output = &DeleteBackupVaultNotificationsOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteBackupVaultNotifications API operation for AWS Backup.
- //
- // Deletes event notifications for the specified backup vault.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation DeleteBackupVaultNotifications for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultNotifications
- func (c *Backup) DeleteBackupVaultNotifications(input *DeleteBackupVaultNotificationsInput) (*DeleteBackupVaultNotificationsOutput, error) {
- req, out := c.DeleteBackupVaultNotificationsRequest(input)
- return out, req.Send()
- }
- // DeleteBackupVaultNotificationsWithContext is the same as DeleteBackupVaultNotifications with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteBackupVaultNotifications for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) DeleteBackupVaultNotificationsWithContext(ctx aws.Context, input *DeleteBackupVaultNotificationsInput, opts ...request.Option) (*DeleteBackupVaultNotificationsOutput, error) {
- req, out := c.DeleteBackupVaultNotificationsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteRecoveryPoint = "DeleteRecoveryPoint"
- // DeleteRecoveryPointRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteRecoveryPoint operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteRecoveryPoint for more information on using the DeleteRecoveryPoint
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteRecoveryPointRequest method.
- // req, resp := client.DeleteRecoveryPointRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteRecoveryPoint
- func (c *Backup) DeleteRecoveryPointRequest(input *DeleteRecoveryPointInput) (req *request.Request, output *DeleteRecoveryPointOutput) {
- op := &request.Operation{
- Name: opDeleteRecoveryPoint,
- HTTPMethod: "DELETE",
- HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}",
- }
- if input == nil {
- input = &DeleteRecoveryPointInput{}
- }
- output = &DeleteRecoveryPointOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteRecoveryPoint API operation for AWS Backup.
- //
- // Deletes the recovery point specified by a recovery point ID.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation DeleteRecoveryPoint for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // Indicates that something is wrong with the input to the request. For example,
- // a parameter is of the wrong type.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteRecoveryPoint
- func (c *Backup) DeleteRecoveryPoint(input *DeleteRecoveryPointInput) (*DeleteRecoveryPointOutput, error) {
- req, out := c.DeleteRecoveryPointRequest(input)
- return out, req.Send()
- }
- // DeleteRecoveryPointWithContext is the same as DeleteRecoveryPoint with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteRecoveryPoint for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) DeleteRecoveryPointWithContext(ctx aws.Context, input *DeleteRecoveryPointInput, opts ...request.Option) (*DeleteRecoveryPointOutput, error) {
- req, out := c.DeleteRecoveryPointRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeBackupJob = "DescribeBackupJob"
- // DescribeBackupJobRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeBackupJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeBackupJob for more information on using the DescribeBackupJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeBackupJobRequest method.
- // req, resp := client.DescribeBackupJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupJob
- func (c *Backup) DescribeBackupJobRequest(input *DescribeBackupJobInput) (req *request.Request, output *DescribeBackupJobOutput) {
- op := &request.Operation{
- Name: opDescribeBackupJob,
- HTTPMethod: "GET",
- HTTPPath: "/backup-jobs/{backupJobId}",
- }
- if input == nil {
- input = &DescribeBackupJobInput{}
- }
- output = &DescribeBackupJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeBackupJob API operation for AWS Backup.
- //
- // Returns metadata associated with creating a backup of a resource.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation DescribeBackupJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // * ErrCodeDependencyFailureException "DependencyFailureException"
- // A dependent AWS service or resource returned an error to the AWS Backup service,
- // and the action cannot be completed.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupJob
- func (c *Backup) DescribeBackupJob(input *DescribeBackupJobInput) (*DescribeBackupJobOutput, error) {
- req, out := c.DescribeBackupJobRequest(input)
- return out, req.Send()
- }
- // DescribeBackupJobWithContext is the same as DescribeBackupJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeBackupJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) DescribeBackupJobWithContext(ctx aws.Context, input *DescribeBackupJobInput, opts ...request.Option) (*DescribeBackupJobOutput, error) {
- req, out := c.DescribeBackupJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeBackupVault = "DescribeBackupVault"
- // DescribeBackupVaultRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeBackupVault operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeBackupVault for more information on using the DescribeBackupVault
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeBackupVaultRequest method.
- // req, resp := client.DescribeBackupVaultRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupVault
- func (c *Backup) DescribeBackupVaultRequest(input *DescribeBackupVaultInput) (req *request.Request, output *DescribeBackupVaultOutput) {
- op := &request.Operation{
- Name: opDescribeBackupVault,
- HTTPMethod: "GET",
- HTTPPath: "/backup-vaults/{backupVaultName}",
- }
- if input == nil {
- input = &DescribeBackupVaultInput{}
- }
- output = &DescribeBackupVaultOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeBackupVault API operation for AWS Backup.
- //
- // Returns metadata about a backup vault specified by its name.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation DescribeBackupVault for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupVault
- func (c *Backup) DescribeBackupVault(input *DescribeBackupVaultInput) (*DescribeBackupVaultOutput, error) {
- req, out := c.DescribeBackupVaultRequest(input)
- return out, req.Send()
- }
- // DescribeBackupVaultWithContext is the same as DescribeBackupVault with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeBackupVault for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) DescribeBackupVaultWithContext(ctx aws.Context, input *DescribeBackupVaultInput, opts ...request.Option) (*DescribeBackupVaultOutput, error) {
- req, out := c.DescribeBackupVaultRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeProtectedResource = "DescribeProtectedResource"
- // DescribeProtectedResourceRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeProtectedResource operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeProtectedResource for more information on using the DescribeProtectedResource
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeProtectedResourceRequest method.
- // req, resp := client.DescribeProtectedResourceRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeProtectedResource
- func (c *Backup) DescribeProtectedResourceRequest(input *DescribeProtectedResourceInput) (req *request.Request, output *DescribeProtectedResourceOutput) {
- op := &request.Operation{
- Name: opDescribeProtectedResource,
- HTTPMethod: "GET",
- HTTPPath: "/resources/{resourceArn}",
- }
- if input == nil {
- input = &DescribeProtectedResourceInput{}
- }
- output = &DescribeProtectedResourceOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeProtectedResource API operation for AWS Backup.
- //
- // Returns information about a saved resource, including the last time it was
- // backed-up, its Amazon Resource Name (ARN), and the AWS service type of the
- // saved resource.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation DescribeProtectedResource for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeProtectedResource
- func (c *Backup) DescribeProtectedResource(input *DescribeProtectedResourceInput) (*DescribeProtectedResourceOutput, error) {
- req, out := c.DescribeProtectedResourceRequest(input)
- return out, req.Send()
- }
- // DescribeProtectedResourceWithContext is the same as DescribeProtectedResource with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeProtectedResource for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) DescribeProtectedResourceWithContext(ctx aws.Context, input *DescribeProtectedResourceInput, opts ...request.Option) (*DescribeProtectedResourceOutput, error) {
- req, out := c.DescribeProtectedResourceRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeRecoveryPoint = "DescribeRecoveryPoint"
- // DescribeRecoveryPointRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeRecoveryPoint operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeRecoveryPoint for more information on using the DescribeRecoveryPoint
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeRecoveryPointRequest method.
- // req, resp := client.DescribeRecoveryPointRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRecoveryPoint
- func (c *Backup) DescribeRecoveryPointRequest(input *DescribeRecoveryPointInput) (req *request.Request, output *DescribeRecoveryPointOutput) {
- op := &request.Operation{
- Name: opDescribeRecoveryPoint,
- HTTPMethod: "GET",
- HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}",
- }
- if input == nil {
- input = &DescribeRecoveryPointInput{}
- }
- output = &DescribeRecoveryPointOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeRecoveryPoint API operation for AWS Backup.
- //
- // Returns metadata associated with a recovery point, including ID, status,
- // encryption, and lifecycle.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation DescribeRecoveryPoint for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRecoveryPoint
- func (c *Backup) DescribeRecoveryPoint(input *DescribeRecoveryPointInput) (*DescribeRecoveryPointOutput, error) {
- req, out := c.DescribeRecoveryPointRequest(input)
- return out, req.Send()
- }
- // DescribeRecoveryPointWithContext is the same as DescribeRecoveryPoint with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeRecoveryPoint for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) DescribeRecoveryPointWithContext(ctx aws.Context, input *DescribeRecoveryPointInput, opts ...request.Option) (*DescribeRecoveryPointOutput, error) {
- req, out := c.DescribeRecoveryPointRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeRestoreJob = "DescribeRestoreJob"
- // DescribeRestoreJobRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeRestoreJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeRestoreJob for more information on using the DescribeRestoreJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeRestoreJobRequest method.
- // req, resp := client.DescribeRestoreJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRestoreJob
- func (c *Backup) DescribeRestoreJobRequest(input *DescribeRestoreJobInput) (req *request.Request, output *DescribeRestoreJobOutput) {
- op := &request.Operation{
- Name: opDescribeRestoreJob,
- HTTPMethod: "GET",
- HTTPPath: "/restore-jobs/{restoreJobId}",
- }
- if input == nil {
- input = &DescribeRestoreJobInput{}
- }
- output = &DescribeRestoreJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeRestoreJob API operation for AWS Backup.
- //
- // Returns metadata associated with a restore job that is specified by a job
- // ID.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation DescribeRestoreJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // * ErrCodeDependencyFailureException "DependencyFailureException"
- // A dependent AWS service or resource returned an error to the AWS Backup service,
- // and the action cannot be completed.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRestoreJob
- func (c *Backup) DescribeRestoreJob(input *DescribeRestoreJobInput) (*DescribeRestoreJobOutput, error) {
- req, out := c.DescribeRestoreJobRequest(input)
- return out, req.Send()
- }
- // DescribeRestoreJobWithContext is the same as DescribeRestoreJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeRestoreJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) DescribeRestoreJobWithContext(ctx aws.Context, input *DescribeRestoreJobInput, opts ...request.Option) (*DescribeRestoreJobOutput, error) {
- req, out := c.DescribeRestoreJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opExportBackupPlanTemplate = "ExportBackupPlanTemplate"
- // ExportBackupPlanTemplateRequest generates a "aws/request.Request" representing the
- // client's request for the ExportBackupPlanTemplate operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ExportBackupPlanTemplate for more information on using the ExportBackupPlanTemplate
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ExportBackupPlanTemplateRequest method.
- // req, resp := client.ExportBackupPlanTemplateRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ExportBackupPlanTemplate
- func (c *Backup) ExportBackupPlanTemplateRequest(input *ExportBackupPlanTemplateInput) (req *request.Request, output *ExportBackupPlanTemplateOutput) {
- op := &request.Operation{
- Name: opExportBackupPlanTemplate,
- HTTPMethod: "GET",
- HTTPPath: "/backup/plans/{backupPlanId}/toTemplate/",
- }
- if input == nil {
- input = &ExportBackupPlanTemplateInput{}
- }
- output = &ExportBackupPlanTemplateOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ExportBackupPlanTemplate API operation for AWS Backup.
- //
- // Returns the backup plan that is specified by the plan ID as a backup template.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation ExportBackupPlanTemplate for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ExportBackupPlanTemplate
- func (c *Backup) ExportBackupPlanTemplate(input *ExportBackupPlanTemplateInput) (*ExportBackupPlanTemplateOutput, error) {
- req, out := c.ExportBackupPlanTemplateRequest(input)
- return out, req.Send()
- }
- // ExportBackupPlanTemplateWithContext is the same as ExportBackupPlanTemplate with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ExportBackupPlanTemplate for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ExportBackupPlanTemplateWithContext(ctx aws.Context, input *ExportBackupPlanTemplateInput, opts ...request.Option) (*ExportBackupPlanTemplateOutput, error) {
- req, out := c.ExportBackupPlanTemplateRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetBackupPlan = "GetBackupPlan"
- // GetBackupPlanRequest generates a "aws/request.Request" representing the
- // client's request for the GetBackupPlan operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetBackupPlan for more information on using the GetBackupPlan
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetBackupPlanRequest method.
- // req, resp := client.GetBackupPlanRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlan
- func (c *Backup) GetBackupPlanRequest(input *GetBackupPlanInput) (req *request.Request, output *GetBackupPlanOutput) {
- op := &request.Operation{
- Name: opGetBackupPlan,
- HTTPMethod: "GET",
- HTTPPath: "/backup/plans/{backupPlanId}/",
- }
- if input == nil {
- input = &GetBackupPlanInput{}
- }
- output = &GetBackupPlanOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetBackupPlan API operation for AWS Backup.
- //
- // Returns the body of a backup plan in JSON format, in addition to plan metadata.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation GetBackupPlan for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlan
- func (c *Backup) GetBackupPlan(input *GetBackupPlanInput) (*GetBackupPlanOutput, error) {
- req, out := c.GetBackupPlanRequest(input)
- return out, req.Send()
- }
- // GetBackupPlanWithContext is the same as GetBackupPlan with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetBackupPlan for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) GetBackupPlanWithContext(ctx aws.Context, input *GetBackupPlanInput, opts ...request.Option) (*GetBackupPlanOutput, error) {
- req, out := c.GetBackupPlanRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetBackupPlanFromJSON = "GetBackupPlanFromJSON"
- // GetBackupPlanFromJSONRequest generates a "aws/request.Request" representing the
- // client's request for the GetBackupPlanFromJSON operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetBackupPlanFromJSON for more information on using the GetBackupPlanFromJSON
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetBackupPlanFromJSONRequest method.
- // req, resp := client.GetBackupPlanFromJSONRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromJSON
- func (c *Backup) GetBackupPlanFromJSONRequest(input *GetBackupPlanFromJSONInput) (req *request.Request, output *GetBackupPlanFromJSONOutput) {
- op := &request.Operation{
- Name: opGetBackupPlanFromJSON,
- HTTPMethod: "POST",
- HTTPPath: "/backup/template/json/toPlan",
- }
- if input == nil {
- input = &GetBackupPlanFromJSONInput{}
- }
- output = &GetBackupPlanFromJSONOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetBackupPlanFromJSON API operation for AWS Backup.
- //
- // Returns a valid JSON document specifying a backup plan or an error.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation GetBackupPlanFromJSON for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeLimitExceededException "LimitExceededException"
- // A limit in the request has been exceeded; for example, a maximum number of
- // items allowed in a request.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // Indicates that something is wrong with the input to the request. For example,
- // a parameter is of the wrong type.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromJSON
- func (c *Backup) GetBackupPlanFromJSON(input *GetBackupPlanFromJSONInput) (*GetBackupPlanFromJSONOutput, error) {
- req, out := c.GetBackupPlanFromJSONRequest(input)
- return out, req.Send()
- }
- // GetBackupPlanFromJSONWithContext is the same as GetBackupPlanFromJSON with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetBackupPlanFromJSON for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) GetBackupPlanFromJSONWithContext(ctx aws.Context, input *GetBackupPlanFromJSONInput, opts ...request.Option) (*GetBackupPlanFromJSONOutput, error) {
- req, out := c.GetBackupPlanFromJSONRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetBackupPlanFromTemplate = "GetBackupPlanFromTemplate"
- // GetBackupPlanFromTemplateRequest generates a "aws/request.Request" representing the
- // client's request for the GetBackupPlanFromTemplate operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetBackupPlanFromTemplate for more information on using the GetBackupPlanFromTemplate
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetBackupPlanFromTemplateRequest method.
- // req, resp := client.GetBackupPlanFromTemplateRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromTemplate
- func (c *Backup) GetBackupPlanFromTemplateRequest(input *GetBackupPlanFromTemplateInput) (req *request.Request, output *GetBackupPlanFromTemplateOutput) {
- op := &request.Operation{
- Name: opGetBackupPlanFromTemplate,
- HTTPMethod: "GET",
- HTTPPath: "/backup/template/plans/{templateId}/toPlan",
- }
- if input == nil {
- input = &GetBackupPlanFromTemplateInput{}
- }
- output = &GetBackupPlanFromTemplateOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetBackupPlanFromTemplate API operation for AWS Backup.
- //
- // Returns the template specified by its templateId as a backup plan.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation GetBackupPlanFromTemplate for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromTemplate
- func (c *Backup) GetBackupPlanFromTemplate(input *GetBackupPlanFromTemplateInput) (*GetBackupPlanFromTemplateOutput, error) {
- req, out := c.GetBackupPlanFromTemplateRequest(input)
- return out, req.Send()
- }
- // GetBackupPlanFromTemplateWithContext is the same as GetBackupPlanFromTemplate with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetBackupPlanFromTemplate for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) GetBackupPlanFromTemplateWithContext(ctx aws.Context, input *GetBackupPlanFromTemplateInput, opts ...request.Option) (*GetBackupPlanFromTemplateOutput, error) {
- req, out := c.GetBackupPlanFromTemplateRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetBackupSelection = "GetBackupSelection"
- // GetBackupSelectionRequest generates a "aws/request.Request" representing the
- // client's request for the GetBackupSelection operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetBackupSelection for more information on using the GetBackupSelection
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetBackupSelectionRequest method.
- // req, resp := client.GetBackupSelectionRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupSelection
- func (c *Backup) GetBackupSelectionRequest(input *GetBackupSelectionInput) (req *request.Request, output *GetBackupSelectionOutput) {
- op := &request.Operation{
- Name: opGetBackupSelection,
- HTTPMethod: "GET",
- HTTPPath: "/backup/plans/{backupPlanId}/selections/{selectionId}",
- }
- if input == nil {
- input = &GetBackupSelectionInput{}
- }
- output = &GetBackupSelectionOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetBackupSelection API operation for AWS Backup.
- //
- // Returns selection metadata and a document in JSON format that specifies a
- // list of resources that are associated with a backup plan.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation GetBackupSelection for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupSelection
- func (c *Backup) GetBackupSelection(input *GetBackupSelectionInput) (*GetBackupSelectionOutput, error) {
- req, out := c.GetBackupSelectionRequest(input)
- return out, req.Send()
- }
- // GetBackupSelectionWithContext is the same as GetBackupSelection with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetBackupSelection for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) GetBackupSelectionWithContext(ctx aws.Context, input *GetBackupSelectionInput, opts ...request.Option) (*GetBackupSelectionOutput, error) {
- req, out := c.GetBackupSelectionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetBackupVaultAccessPolicy = "GetBackupVaultAccessPolicy"
- // GetBackupVaultAccessPolicyRequest generates a "aws/request.Request" representing the
- // client's request for the GetBackupVaultAccessPolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetBackupVaultAccessPolicy for more information on using the GetBackupVaultAccessPolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetBackupVaultAccessPolicyRequest method.
- // req, resp := client.GetBackupVaultAccessPolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultAccessPolicy
- func (c *Backup) GetBackupVaultAccessPolicyRequest(input *GetBackupVaultAccessPolicyInput) (req *request.Request, output *GetBackupVaultAccessPolicyOutput) {
- op := &request.Operation{
- Name: opGetBackupVaultAccessPolicy,
- HTTPMethod: "GET",
- HTTPPath: "/backup-vaults/{backupVaultName}/access-policy",
- }
- if input == nil {
- input = &GetBackupVaultAccessPolicyInput{}
- }
- output = &GetBackupVaultAccessPolicyOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetBackupVaultAccessPolicy API operation for AWS Backup.
- //
- // Returns the access policy document that is associated with the named backup
- // vault.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation GetBackupVaultAccessPolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultAccessPolicy
- func (c *Backup) GetBackupVaultAccessPolicy(input *GetBackupVaultAccessPolicyInput) (*GetBackupVaultAccessPolicyOutput, error) {
- req, out := c.GetBackupVaultAccessPolicyRequest(input)
- return out, req.Send()
- }
- // GetBackupVaultAccessPolicyWithContext is the same as GetBackupVaultAccessPolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetBackupVaultAccessPolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) GetBackupVaultAccessPolicyWithContext(ctx aws.Context, input *GetBackupVaultAccessPolicyInput, opts ...request.Option) (*GetBackupVaultAccessPolicyOutput, error) {
- req, out := c.GetBackupVaultAccessPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetBackupVaultNotifications = "GetBackupVaultNotifications"
- // GetBackupVaultNotificationsRequest generates a "aws/request.Request" representing the
- // client's request for the GetBackupVaultNotifications operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetBackupVaultNotifications for more information on using the GetBackupVaultNotifications
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetBackupVaultNotificationsRequest method.
- // req, resp := client.GetBackupVaultNotificationsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultNotifications
- func (c *Backup) GetBackupVaultNotificationsRequest(input *GetBackupVaultNotificationsInput) (req *request.Request, output *GetBackupVaultNotificationsOutput) {
- op := &request.Operation{
- Name: opGetBackupVaultNotifications,
- HTTPMethod: "GET",
- HTTPPath: "/backup-vaults/{backupVaultName}/notification-configuration",
- }
- if input == nil {
- input = &GetBackupVaultNotificationsInput{}
- }
- output = &GetBackupVaultNotificationsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetBackupVaultNotifications API operation for AWS Backup.
- //
- // Returns event notifications for the specified backup vault.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation GetBackupVaultNotifications for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultNotifications
- func (c *Backup) GetBackupVaultNotifications(input *GetBackupVaultNotificationsInput) (*GetBackupVaultNotificationsOutput, error) {
- req, out := c.GetBackupVaultNotificationsRequest(input)
- return out, req.Send()
- }
- // GetBackupVaultNotificationsWithContext is the same as GetBackupVaultNotifications with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetBackupVaultNotifications for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) GetBackupVaultNotificationsWithContext(ctx aws.Context, input *GetBackupVaultNotificationsInput, opts ...request.Option) (*GetBackupVaultNotificationsOutput, error) {
- req, out := c.GetBackupVaultNotificationsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetRecoveryPointRestoreMetadata = "GetRecoveryPointRestoreMetadata"
- // GetRecoveryPointRestoreMetadataRequest generates a "aws/request.Request" representing the
- // client's request for the GetRecoveryPointRestoreMetadata operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetRecoveryPointRestoreMetadata for more information on using the GetRecoveryPointRestoreMetadata
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetRecoveryPointRestoreMetadataRequest method.
- // req, resp := client.GetRecoveryPointRestoreMetadataRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetRecoveryPointRestoreMetadata
- func (c *Backup) GetRecoveryPointRestoreMetadataRequest(input *GetRecoveryPointRestoreMetadataInput) (req *request.Request, output *GetRecoveryPointRestoreMetadataOutput) {
- op := &request.Operation{
- Name: opGetRecoveryPointRestoreMetadata,
- HTTPMethod: "GET",
- HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}/restore-metadata",
- }
- if input == nil {
- input = &GetRecoveryPointRestoreMetadataInput{}
- }
- output = &GetRecoveryPointRestoreMetadataOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetRecoveryPointRestoreMetadata API operation for AWS Backup.
- //
- // Returns two sets of metadata key-value pairs. The first set lists the metadata
- // that the recovery point was created with. The second set lists the metadata
- // key-value pairs that are required to restore the recovery point.
- //
- // These sets can be the same, or the restore metadata set can contain different
- // values if the target service to be restored has changed since the recovery
- // point was created and now requires additional or different information in
- // order to be restored.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation GetRecoveryPointRestoreMetadata for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetRecoveryPointRestoreMetadata
- func (c *Backup) GetRecoveryPointRestoreMetadata(input *GetRecoveryPointRestoreMetadataInput) (*GetRecoveryPointRestoreMetadataOutput, error) {
- req, out := c.GetRecoveryPointRestoreMetadataRequest(input)
- return out, req.Send()
- }
- // GetRecoveryPointRestoreMetadataWithContext is the same as GetRecoveryPointRestoreMetadata with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetRecoveryPointRestoreMetadata for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) GetRecoveryPointRestoreMetadataWithContext(ctx aws.Context, input *GetRecoveryPointRestoreMetadataInput, opts ...request.Option) (*GetRecoveryPointRestoreMetadataOutput, error) {
- req, out := c.GetRecoveryPointRestoreMetadataRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetSupportedResourceTypes = "GetSupportedResourceTypes"
- // GetSupportedResourceTypesRequest generates a "aws/request.Request" representing the
- // client's request for the GetSupportedResourceTypes operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetSupportedResourceTypes for more information on using the GetSupportedResourceTypes
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetSupportedResourceTypesRequest method.
- // req, resp := client.GetSupportedResourceTypesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetSupportedResourceTypes
- func (c *Backup) GetSupportedResourceTypesRequest(input *GetSupportedResourceTypesInput) (req *request.Request, output *GetSupportedResourceTypesOutput) {
- op := &request.Operation{
- Name: opGetSupportedResourceTypes,
- HTTPMethod: "GET",
- HTTPPath: "/supported-resource-types",
- }
- if input == nil {
- input = &GetSupportedResourceTypesInput{}
- }
- output = &GetSupportedResourceTypesOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetSupportedResourceTypes API operation for AWS Backup.
- //
- // Returns the AWS resource types supported by AWS Backup.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation GetSupportedResourceTypes for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetSupportedResourceTypes
- func (c *Backup) GetSupportedResourceTypes(input *GetSupportedResourceTypesInput) (*GetSupportedResourceTypesOutput, error) {
- req, out := c.GetSupportedResourceTypesRequest(input)
- return out, req.Send()
- }
- // GetSupportedResourceTypesWithContext is the same as GetSupportedResourceTypes with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetSupportedResourceTypes for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) GetSupportedResourceTypesWithContext(ctx aws.Context, input *GetSupportedResourceTypesInput, opts ...request.Option) (*GetSupportedResourceTypesOutput, error) {
- req, out := c.GetSupportedResourceTypesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opListBackupJobs = "ListBackupJobs"
- // ListBackupJobsRequest generates a "aws/request.Request" representing the
- // client's request for the ListBackupJobs operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListBackupJobs for more information on using the ListBackupJobs
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListBackupJobsRequest method.
- // req, resp := client.ListBackupJobsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupJobs
- func (c *Backup) ListBackupJobsRequest(input *ListBackupJobsInput) (req *request.Request, output *ListBackupJobsOutput) {
- op := &request.Operation{
- Name: opListBackupJobs,
- HTTPMethod: "GET",
- HTTPPath: "/backup-jobs/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListBackupJobsInput{}
- }
- output = &ListBackupJobsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListBackupJobs API operation for AWS Backup.
- //
- // Returns metadata about your backup jobs.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation ListBackupJobs for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupJobs
- func (c *Backup) ListBackupJobs(input *ListBackupJobsInput) (*ListBackupJobsOutput, error) {
- req, out := c.ListBackupJobsRequest(input)
- return out, req.Send()
- }
- // ListBackupJobsWithContext is the same as ListBackupJobs with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListBackupJobs for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListBackupJobsWithContext(ctx aws.Context, input *ListBackupJobsInput, opts ...request.Option) (*ListBackupJobsOutput, error) {
- req, out := c.ListBackupJobsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListBackupJobsPages iterates over the pages of a ListBackupJobs operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListBackupJobs method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListBackupJobs operation.
- // pageNum := 0
- // err := client.ListBackupJobsPages(params,
- // func(page *ListBackupJobsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Backup) ListBackupJobsPages(input *ListBackupJobsInput, fn func(*ListBackupJobsOutput, bool) bool) error {
- return c.ListBackupJobsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListBackupJobsPagesWithContext same as ListBackupJobsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListBackupJobsPagesWithContext(ctx aws.Context, input *ListBackupJobsInput, fn func(*ListBackupJobsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListBackupJobsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListBackupJobsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListBackupJobsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opListBackupPlanTemplates = "ListBackupPlanTemplates"
- // ListBackupPlanTemplatesRequest generates a "aws/request.Request" representing the
- // client's request for the ListBackupPlanTemplates operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListBackupPlanTemplates for more information on using the ListBackupPlanTemplates
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListBackupPlanTemplatesRequest method.
- // req, resp := client.ListBackupPlanTemplatesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanTemplates
- func (c *Backup) ListBackupPlanTemplatesRequest(input *ListBackupPlanTemplatesInput) (req *request.Request, output *ListBackupPlanTemplatesOutput) {
- op := &request.Operation{
- Name: opListBackupPlanTemplates,
- HTTPMethod: "GET",
- HTTPPath: "/backup/template/plans",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListBackupPlanTemplatesInput{}
- }
- output = &ListBackupPlanTemplatesOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListBackupPlanTemplates API operation for AWS Backup.
- //
- // Returns metadata of your saved backup plan templates, including the template
- // ID, name, and the creation and deletion dates.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation ListBackupPlanTemplates for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanTemplates
- func (c *Backup) ListBackupPlanTemplates(input *ListBackupPlanTemplatesInput) (*ListBackupPlanTemplatesOutput, error) {
- req, out := c.ListBackupPlanTemplatesRequest(input)
- return out, req.Send()
- }
- // ListBackupPlanTemplatesWithContext is the same as ListBackupPlanTemplates with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListBackupPlanTemplates for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListBackupPlanTemplatesWithContext(ctx aws.Context, input *ListBackupPlanTemplatesInput, opts ...request.Option) (*ListBackupPlanTemplatesOutput, error) {
- req, out := c.ListBackupPlanTemplatesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListBackupPlanTemplatesPages iterates over the pages of a ListBackupPlanTemplates operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListBackupPlanTemplates method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListBackupPlanTemplates operation.
- // pageNum := 0
- // err := client.ListBackupPlanTemplatesPages(params,
- // func(page *ListBackupPlanTemplatesOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Backup) ListBackupPlanTemplatesPages(input *ListBackupPlanTemplatesInput, fn func(*ListBackupPlanTemplatesOutput, bool) bool) error {
- return c.ListBackupPlanTemplatesPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListBackupPlanTemplatesPagesWithContext same as ListBackupPlanTemplatesPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListBackupPlanTemplatesPagesWithContext(ctx aws.Context, input *ListBackupPlanTemplatesInput, fn func(*ListBackupPlanTemplatesOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListBackupPlanTemplatesInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListBackupPlanTemplatesRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListBackupPlanTemplatesOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opListBackupPlanVersions = "ListBackupPlanVersions"
- // ListBackupPlanVersionsRequest generates a "aws/request.Request" representing the
- // client's request for the ListBackupPlanVersions operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListBackupPlanVersions for more information on using the ListBackupPlanVersions
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListBackupPlanVersionsRequest method.
- // req, resp := client.ListBackupPlanVersionsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanVersions
- func (c *Backup) ListBackupPlanVersionsRequest(input *ListBackupPlanVersionsInput) (req *request.Request, output *ListBackupPlanVersionsOutput) {
- op := &request.Operation{
- Name: opListBackupPlanVersions,
- HTTPMethod: "GET",
- HTTPPath: "/backup/plans/{backupPlanId}/versions/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListBackupPlanVersionsInput{}
- }
- output = &ListBackupPlanVersionsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListBackupPlanVersions API operation for AWS Backup.
- //
- // Returns version metadata of your backup plans, including Amazon Resource
- // Names (ARNs), backup plan IDs, creation and deletion dates, plan names, and
- // version IDs.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation ListBackupPlanVersions for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanVersions
- func (c *Backup) ListBackupPlanVersions(input *ListBackupPlanVersionsInput) (*ListBackupPlanVersionsOutput, error) {
- req, out := c.ListBackupPlanVersionsRequest(input)
- return out, req.Send()
- }
- // ListBackupPlanVersionsWithContext is the same as ListBackupPlanVersions with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListBackupPlanVersions for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListBackupPlanVersionsWithContext(ctx aws.Context, input *ListBackupPlanVersionsInput, opts ...request.Option) (*ListBackupPlanVersionsOutput, error) {
- req, out := c.ListBackupPlanVersionsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListBackupPlanVersionsPages iterates over the pages of a ListBackupPlanVersions operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListBackupPlanVersions method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListBackupPlanVersions operation.
- // pageNum := 0
- // err := client.ListBackupPlanVersionsPages(params,
- // func(page *ListBackupPlanVersionsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Backup) ListBackupPlanVersionsPages(input *ListBackupPlanVersionsInput, fn func(*ListBackupPlanVersionsOutput, bool) bool) error {
- return c.ListBackupPlanVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListBackupPlanVersionsPagesWithContext same as ListBackupPlanVersionsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListBackupPlanVersionsPagesWithContext(ctx aws.Context, input *ListBackupPlanVersionsInput, fn func(*ListBackupPlanVersionsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListBackupPlanVersionsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListBackupPlanVersionsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListBackupPlanVersionsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opListBackupPlans = "ListBackupPlans"
- // ListBackupPlansRequest generates a "aws/request.Request" representing the
- // client's request for the ListBackupPlans operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListBackupPlans for more information on using the ListBackupPlans
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListBackupPlansRequest method.
- // req, resp := client.ListBackupPlansRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlans
- func (c *Backup) ListBackupPlansRequest(input *ListBackupPlansInput) (req *request.Request, output *ListBackupPlansOutput) {
- op := &request.Operation{
- Name: opListBackupPlans,
- HTTPMethod: "GET",
- HTTPPath: "/backup/plans/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListBackupPlansInput{}
- }
- output = &ListBackupPlansOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListBackupPlans API operation for AWS Backup.
- //
- // Returns metadata of your saved backup plans, including Amazon Resource Names
- // (ARNs), plan IDs, creation and deletion dates, version IDs, plan names, and
- // creator request IDs.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation ListBackupPlans for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlans
- func (c *Backup) ListBackupPlans(input *ListBackupPlansInput) (*ListBackupPlansOutput, error) {
- req, out := c.ListBackupPlansRequest(input)
- return out, req.Send()
- }
- // ListBackupPlansWithContext is the same as ListBackupPlans with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListBackupPlans for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListBackupPlansWithContext(ctx aws.Context, input *ListBackupPlansInput, opts ...request.Option) (*ListBackupPlansOutput, error) {
- req, out := c.ListBackupPlansRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListBackupPlansPages iterates over the pages of a ListBackupPlans operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListBackupPlans method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListBackupPlans operation.
- // pageNum := 0
- // err := client.ListBackupPlansPages(params,
- // func(page *ListBackupPlansOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Backup) ListBackupPlansPages(input *ListBackupPlansInput, fn func(*ListBackupPlansOutput, bool) bool) error {
- return c.ListBackupPlansPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListBackupPlansPagesWithContext same as ListBackupPlansPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListBackupPlansPagesWithContext(ctx aws.Context, input *ListBackupPlansInput, fn func(*ListBackupPlansOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListBackupPlansInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListBackupPlansRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListBackupPlansOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opListBackupSelections = "ListBackupSelections"
- // ListBackupSelectionsRequest generates a "aws/request.Request" representing the
- // client's request for the ListBackupSelections operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListBackupSelections for more information on using the ListBackupSelections
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListBackupSelectionsRequest method.
- // req, resp := client.ListBackupSelectionsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupSelections
- func (c *Backup) ListBackupSelectionsRequest(input *ListBackupSelectionsInput) (req *request.Request, output *ListBackupSelectionsOutput) {
- op := &request.Operation{
- Name: opListBackupSelections,
- HTTPMethod: "GET",
- HTTPPath: "/backup/plans/{backupPlanId}/selections/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListBackupSelectionsInput{}
- }
- output = &ListBackupSelectionsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListBackupSelections API operation for AWS Backup.
- //
- // Returns an array containing metadata of the resources associated with the
- // target backup plan.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation ListBackupSelections for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupSelections
- func (c *Backup) ListBackupSelections(input *ListBackupSelectionsInput) (*ListBackupSelectionsOutput, error) {
- req, out := c.ListBackupSelectionsRequest(input)
- return out, req.Send()
- }
- // ListBackupSelectionsWithContext is the same as ListBackupSelections with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListBackupSelections for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListBackupSelectionsWithContext(ctx aws.Context, input *ListBackupSelectionsInput, opts ...request.Option) (*ListBackupSelectionsOutput, error) {
- req, out := c.ListBackupSelectionsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListBackupSelectionsPages iterates over the pages of a ListBackupSelections operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListBackupSelections method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListBackupSelections operation.
- // pageNum := 0
- // err := client.ListBackupSelectionsPages(params,
- // func(page *ListBackupSelectionsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Backup) ListBackupSelectionsPages(input *ListBackupSelectionsInput, fn func(*ListBackupSelectionsOutput, bool) bool) error {
- return c.ListBackupSelectionsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListBackupSelectionsPagesWithContext same as ListBackupSelectionsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListBackupSelectionsPagesWithContext(ctx aws.Context, input *ListBackupSelectionsInput, fn func(*ListBackupSelectionsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListBackupSelectionsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListBackupSelectionsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListBackupSelectionsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opListBackupVaults = "ListBackupVaults"
- // ListBackupVaultsRequest generates a "aws/request.Request" representing the
- // client's request for the ListBackupVaults operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListBackupVaults for more information on using the ListBackupVaults
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListBackupVaultsRequest method.
- // req, resp := client.ListBackupVaultsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupVaults
- func (c *Backup) ListBackupVaultsRequest(input *ListBackupVaultsInput) (req *request.Request, output *ListBackupVaultsOutput) {
- op := &request.Operation{
- Name: opListBackupVaults,
- HTTPMethod: "GET",
- HTTPPath: "/backup-vaults/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListBackupVaultsInput{}
- }
- output = &ListBackupVaultsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListBackupVaults API operation for AWS Backup.
- //
- // Returns a list of recovery point storage containers along with information
- // about them.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation ListBackupVaults for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupVaults
- func (c *Backup) ListBackupVaults(input *ListBackupVaultsInput) (*ListBackupVaultsOutput, error) {
- req, out := c.ListBackupVaultsRequest(input)
- return out, req.Send()
- }
- // ListBackupVaultsWithContext is the same as ListBackupVaults with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListBackupVaults for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListBackupVaultsWithContext(ctx aws.Context, input *ListBackupVaultsInput, opts ...request.Option) (*ListBackupVaultsOutput, error) {
- req, out := c.ListBackupVaultsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListBackupVaultsPages iterates over the pages of a ListBackupVaults operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListBackupVaults method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListBackupVaults operation.
- // pageNum := 0
- // err := client.ListBackupVaultsPages(params,
- // func(page *ListBackupVaultsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Backup) ListBackupVaultsPages(input *ListBackupVaultsInput, fn func(*ListBackupVaultsOutput, bool) bool) error {
- return c.ListBackupVaultsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListBackupVaultsPagesWithContext same as ListBackupVaultsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListBackupVaultsPagesWithContext(ctx aws.Context, input *ListBackupVaultsInput, fn func(*ListBackupVaultsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListBackupVaultsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListBackupVaultsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListBackupVaultsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opListProtectedResources = "ListProtectedResources"
- // ListProtectedResourcesRequest generates a "aws/request.Request" representing the
- // client's request for the ListProtectedResources operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListProtectedResources for more information on using the ListProtectedResources
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListProtectedResourcesRequest method.
- // req, resp := client.ListProtectedResourcesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListProtectedResources
- func (c *Backup) ListProtectedResourcesRequest(input *ListProtectedResourcesInput) (req *request.Request, output *ListProtectedResourcesOutput) {
- op := &request.Operation{
- Name: opListProtectedResources,
- HTTPMethod: "GET",
- HTTPPath: "/resources/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListProtectedResourcesInput{}
- }
- output = &ListProtectedResourcesOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListProtectedResources API operation for AWS Backup.
- //
- // Returns an array of resources successfully backed up by AWS Backup, including
- // the time the resource was saved, an Amazon Resource Name (ARN) of the resource,
- // and a resource type.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation ListProtectedResources for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListProtectedResources
- func (c *Backup) ListProtectedResources(input *ListProtectedResourcesInput) (*ListProtectedResourcesOutput, error) {
- req, out := c.ListProtectedResourcesRequest(input)
- return out, req.Send()
- }
- // ListProtectedResourcesWithContext is the same as ListProtectedResources with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListProtectedResources for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListProtectedResourcesWithContext(ctx aws.Context, input *ListProtectedResourcesInput, opts ...request.Option) (*ListProtectedResourcesOutput, error) {
- req, out := c.ListProtectedResourcesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListProtectedResourcesPages iterates over the pages of a ListProtectedResources operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListProtectedResources method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListProtectedResources operation.
- // pageNum := 0
- // err := client.ListProtectedResourcesPages(params,
- // func(page *ListProtectedResourcesOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Backup) ListProtectedResourcesPages(input *ListProtectedResourcesInput, fn func(*ListProtectedResourcesOutput, bool) bool) error {
- return c.ListProtectedResourcesPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListProtectedResourcesPagesWithContext same as ListProtectedResourcesPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListProtectedResourcesPagesWithContext(ctx aws.Context, input *ListProtectedResourcesInput, fn func(*ListProtectedResourcesOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListProtectedResourcesInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListProtectedResourcesRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListProtectedResourcesOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opListRecoveryPointsByBackupVault = "ListRecoveryPointsByBackupVault"
- // ListRecoveryPointsByBackupVaultRequest generates a "aws/request.Request" representing the
- // client's request for the ListRecoveryPointsByBackupVault operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListRecoveryPointsByBackupVault for more information on using the ListRecoveryPointsByBackupVault
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListRecoveryPointsByBackupVaultRequest method.
- // req, resp := client.ListRecoveryPointsByBackupVaultRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByBackupVault
- func (c *Backup) ListRecoveryPointsByBackupVaultRequest(input *ListRecoveryPointsByBackupVaultInput) (req *request.Request, output *ListRecoveryPointsByBackupVaultOutput) {
- op := &request.Operation{
- Name: opListRecoveryPointsByBackupVault,
- HTTPMethod: "GET",
- HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListRecoveryPointsByBackupVaultInput{}
- }
- output = &ListRecoveryPointsByBackupVaultOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListRecoveryPointsByBackupVault API operation for AWS Backup.
- //
- // Returns detailed information about the recovery points stored in a backup
- // vault.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation ListRecoveryPointsByBackupVault for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByBackupVault
- func (c *Backup) ListRecoveryPointsByBackupVault(input *ListRecoveryPointsByBackupVaultInput) (*ListRecoveryPointsByBackupVaultOutput, error) {
- req, out := c.ListRecoveryPointsByBackupVaultRequest(input)
- return out, req.Send()
- }
- // ListRecoveryPointsByBackupVaultWithContext is the same as ListRecoveryPointsByBackupVault with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListRecoveryPointsByBackupVault for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListRecoveryPointsByBackupVaultWithContext(ctx aws.Context, input *ListRecoveryPointsByBackupVaultInput, opts ...request.Option) (*ListRecoveryPointsByBackupVaultOutput, error) {
- req, out := c.ListRecoveryPointsByBackupVaultRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListRecoveryPointsByBackupVaultPages iterates over the pages of a ListRecoveryPointsByBackupVault operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListRecoveryPointsByBackupVault method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListRecoveryPointsByBackupVault operation.
- // pageNum := 0
- // err := client.ListRecoveryPointsByBackupVaultPages(params,
- // func(page *ListRecoveryPointsByBackupVaultOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Backup) ListRecoveryPointsByBackupVaultPages(input *ListRecoveryPointsByBackupVaultInput, fn func(*ListRecoveryPointsByBackupVaultOutput, bool) bool) error {
- return c.ListRecoveryPointsByBackupVaultPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListRecoveryPointsByBackupVaultPagesWithContext same as ListRecoveryPointsByBackupVaultPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListRecoveryPointsByBackupVaultPagesWithContext(ctx aws.Context, input *ListRecoveryPointsByBackupVaultInput, fn func(*ListRecoveryPointsByBackupVaultOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListRecoveryPointsByBackupVaultInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListRecoveryPointsByBackupVaultRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListRecoveryPointsByBackupVaultOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opListRecoveryPointsByResource = "ListRecoveryPointsByResource"
- // ListRecoveryPointsByResourceRequest generates a "aws/request.Request" representing the
- // client's request for the ListRecoveryPointsByResource operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListRecoveryPointsByResource for more information on using the ListRecoveryPointsByResource
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListRecoveryPointsByResourceRequest method.
- // req, resp := client.ListRecoveryPointsByResourceRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByResource
- func (c *Backup) ListRecoveryPointsByResourceRequest(input *ListRecoveryPointsByResourceInput) (req *request.Request, output *ListRecoveryPointsByResourceOutput) {
- op := &request.Operation{
- Name: opListRecoveryPointsByResource,
- HTTPMethod: "GET",
- HTTPPath: "/resources/{resourceArn}/recovery-points/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListRecoveryPointsByResourceInput{}
- }
- output = &ListRecoveryPointsByResourceOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListRecoveryPointsByResource API operation for AWS Backup.
- //
- // Returns detailed information about recovery points of the type specified
- // by a resource Amazon Resource Name (ARN).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation ListRecoveryPointsByResource for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByResource
- func (c *Backup) ListRecoveryPointsByResource(input *ListRecoveryPointsByResourceInput) (*ListRecoveryPointsByResourceOutput, error) {
- req, out := c.ListRecoveryPointsByResourceRequest(input)
- return out, req.Send()
- }
- // ListRecoveryPointsByResourceWithContext is the same as ListRecoveryPointsByResource with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListRecoveryPointsByResource for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListRecoveryPointsByResourceWithContext(ctx aws.Context, input *ListRecoveryPointsByResourceInput, opts ...request.Option) (*ListRecoveryPointsByResourceOutput, error) {
- req, out := c.ListRecoveryPointsByResourceRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListRecoveryPointsByResourcePages iterates over the pages of a ListRecoveryPointsByResource operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListRecoveryPointsByResource method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListRecoveryPointsByResource operation.
- // pageNum := 0
- // err := client.ListRecoveryPointsByResourcePages(params,
- // func(page *ListRecoveryPointsByResourceOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Backup) ListRecoveryPointsByResourcePages(input *ListRecoveryPointsByResourceInput, fn func(*ListRecoveryPointsByResourceOutput, bool) bool) error {
- return c.ListRecoveryPointsByResourcePagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListRecoveryPointsByResourcePagesWithContext same as ListRecoveryPointsByResourcePages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListRecoveryPointsByResourcePagesWithContext(ctx aws.Context, input *ListRecoveryPointsByResourceInput, fn func(*ListRecoveryPointsByResourceOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListRecoveryPointsByResourceInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListRecoveryPointsByResourceRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListRecoveryPointsByResourceOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opListRestoreJobs = "ListRestoreJobs"
- // ListRestoreJobsRequest generates a "aws/request.Request" representing the
- // client's request for the ListRestoreJobs operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListRestoreJobs for more information on using the ListRestoreJobs
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListRestoreJobsRequest method.
- // req, resp := client.ListRestoreJobsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRestoreJobs
- func (c *Backup) ListRestoreJobsRequest(input *ListRestoreJobsInput) (req *request.Request, output *ListRestoreJobsOutput) {
- op := &request.Operation{
- Name: opListRestoreJobs,
- HTTPMethod: "GET",
- HTTPPath: "/restore-jobs/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListRestoreJobsInput{}
- }
- output = &ListRestoreJobsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListRestoreJobs API operation for AWS Backup.
- //
- // Returns a list of jobs that AWS Backup initiated to restore a saved resource,
- // including metadata about the recovery process.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation ListRestoreJobs for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRestoreJobs
- func (c *Backup) ListRestoreJobs(input *ListRestoreJobsInput) (*ListRestoreJobsOutput, error) {
- req, out := c.ListRestoreJobsRequest(input)
- return out, req.Send()
- }
- // ListRestoreJobsWithContext is the same as ListRestoreJobs with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListRestoreJobs for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListRestoreJobsWithContext(ctx aws.Context, input *ListRestoreJobsInput, opts ...request.Option) (*ListRestoreJobsOutput, error) {
- req, out := c.ListRestoreJobsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListRestoreJobsPages iterates over the pages of a ListRestoreJobs operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListRestoreJobs method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListRestoreJobs operation.
- // pageNum := 0
- // err := client.ListRestoreJobsPages(params,
- // func(page *ListRestoreJobsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Backup) ListRestoreJobsPages(input *ListRestoreJobsInput, fn func(*ListRestoreJobsOutput, bool) bool) error {
- return c.ListRestoreJobsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListRestoreJobsPagesWithContext same as ListRestoreJobsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListRestoreJobsPagesWithContext(ctx aws.Context, input *ListRestoreJobsInput, fn func(*ListRestoreJobsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListRestoreJobsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListRestoreJobsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListRestoreJobsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opListTags = "ListTags"
- // ListTagsRequest generates a "aws/request.Request" representing the
- // client's request for the ListTags operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListTags for more information on using the ListTags
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListTagsRequest method.
- // req, resp := client.ListTagsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListTags
- func (c *Backup) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) {
- op := &request.Operation{
- Name: opListTags,
- HTTPMethod: "GET",
- HTTPPath: "/tags/{resourceArn}/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListTagsInput{}
- }
- output = &ListTagsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListTags API operation for AWS Backup.
- //
- // Returns a list of key-value pairs assigned to a target recovery point, backup
- // plan, or backup vault.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation ListTags for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListTags
- func (c *Backup) ListTags(input *ListTagsInput) (*ListTagsOutput, error) {
- req, out := c.ListTagsRequest(input)
- return out, req.Send()
- }
- // ListTagsWithContext is the same as ListTags with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListTags for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) {
- req, out := c.ListTagsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListTagsPages iterates over the pages of a ListTags operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListTags method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListTags operation.
- // pageNum := 0
- // err := client.ListTagsPages(params,
- // func(page *ListTagsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Backup) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error {
- return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListTagsPagesWithContext same as ListTagsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListTagsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListTagsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opPutBackupVaultAccessPolicy = "PutBackupVaultAccessPolicy"
- // PutBackupVaultAccessPolicyRequest generates a "aws/request.Request" representing the
- // client's request for the PutBackupVaultAccessPolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See PutBackupVaultAccessPolicy for more information on using the PutBackupVaultAccessPolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the PutBackupVaultAccessPolicyRequest method.
- // req, resp := client.PutBackupVaultAccessPolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultAccessPolicy
- func (c *Backup) PutBackupVaultAccessPolicyRequest(input *PutBackupVaultAccessPolicyInput) (req *request.Request, output *PutBackupVaultAccessPolicyOutput) {
- op := &request.Operation{
- Name: opPutBackupVaultAccessPolicy,
- HTTPMethod: "PUT",
- HTTPPath: "/backup-vaults/{backupVaultName}/access-policy",
- }
- if input == nil {
- input = &PutBackupVaultAccessPolicyInput{}
- }
- output = &PutBackupVaultAccessPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // PutBackupVaultAccessPolicy API operation for AWS Backup.
- //
- // Sets a resource-based policy that is used to manage access permissions on
- // the target backup vault. Requires a backup vault name and an access policy
- // document in JSON format.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation PutBackupVaultAccessPolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultAccessPolicy
- func (c *Backup) PutBackupVaultAccessPolicy(input *PutBackupVaultAccessPolicyInput) (*PutBackupVaultAccessPolicyOutput, error) {
- req, out := c.PutBackupVaultAccessPolicyRequest(input)
- return out, req.Send()
- }
- // PutBackupVaultAccessPolicyWithContext is the same as PutBackupVaultAccessPolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PutBackupVaultAccessPolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) PutBackupVaultAccessPolicyWithContext(ctx aws.Context, input *PutBackupVaultAccessPolicyInput, opts ...request.Option) (*PutBackupVaultAccessPolicyOutput, error) {
- req, out := c.PutBackupVaultAccessPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opPutBackupVaultNotifications = "PutBackupVaultNotifications"
- // PutBackupVaultNotificationsRequest generates a "aws/request.Request" representing the
- // client's request for the PutBackupVaultNotifications operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See PutBackupVaultNotifications for more information on using the PutBackupVaultNotifications
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the PutBackupVaultNotificationsRequest method.
- // req, resp := client.PutBackupVaultNotificationsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultNotifications
- func (c *Backup) PutBackupVaultNotificationsRequest(input *PutBackupVaultNotificationsInput) (req *request.Request, output *PutBackupVaultNotificationsOutput) {
- op := &request.Operation{
- Name: opPutBackupVaultNotifications,
- HTTPMethod: "PUT",
- HTTPPath: "/backup-vaults/{backupVaultName}/notification-configuration",
- }
- if input == nil {
- input = &PutBackupVaultNotificationsInput{}
- }
- output = &PutBackupVaultNotificationsOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // PutBackupVaultNotifications API operation for AWS Backup.
- //
- // Turns on notifications on a backup vault for the specified topic and events.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation PutBackupVaultNotifications for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultNotifications
- func (c *Backup) PutBackupVaultNotifications(input *PutBackupVaultNotificationsInput) (*PutBackupVaultNotificationsOutput, error) {
- req, out := c.PutBackupVaultNotificationsRequest(input)
- return out, req.Send()
- }
- // PutBackupVaultNotificationsWithContext is the same as PutBackupVaultNotifications with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PutBackupVaultNotifications for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) PutBackupVaultNotificationsWithContext(ctx aws.Context, input *PutBackupVaultNotificationsInput, opts ...request.Option) (*PutBackupVaultNotificationsOutput, error) {
- req, out := c.PutBackupVaultNotificationsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStartBackupJob = "StartBackupJob"
- // StartBackupJobRequest generates a "aws/request.Request" representing the
- // client's request for the StartBackupJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StartBackupJob for more information on using the StartBackupJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StartBackupJobRequest method.
- // req, resp := client.StartBackupJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartBackupJob
- func (c *Backup) StartBackupJobRequest(input *StartBackupJobInput) (req *request.Request, output *StartBackupJobOutput) {
- op := &request.Operation{
- Name: opStartBackupJob,
- HTTPMethod: "PUT",
- HTTPPath: "/backup-jobs",
- }
- if input == nil {
- input = &StartBackupJobInput{}
- }
- output = &StartBackupJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // StartBackupJob API operation for AWS Backup.
- //
- // Starts a job to create a one-time backup of the specified resource.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation StartBackupJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // * ErrCodeLimitExceededException "LimitExceededException"
- // A limit in the request has been exceeded; for example, a maximum number of
- // items allowed in a request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartBackupJob
- func (c *Backup) StartBackupJob(input *StartBackupJobInput) (*StartBackupJobOutput, error) {
- req, out := c.StartBackupJobRequest(input)
- return out, req.Send()
- }
- // StartBackupJobWithContext is the same as StartBackupJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StartBackupJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) StartBackupJobWithContext(ctx aws.Context, input *StartBackupJobInput, opts ...request.Option) (*StartBackupJobOutput, error) {
- req, out := c.StartBackupJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStartRestoreJob = "StartRestoreJob"
- // StartRestoreJobRequest generates a "aws/request.Request" representing the
- // client's request for the StartRestoreJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StartRestoreJob for more information on using the StartRestoreJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StartRestoreJobRequest method.
- // req, resp := client.StartRestoreJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartRestoreJob
- func (c *Backup) StartRestoreJobRequest(input *StartRestoreJobInput) (req *request.Request, output *StartRestoreJobOutput) {
- op := &request.Operation{
- Name: opStartRestoreJob,
- HTTPMethod: "PUT",
- HTTPPath: "/restore-jobs",
- }
- if input == nil {
- input = &StartRestoreJobInput{}
- }
- output = &StartRestoreJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // StartRestoreJob API operation for AWS Backup.
- //
- // Recovers the saved resource identified by an Amazon Resource Name (ARN).
- //
- // If the resource ARN is included in the request, then the last complete backup
- // of that resource is recovered. If the ARN of a recovery point is supplied,
- // then that recovery point is restored.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation StartRestoreJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartRestoreJob
- func (c *Backup) StartRestoreJob(input *StartRestoreJobInput) (*StartRestoreJobOutput, error) {
- req, out := c.StartRestoreJobRequest(input)
- return out, req.Send()
- }
- // StartRestoreJobWithContext is the same as StartRestoreJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StartRestoreJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) StartRestoreJobWithContext(ctx aws.Context, input *StartRestoreJobInput, opts ...request.Option) (*StartRestoreJobOutput, error) {
- req, out := c.StartRestoreJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStopBackupJob = "StopBackupJob"
- // StopBackupJobRequest generates a "aws/request.Request" representing the
- // client's request for the StopBackupJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StopBackupJob for more information on using the StopBackupJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StopBackupJobRequest method.
- // req, resp := client.StopBackupJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StopBackupJob
- func (c *Backup) StopBackupJobRequest(input *StopBackupJobInput) (req *request.Request, output *StopBackupJobOutput) {
- op := &request.Operation{
- Name: opStopBackupJob,
- HTTPMethod: "POST",
- HTTPPath: "/backup-jobs/{backupJobId}",
- }
- if input == nil {
- input = &StopBackupJobInput{}
- }
- output = &StopBackupJobOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // StopBackupJob API operation for AWS Backup.
- //
- // Attempts to cancel a job to create a one-time backup of a resource.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation StopBackupJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // Indicates that something is wrong with the input to the request. For example,
- // a parameter is of the wrong type.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StopBackupJob
- func (c *Backup) StopBackupJob(input *StopBackupJobInput) (*StopBackupJobOutput, error) {
- req, out := c.StopBackupJobRequest(input)
- return out, req.Send()
- }
- // StopBackupJobWithContext is the same as StopBackupJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StopBackupJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) StopBackupJobWithContext(ctx aws.Context, input *StopBackupJobInput, opts ...request.Option) (*StopBackupJobOutput, error) {
- req, out := c.StopBackupJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opTagResource = "TagResource"
- // TagResourceRequest generates a "aws/request.Request" representing the
- // client's request for the TagResource operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See TagResource for more information on using the TagResource
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the TagResourceRequest method.
- // req, resp := client.TagResourceRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/TagResource
- func (c *Backup) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
- op := &request.Operation{
- Name: opTagResource,
- HTTPMethod: "POST",
- HTTPPath: "/tags/{resourceArn}",
- }
- if input == nil {
- input = &TagResourceInput{}
- }
- output = &TagResourceOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // TagResource API operation for AWS Backup.
- //
- // Assigns a set of key-value pairs to a recovery point, backup plan, or backup
- // vault identified by an Amazon Resource Name (ARN).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation TagResource for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // * ErrCodeLimitExceededException "LimitExceededException"
- // A limit in the request has been exceeded; for example, a maximum number of
- // items allowed in a request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/TagResource
- func (c *Backup) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
- req, out := c.TagResourceRequest(input)
- return out, req.Send()
- }
- // TagResourceWithContext is the same as TagResource with the addition of
- // the ability to pass a context and additional request options.
- //
- // See TagResource for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
- req, out := c.TagResourceRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opUntagResource = "UntagResource"
- // UntagResourceRequest generates a "aws/request.Request" representing the
- // client's request for the UntagResource operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See UntagResource for more information on using the UntagResource
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the UntagResourceRequest method.
- // req, resp := client.UntagResourceRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UntagResource
- func (c *Backup) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
- op := &request.Operation{
- Name: opUntagResource,
- HTTPMethod: "POST",
- HTTPPath: "/untag/{resourceArn}",
- }
- if input == nil {
- input = &UntagResourceInput{}
- }
- output = &UntagResourceOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // UntagResource API operation for AWS Backup.
- //
- // Removes a set of key-value pairs from a recovery point, backup plan, or backup
- // vault identified by an Amazon Resource Name (ARN)
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation UntagResource for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UntagResource
- func (c *Backup) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
- req, out := c.UntagResourceRequest(input)
- return out, req.Send()
- }
- // UntagResourceWithContext is the same as UntagResource with the addition of
- // the ability to pass a context and additional request options.
- //
- // See UntagResource for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
- req, out := c.UntagResourceRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opUpdateBackupPlan = "UpdateBackupPlan"
- // UpdateBackupPlanRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateBackupPlan operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See UpdateBackupPlan for more information on using the UpdateBackupPlan
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the UpdateBackupPlanRequest method.
- // req, resp := client.UpdateBackupPlanRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateBackupPlan
- func (c *Backup) UpdateBackupPlanRequest(input *UpdateBackupPlanInput) (req *request.Request, output *UpdateBackupPlanOutput) {
- op := &request.Operation{
- Name: opUpdateBackupPlan,
- HTTPMethod: "POST",
- HTTPPath: "/backup/plans/{backupPlanId}",
- }
- if input == nil {
- input = &UpdateBackupPlanInput{}
- }
- output = &UpdateBackupPlanOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // UpdateBackupPlan API operation for AWS Backup.
- //
- // Replaces the body of a saved backup plan identified by its backupPlanId with
- // the input document in JSON format. The new version is uniquely identified
- // by a VersionId.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation UpdateBackupPlan for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateBackupPlan
- func (c *Backup) UpdateBackupPlan(input *UpdateBackupPlanInput) (*UpdateBackupPlanOutput, error) {
- req, out := c.UpdateBackupPlanRequest(input)
- return out, req.Send()
- }
- // UpdateBackupPlanWithContext is the same as UpdateBackupPlan with the addition of
- // the ability to pass a context and additional request options.
- //
- // See UpdateBackupPlan for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) UpdateBackupPlanWithContext(ctx aws.Context, input *UpdateBackupPlanInput, opts ...request.Option) (*UpdateBackupPlanOutput, error) {
- req, out := c.UpdateBackupPlanRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opUpdateRecoveryPointLifecycle = "UpdateRecoveryPointLifecycle"
- // UpdateRecoveryPointLifecycleRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateRecoveryPointLifecycle operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See UpdateRecoveryPointLifecycle for more information on using the UpdateRecoveryPointLifecycle
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the UpdateRecoveryPointLifecycleRequest method.
- // req, resp := client.UpdateRecoveryPointLifecycleRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateRecoveryPointLifecycle
- func (c *Backup) UpdateRecoveryPointLifecycleRequest(input *UpdateRecoveryPointLifecycleInput) (req *request.Request, output *UpdateRecoveryPointLifecycleOutput) {
- op := &request.Operation{
- Name: opUpdateRecoveryPointLifecycle,
- HTTPMethod: "POST",
- HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}",
- }
- if input == nil {
- input = &UpdateRecoveryPointLifecycleInput{}
- }
- output = &UpdateRecoveryPointLifecycleOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // UpdateRecoveryPointLifecycle API operation for AWS Backup.
- //
- // Sets the transition lifecycle of a recovery point.
- //
- // The lifecycle defines when a protected resource is transitioned to cold storage
- // and when it expires. AWS Backup transitions and expires backups automatically
- // according to the lifecycle that you define.
- //
- // Backups transitioned to cold storage must be stored in cold storage for a
- // minimum of 90 days. Therefore, the “expire after days” setting must be 90
- // days greater than the “transition to cold after days” setting. The “transition
- // to cold after days” setting cannot be changed after a backup has been transitioned
- // to cold.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Backup's
- // API operation UpdateRecoveryPointLifecycle for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // A resource that is required for the action doesn't exist.
- //
- // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
- // Indicates that something is wrong with a parameter's value. For example,
- // the value is out of range.
- //
- // * ErrCodeMissingParameterValueException "MissingParameterValueException"
- // Indicates that a required parameter is missing.
- //
- // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
- // The request failed due to a temporary failure of the server.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateRecoveryPointLifecycle
- func (c *Backup) UpdateRecoveryPointLifecycle(input *UpdateRecoveryPointLifecycleInput) (*UpdateRecoveryPointLifecycleOutput, error) {
- req, out := c.UpdateRecoveryPointLifecycleRequest(input)
- return out, req.Send()
- }
- // UpdateRecoveryPointLifecycleWithContext is the same as UpdateRecoveryPointLifecycle with the addition of
- // the ability to pass a context and additional request options.
- //
- // See UpdateRecoveryPointLifecycle for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Backup) UpdateRecoveryPointLifecycleWithContext(ctx aws.Context, input *UpdateRecoveryPointLifecycleInput, opts ...request.Option) (*UpdateRecoveryPointLifecycleOutput, error) {
- req, out := c.UpdateRecoveryPointLifecycleRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // Contains DeleteAt and MoveToColdStorageAt timestamps, which are used to specify
- // a lifecycle for a recovery point.
- //
- // The lifecycle defines when a protected resource is transitioned to cold storage
- // and when it expires. AWS Backup transitions and expires backups automatically
- // according to the lifecycle that you define.
- //
- // Backups transitioned to cold storage must be stored in cold storage for a
- // minimum of 90 days. Therefore, the “expire after days” setting must be 90
- // days greater than the “transition to cold after days” setting. The “transition
- // to cold after days” setting cannot be changed after a backup has been transitioned
- // to cold.
- type CalculatedLifecycle struct {
- _ struct{} `type:"structure"`
- // A timestamp that specifies when to delete a recovery point.
- DeleteAt *time.Time `type:"timestamp"`
- // A timestamp that specifies when to transition a recovery point to cold storage.
- MoveToColdStorageAt *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s CalculatedLifecycle) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CalculatedLifecycle) GoString() string {
- return s.String()
- }
- // SetDeleteAt sets the DeleteAt field's value.
- func (s *CalculatedLifecycle) SetDeleteAt(v time.Time) *CalculatedLifecycle {
- s.DeleteAt = &v
- return s
- }
- // SetMoveToColdStorageAt sets the MoveToColdStorageAt field's value.
- func (s *CalculatedLifecycle) SetMoveToColdStorageAt(v time.Time) *CalculatedLifecycle {
- s.MoveToColdStorageAt = &v
- return s
- }
- // Contains an array of triplets made up of a condition type (such as StringEquals),
- // a key, and a value. Conditions are used to filter resources in a selection
- // that is assigned to a backup plan.
- type Condition struct {
- _ struct{} `type:"structure"`
- // The key in a key-value pair. For example, in "ec2:ResourceTag/Department":
- // "accounting", "ec2:ResourceTag/Department" is the key.
- //
- // ConditionKey is a required field
- ConditionKey *string `type:"string" required:"true"`
- // An operation, such as StringEquals, that is applied to a key-value pair used
- // to filter resources in a selection.
- //
- // ConditionType is a required field
- ConditionType *string `type:"string" required:"true" enum:"ConditionType"`
- // The value in a key-value pair. For example, in "ec2:ResourceTag/Department":
- // "accounting", "accounting" is the value.
- //
- // ConditionValue is a required field
- ConditionValue *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s Condition) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Condition) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *Condition) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Condition"}
- if s.ConditionKey == nil {
- invalidParams.Add(request.NewErrParamRequired("ConditionKey"))
- }
- if s.ConditionType == nil {
- invalidParams.Add(request.NewErrParamRequired("ConditionType"))
- }
- if s.ConditionValue == nil {
- invalidParams.Add(request.NewErrParamRequired("ConditionValue"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetConditionKey sets the ConditionKey field's value.
- func (s *Condition) SetConditionKey(v string) *Condition {
- s.ConditionKey = &v
- return s
- }
- // SetConditionType sets the ConditionType field's value.
- func (s *Condition) SetConditionType(v string) *Condition {
- s.ConditionType = &v
- return s
- }
- // SetConditionValue sets the ConditionValue field's value.
- func (s *Condition) SetConditionValue(v string) *Condition {
- s.ConditionValue = &v
- return s
- }
- type CreateBackupPlanInput struct {
- _ struct{} `type:"structure"`
- // Specifies the body of a backup plan. Includes a BackupPlanName and one or
- // more sets of Rules.
- //
- // BackupPlan is a required field
- BackupPlan *PlanInput `type:"structure" required:"true"`
- // To help organize your resources, you can assign your own metadata to the
- // resources that you create. Each tag is a key-value pair. The specified tags
- // are assigned to all backups created with this plan.
- BackupPlanTags map[string]*string `type:"map" sensitive:"true"`
- // Identifies the request and allows failed requests to be retried without the
- // risk of executing the operation twice. If the request includes a CreatorRequestId
- // that matches an existing backup plan, that plan is returned. This parameter
- // is optional.
- CreatorRequestId *string `type:"string"`
- }
- // String returns the string representation
- func (s CreateBackupPlanInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateBackupPlanInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateBackupPlanInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateBackupPlanInput"}
- if s.BackupPlan == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupPlan"))
- }
- if s.BackupPlan != nil {
- if err := s.BackupPlan.Validate(); err != nil {
- invalidParams.AddNested("BackupPlan", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupPlan sets the BackupPlan field's value.
- func (s *CreateBackupPlanInput) SetBackupPlan(v *PlanInput) *CreateBackupPlanInput {
- s.BackupPlan = v
- return s
- }
- // SetBackupPlanTags sets the BackupPlanTags field's value.
- func (s *CreateBackupPlanInput) SetBackupPlanTags(v map[string]*string) *CreateBackupPlanInput {
- s.BackupPlanTags = v
- return s
- }
- // SetCreatorRequestId sets the CreatorRequestId field's value.
- func (s *CreateBackupPlanInput) SetCreatorRequestId(v string) *CreateBackupPlanInput {
- s.CreatorRequestId = &v
- return s
- }
- type CreateBackupPlanOutput struct {
- _ struct{} `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for
- // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50.
- BackupPlanArn *string `type:"string"`
- // Uniquely identifies a backup plan.
- BackupPlanId *string `type:"string"`
- // The date and time that a backup plan is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most
- // 1024 bytes long. They cannot be edited.
- VersionId *string `type:"string"`
- }
- // String returns the string representation
- func (s CreateBackupPlanOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateBackupPlanOutput) GoString() string {
- return s.String()
- }
- // SetBackupPlanArn sets the BackupPlanArn field's value.
- func (s *CreateBackupPlanOutput) SetBackupPlanArn(v string) *CreateBackupPlanOutput {
- s.BackupPlanArn = &v
- return s
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *CreateBackupPlanOutput) SetBackupPlanId(v string) *CreateBackupPlanOutput {
- s.BackupPlanId = &v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *CreateBackupPlanOutput) SetCreationDate(v time.Time) *CreateBackupPlanOutput {
- s.CreationDate = &v
- return s
- }
- // SetVersionId sets the VersionId field's value.
- func (s *CreateBackupPlanOutput) SetVersionId(v string) *CreateBackupPlanOutput {
- s.VersionId = &v
- return s
- }
- type CreateBackupSelectionInput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies the backup plan to be associated with the selection of
- // resources.
- //
- // BackupPlanId is a required field
- BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
- // Specifies the body of a request to assign a set of resources to a backup
- // plan.
- //
- // It includes an array of resources, an optional array of patterns to exclude
- // resources, an optional role to provide access to the AWS service the resource
- // belongs to, and an optional array of tags used to identify a set of resources.
- //
- // BackupSelection is a required field
- BackupSelection *Selection `type:"structure" required:"true"`
- // A unique string that identifies the request and allows failed requests to
- // be retried without the risk of executing the operation twice.
- CreatorRequestId *string `type:"string"`
- }
- // String returns the string representation
- func (s CreateBackupSelectionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateBackupSelectionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateBackupSelectionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateBackupSelectionInput"}
- if s.BackupPlanId == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
- }
- if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
- }
- if s.BackupSelection == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupSelection"))
- }
- if s.BackupSelection != nil {
- if err := s.BackupSelection.Validate(); err != nil {
- invalidParams.AddNested("BackupSelection", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *CreateBackupSelectionInput) SetBackupPlanId(v string) *CreateBackupSelectionInput {
- s.BackupPlanId = &v
- return s
- }
- // SetBackupSelection sets the BackupSelection field's value.
- func (s *CreateBackupSelectionInput) SetBackupSelection(v *Selection) *CreateBackupSelectionInput {
- s.BackupSelection = v
- return s
- }
- // SetCreatorRequestId sets the CreatorRequestId field's value.
- func (s *CreateBackupSelectionInput) SetCreatorRequestId(v string) *CreateBackupSelectionInput {
- s.CreatorRequestId = &v
- return s
- }
- type CreateBackupSelectionOutput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a backup plan.
- BackupPlanId *string `type:"string"`
- // The date and time a backup selection is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // Uniquely identifies the body of a request to assign a set of resources to
- // a backup plan.
- SelectionId *string `type:"string"`
- }
- // String returns the string representation
- func (s CreateBackupSelectionOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateBackupSelectionOutput) GoString() string {
- return s.String()
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *CreateBackupSelectionOutput) SetBackupPlanId(v string) *CreateBackupSelectionOutput {
- s.BackupPlanId = &v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *CreateBackupSelectionOutput) SetCreationDate(v time.Time) *CreateBackupSelectionOutput {
- s.CreationDate = &v
- return s
- }
- // SetSelectionId sets the SelectionId field's value.
- func (s *CreateBackupSelectionOutput) SetSelectionId(v string) *CreateBackupSelectionOutput {
- s.SelectionId = &v
- return s
- }
- type CreateBackupVaultInput struct {
- _ struct{} `type:"structure"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
- // Metadata that you can assign to help organize the resources that you create.
- // Each tag is a key-value pair.
- BackupVaultTags map[string]*string `type:"map" sensitive:"true"`
- // A unique string that identifies the request and allows failed requests to
- // be retried without the risk of executing the operation twice.
- CreatorRequestId *string `type:"string"`
- // The server-side encryption key that is used to protect your backups; for
- // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
- EncryptionKeyArn *string `type:"string"`
- }
- // String returns the string representation
- func (s CreateBackupVaultInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateBackupVaultInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateBackupVaultInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateBackupVaultInput"}
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *CreateBackupVaultInput) SetBackupVaultName(v string) *CreateBackupVaultInput {
- s.BackupVaultName = &v
- return s
- }
- // SetBackupVaultTags sets the BackupVaultTags field's value.
- func (s *CreateBackupVaultInput) SetBackupVaultTags(v map[string]*string) *CreateBackupVaultInput {
- s.BackupVaultTags = v
- return s
- }
- // SetCreatorRequestId sets the CreatorRequestId field's value.
- func (s *CreateBackupVaultInput) SetCreatorRequestId(v string) *CreateBackupVaultInput {
- s.CreatorRequestId = &v
- return s
- }
- // SetEncryptionKeyArn sets the EncryptionKeyArn field's value.
- func (s *CreateBackupVaultInput) SetEncryptionKeyArn(v string) *CreateBackupVaultInput {
- s.EncryptionKeyArn = &v
- return s
- }
- type CreateBackupVaultOutput struct {
- _ struct{} `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for
- // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
- BackupVaultArn *string `type:"string"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the Region where they are created. They consist of lowercase letters, numbers,
- // and hyphens.
- BackupVaultName *string `type:"string"`
- // The date and time a backup vault is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s CreateBackupVaultOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateBackupVaultOutput) GoString() string {
- return s.String()
- }
- // SetBackupVaultArn sets the BackupVaultArn field's value.
- func (s *CreateBackupVaultOutput) SetBackupVaultArn(v string) *CreateBackupVaultOutput {
- s.BackupVaultArn = &v
- return s
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *CreateBackupVaultOutput) SetBackupVaultName(v string) *CreateBackupVaultOutput {
- s.BackupVaultName = &v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *CreateBackupVaultOutput) SetCreationDate(v time.Time) *CreateBackupVaultOutput {
- s.CreationDate = &v
- return s
- }
- type DeleteBackupPlanInput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a backup plan.
- //
- // BackupPlanId is a required field
- BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteBackupPlanInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteBackupPlanInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteBackupPlanInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBackupPlanInput"}
- if s.BackupPlanId == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
- }
- if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *DeleteBackupPlanInput) SetBackupPlanId(v string) *DeleteBackupPlanInput {
- s.BackupPlanId = &v
- return s
- }
- type DeleteBackupPlanOutput struct {
- _ struct{} `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for
- // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50.
- BackupPlanArn *string `type:"string"`
- // Uniquely identifies a backup plan.
- BackupPlanId *string `type:"string"`
- // The date and time a backup plan is deleted, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- DeletionDate *time.Time `type:"timestamp"`
- // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most
- // 1,024 bytes long. Version Ids cannot be edited.
- VersionId *string `type:"string"`
- }
- // String returns the string representation
- func (s DeleteBackupPlanOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteBackupPlanOutput) GoString() string {
- return s.String()
- }
- // SetBackupPlanArn sets the BackupPlanArn field's value.
- func (s *DeleteBackupPlanOutput) SetBackupPlanArn(v string) *DeleteBackupPlanOutput {
- s.BackupPlanArn = &v
- return s
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *DeleteBackupPlanOutput) SetBackupPlanId(v string) *DeleteBackupPlanOutput {
- s.BackupPlanId = &v
- return s
- }
- // SetDeletionDate sets the DeletionDate field's value.
- func (s *DeleteBackupPlanOutput) SetDeletionDate(v time.Time) *DeleteBackupPlanOutput {
- s.DeletionDate = &v
- return s
- }
- // SetVersionId sets the VersionId field's value.
- func (s *DeleteBackupPlanOutput) SetVersionId(v string) *DeleteBackupPlanOutput {
- s.VersionId = &v
- return s
- }
- type DeleteBackupSelectionInput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a backup plan.
- //
- // BackupPlanId is a required field
- BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
- // Uniquely identifies the body of a request to assign a set of resources to
- // a backup plan.
- //
- // SelectionId is a required field
- SelectionId *string `location:"uri" locationName:"selectionId" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteBackupSelectionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteBackupSelectionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteBackupSelectionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBackupSelectionInput"}
- if s.BackupPlanId == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
- }
- if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
- }
- if s.SelectionId == nil {
- invalidParams.Add(request.NewErrParamRequired("SelectionId"))
- }
- if s.SelectionId != nil && len(*s.SelectionId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("SelectionId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *DeleteBackupSelectionInput) SetBackupPlanId(v string) *DeleteBackupSelectionInput {
- s.BackupPlanId = &v
- return s
- }
- // SetSelectionId sets the SelectionId field's value.
- func (s *DeleteBackupSelectionInput) SetSelectionId(v string) *DeleteBackupSelectionInput {
- s.SelectionId = &v
- return s
- }
- type DeleteBackupSelectionOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteBackupSelectionOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteBackupSelectionOutput) GoString() string {
- return s.String()
- }
- type DeleteBackupVaultAccessPolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteBackupVaultAccessPolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteBackupVaultAccessPolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteBackupVaultAccessPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBackupVaultAccessPolicyInput"}
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *DeleteBackupVaultAccessPolicyInput) SetBackupVaultName(v string) *DeleteBackupVaultAccessPolicyInput {
- s.BackupVaultName = &v
- return s
- }
- type DeleteBackupVaultAccessPolicyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteBackupVaultAccessPolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteBackupVaultAccessPolicyOutput) GoString() string {
- return s.String()
- }
- type DeleteBackupVaultInput struct {
- _ struct{} `type:"structure"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // theAWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteBackupVaultInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteBackupVaultInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteBackupVaultInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBackupVaultInput"}
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *DeleteBackupVaultInput) SetBackupVaultName(v string) *DeleteBackupVaultInput {
- s.BackupVaultName = &v
- return s
- }
- type DeleteBackupVaultNotificationsInput struct {
- _ struct{} `type:"structure"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the Region where they are created. They consist of lowercase letters, numbers,
- // and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteBackupVaultNotificationsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteBackupVaultNotificationsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteBackupVaultNotificationsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBackupVaultNotificationsInput"}
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *DeleteBackupVaultNotificationsInput) SetBackupVaultName(v string) *DeleteBackupVaultNotificationsInput {
- s.BackupVaultName = &v
- return s
- }
- type DeleteBackupVaultNotificationsOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteBackupVaultNotificationsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteBackupVaultNotificationsOutput) GoString() string {
- return s.String()
- }
- type DeleteBackupVaultOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteBackupVaultOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteBackupVaultOutput) GoString() string {
- return s.String()
- }
- type DeleteRecoveryPointInput struct {
- _ struct{} `type:"structure"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
- // An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
- // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- //
- // RecoveryPointArn is a required field
- RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteRecoveryPointInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteRecoveryPointInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteRecoveryPointInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteRecoveryPointInput"}
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
- }
- if s.RecoveryPointArn == nil {
- invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn"))
- }
- if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *DeleteRecoveryPointInput) SetBackupVaultName(v string) *DeleteRecoveryPointInput {
- s.BackupVaultName = &v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *DeleteRecoveryPointInput) SetRecoveryPointArn(v string) *DeleteRecoveryPointInput {
- s.RecoveryPointArn = &v
- return s
- }
- type DeleteRecoveryPointOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteRecoveryPointOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteRecoveryPointOutput) GoString() string {
- return s.String()
- }
- type DescribeBackupJobInput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a request to AWS Backup to back up a resource.
- //
- // BackupJobId is a required field
- BackupJobId *string `location:"uri" locationName:"backupJobId" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeBackupJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeBackupJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeBackupJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeBackupJobInput"}
- if s.BackupJobId == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupJobId"))
- }
- if s.BackupJobId != nil && len(*s.BackupJobId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupJobId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupJobId sets the BackupJobId field's value.
- func (s *DescribeBackupJobInput) SetBackupJobId(v string) *DescribeBackupJobInput {
- s.BackupJobId = &v
- return s
- }
- type DescribeBackupJobOutput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a request to AWS Backup to back up a resource.
- BackupJobId *string `type:"string"`
- // The size, in bytes, of a backup.
- BackupSizeInBytes *int64 `type:"long"`
- // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for
- // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
- BackupVaultArn *string `type:"string"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- BackupVaultName *string `type:"string"`
- // The size in bytes transferred to a backup vault at the time that the job
- // status was queried.
- BytesTransferred *int64 `type:"long"`
- // The date and time that a job to create a backup job is completed, in Unix
- // format and Coordinated Universal Time (UTC). The value of CreationDate is
- // accurate to milliseconds. For example, the value 1516925490.087 represents
- // Friday, January 26, 2018 12:11:30.087 AM.
- CompletionDate *time.Time `type:"timestamp"`
- // Contains identifying information about the creation of a backup job, including
- // the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId of the
- // backup plan that is used to create it.
- CreatedBy *RecoveryPointCreator `type:"structure"`
- // The date and time that a backup job is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // The date and time that a job to back up resources is expected to be completed,
- // in Unix format and Coordinated Universal Time (UTC). The value of ExpectedCompletionDate
- // is accurate to milliseconds. For example, the value 1516925490.087 represents
- // Friday, January 26, 2018 12:11:30.087 AM.
- ExpectedCompletionDate *time.Time `type:"timestamp"`
- // Specifies the IAM role ARN used to create the target recovery point; for
- // example, arn:aws:iam::123456789012:role/S3Access.
- IamRoleArn *string `type:"string"`
- // Contains an estimated percentage that is complete of a job at the time the
- // job status was queried.
- PercentDone *string `type:"string"`
- // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- RecoveryPointArn *string `type:"string"`
- // An ARN that uniquely identifies a saved resource. The format of the ARN depends
- // on the resource type.
- ResourceArn *string `type:"string"`
- // The type of AWS resource to be backed-up; for example, an Amazon Elastic
- // Block Store (Amazon EBS) volume or an Amazon Relational Database Service
- // (Amazon RDS) database.
- ResourceType *string `type:"string"`
- // Specifies the time in Unix format and Coordinated Universal Time (UTC) when
- // a backup job must be started before it is canceled. The value is calculated
- // by adding the start window to the scheduled time. So if the scheduled time
- // were 6:00 PM and the start window is 2 hours, the StartBy time would be 8:00
- // PM on the date specified. The value of StartBy is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- StartBy *time.Time `type:"timestamp"`
- // The current state of a resource recovery point.
- State *string `type:"string" enum:"JobState"`
- // A detailed message explaining the status of the job to back up a resource.
- StatusMessage *string `type:"string"`
- }
- // String returns the string representation
- func (s DescribeBackupJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeBackupJobOutput) GoString() string {
- return s.String()
- }
- // SetBackupJobId sets the BackupJobId field's value.
- func (s *DescribeBackupJobOutput) SetBackupJobId(v string) *DescribeBackupJobOutput {
- s.BackupJobId = &v
- return s
- }
- // SetBackupSizeInBytes sets the BackupSizeInBytes field's value.
- func (s *DescribeBackupJobOutput) SetBackupSizeInBytes(v int64) *DescribeBackupJobOutput {
- s.BackupSizeInBytes = &v
- return s
- }
- // SetBackupVaultArn sets the BackupVaultArn field's value.
- func (s *DescribeBackupJobOutput) SetBackupVaultArn(v string) *DescribeBackupJobOutput {
- s.BackupVaultArn = &v
- return s
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *DescribeBackupJobOutput) SetBackupVaultName(v string) *DescribeBackupJobOutput {
- s.BackupVaultName = &v
- return s
- }
- // SetBytesTransferred sets the BytesTransferred field's value.
- func (s *DescribeBackupJobOutput) SetBytesTransferred(v int64) *DescribeBackupJobOutput {
- s.BytesTransferred = &v
- return s
- }
- // SetCompletionDate sets the CompletionDate field's value.
- func (s *DescribeBackupJobOutput) SetCompletionDate(v time.Time) *DescribeBackupJobOutput {
- s.CompletionDate = &v
- return s
- }
- // SetCreatedBy sets the CreatedBy field's value.
- func (s *DescribeBackupJobOutput) SetCreatedBy(v *RecoveryPointCreator) *DescribeBackupJobOutput {
- s.CreatedBy = v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *DescribeBackupJobOutput) SetCreationDate(v time.Time) *DescribeBackupJobOutput {
- s.CreationDate = &v
- return s
- }
- // SetExpectedCompletionDate sets the ExpectedCompletionDate field's value.
- func (s *DescribeBackupJobOutput) SetExpectedCompletionDate(v time.Time) *DescribeBackupJobOutput {
- s.ExpectedCompletionDate = &v
- return s
- }
- // SetIamRoleArn sets the IamRoleArn field's value.
- func (s *DescribeBackupJobOutput) SetIamRoleArn(v string) *DescribeBackupJobOutput {
- s.IamRoleArn = &v
- return s
- }
- // SetPercentDone sets the PercentDone field's value.
- func (s *DescribeBackupJobOutput) SetPercentDone(v string) *DescribeBackupJobOutput {
- s.PercentDone = &v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *DescribeBackupJobOutput) SetRecoveryPointArn(v string) *DescribeBackupJobOutput {
- s.RecoveryPointArn = &v
- return s
- }
- // SetResourceArn sets the ResourceArn field's value.
- func (s *DescribeBackupJobOutput) SetResourceArn(v string) *DescribeBackupJobOutput {
- s.ResourceArn = &v
- return s
- }
- // SetResourceType sets the ResourceType field's value.
- func (s *DescribeBackupJobOutput) SetResourceType(v string) *DescribeBackupJobOutput {
- s.ResourceType = &v
- return s
- }
- // SetStartBy sets the StartBy field's value.
- func (s *DescribeBackupJobOutput) SetStartBy(v time.Time) *DescribeBackupJobOutput {
- s.StartBy = &v
- return s
- }
- // SetState sets the State field's value.
- func (s *DescribeBackupJobOutput) SetState(v string) *DescribeBackupJobOutput {
- s.State = &v
- return s
- }
- // SetStatusMessage sets the StatusMessage field's value.
- func (s *DescribeBackupJobOutput) SetStatusMessage(v string) *DescribeBackupJobOutput {
- s.StatusMessage = &v
- return s
- }
- type DescribeBackupVaultInput struct {
- _ struct{} `type:"structure"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeBackupVaultInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeBackupVaultInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeBackupVaultInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeBackupVaultInput"}
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *DescribeBackupVaultInput) SetBackupVaultName(v string) *DescribeBackupVaultInput {
- s.BackupVaultName = &v
- return s
- }
- type DescribeBackupVaultOutput struct {
- _ struct{} `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for
- // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
- BackupVaultArn *string `type:"string"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the Region where they are created. They consist of lowercase letters, numbers,
- // and hyphens.
- BackupVaultName *string `type:"string"`
- // The date and time that a backup vault is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // A unique string that identifies the request and allows failed requests to
- // be retried without the risk of executing the operation twice.
- CreatorRequestId *string `type:"string"`
- // The server-side encryption key that is used to protect your backups; for
- // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
- EncryptionKeyArn *string `type:"string"`
- // The number of recovery points that are stored in a backup vault.
- NumberOfRecoveryPoints *int64 `type:"long"`
- }
- // String returns the string representation
- func (s DescribeBackupVaultOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeBackupVaultOutput) GoString() string {
- return s.String()
- }
- // SetBackupVaultArn sets the BackupVaultArn field's value.
- func (s *DescribeBackupVaultOutput) SetBackupVaultArn(v string) *DescribeBackupVaultOutput {
- s.BackupVaultArn = &v
- return s
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *DescribeBackupVaultOutput) SetBackupVaultName(v string) *DescribeBackupVaultOutput {
- s.BackupVaultName = &v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *DescribeBackupVaultOutput) SetCreationDate(v time.Time) *DescribeBackupVaultOutput {
- s.CreationDate = &v
- return s
- }
- // SetCreatorRequestId sets the CreatorRequestId field's value.
- func (s *DescribeBackupVaultOutput) SetCreatorRequestId(v string) *DescribeBackupVaultOutput {
- s.CreatorRequestId = &v
- return s
- }
- // SetEncryptionKeyArn sets the EncryptionKeyArn field's value.
- func (s *DescribeBackupVaultOutput) SetEncryptionKeyArn(v string) *DescribeBackupVaultOutput {
- s.EncryptionKeyArn = &v
- return s
- }
- // SetNumberOfRecoveryPoints sets the NumberOfRecoveryPoints field's value.
- func (s *DescribeBackupVaultOutput) SetNumberOfRecoveryPoints(v int64) *DescribeBackupVaultOutput {
- s.NumberOfRecoveryPoints = &v
- return s
- }
- type DescribeProtectedResourceInput struct {
- _ struct{} `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format
- // of the ARN depends on the resource type.
- //
- // ResourceArn is a required field
- ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeProtectedResourceInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeProtectedResourceInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeProtectedResourceInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeProtectedResourceInput"}
- if s.ResourceArn == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
- }
- if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetResourceArn sets the ResourceArn field's value.
- func (s *DescribeProtectedResourceInput) SetResourceArn(v string) *DescribeProtectedResourceInput {
- s.ResourceArn = &v
- return s
- }
- type DescribeProtectedResourceOutput struct {
- _ struct{} `type:"structure"`
- // The date and time that a resource was last backed up, in Unix format and
- // Coordinated Universal Time (UTC). The value of LastBackupTime is accurate
- // to milliseconds. For example, the value 1516925490.087 represents Friday,
- // January 26, 2018 12:11:30.087 AM.
- LastBackupTime *time.Time `type:"timestamp"`
- // An ARN that uniquely identifies a resource. The format of the ARN depends
- // on the resource type.
- ResourceArn *string `type:"string"`
- // The type of AWS resource saved as a recovery point; for example, an EBS volume
- // or an Amazon RDS database.
- ResourceType *string `type:"string"`
- }
- // String returns the string representation
- func (s DescribeProtectedResourceOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeProtectedResourceOutput) GoString() string {
- return s.String()
- }
- // SetLastBackupTime sets the LastBackupTime field's value.
- func (s *DescribeProtectedResourceOutput) SetLastBackupTime(v time.Time) *DescribeProtectedResourceOutput {
- s.LastBackupTime = &v
- return s
- }
- // SetResourceArn sets the ResourceArn field's value.
- func (s *DescribeProtectedResourceOutput) SetResourceArn(v string) *DescribeProtectedResourceOutput {
- s.ResourceArn = &v
- return s
- }
- // SetResourceType sets the ResourceType field's value.
- func (s *DescribeProtectedResourceOutput) SetResourceType(v string) *DescribeProtectedResourceOutput {
- s.ResourceType = &v
- return s
- }
- type DescribeRecoveryPointInput struct {
- _ struct{} `type:"structure"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
- // An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
- // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- //
- // RecoveryPointArn is a required field
- RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeRecoveryPointInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeRecoveryPointInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeRecoveryPointInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeRecoveryPointInput"}
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
- }
- if s.RecoveryPointArn == nil {
- invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn"))
- }
- if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *DescribeRecoveryPointInput) SetBackupVaultName(v string) *DescribeRecoveryPointInput {
- s.BackupVaultName = &v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *DescribeRecoveryPointInput) SetRecoveryPointArn(v string) *DescribeRecoveryPointInput {
- s.RecoveryPointArn = &v
- return s
- }
- type DescribeRecoveryPointOutput struct {
- _ struct{} `type:"structure"`
- // The size, in bytes, of a backup.
- BackupSizeInBytes *int64 `type:"long"`
- // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
- BackupVaultArn *string `type:"string"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the Region where they are created. They consist of lowercase letters, numbers,
- // and hyphens.
- BackupVaultName *string `type:"string"`
- // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt
- // timestamps.
- CalculatedLifecycle *CalculatedLifecycle `type:"structure"`
- // The date and time that a job to create a recovery point is completed, in
- // Unix format and Coordinated Universal Time (UTC). The value of CompletionDate
- // is accurate to milliseconds. For example, the value 1516925490.087 represents
- // Friday, January 26, 2018 12:11:30.087 AM.
- CompletionDate *time.Time `type:"timestamp"`
- // Contains identifying information about the creation of a recovery point,
- // including the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId
- // of the backup plan used to create it.
- CreatedBy *RecoveryPointCreator `type:"structure"`
- // The date and time that a recovery point is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // The server-side encryption key used to protect your backups; for example,
- // arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
- EncryptionKeyArn *string `type:"string"`
- // Specifies the IAM role ARN used to create the target recovery point; for
- // example, arn:aws:iam::123456789012:role/S3Access.
- IamRoleArn *string `type:"string"`
- // A Boolean value that is returned as TRUE if the specified recovery point
- // is encrypted, or FALSE if the recovery point is not encrypted.
- IsEncrypted *bool `type:"boolean"`
- // The date and time that a recovery point was last restored, in Unix format
- // and Coordinated Universal Time (UTC). The value of LastRestoreTime is accurate
- // to milliseconds. For example, the value 1516925490.087 represents Friday,
- // January 26, 2018 12:11:30.087 AM.
- LastRestoreTime *time.Time `type:"timestamp"`
- // The lifecycle defines when a protected resource is transitioned to cold storage
- // and when it expires. AWS Backup transitions and expires backups automatically
- // according to the lifecycle that you define.
- //
- // Backups that are transitioned to cold storage must be stored in cold storage
- // for a minimum of 90 days. Therefore, the “expire after days” setting must
- // be 90 days greater than the “transition to cold after days” setting. The
- // “transition to cold after days” setting cannot be changed after a backup
- // has been transitioned to cold.
- Lifecycle *Lifecycle `type:"structure"`
- // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- RecoveryPointArn *string `type:"string"`
- // An ARN that uniquely identifies a saved resource. The format of the ARN depends
- // on the resource type.
- ResourceArn *string `type:"string"`
- // The type of AWS resource to save as a recovery point; for example, an Amazon
- // Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database
- // Service (Amazon RDS) database.
- ResourceType *string `type:"string"`
- // A status code specifying the state of the recovery point.
- //
- // A partial status indicates that the recovery point was not successfully re-created
- // and must be retried.
- Status *string `type:"string" enum:"RecoveryPointStatus"`
- // Specifies the storage class of the recovery point. Valid values are WARM
- // or COLD.
- StorageClass *string `type:"string" enum:"StorageClass"`
- }
- // String returns the string representation
- func (s DescribeRecoveryPointOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeRecoveryPointOutput) GoString() string {
- return s.String()
- }
- // SetBackupSizeInBytes sets the BackupSizeInBytes field's value.
- func (s *DescribeRecoveryPointOutput) SetBackupSizeInBytes(v int64) *DescribeRecoveryPointOutput {
- s.BackupSizeInBytes = &v
- return s
- }
- // SetBackupVaultArn sets the BackupVaultArn field's value.
- func (s *DescribeRecoveryPointOutput) SetBackupVaultArn(v string) *DescribeRecoveryPointOutput {
- s.BackupVaultArn = &v
- return s
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *DescribeRecoveryPointOutput) SetBackupVaultName(v string) *DescribeRecoveryPointOutput {
- s.BackupVaultName = &v
- return s
- }
- // SetCalculatedLifecycle sets the CalculatedLifecycle field's value.
- func (s *DescribeRecoveryPointOutput) SetCalculatedLifecycle(v *CalculatedLifecycle) *DescribeRecoveryPointOutput {
- s.CalculatedLifecycle = v
- return s
- }
- // SetCompletionDate sets the CompletionDate field's value.
- func (s *DescribeRecoveryPointOutput) SetCompletionDate(v time.Time) *DescribeRecoveryPointOutput {
- s.CompletionDate = &v
- return s
- }
- // SetCreatedBy sets the CreatedBy field's value.
- func (s *DescribeRecoveryPointOutput) SetCreatedBy(v *RecoveryPointCreator) *DescribeRecoveryPointOutput {
- s.CreatedBy = v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *DescribeRecoveryPointOutput) SetCreationDate(v time.Time) *DescribeRecoveryPointOutput {
- s.CreationDate = &v
- return s
- }
- // SetEncryptionKeyArn sets the EncryptionKeyArn field's value.
- func (s *DescribeRecoveryPointOutput) SetEncryptionKeyArn(v string) *DescribeRecoveryPointOutput {
- s.EncryptionKeyArn = &v
- return s
- }
- // SetIamRoleArn sets the IamRoleArn field's value.
- func (s *DescribeRecoveryPointOutput) SetIamRoleArn(v string) *DescribeRecoveryPointOutput {
- s.IamRoleArn = &v
- return s
- }
- // SetIsEncrypted sets the IsEncrypted field's value.
- func (s *DescribeRecoveryPointOutput) SetIsEncrypted(v bool) *DescribeRecoveryPointOutput {
- s.IsEncrypted = &v
- return s
- }
- // SetLastRestoreTime sets the LastRestoreTime field's value.
- func (s *DescribeRecoveryPointOutput) SetLastRestoreTime(v time.Time) *DescribeRecoveryPointOutput {
- s.LastRestoreTime = &v
- return s
- }
- // SetLifecycle sets the Lifecycle field's value.
- func (s *DescribeRecoveryPointOutput) SetLifecycle(v *Lifecycle) *DescribeRecoveryPointOutput {
- s.Lifecycle = v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *DescribeRecoveryPointOutput) SetRecoveryPointArn(v string) *DescribeRecoveryPointOutput {
- s.RecoveryPointArn = &v
- return s
- }
- // SetResourceArn sets the ResourceArn field's value.
- func (s *DescribeRecoveryPointOutput) SetResourceArn(v string) *DescribeRecoveryPointOutput {
- s.ResourceArn = &v
- return s
- }
- // SetResourceType sets the ResourceType field's value.
- func (s *DescribeRecoveryPointOutput) SetResourceType(v string) *DescribeRecoveryPointOutput {
- s.ResourceType = &v
- return s
- }
- // SetStatus sets the Status field's value.
- func (s *DescribeRecoveryPointOutput) SetStatus(v string) *DescribeRecoveryPointOutput {
- s.Status = &v
- return s
- }
- // SetStorageClass sets the StorageClass field's value.
- func (s *DescribeRecoveryPointOutput) SetStorageClass(v string) *DescribeRecoveryPointOutput {
- s.StorageClass = &v
- return s
- }
- type DescribeRestoreJobInput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies the job that restores a recovery point.
- //
- // RestoreJobId is a required field
- RestoreJobId *string `location:"uri" locationName:"restoreJobId" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeRestoreJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeRestoreJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeRestoreJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeRestoreJobInput"}
- if s.RestoreJobId == nil {
- invalidParams.Add(request.NewErrParamRequired("RestoreJobId"))
- }
- if s.RestoreJobId != nil && len(*s.RestoreJobId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RestoreJobId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetRestoreJobId sets the RestoreJobId field's value.
- func (s *DescribeRestoreJobInput) SetRestoreJobId(v string) *DescribeRestoreJobInput {
- s.RestoreJobId = &v
- return s
- }
- type DescribeRestoreJobOutput struct {
- _ struct{} `type:"structure"`
- // The size, in bytes, of the restored resource.
- BackupSizeInBytes *int64 `type:"long"`
- // The date and time that a job to restore a recovery point is completed, in
- // Unix format and Coordinated Universal Time (UTC). The value of CompletionDate
- // is accurate to milliseconds. For example, the value 1516925490.087 represents
- // Friday, January 26, 2018 12:11:30.087 AM.
- CompletionDate *time.Time `type:"timestamp"`
- // An Amazon Resource Name (ARN) that uniquely identifies a resource whose recovery
- // point is being restored. The format of the ARN depends on the resource type
- // of the backed-up resource.
- CreatedResourceArn *string `type:"string"`
- // The date and time that a restore job is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // The amount of time in minutes that a job restoring a recovery point is expected
- // to take.
- ExpectedCompletionTimeMinutes *int64 `type:"long"`
- // Specifies the IAM role ARN used to create the target recovery point; for
- // example, arn:aws:iam::123456789012:role/S3Access.
- IamRoleArn *string `type:"string"`
- // Contains an estimated percentage that is complete of a job at the time the
- // job status was queried.
- PercentDone *string `type:"string"`
- // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- RecoveryPointArn *string `type:"string"`
- // Uniquely identifies the job that restores a recovery point.
- RestoreJobId *string `type:"string"`
- // Status code specifying the state of the job that is initiated by AWS Backup
- // to restore a recovery point.
- Status *string `type:"string" enum:"RestoreJobStatus"`
- // A detailed message explaining the status of a job to restore a recovery point.
- StatusMessage *string `type:"string"`
- }
- // String returns the string representation
- func (s DescribeRestoreJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeRestoreJobOutput) GoString() string {
- return s.String()
- }
- // SetBackupSizeInBytes sets the BackupSizeInBytes field's value.
- func (s *DescribeRestoreJobOutput) SetBackupSizeInBytes(v int64) *DescribeRestoreJobOutput {
- s.BackupSizeInBytes = &v
- return s
- }
- // SetCompletionDate sets the CompletionDate field's value.
- func (s *DescribeRestoreJobOutput) SetCompletionDate(v time.Time) *DescribeRestoreJobOutput {
- s.CompletionDate = &v
- return s
- }
- // SetCreatedResourceArn sets the CreatedResourceArn field's value.
- func (s *DescribeRestoreJobOutput) SetCreatedResourceArn(v string) *DescribeRestoreJobOutput {
- s.CreatedResourceArn = &v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *DescribeRestoreJobOutput) SetCreationDate(v time.Time) *DescribeRestoreJobOutput {
- s.CreationDate = &v
- return s
- }
- // SetExpectedCompletionTimeMinutes sets the ExpectedCompletionTimeMinutes field's value.
- func (s *DescribeRestoreJobOutput) SetExpectedCompletionTimeMinutes(v int64) *DescribeRestoreJobOutput {
- s.ExpectedCompletionTimeMinutes = &v
- return s
- }
- // SetIamRoleArn sets the IamRoleArn field's value.
- func (s *DescribeRestoreJobOutput) SetIamRoleArn(v string) *DescribeRestoreJobOutput {
- s.IamRoleArn = &v
- return s
- }
- // SetPercentDone sets the PercentDone field's value.
- func (s *DescribeRestoreJobOutput) SetPercentDone(v string) *DescribeRestoreJobOutput {
- s.PercentDone = &v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *DescribeRestoreJobOutput) SetRecoveryPointArn(v string) *DescribeRestoreJobOutput {
- s.RecoveryPointArn = &v
- return s
- }
- // SetRestoreJobId sets the RestoreJobId field's value.
- func (s *DescribeRestoreJobOutput) SetRestoreJobId(v string) *DescribeRestoreJobOutput {
- s.RestoreJobId = &v
- return s
- }
- // SetStatus sets the Status field's value.
- func (s *DescribeRestoreJobOutput) SetStatus(v string) *DescribeRestoreJobOutput {
- s.Status = &v
- return s
- }
- // SetStatusMessage sets the StatusMessage field's value.
- func (s *DescribeRestoreJobOutput) SetStatusMessage(v string) *DescribeRestoreJobOutput {
- s.StatusMessage = &v
- return s
- }
- type ExportBackupPlanTemplateInput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a backup plan.
- //
- // BackupPlanId is a required field
- BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s ExportBackupPlanTemplateInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ExportBackupPlanTemplateInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ExportBackupPlanTemplateInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ExportBackupPlanTemplateInput"}
- if s.BackupPlanId == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
- }
- if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *ExportBackupPlanTemplateInput) SetBackupPlanId(v string) *ExportBackupPlanTemplateInput {
- s.BackupPlanId = &v
- return s
- }
- type ExportBackupPlanTemplateOutput struct {
- _ struct{} `type:"structure"`
- // The body of a backup plan template in JSON format.
- //
- // This is a signed JSON document that cannot be modified before being passed
- // to GetBackupPlanFromJSON.
- BackupPlanTemplateJson *string `type:"string"`
- }
- // String returns the string representation
- func (s ExportBackupPlanTemplateOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ExportBackupPlanTemplateOutput) GoString() string {
- return s.String()
- }
- // SetBackupPlanTemplateJson sets the BackupPlanTemplateJson field's value.
- func (s *ExportBackupPlanTemplateOutput) SetBackupPlanTemplateJson(v string) *ExportBackupPlanTemplateOutput {
- s.BackupPlanTemplateJson = &v
- return s
- }
- type GetBackupPlanFromJSONInput struct {
- _ struct{} `type:"structure"`
- // A customer-supplied backup plan document in JSON format.
- //
- // BackupPlanTemplateJson is a required field
- BackupPlanTemplateJson *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetBackupPlanFromJSONInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBackupPlanFromJSONInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetBackupPlanFromJSONInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBackupPlanFromJSONInput"}
- if s.BackupPlanTemplateJson == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupPlanTemplateJson"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupPlanTemplateJson sets the BackupPlanTemplateJson field's value.
- func (s *GetBackupPlanFromJSONInput) SetBackupPlanTemplateJson(v string) *GetBackupPlanFromJSONInput {
- s.BackupPlanTemplateJson = &v
- return s
- }
- type GetBackupPlanFromJSONOutput struct {
- _ struct{} `type:"structure"`
- // Specifies the body of a backup plan. Includes a BackupPlanName and one or
- // more sets of Rules.
- BackupPlan *Plan `type:"structure"`
- }
- // String returns the string representation
- func (s GetBackupPlanFromJSONOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBackupPlanFromJSONOutput) GoString() string {
- return s.String()
- }
- // SetBackupPlan sets the BackupPlan field's value.
- func (s *GetBackupPlanFromJSONOutput) SetBackupPlan(v *Plan) *GetBackupPlanFromJSONOutput {
- s.BackupPlan = v
- return s
- }
- type GetBackupPlanFromTemplateInput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a stored backup plan template.
- //
- // BackupPlanTemplateId is a required field
- BackupPlanTemplateId *string `location:"uri" locationName:"templateId" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetBackupPlanFromTemplateInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBackupPlanFromTemplateInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetBackupPlanFromTemplateInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBackupPlanFromTemplateInput"}
- if s.BackupPlanTemplateId == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupPlanTemplateId"))
- }
- if s.BackupPlanTemplateId != nil && len(*s.BackupPlanTemplateId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupPlanTemplateId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupPlanTemplateId sets the BackupPlanTemplateId field's value.
- func (s *GetBackupPlanFromTemplateInput) SetBackupPlanTemplateId(v string) *GetBackupPlanFromTemplateInput {
- s.BackupPlanTemplateId = &v
- return s
- }
- type GetBackupPlanFromTemplateOutput struct {
- _ struct{} `type:"structure"`
- // Returns the body of a backup plan based on the target template, including
- // the name, rules, and backup vault of the plan.
- BackupPlanDocument *Plan `type:"structure"`
- }
- // String returns the string representation
- func (s GetBackupPlanFromTemplateOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBackupPlanFromTemplateOutput) GoString() string {
- return s.String()
- }
- // SetBackupPlanDocument sets the BackupPlanDocument field's value.
- func (s *GetBackupPlanFromTemplateOutput) SetBackupPlanDocument(v *Plan) *GetBackupPlanFromTemplateOutput {
- s.BackupPlanDocument = v
- return s
- }
- type GetBackupPlanInput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a backup plan.
- //
- // BackupPlanId is a required field
- BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
- // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most
- // 1,024 bytes long. Version IDs cannot be edited.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
- }
- // String returns the string representation
- func (s GetBackupPlanInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBackupPlanInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetBackupPlanInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBackupPlanInput"}
- if s.BackupPlanId == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
- }
- if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *GetBackupPlanInput) SetBackupPlanId(v string) *GetBackupPlanInput {
- s.BackupPlanId = &v
- return s
- }
- // SetVersionId sets the VersionId field's value.
- func (s *GetBackupPlanInput) SetVersionId(v string) *GetBackupPlanInput {
- s.VersionId = &v
- return s
- }
- type GetBackupPlanOutput struct {
- _ struct{} `type:"structure"`
- // Specifies the body of a backup plan. Includes a BackupPlanName and one or
- // more sets of Rules.
- BackupPlan *Plan `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for
- // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50.
- BackupPlanArn *string `type:"string"`
- // Uniquely identifies a backup plan.
- BackupPlanId *string `type:"string"`
- // The date and time that a backup plan is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // A unique string that identifies the request and allows failed requests to
- // be retried without the risk of executing the operation twice.
- CreatorRequestId *string `type:"string"`
- // The date and time that a backup plan is deleted, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- DeletionDate *time.Time `type:"timestamp"`
- // The last time a job to back up resources was executed with this backup plan.
- // A date and time, in Unix format and Coordinated Universal Time (UTC). The
- // value of LastExecutionDate is accurate to milliseconds. For example, the
- // value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
- LastExecutionDate *time.Time `type:"timestamp"`
- // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most
- // 1,024 bytes long. Version IDs cannot be edited.
- VersionId *string `type:"string"`
- }
- // String returns the string representation
- func (s GetBackupPlanOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBackupPlanOutput) GoString() string {
- return s.String()
- }
- // SetBackupPlan sets the BackupPlan field's value.
- func (s *GetBackupPlanOutput) SetBackupPlan(v *Plan) *GetBackupPlanOutput {
- s.BackupPlan = v
- return s
- }
- // SetBackupPlanArn sets the BackupPlanArn field's value.
- func (s *GetBackupPlanOutput) SetBackupPlanArn(v string) *GetBackupPlanOutput {
- s.BackupPlanArn = &v
- return s
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *GetBackupPlanOutput) SetBackupPlanId(v string) *GetBackupPlanOutput {
- s.BackupPlanId = &v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *GetBackupPlanOutput) SetCreationDate(v time.Time) *GetBackupPlanOutput {
- s.CreationDate = &v
- return s
- }
- // SetCreatorRequestId sets the CreatorRequestId field's value.
- func (s *GetBackupPlanOutput) SetCreatorRequestId(v string) *GetBackupPlanOutput {
- s.CreatorRequestId = &v
- return s
- }
- // SetDeletionDate sets the DeletionDate field's value.
- func (s *GetBackupPlanOutput) SetDeletionDate(v time.Time) *GetBackupPlanOutput {
- s.DeletionDate = &v
- return s
- }
- // SetLastExecutionDate sets the LastExecutionDate field's value.
- func (s *GetBackupPlanOutput) SetLastExecutionDate(v time.Time) *GetBackupPlanOutput {
- s.LastExecutionDate = &v
- return s
- }
- // SetVersionId sets the VersionId field's value.
- func (s *GetBackupPlanOutput) SetVersionId(v string) *GetBackupPlanOutput {
- s.VersionId = &v
- return s
- }
- type GetBackupSelectionInput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a backup plan.
- //
- // BackupPlanId is a required field
- BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
- // Uniquely identifies the body of a request to assign a set of resources to
- // a backup plan.
- //
- // SelectionId is a required field
- SelectionId *string `location:"uri" locationName:"selectionId" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetBackupSelectionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBackupSelectionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetBackupSelectionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBackupSelectionInput"}
- if s.BackupPlanId == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
- }
- if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
- }
- if s.SelectionId == nil {
- invalidParams.Add(request.NewErrParamRequired("SelectionId"))
- }
- if s.SelectionId != nil && len(*s.SelectionId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("SelectionId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *GetBackupSelectionInput) SetBackupPlanId(v string) *GetBackupSelectionInput {
- s.BackupPlanId = &v
- return s
- }
- // SetSelectionId sets the SelectionId field's value.
- func (s *GetBackupSelectionInput) SetSelectionId(v string) *GetBackupSelectionInput {
- s.SelectionId = &v
- return s
- }
- type GetBackupSelectionOutput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a backup plan.
- BackupPlanId *string `type:"string"`
- // Specifies the body of a request to assign a set of resources to a backup
- // plan.
- //
- // It includes an array of resources, an optional array of patterns to exclude
- // resources, an optional role to provide access to the AWS service that the
- // resource belongs to, and an optional array of tags used to identify a set
- // of resources.
- BackupSelection *Selection `type:"structure"`
- // The date and time a backup selection is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // A unique string that identifies the request and allows failed requests to
- // be retried without the risk of executing the operation twice.
- CreatorRequestId *string `type:"string"`
- // Uniquely identifies the body of a request to assign a set of resources to
- // a backup plan.
- SelectionId *string `type:"string"`
- }
- // String returns the string representation
- func (s GetBackupSelectionOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBackupSelectionOutput) GoString() string {
- return s.String()
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *GetBackupSelectionOutput) SetBackupPlanId(v string) *GetBackupSelectionOutput {
- s.BackupPlanId = &v
- return s
- }
- // SetBackupSelection sets the BackupSelection field's value.
- func (s *GetBackupSelectionOutput) SetBackupSelection(v *Selection) *GetBackupSelectionOutput {
- s.BackupSelection = v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *GetBackupSelectionOutput) SetCreationDate(v time.Time) *GetBackupSelectionOutput {
- s.CreationDate = &v
- return s
- }
- // SetCreatorRequestId sets the CreatorRequestId field's value.
- func (s *GetBackupSelectionOutput) SetCreatorRequestId(v string) *GetBackupSelectionOutput {
- s.CreatorRequestId = &v
- return s
- }
- // SetSelectionId sets the SelectionId field's value.
- func (s *GetBackupSelectionOutput) SetSelectionId(v string) *GetBackupSelectionOutput {
- s.SelectionId = &v
- return s
- }
- type GetBackupVaultAccessPolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetBackupVaultAccessPolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBackupVaultAccessPolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetBackupVaultAccessPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBackupVaultAccessPolicyInput"}
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *GetBackupVaultAccessPolicyInput) SetBackupVaultName(v string) *GetBackupVaultAccessPolicyInput {
- s.BackupVaultName = &v
- return s
- }
- type GetBackupVaultAccessPolicyOutput struct {
- _ struct{} `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for
- // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
- BackupVaultArn *string `type:"string"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the Region where they are created. They consist of lowercase letters, numbers,
- // and hyphens.
- BackupVaultName *string `type:"string"`
- // The backup vault access policy document in JSON format.
- Policy *string `type:"string"`
- }
- // String returns the string representation
- func (s GetBackupVaultAccessPolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBackupVaultAccessPolicyOutput) GoString() string {
- return s.String()
- }
- // SetBackupVaultArn sets the BackupVaultArn field's value.
- func (s *GetBackupVaultAccessPolicyOutput) SetBackupVaultArn(v string) *GetBackupVaultAccessPolicyOutput {
- s.BackupVaultArn = &v
- return s
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *GetBackupVaultAccessPolicyOutput) SetBackupVaultName(v string) *GetBackupVaultAccessPolicyOutput {
- s.BackupVaultName = &v
- return s
- }
- // SetPolicy sets the Policy field's value.
- func (s *GetBackupVaultAccessPolicyOutput) SetPolicy(v string) *GetBackupVaultAccessPolicyOutput {
- s.Policy = &v
- return s
- }
- type GetBackupVaultNotificationsInput struct {
- _ struct{} `type:"structure"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetBackupVaultNotificationsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBackupVaultNotificationsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetBackupVaultNotificationsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBackupVaultNotificationsInput"}
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *GetBackupVaultNotificationsInput) SetBackupVaultName(v string) *GetBackupVaultNotificationsInput {
- s.BackupVaultName = &v
- return s
- }
- type GetBackupVaultNotificationsOutput struct {
- _ struct{} `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for
- // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
- BackupVaultArn *string `type:"string"`
- // An array of events that indicate the status of jobs to back up resources
- // to the backup vault.
- BackupVaultEvents []*string `type:"list"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the Region where they are created. They consist of lowercase letters, numbers,
- // and hyphens.
- BackupVaultName *string `type:"string"`
- // An ARN that uniquely identifies an Amazon Simple Notification Service (Amazon
- // SNS) topic; for example, arn:aws:sns:us-west-2:111122223333:MyTopic.
- SNSTopicArn *string `type:"string"`
- }
- // String returns the string representation
- func (s GetBackupVaultNotificationsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetBackupVaultNotificationsOutput) GoString() string {
- return s.String()
- }
- // SetBackupVaultArn sets the BackupVaultArn field's value.
- func (s *GetBackupVaultNotificationsOutput) SetBackupVaultArn(v string) *GetBackupVaultNotificationsOutput {
- s.BackupVaultArn = &v
- return s
- }
- // SetBackupVaultEvents sets the BackupVaultEvents field's value.
- func (s *GetBackupVaultNotificationsOutput) SetBackupVaultEvents(v []*string) *GetBackupVaultNotificationsOutput {
- s.BackupVaultEvents = v
- return s
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *GetBackupVaultNotificationsOutput) SetBackupVaultName(v string) *GetBackupVaultNotificationsOutput {
- s.BackupVaultName = &v
- return s
- }
- // SetSNSTopicArn sets the SNSTopicArn field's value.
- func (s *GetBackupVaultNotificationsOutput) SetSNSTopicArn(v string) *GetBackupVaultNotificationsOutput {
- s.SNSTopicArn = &v
- return s
- }
- type GetRecoveryPointRestoreMetadataInput struct {
- _ struct{} `type:"structure"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
- // An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
- // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- //
- // RecoveryPointArn is a required field
- RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetRecoveryPointRestoreMetadataInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetRecoveryPointRestoreMetadataInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetRecoveryPointRestoreMetadataInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetRecoveryPointRestoreMetadataInput"}
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
- }
- if s.RecoveryPointArn == nil {
- invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn"))
- }
- if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *GetRecoveryPointRestoreMetadataInput) SetBackupVaultName(v string) *GetRecoveryPointRestoreMetadataInput {
- s.BackupVaultName = &v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *GetRecoveryPointRestoreMetadataInput) SetRecoveryPointArn(v string) *GetRecoveryPointRestoreMetadataInput {
- s.RecoveryPointArn = &v
- return s
- }
- type GetRecoveryPointRestoreMetadataOutput struct {
- _ struct{} `type:"structure"`
- // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
- BackupVaultArn *string `type:"string"`
- // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- RecoveryPointArn *string `type:"string"`
- // A set of metadata key-value pairs that lists the metadata key-value pairs
- // that are required to restore the recovery point.
- RestoreMetadata map[string]*string `type:"map"`
- }
- // String returns the string representation
- func (s GetRecoveryPointRestoreMetadataOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetRecoveryPointRestoreMetadataOutput) GoString() string {
- return s.String()
- }
- // SetBackupVaultArn sets the BackupVaultArn field's value.
- func (s *GetRecoveryPointRestoreMetadataOutput) SetBackupVaultArn(v string) *GetRecoveryPointRestoreMetadataOutput {
- s.BackupVaultArn = &v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *GetRecoveryPointRestoreMetadataOutput) SetRecoveryPointArn(v string) *GetRecoveryPointRestoreMetadataOutput {
- s.RecoveryPointArn = &v
- return s
- }
- // SetRestoreMetadata sets the RestoreMetadata field's value.
- func (s *GetRecoveryPointRestoreMetadataOutput) SetRestoreMetadata(v map[string]*string) *GetRecoveryPointRestoreMetadataOutput {
- s.RestoreMetadata = v
- return s
- }
- type GetSupportedResourceTypesInput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s GetSupportedResourceTypesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetSupportedResourceTypesInput) GoString() string {
- return s.String()
- }
- type GetSupportedResourceTypesOutput struct {
- _ struct{} `type:"structure"`
- // Contains a string with the supported AWS resource types:
- //
- // * EBS for Amazon Elastic Block Store
- //
- // * SGW for AWS Storage Gateway
- //
- // * RDS for Amazon Relational Database Service
- //
- // * DDB for Amazon DynamoDB
- //
- // * EFS for Amazon Elastic File System
- ResourceTypes []*string `type:"list"`
- }
- // String returns the string representation
- func (s GetSupportedResourceTypesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetSupportedResourceTypesOutput) GoString() string {
- return s.String()
- }
- // SetResourceTypes sets the ResourceTypes field's value.
- func (s *GetSupportedResourceTypesOutput) SetResourceTypes(v []*string) *GetSupportedResourceTypesOutput {
- s.ResourceTypes = v
- return s
- }
- // Contains detailed information about a backup job.
- type Job struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a request to AWS Backup to back up a resource.
- BackupJobId *string `type:"string"`
- // The size, in bytes, of a backup.
- BackupSizeInBytes *int64 `type:"long"`
- // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for
- // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
- BackupVaultArn *string `type:"string"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- BackupVaultName *string `type:"string"`
- // The size in bytes transferred to a backup vault at the time that the job
- // status was queried.
- BytesTransferred *int64 `type:"long"`
- // The date and time a job to create a backup job is completed, in Unix format
- // and Coordinated Universal Time (UTC). The value of CompletionDate is accurate
- // to milliseconds. For example, the value 1516925490.087 represents Friday,
- // January 26, 2018 12:11:30.087 AM.
- CompletionDate *time.Time `type:"timestamp"`
- // Contains identifying information about the creation of a backup job, including
- // the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId of the
- // backup plan used to create it.
- CreatedBy *RecoveryPointCreator `type:"structure"`
- // The date and time a backup job is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // The date and time a job to back up resources is expected to be completed,
- // in Unix format and Coordinated Universal Time (UTC). The value of ExpectedCompletionDate
- // is accurate to milliseconds. For example, the value 1516925490.087 represents
- // Friday, January 26, 2018 12:11:30.087 AM.
- ExpectedCompletionDate *time.Time `type:"timestamp"`
- // Specifies the IAM role ARN used to create the target recovery point; for
- // example, arn:aws:iam::123456789012:role/S3Access.
- IamRoleArn *string `type:"string"`
- // Contains an estimated percentage complete of a job at the time the job status
- // was queried.
- PercentDone *string `type:"string"`
- // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- RecoveryPointArn *string `type:"string"`
- // An ARN that uniquely identifies a resource. The format of the ARN depends
- // on the resource type.
- ResourceArn *string `type:"string"`
- // The type of AWS resource to be backed-up; for example, an Amazon Elastic
- // Block Store (Amazon EBS) volume or an Amazon Relational Database Service
- // (Amazon RDS) database.
- ResourceType *string `type:"string"`
- // Specifies the time in Unix format and Coordinated Universal Time (UTC) when
- // a backup job must be started before it is canceled. The value is calculated
- // by adding the start window to the scheduled time. So if the scheduled time
- // were 6:00 PM and the start window is 2 hours, the StartBy time would be 8:00
- // PM on the date specified. The value of StartBy is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- StartBy *time.Time `type:"timestamp"`
- // The current state of a resource recovery point.
- State *string `type:"string" enum:"JobState"`
- // A detailed message explaining the status of the job to back up a resource.
- StatusMessage *string `type:"string"`
- }
- // String returns the string representation
- func (s Job) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Job) GoString() string {
- return s.String()
- }
- // SetBackupJobId sets the BackupJobId field's value.
- func (s *Job) SetBackupJobId(v string) *Job {
- s.BackupJobId = &v
- return s
- }
- // SetBackupSizeInBytes sets the BackupSizeInBytes field's value.
- func (s *Job) SetBackupSizeInBytes(v int64) *Job {
- s.BackupSizeInBytes = &v
- return s
- }
- // SetBackupVaultArn sets the BackupVaultArn field's value.
- func (s *Job) SetBackupVaultArn(v string) *Job {
- s.BackupVaultArn = &v
- return s
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *Job) SetBackupVaultName(v string) *Job {
- s.BackupVaultName = &v
- return s
- }
- // SetBytesTransferred sets the BytesTransferred field's value.
- func (s *Job) SetBytesTransferred(v int64) *Job {
- s.BytesTransferred = &v
- return s
- }
- // SetCompletionDate sets the CompletionDate field's value.
- func (s *Job) SetCompletionDate(v time.Time) *Job {
- s.CompletionDate = &v
- return s
- }
- // SetCreatedBy sets the CreatedBy field's value.
- func (s *Job) SetCreatedBy(v *RecoveryPointCreator) *Job {
- s.CreatedBy = v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *Job) SetCreationDate(v time.Time) *Job {
- s.CreationDate = &v
- return s
- }
- // SetExpectedCompletionDate sets the ExpectedCompletionDate field's value.
- func (s *Job) SetExpectedCompletionDate(v time.Time) *Job {
- s.ExpectedCompletionDate = &v
- return s
- }
- // SetIamRoleArn sets the IamRoleArn field's value.
- func (s *Job) SetIamRoleArn(v string) *Job {
- s.IamRoleArn = &v
- return s
- }
- // SetPercentDone sets the PercentDone field's value.
- func (s *Job) SetPercentDone(v string) *Job {
- s.PercentDone = &v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *Job) SetRecoveryPointArn(v string) *Job {
- s.RecoveryPointArn = &v
- return s
- }
- // SetResourceArn sets the ResourceArn field's value.
- func (s *Job) SetResourceArn(v string) *Job {
- s.ResourceArn = &v
- return s
- }
- // SetResourceType sets the ResourceType field's value.
- func (s *Job) SetResourceType(v string) *Job {
- s.ResourceType = &v
- return s
- }
- // SetStartBy sets the StartBy field's value.
- func (s *Job) SetStartBy(v time.Time) *Job {
- s.StartBy = &v
- return s
- }
- // SetState sets the State field's value.
- func (s *Job) SetState(v string) *Job {
- s.State = &v
- return s
- }
- // SetStatusMessage sets the StatusMessage field's value.
- func (s *Job) SetStatusMessage(v string) *Job {
- s.StatusMessage = &v
- return s
- }
- // Contains an array of Transition objects specifying how long in days before
- // a recovery point transitions to cold storage or is deleted.
- type Lifecycle struct {
- _ struct{} `type:"structure"`
- // Specifies the number of days after creation that a recovery point is deleted.
- // Must be greater than MoveToColdStorageAfterDays.
- DeleteAfterDays *int64 `type:"long"`
- // Specifies the number of days after creation that a recovery point is moved
- // to cold storage.
- MoveToColdStorageAfterDays *int64 `type:"long"`
- }
- // String returns the string representation
- func (s Lifecycle) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Lifecycle) GoString() string {
- return s.String()
- }
- // SetDeleteAfterDays sets the DeleteAfterDays field's value.
- func (s *Lifecycle) SetDeleteAfterDays(v int64) *Lifecycle {
- s.DeleteAfterDays = &v
- return s
- }
- // SetMoveToColdStorageAfterDays sets the MoveToColdStorageAfterDays field's value.
- func (s *Lifecycle) SetMoveToColdStorageAfterDays(v int64) *Lifecycle {
- s.MoveToColdStorageAfterDays = &v
- return s
- }
- type ListBackupJobsInput struct {
- _ struct{} `type:"structure"`
- // Returns only backup jobs that will be stored in the specified backup vault.
- // Backup vaults are identified by names that are unique to the account used
- // to create them and the AWS Region where they are created. They consist of
- // lowercase letters, numbers, and hyphens.
- ByBackupVaultName *string `location:"querystring" locationName:"backupVaultName" type:"string"`
- // Returns only backup jobs that were created after the specified date.
- ByCreatedAfter *time.Time `location:"querystring" locationName:"createdAfter" type:"timestamp"`
- // Returns only backup jobs that were created before the specified date.
- ByCreatedBefore *time.Time `location:"querystring" locationName:"createdBefore" type:"timestamp"`
- // Returns only backup jobs that match the specified resource Amazon Resource
- // Name (ARN).
- ByResourceArn *string `location:"querystring" locationName:"resourceArn" type:"string"`
- // Returns only backup jobs for the specified resources:
- //
- // * EBS for Amazon Elastic Block Store
- //
- // * SGW for AWS Storage Gateway
- //
- // * RDS for Amazon Relational Database Service
- //
- // * DDB for Amazon DynamoDB
- //
- // * EFS for Amazon Elastic File System
- ByResourceType *string `location:"querystring" locationName:"resourceType" type:"string"`
- // Returns only backup jobs that are in the specified state.
- ByState *string `location:"querystring" locationName:"state" type:"string" enum:"JobState"`
- // The maximum number of items to be returned.
- MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
- }
- // String returns the string representation
- func (s ListBackupJobsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBackupJobsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListBackupJobsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBackupJobsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetByBackupVaultName sets the ByBackupVaultName field's value.
- func (s *ListBackupJobsInput) SetByBackupVaultName(v string) *ListBackupJobsInput {
- s.ByBackupVaultName = &v
- return s
- }
- // SetByCreatedAfter sets the ByCreatedAfter field's value.
- func (s *ListBackupJobsInput) SetByCreatedAfter(v time.Time) *ListBackupJobsInput {
- s.ByCreatedAfter = &v
- return s
- }
- // SetByCreatedBefore sets the ByCreatedBefore field's value.
- func (s *ListBackupJobsInput) SetByCreatedBefore(v time.Time) *ListBackupJobsInput {
- s.ByCreatedBefore = &v
- return s
- }
- // SetByResourceArn sets the ByResourceArn field's value.
- func (s *ListBackupJobsInput) SetByResourceArn(v string) *ListBackupJobsInput {
- s.ByResourceArn = &v
- return s
- }
- // SetByResourceType sets the ByResourceType field's value.
- func (s *ListBackupJobsInput) SetByResourceType(v string) *ListBackupJobsInput {
- s.ByResourceType = &v
- return s
- }
- // SetByState sets the ByState field's value.
- func (s *ListBackupJobsInput) SetByState(v string) *ListBackupJobsInput {
- s.ByState = &v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListBackupJobsInput) SetMaxResults(v int64) *ListBackupJobsInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListBackupJobsInput) SetNextToken(v string) *ListBackupJobsInput {
- s.NextToken = &v
- return s
- }
- type ListBackupJobsOutput struct {
- _ struct{} `type:"structure"`
- // An array of structures containing metadata about your backup jobs returned
- // in JSON format.
- BackupJobs []*Job `type:"list"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `type:"string"`
- }
- // String returns the string representation
- func (s ListBackupJobsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBackupJobsOutput) GoString() string {
- return s.String()
- }
- // SetBackupJobs sets the BackupJobs field's value.
- func (s *ListBackupJobsOutput) SetBackupJobs(v []*Job) *ListBackupJobsOutput {
- s.BackupJobs = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListBackupJobsOutput) SetNextToken(v string) *ListBackupJobsOutput {
- s.NextToken = &v
- return s
- }
- type ListBackupPlanTemplatesInput struct {
- _ struct{} `type:"structure"`
- // The maximum number of items to be returned.
- MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
- }
- // String returns the string representation
- func (s ListBackupPlanTemplatesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBackupPlanTemplatesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListBackupPlanTemplatesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBackupPlanTemplatesInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListBackupPlanTemplatesInput) SetMaxResults(v int64) *ListBackupPlanTemplatesInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListBackupPlanTemplatesInput) SetNextToken(v string) *ListBackupPlanTemplatesInput {
- s.NextToken = &v
- return s
- }
- type ListBackupPlanTemplatesOutput struct {
- _ struct{} `type:"structure"`
- // An array of template list items containing metadata about your saved templates.
- BackupPlanTemplatesList []*PlanTemplatesListMember `type:"list"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `type:"string"`
- }
- // String returns the string representation
- func (s ListBackupPlanTemplatesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBackupPlanTemplatesOutput) GoString() string {
- return s.String()
- }
- // SetBackupPlanTemplatesList sets the BackupPlanTemplatesList field's value.
- func (s *ListBackupPlanTemplatesOutput) SetBackupPlanTemplatesList(v []*PlanTemplatesListMember) *ListBackupPlanTemplatesOutput {
- s.BackupPlanTemplatesList = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListBackupPlanTemplatesOutput) SetNextToken(v string) *ListBackupPlanTemplatesOutput {
- s.NextToken = &v
- return s
- }
- type ListBackupPlanVersionsInput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a backup plan.
- //
- // BackupPlanId is a required field
- BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
- // The maximum number of items to be returned.
- MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
- }
- // String returns the string representation
- func (s ListBackupPlanVersionsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBackupPlanVersionsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListBackupPlanVersionsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBackupPlanVersionsInput"}
- if s.BackupPlanId == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
- }
- if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *ListBackupPlanVersionsInput) SetBackupPlanId(v string) *ListBackupPlanVersionsInput {
- s.BackupPlanId = &v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListBackupPlanVersionsInput) SetMaxResults(v int64) *ListBackupPlanVersionsInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListBackupPlanVersionsInput) SetNextToken(v string) *ListBackupPlanVersionsInput {
- s.NextToken = &v
- return s
- }
- type ListBackupPlanVersionsOutput struct {
- _ struct{} `type:"structure"`
- // An array of version list items containing metadata about your backup plans.
- BackupPlanVersionsList []*PlansListMember `type:"list"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `type:"string"`
- }
- // String returns the string representation
- func (s ListBackupPlanVersionsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBackupPlanVersionsOutput) GoString() string {
- return s.String()
- }
- // SetBackupPlanVersionsList sets the BackupPlanVersionsList field's value.
- func (s *ListBackupPlanVersionsOutput) SetBackupPlanVersionsList(v []*PlansListMember) *ListBackupPlanVersionsOutput {
- s.BackupPlanVersionsList = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListBackupPlanVersionsOutput) SetNextToken(v string) *ListBackupPlanVersionsOutput {
- s.NextToken = &v
- return s
- }
- type ListBackupPlansInput struct {
- _ struct{} `type:"structure"`
- // A Boolean value with a default value of FALSE that returns deleted backup
- // plans when set to TRUE.
- IncludeDeleted *bool `location:"querystring" locationName:"includeDeleted" type:"boolean"`
- // The maximum number of items to be returned.
- MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
- }
- // String returns the string representation
- func (s ListBackupPlansInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBackupPlansInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListBackupPlansInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBackupPlansInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetIncludeDeleted sets the IncludeDeleted field's value.
- func (s *ListBackupPlansInput) SetIncludeDeleted(v bool) *ListBackupPlansInput {
- s.IncludeDeleted = &v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListBackupPlansInput) SetMaxResults(v int64) *ListBackupPlansInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListBackupPlansInput) SetNextToken(v string) *ListBackupPlansInput {
- s.NextToken = &v
- return s
- }
- type ListBackupPlansOutput struct {
- _ struct{} `type:"structure"`
- // An array of backup plan list items containing metadata about your saved backup
- // plans.
- BackupPlansList []*PlansListMember `type:"list"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `type:"string"`
- }
- // String returns the string representation
- func (s ListBackupPlansOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBackupPlansOutput) GoString() string {
- return s.String()
- }
- // SetBackupPlansList sets the BackupPlansList field's value.
- func (s *ListBackupPlansOutput) SetBackupPlansList(v []*PlansListMember) *ListBackupPlansOutput {
- s.BackupPlansList = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListBackupPlansOutput) SetNextToken(v string) *ListBackupPlansOutput {
- s.NextToken = &v
- return s
- }
- type ListBackupSelectionsInput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a backup plan.
- //
- // BackupPlanId is a required field
- BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
- // The maximum number of items to be returned.
- MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
- }
- // String returns the string representation
- func (s ListBackupSelectionsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBackupSelectionsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListBackupSelectionsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBackupSelectionsInput"}
- if s.BackupPlanId == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
- }
- if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *ListBackupSelectionsInput) SetBackupPlanId(v string) *ListBackupSelectionsInput {
- s.BackupPlanId = &v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListBackupSelectionsInput) SetMaxResults(v int64) *ListBackupSelectionsInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListBackupSelectionsInput) SetNextToken(v string) *ListBackupSelectionsInput {
- s.NextToken = &v
- return s
- }
- type ListBackupSelectionsOutput struct {
- _ struct{} `type:"structure"`
- // An array of backup selection list items containing metadata about each resource
- // in the list.
- BackupSelectionsList []*SelectionsListMember `type:"list"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `type:"string"`
- }
- // String returns the string representation
- func (s ListBackupSelectionsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBackupSelectionsOutput) GoString() string {
- return s.String()
- }
- // SetBackupSelectionsList sets the BackupSelectionsList field's value.
- func (s *ListBackupSelectionsOutput) SetBackupSelectionsList(v []*SelectionsListMember) *ListBackupSelectionsOutput {
- s.BackupSelectionsList = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListBackupSelectionsOutput) SetNextToken(v string) *ListBackupSelectionsOutput {
- s.NextToken = &v
- return s
- }
- type ListBackupVaultsInput struct {
- _ struct{} `type:"structure"`
- // The maximum number of items to be returned.
- MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
- }
- // String returns the string representation
- func (s ListBackupVaultsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBackupVaultsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListBackupVaultsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBackupVaultsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListBackupVaultsInput) SetMaxResults(v int64) *ListBackupVaultsInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListBackupVaultsInput) SetNextToken(v string) *ListBackupVaultsInput {
- s.NextToken = &v
- return s
- }
- type ListBackupVaultsOutput struct {
- _ struct{} `type:"structure"`
- // An array of backup vault list members containing vault metadata, including
- // Amazon Resource Name (ARN), display name, creation date, number of saved
- // recovery points, and encryption information if the resources saved in the
- // backup vault are encrypted.
- BackupVaultList []*VaultListMember `type:"list"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `type:"string"`
- }
- // String returns the string representation
- func (s ListBackupVaultsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListBackupVaultsOutput) GoString() string {
- return s.String()
- }
- // SetBackupVaultList sets the BackupVaultList field's value.
- func (s *ListBackupVaultsOutput) SetBackupVaultList(v []*VaultListMember) *ListBackupVaultsOutput {
- s.BackupVaultList = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListBackupVaultsOutput) SetNextToken(v string) *ListBackupVaultsOutput {
- s.NextToken = &v
- return s
- }
- type ListProtectedResourcesInput struct {
- _ struct{} `type:"structure"`
- // The maximum number of items to be returned.
- MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
- }
- // String returns the string representation
- func (s ListProtectedResourcesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListProtectedResourcesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListProtectedResourcesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListProtectedResourcesInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListProtectedResourcesInput) SetMaxResults(v int64) *ListProtectedResourcesInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListProtectedResourcesInput) SetNextToken(v string) *ListProtectedResourcesInput {
- s.NextToken = &v
- return s
- }
- type ListProtectedResourcesOutput struct {
- _ struct{} `type:"structure"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `type:"string"`
- // An array of resources successfully backed up by AWS Backup including the
- // time the resource was saved, an Amazon Resource Name (ARN) of the resource,
- // and a resource type.
- Results []*ProtectedResource `type:"list"`
- }
- // String returns the string representation
- func (s ListProtectedResourcesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListProtectedResourcesOutput) GoString() string {
- return s.String()
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListProtectedResourcesOutput) SetNextToken(v string) *ListProtectedResourcesOutput {
- s.NextToken = &v
- return s
- }
- // SetResults sets the Results field's value.
- func (s *ListProtectedResourcesOutput) SetResults(v []*ProtectedResource) *ListProtectedResourcesOutput {
- s.Results = v
- return s
- }
- type ListRecoveryPointsByBackupVaultInput struct {
- _ struct{} `type:"structure"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
- // Returns only recovery points that match the specified backup plan ID.
- ByBackupPlanId *string `location:"querystring" locationName:"backupPlanId" type:"string"`
- // Returns only recovery points that were created after the specified timestamp.
- ByCreatedAfter *time.Time `location:"querystring" locationName:"createdAfter" type:"timestamp"`
- // Returns only recovery points that were created before the specified timestamp.
- ByCreatedBefore *time.Time `location:"querystring" locationName:"createdBefore" type:"timestamp"`
- // Returns only recovery points that match the specified resource Amazon Resource
- // Name (ARN).
- ByResourceArn *string `location:"querystring" locationName:"resourceArn" type:"string"`
- // Returns only recovery points that match the specified resource type.
- ByResourceType *string `location:"querystring" locationName:"resourceType" type:"string"`
- // The maximum number of items to be returned.
- MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
- }
- // String returns the string representation
- func (s ListRecoveryPointsByBackupVaultInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListRecoveryPointsByBackupVaultInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListRecoveryPointsByBackupVaultInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListRecoveryPointsByBackupVaultInput"}
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *ListRecoveryPointsByBackupVaultInput) SetBackupVaultName(v string) *ListRecoveryPointsByBackupVaultInput {
- s.BackupVaultName = &v
- return s
- }
- // SetByBackupPlanId sets the ByBackupPlanId field's value.
- func (s *ListRecoveryPointsByBackupVaultInput) SetByBackupPlanId(v string) *ListRecoveryPointsByBackupVaultInput {
- s.ByBackupPlanId = &v
- return s
- }
- // SetByCreatedAfter sets the ByCreatedAfter field's value.
- func (s *ListRecoveryPointsByBackupVaultInput) SetByCreatedAfter(v time.Time) *ListRecoveryPointsByBackupVaultInput {
- s.ByCreatedAfter = &v
- return s
- }
- // SetByCreatedBefore sets the ByCreatedBefore field's value.
- func (s *ListRecoveryPointsByBackupVaultInput) SetByCreatedBefore(v time.Time) *ListRecoveryPointsByBackupVaultInput {
- s.ByCreatedBefore = &v
- return s
- }
- // SetByResourceArn sets the ByResourceArn field's value.
- func (s *ListRecoveryPointsByBackupVaultInput) SetByResourceArn(v string) *ListRecoveryPointsByBackupVaultInput {
- s.ByResourceArn = &v
- return s
- }
- // SetByResourceType sets the ByResourceType field's value.
- func (s *ListRecoveryPointsByBackupVaultInput) SetByResourceType(v string) *ListRecoveryPointsByBackupVaultInput {
- s.ByResourceType = &v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListRecoveryPointsByBackupVaultInput) SetMaxResults(v int64) *ListRecoveryPointsByBackupVaultInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListRecoveryPointsByBackupVaultInput) SetNextToken(v string) *ListRecoveryPointsByBackupVaultInput {
- s.NextToken = &v
- return s
- }
- type ListRecoveryPointsByBackupVaultOutput struct {
- _ struct{} `type:"structure"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `type:"string"`
- // An array of objects that contain detailed information about recovery points
- // saved in a backup vault.
- RecoveryPoints []*RecoveryPointByBackupVault `type:"list"`
- }
- // String returns the string representation
- func (s ListRecoveryPointsByBackupVaultOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListRecoveryPointsByBackupVaultOutput) GoString() string {
- return s.String()
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListRecoveryPointsByBackupVaultOutput) SetNextToken(v string) *ListRecoveryPointsByBackupVaultOutput {
- s.NextToken = &v
- return s
- }
- // SetRecoveryPoints sets the RecoveryPoints field's value.
- func (s *ListRecoveryPointsByBackupVaultOutput) SetRecoveryPoints(v []*RecoveryPointByBackupVault) *ListRecoveryPointsByBackupVaultOutput {
- s.RecoveryPoints = v
- return s
- }
- type ListRecoveryPointsByResourceInput struct {
- _ struct{} `type:"structure"`
- // The maximum number of items to be returned.
- MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
- // An ARN that uniquely identifies a resource. The format of the ARN depends
- // on the resource type.
- //
- // ResourceArn is a required field
- ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s ListRecoveryPointsByResourceInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListRecoveryPointsByResourceInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListRecoveryPointsByResourceInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListRecoveryPointsByResourceInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.ResourceArn == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
- }
- if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListRecoveryPointsByResourceInput) SetMaxResults(v int64) *ListRecoveryPointsByResourceInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListRecoveryPointsByResourceInput) SetNextToken(v string) *ListRecoveryPointsByResourceInput {
- s.NextToken = &v
- return s
- }
- // SetResourceArn sets the ResourceArn field's value.
- func (s *ListRecoveryPointsByResourceInput) SetResourceArn(v string) *ListRecoveryPointsByResourceInput {
- s.ResourceArn = &v
- return s
- }
- type ListRecoveryPointsByResourceOutput struct {
- _ struct{} `type:"structure"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `type:"string"`
- // An array of objects that contain detailed information about recovery points
- // of the specified resource type.
- RecoveryPoints []*RecoveryPointByResource `type:"list"`
- }
- // String returns the string representation
- func (s ListRecoveryPointsByResourceOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListRecoveryPointsByResourceOutput) GoString() string {
- return s.String()
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListRecoveryPointsByResourceOutput) SetNextToken(v string) *ListRecoveryPointsByResourceOutput {
- s.NextToken = &v
- return s
- }
- // SetRecoveryPoints sets the RecoveryPoints field's value.
- func (s *ListRecoveryPointsByResourceOutput) SetRecoveryPoints(v []*RecoveryPointByResource) *ListRecoveryPointsByResourceOutput {
- s.RecoveryPoints = v
- return s
- }
- type ListRestoreJobsInput struct {
- _ struct{} `type:"structure"`
- // The maximum number of items to be returned.
- MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
- }
- // String returns the string representation
- func (s ListRestoreJobsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListRestoreJobsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListRestoreJobsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListRestoreJobsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListRestoreJobsInput) SetMaxResults(v int64) *ListRestoreJobsInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListRestoreJobsInput) SetNextToken(v string) *ListRestoreJobsInput {
- s.NextToken = &v
- return s
- }
- type ListRestoreJobsOutput struct {
- _ struct{} `type:"structure"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `type:"string"`
- // An array of objects that contain detailed information about jobs to restore
- // saved resources.
- RestoreJobs []*RestoreJobsListMember `type:"list"`
- }
- // String returns the string representation
- func (s ListRestoreJobsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListRestoreJobsOutput) GoString() string {
- return s.String()
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListRestoreJobsOutput) SetNextToken(v string) *ListRestoreJobsOutput {
- s.NextToken = &v
- return s
- }
- // SetRestoreJobs sets the RestoreJobs field's value.
- func (s *ListRestoreJobsOutput) SetRestoreJobs(v []*RestoreJobsListMember) *ListRestoreJobsOutput {
- s.RestoreJobs = v
- return s
- }
- type ListTagsInput struct {
- _ struct{} `type:"structure"`
- // The maximum number of items to be returned.
- MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
- // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format
- // of the ARN depends on the type of resource. Valid targets for ListTags are
- // recovery points, backup plans, and backup vaults.
- //
- // ResourceArn is a required field
- ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s ListTagsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListTagsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListTagsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.ResourceArn == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
- }
- if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput {
- s.NextToken = &v
- return s
- }
- // SetResourceArn sets the ResourceArn field's value.
- func (s *ListTagsInput) SetResourceArn(v string) *ListTagsInput {
- s.ResourceArn = &v
- return s
- }
- type ListTagsOutput struct {
- _ struct{} `type:"structure"`
- // The next item following a partial list of returned items. For example, if
- // a request is made to return maxResults number of items, NextToken allows
- // you to return more items in your list starting at the location pointed to
- // by the next token.
- NextToken *string `type:"string"`
- // To help organize your resources, you can assign your own metadata to the
- // resources you create. Each tag is a key-value pair.
- Tags map[string]*string `type:"map" sensitive:"true"`
- }
- // String returns the string representation
- func (s ListTagsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListTagsOutput) GoString() string {
- return s.String()
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput {
- s.NextToken = &v
- return s
- }
- // SetTags sets the Tags field's value.
- func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput {
- s.Tags = v
- return s
- }
- // Contains an optional backup plan display name and an array of BackupRule
- // objects, each of which specifies a backup rule. Each rule in a backup plan
- // is a separate scheduled task and can back up a different selection of AWS
- // resources.
- type Plan struct {
- _ struct{} `type:"structure"`
- // The display name of a backup plan.
- //
- // BackupPlanName is a required field
- BackupPlanName *string `type:"string" required:"true"`
- // An array of BackupRule objects, each of which specifies a scheduled task
- // that is used to back up a selection of resources.
- //
- // Rules is a required field
- Rules []*Rule `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s Plan) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Plan) GoString() string {
- return s.String()
- }
- // SetBackupPlanName sets the BackupPlanName field's value.
- func (s *Plan) SetBackupPlanName(v string) *Plan {
- s.BackupPlanName = &v
- return s
- }
- // SetRules sets the Rules field's value.
- func (s *Plan) SetRules(v []*Rule) *Plan {
- s.Rules = v
- return s
- }
- // Contains an optional backup plan display name and an array of BackupRule
- // objects, each of which specifies a backup rule. Each rule in a backup plan
- // is a separate scheduled task and can back up a different selection of AWS
- // resources.
- type PlanInput struct {
- _ struct{} `type:"structure"`
- // The display name of a backup plan.
- //
- // BackupPlanName is a required field
- BackupPlanName *string `type:"string" required:"true"`
- // An array of BackupRule objects, each of which specifies a scheduled task
- // that is used to back up a selection of resources.
- //
- // Rules is a required field
- Rules []*RuleInput `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s PlanInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PlanInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PlanInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PlanInput"}
- if s.BackupPlanName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupPlanName"))
- }
- if s.Rules == nil {
- invalidParams.Add(request.NewErrParamRequired("Rules"))
- }
- if s.Rules != nil {
- for i, v := range s.Rules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupPlanName sets the BackupPlanName field's value.
- func (s *PlanInput) SetBackupPlanName(v string) *PlanInput {
- s.BackupPlanName = &v
- return s
- }
- // SetRules sets the Rules field's value.
- func (s *PlanInput) SetRules(v []*RuleInput) *PlanInput {
- s.Rules = v
- return s
- }
- // An object specifying metadata associated with a backup plan template.
- type PlanTemplatesListMember struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a stored backup plan template.
- BackupPlanTemplateId *string `type:"string"`
- // The optional display name of a backup plan template.
- BackupPlanTemplateName *string `type:"string"`
- }
- // String returns the string representation
- func (s PlanTemplatesListMember) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PlanTemplatesListMember) GoString() string {
- return s.String()
- }
- // SetBackupPlanTemplateId sets the BackupPlanTemplateId field's value.
- func (s *PlanTemplatesListMember) SetBackupPlanTemplateId(v string) *PlanTemplatesListMember {
- s.BackupPlanTemplateId = &v
- return s
- }
- // SetBackupPlanTemplateName sets the BackupPlanTemplateName field's value.
- func (s *PlanTemplatesListMember) SetBackupPlanTemplateName(v string) *PlanTemplatesListMember {
- s.BackupPlanTemplateName = &v
- return s
- }
- // Contains metadata about a backup plan.
- type PlansListMember struct {
- _ struct{} `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for
- // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50.
- BackupPlanArn *string `type:"string"`
- // Uniquely identifies a backup plan.
- BackupPlanId *string `type:"string"`
- // The display name of a saved backup plan.
- BackupPlanName *string `type:"string"`
- // The date and time a resource backup plan is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // A unique string that identifies the request and allows failed requests to
- // be retried without the risk of executing the operation twice.
- CreatorRequestId *string `type:"string"`
- // The date and time a backup plan is deleted, in Unix format and Coordinated
- // Universal Time (UTC). The value of DeletionDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- DeletionDate *time.Time `type:"timestamp"`
- // The last time a job to back up resources was executed with this rule. A date
- // and time, in Unix format and Coordinated Universal Time (UTC). The value
- // of LastExecutionDate is accurate to milliseconds. For example, the value
- // 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
- LastExecutionDate *time.Time `type:"timestamp"`
- // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most
- // 1,024 bytes long. Version IDs cannot be edited.
- VersionId *string `type:"string"`
- }
- // String returns the string representation
- func (s PlansListMember) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PlansListMember) GoString() string {
- return s.String()
- }
- // SetBackupPlanArn sets the BackupPlanArn field's value.
- func (s *PlansListMember) SetBackupPlanArn(v string) *PlansListMember {
- s.BackupPlanArn = &v
- return s
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *PlansListMember) SetBackupPlanId(v string) *PlansListMember {
- s.BackupPlanId = &v
- return s
- }
- // SetBackupPlanName sets the BackupPlanName field's value.
- func (s *PlansListMember) SetBackupPlanName(v string) *PlansListMember {
- s.BackupPlanName = &v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *PlansListMember) SetCreationDate(v time.Time) *PlansListMember {
- s.CreationDate = &v
- return s
- }
- // SetCreatorRequestId sets the CreatorRequestId field's value.
- func (s *PlansListMember) SetCreatorRequestId(v string) *PlansListMember {
- s.CreatorRequestId = &v
- return s
- }
- // SetDeletionDate sets the DeletionDate field's value.
- func (s *PlansListMember) SetDeletionDate(v time.Time) *PlansListMember {
- s.DeletionDate = &v
- return s
- }
- // SetLastExecutionDate sets the LastExecutionDate field's value.
- func (s *PlansListMember) SetLastExecutionDate(v time.Time) *PlansListMember {
- s.LastExecutionDate = &v
- return s
- }
- // SetVersionId sets the VersionId field's value.
- func (s *PlansListMember) SetVersionId(v string) *PlansListMember {
- s.VersionId = &v
- return s
- }
- // A structure that contains information about a backed-up resource.
- type ProtectedResource struct {
- _ struct{} `type:"structure"`
- // The date and time a resource was last backed up, in Unix format and Coordinated
- // Universal Time (UTC). The value of LastBackupTime is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- LastBackupTime *time.Time `type:"timestamp"`
- // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format
- // of the ARN depends on the resource type.
- ResourceArn *string `type:"string"`
- // The type of AWS resource; for example, an Amazon Elastic Block Store (Amazon
- // EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.
- ResourceType *string `type:"string"`
- }
- // String returns the string representation
- func (s ProtectedResource) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ProtectedResource) GoString() string {
- return s.String()
- }
- // SetLastBackupTime sets the LastBackupTime field's value.
- func (s *ProtectedResource) SetLastBackupTime(v time.Time) *ProtectedResource {
- s.LastBackupTime = &v
- return s
- }
- // SetResourceArn sets the ResourceArn field's value.
- func (s *ProtectedResource) SetResourceArn(v string) *ProtectedResource {
- s.ResourceArn = &v
- return s
- }
- // SetResourceType sets the ResourceType field's value.
- func (s *ProtectedResource) SetResourceType(v string) *ProtectedResource {
- s.ResourceType = &v
- return s
- }
- type PutBackupVaultAccessPolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
- // The backup vault access policy document in JSON format.
- Policy *string `type:"string"`
- }
- // String returns the string representation
- func (s PutBackupVaultAccessPolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutBackupVaultAccessPolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutBackupVaultAccessPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBackupVaultAccessPolicyInput"}
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *PutBackupVaultAccessPolicyInput) SetBackupVaultName(v string) *PutBackupVaultAccessPolicyInput {
- s.BackupVaultName = &v
- return s
- }
- // SetPolicy sets the Policy field's value.
- func (s *PutBackupVaultAccessPolicyInput) SetPolicy(v string) *PutBackupVaultAccessPolicyInput {
- s.Policy = &v
- return s
- }
- type PutBackupVaultAccessPolicyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s PutBackupVaultAccessPolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutBackupVaultAccessPolicyOutput) GoString() string {
- return s.String()
- }
- type PutBackupVaultNotificationsInput struct {
- _ struct{} `type:"structure"`
- // An array of events that indicate the status of jobs to back up resources
- // to the backup vault.
- //
- // BackupVaultEvents is a required field
- BackupVaultEvents []*string `type:"list" required:"true"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
- // The Amazon Resource Name (ARN) that specifies the topic for a backup vault’s
- // events; for example, arn:aws:sns:us-west-2:111122223333:MyVaultTopic.
- //
- // SNSTopicArn is a required field
- SNSTopicArn *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s PutBackupVaultNotificationsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutBackupVaultNotificationsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutBackupVaultNotificationsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBackupVaultNotificationsInput"}
- if s.BackupVaultEvents == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultEvents"))
- }
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
- }
- if s.SNSTopicArn == nil {
- invalidParams.Add(request.NewErrParamRequired("SNSTopicArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultEvents sets the BackupVaultEvents field's value.
- func (s *PutBackupVaultNotificationsInput) SetBackupVaultEvents(v []*string) *PutBackupVaultNotificationsInput {
- s.BackupVaultEvents = v
- return s
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *PutBackupVaultNotificationsInput) SetBackupVaultName(v string) *PutBackupVaultNotificationsInput {
- s.BackupVaultName = &v
- return s
- }
- // SetSNSTopicArn sets the SNSTopicArn field's value.
- func (s *PutBackupVaultNotificationsInput) SetSNSTopicArn(v string) *PutBackupVaultNotificationsInput {
- s.SNSTopicArn = &v
- return s
- }
- type PutBackupVaultNotificationsOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s PutBackupVaultNotificationsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutBackupVaultNotificationsOutput) GoString() string {
- return s.String()
- }
- // Contains detailed information about the recovery points stored in a backup
- // vault.
- type RecoveryPointByBackupVault struct {
- _ struct{} `type:"structure"`
- // The size, in bytes, of a backup.
- BackupSizeInBytes *int64 `type:"long"`
- // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
- BackupVaultArn *string `type:"string"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- BackupVaultName *string `type:"string"`
- // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt
- // timestamps.
- CalculatedLifecycle *CalculatedLifecycle `type:"structure"`
- // The date and time a job to restore a recovery point is completed, in Unix
- // format and Coordinated Universal Time (UTC). The value of CompletionDate
- // is accurate to milliseconds. For example, the value 1516925490.087 represents
- // Friday, January 26, 2018 12:11:30.087 AM.
- CompletionDate *time.Time `type:"timestamp"`
- // Contains identifying information about the creation of a recovery point,
- // including the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId
- // of the backup plan that is used to create it.
- CreatedBy *RecoveryPointCreator `type:"structure"`
- // The date and time a recovery point is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // The server-side encryption key that is used to protect your backups; for
- // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
- EncryptionKeyArn *string `type:"string"`
- // Specifies the IAM role ARN used to create the target recovery point; for
- // example, arn:aws:iam::123456789012:role/S3Access.
- IamRoleArn *string `type:"string"`
- // A Boolean value that is returned as TRUE if the specified recovery point
- // is encrypted, or FALSE if the recovery point is not encrypted.
- IsEncrypted *bool `type:"boolean"`
- // The date and time a recovery point was last restored, in Unix format and
- // Coordinated Universal Time (UTC). The value of LastRestoreTime is accurate
- // to milliseconds. For example, the value 1516925490.087 represents Friday,
- // January 26, 2018 12:11:30.087 AM.
- LastRestoreTime *time.Time `type:"timestamp"`
- // The lifecycle defines when a protected resource is transitioned to cold storage
- // and when it expires. AWS Backup transitions and expires backups automatically
- // according to the lifecycle that you define.
- //
- // Backups transitioned to cold storage must be stored in cold storage for a
- // minimum of 90 days. Therefore, the “expire after days” setting must be 90
- // days greater than the “transition to cold after days” setting. The “transition
- // to cold after days” setting cannot be changed after a backup has been transitioned
- // to cold.
- Lifecycle *Lifecycle `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
- // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- RecoveryPointArn *string `type:"string"`
- // An ARN that uniquely identifies a resource. The format of the ARN depends
- // on the resource type.
- ResourceArn *string `type:"string"`
- // The type of AWS resource saved as a recovery point; for example, an Amazon
- // Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database
- // Service (Amazon RDS) database.
- ResourceType *string `type:"string"`
- // A status code specifying the state of the recovery point.
- Status *string `type:"string" enum:"RecoveryPointStatus"`
- }
- // String returns the string representation
- func (s RecoveryPointByBackupVault) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RecoveryPointByBackupVault) GoString() string {
- return s.String()
- }
- // SetBackupSizeInBytes sets the BackupSizeInBytes field's value.
- func (s *RecoveryPointByBackupVault) SetBackupSizeInBytes(v int64) *RecoveryPointByBackupVault {
- s.BackupSizeInBytes = &v
- return s
- }
- // SetBackupVaultArn sets the BackupVaultArn field's value.
- func (s *RecoveryPointByBackupVault) SetBackupVaultArn(v string) *RecoveryPointByBackupVault {
- s.BackupVaultArn = &v
- return s
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *RecoveryPointByBackupVault) SetBackupVaultName(v string) *RecoveryPointByBackupVault {
- s.BackupVaultName = &v
- return s
- }
- // SetCalculatedLifecycle sets the CalculatedLifecycle field's value.
- func (s *RecoveryPointByBackupVault) SetCalculatedLifecycle(v *CalculatedLifecycle) *RecoveryPointByBackupVault {
- s.CalculatedLifecycle = v
- return s
- }
- // SetCompletionDate sets the CompletionDate field's value.
- func (s *RecoveryPointByBackupVault) SetCompletionDate(v time.Time) *RecoveryPointByBackupVault {
- s.CompletionDate = &v
- return s
- }
- // SetCreatedBy sets the CreatedBy field's value.
- func (s *RecoveryPointByBackupVault) SetCreatedBy(v *RecoveryPointCreator) *RecoveryPointByBackupVault {
- s.CreatedBy = v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *RecoveryPointByBackupVault) SetCreationDate(v time.Time) *RecoveryPointByBackupVault {
- s.CreationDate = &v
- return s
- }
- // SetEncryptionKeyArn sets the EncryptionKeyArn field's value.
- func (s *RecoveryPointByBackupVault) SetEncryptionKeyArn(v string) *RecoveryPointByBackupVault {
- s.EncryptionKeyArn = &v
- return s
- }
- // SetIamRoleArn sets the IamRoleArn field's value.
- func (s *RecoveryPointByBackupVault) SetIamRoleArn(v string) *RecoveryPointByBackupVault {
- s.IamRoleArn = &v
- return s
- }
- // SetIsEncrypted sets the IsEncrypted field's value.
- func (s *RecoveryPointByBackupVault) SetIsEncrypted(v bool) *RecoveryPointByBackupVault {
- s.IsEncrypted = &v
- return s
- }
- // SetLastRestoreTime sets the LastRestoreTime field's value.
- func (s *RecoveryPointByBackupVault) SetLastRestoreTime(v time.Time) *RecoveryPointByBackupVault {
- s.LastRestoreTime = &v
- return s
- }
- // SetLifecycle sets the Lifecycle field's value.
- func (s *RecoveryPointByBackupVault) SetLifecycle(v *Lifecycle) *RecoveryPointByBackupVault {
- s.Lifecycle = v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *RecoveryPointByBackupVault) SetRecoveryPointArn(v string) *RecoveryPointByBackupVault {
- s.RecoveryPointArn = &v
- return s
- }
- // SetResourceArn sets the ResourceArn field's value.
- func (s *RecoveryPointByBackupVault) SetResourceArn(v string) *RecoveryPointByBackupVault {
- s.ResourceArn = &v
- return s
- }
- // SetResourceType sets the ResourceType field's value.
- func (s *RecoveryPointByBackupVault) SetResourceType(v string) *RecoveryPointByBackupVault {
- s.ResourceType = &v
- return s
- }
- // SetStatus sets the Status field's value.
- func (s *RecoveryPointByBackupVault) SetStatus(v string) *RecoveryPointByBackupVault {
- s.Status = &v
- return s
- }
- // Contains detailed information about a saved recovery point.
- type RecoveryPointByResource struct {
- _ struct{} `type:"structure"`
- // The size, in bytes, of a backup.
- BackupSizeBytes *int64 `type:"long"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- BackupVaultName *string `type:"string"`
- // The date and time a recovery point is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // The server-side encryption key that is used to protect your backups; for
- // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
- EncryptionKeyArn *string `type:"string"`
- // An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
- // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- RecoveryPointArn *string `type:"string"`
- // A status code specifying the state of the recovery point.
- Status *string `type:"string" enum:"RecoveryPointStatus"`
- }
- // String returns the string representation
- func (s RecoveryPointByResource) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RecoveryPointByResource) GoString() string {
- return s.String()
- }
- // SetBackupSizeBytes sets the BackupSizeBytes field's value.
- func (s *RecoveryPointByResource) SetBackupSizeBytes(v int64) *RecoveryPointByResource {
- s.BackupSizeBytes = &v
- return s
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *RecoveryPointByResource) SetBackupVaultName(v string) *RecoveryPointByResource {
- s.BackupVaultName = &v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *RecoveryPointByResource) SetCreationDate(v time.Time) *RecoveryPointByResource {
- s.CreationDate = &v
- return s
- }
- // SetEncryptionKeyArn sets the EncryptionKeyArn field's value.
- func (s *RecoveryPointByResource) SetEncryptionKeyArn(v string) *RecoveryPointByResource {
- s.EncryptionKeyArn = &v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *RecoveryPointByResource) SetRecoveryPointArn(v string) *RecoveryPointByResource {
- s.RecoveryPointArn = &v
- return s
- }
- // SetStatus sets the Status field's value.
- func (s *RecoveryPointByResource) SetStatus(v string) *RecoveryPointByResource {
- s.Status = &v
- return s
- }
- // Contains information about the backup plan and rule that AWS Backup used
- // to initiate the recovery point backup.
- type RecoveryPointCreator struct {
- _ struct{} `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for
- // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50.
- BackupPlanArn *string `type:"string"`
- // Uniquely identifies a backup plan.
- BackupPlanId *string `type:"string"`
- // Version IDs are unique, randomly generated, Unicode, UTF-8 encoded strings
- // that are at most 1,024 bytes long. They cannot be edited.
- BackupPlanVersion *string `type:"string"`
- // Uniquely identifies a rule used to schedule the backup of a selection of
- // resources.
- BackupRuleId *string `type:"string"`
- }
- // String returns the string representation
- func (s RecoveryPointCreator) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RecoveryPointCreator) GoString() string {
- return s.String()
- }
- // SetBackupPlanArn sets the BackupPlanArn field's value.
- func (s *RecoveryPointCreator) SetBackupPlanArn(v string) *RecoveryPointCreator {
- s.BackupPlanArn = &v
- return s
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *RecoveryPointCreator) SetBackupPlanId(v string) *RecoveryPointCreator {
- s.BackupPlanId = &v
- return s
- }
- // SetBackupPlanVersion sets the BackupPlanVersion field's value.
- func (s *RecoveryPointCreator) SetBackupPlanVersion(v string) *RecoveryPointCreator {
- s.BackupPlanVersion = &v
- return s
- }
- // SetBackupRuleId sets the BackupRuleId field's value.
- func (s *RecoveryPointCreator) SetBackupRuleId(v string) *RecoveryPointCreator {
- s.BackupRuleId = &v
- return s
- }
- // Contains metadata about a restore job.
- type RestoreJobsListMember struct {
- _ struct{} `type:"structure"`
- // The size, in bytes, of the restored resource.
- BackupSizeInBytes *int64 `type:"long"`
- // The date and time a job to restore a recovery point is completed, in Unix
- // format and Coordinated Universal Time (UTC). The value of CompletionDate
- // is accurate to milliseconds. For example, the value 1516925490.087 represents
- // Friday, January 26, 2018 12:11:30.087 AM.
- CompletionDate *time.Time `type:"timestamp"`
- // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format
- // of the ARN depends on the resource type.
- CreatedResourceArn *string `type:"string"`
- // The date and time a restore job is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // The amount of time in minutes that a job restoring a recovery point is expected
- // to take.
- ExpectedCompletionTimeMinutes *int64 `type:"long"`
- // Specifies the IAM role ARN used to create the target recovery point; for
- // example, arn:aws:iam::123456789012:role/S3Access.
- IamRoleArn *string `type:"string"`
- // Contains an estimated percentage complete of a job at the time the job status
- // was queried.
- PercentDone *string `type:"string"`
- // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- RecoveryPointArn *string `type:"string"`
- // Uniquely identifies the job that restores a recovery point.
- RestoreJobId *string `type:"string"`
- // A status code specifying the state of the job initiated by AWS Backup to
- // restore a recovery point.
- Status *string `type:"string" enum:"RestoreJobStatus"`
- // A detailed message explaining the status of the job to restore a recovery
- // point.
- StatusMessage *string `type:"string"`
- }
- // String returns the string representation
- func (s RestoreJobsListMember) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RestoreJobsListMember) GoString() string {
- return s.String()
- }
- // SetBackupSizeInBytes sets the BackupSizeInBytes field's value.
- func (s *RestoreJobsListMember) SetBackupSizeInBytes(v int64) *RestoreJobsListMember {
- s.BackupSizeInBytes = &v
- return s
- }
- // SetCompletionDate sets the CompletionDate field's value.
- func (s *RestoreJobsListMember) SetCompletionDate(v time.Time) *RestoreJobsListMember {
- s.CompletionDate = &v
- return s
- }
- // SetCreatedResourceArn sets the CreatedResourceArn field's value.
- func (s *RestoreJobsListMember) SetCreatedResourceArn(v string) *RestoreJobsListMember {
- s.CreatedResourceArn = &v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *RestoreJobsListMember) SetCreationDate(v time.Time) *RestoreJobsListMember {
- s.CreationDate = &v
- return s
- }
- // SetExpectedCompletionTimeMinutes sets the ExpectedCompletionTimeMinutes field's value.
- func (s *RestoreJobsListMember) SetExpectedCompletionTimeMinutes(v int64) *RestoreJobsListMember {
- s.ExpectedCompletionTimeMinutes = &v
- return s
- }
- // SetIamRoleArn sets the IamRoleArn field's value.
- func (s *RestoreJobsListMember) SetIamRoleArn(v string) *RestoreJobsListMember {
- s.IamRoleArn = &v
- return s
- }
- // SetPercentDone sets the PercentDone field's value.
- func (s *RestoreJobsListMember) SetPercentDone(v string) *RestoreJobsListMember {
- s.PercentDone = &v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *RestoreJobsListMember) SetRecoveryPointArn(v string) *RestoreJobsListMember {
- s.RecoveryPointArn = &v
- return s
- }
- // SetRestoreJobId sets the RestoreJobId field's value.
- func (s *RestoreJobsListMember) SetRestoreJobId(v string) *RestoreJobsListMember {
- s.RestoreJobId = &v
- return s
- }
- // SetStatus sets the Status field's value.
- func (s *RestoreJobsListMember) SetStatus(v string) *RestoreJobsListMember {
- s.Status = &v
- return s
- }
- // SetStatusMessage sets the StatusMessage field's value.
- func (s *RestoreJobsListMember) SetStatusMessage(v string) *RestoreJobsListMember {
- s.StatusMessage = &v
- return s
- }
- // Specifies a scheduled task used to back up a selection of resources.
- type Rule struct {
- _ struct{} `type:"structure"`
- // A value in minutes after a backup job is successfully started before it must
- // be completed or it is canceled by AWS Backup. This value is optional.
- CompletionWindowMinutes *int64 `type:"long"`
- // The lifecycle defines when a protected resource is transitioned to cold storage
- // and when it expires. AWS Backup transitions and expires backups automatically
- // according to the lifecycle that you define.
- //
- // Backups transitioned to cold storage must be stored in cold storage for a
- // minimum of 90 days. Therefore, the “expire after days” setting must be 90
- // days greater than the “transition to cold after days” setting. The “transition
- // to cold after days” setting cannot be changed after a backup has been transitioned
- // to cold.
- Lifecycle *Lifecycle `type:"structure"`
- // An array of key-value pair strings that are assigned to resources that are
- // associated with this rule when restored from backup.
- RecoveryPointTags map[string]*string `type:"map" sensitive:"true"`
- // Uniquely identifies a rule that is used to schedule the backup of a selection
- // of resources.
- RuleId *string `type:"string"`
- // An optional display name for a backup rule.
- //
- // RuleName is a required field
- RuleName *string `type:"string" required:"true"`
- // A CRON expression specifying when AWS Backup initiates a backup job.
- ScheduleExpression *string `type:"string"`
- // An optional value that specifies a period of time in minutes after a backup
- // is scheduled before a job is canceled if it doesn't start successfully.
- StartWindowMinutes *int64 `type:"long"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // TargetBackupVaultName is a required field
- TargetBackupVaultName *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s Rule) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Rule) GoString() string {
- return s.String()
- }
- // SetCompletionWindowMinutes sets the CompletionWindowMinutes field's value.
- func (s *Rule) SetCompletionWindowMinutes(v int64) *Rule {
- s.CompletionWindowMinutes = &v
- return s
- }
- // SetLifecycle sets the Lifecycle field's value.
- func (s *Rule) SetLifecycle(v *Lifecycle) *Rule {
- s.Lifecycle = v
- return s
- }
- // SetRecoveryPointTags sets the RecoveryPointTags field's value.
- func (s *Rule) SetRecoveryPointTags(v map[string]*string) *Rule {
- s.RecoveryPointTags = v
- return s
- }
- // SetRuleId sets the RuleId field's value.
- func (s *Rule) SetRuleId(v string) *Rule {
- s.RuleId = &v
- return s
- }
- // SetRuleName sets the RuleName field's value.
- func (s *Rule) SetRuleName(v string) *Rule {
- s.RuleName = &v
- return s
- }
- // SetScheduleExpression sets the ScheduleExpression field's value.
- func (s *Rule) SetScheduleExpression(v string) *Rule {
- s.ScheduleExpression = &v
- return s
- }
- // SetStartWindowMinutes sets the StartWindowMinutes field's value.
- func (s *Rule) SetStartWindowMinutes(v int64) *Rule {
- s.StartWindowMinutes = &v
- return s
- }
- // SetTargetBackupVaultName sets the TargetBackupVaultName field's value.
- func (s *Rule) SetTargetBackupVaultName(v string) *Rule {
- s.TargetBackupVaultName = &v
- return s
- }
- // Specifies a scheduled task used to back up a selection of resources.
- type RuleInput struct {
- _ struct{} `type:"structure"`
- // The amount of time AWS Backup attempts a backup before canceling the job
- // and returning an error.
- CompletionWindowMinutes *int64 `type:"long"`
- // The lifecycle defines when a protected resource is transitioned to cold storage
- // and when it expires. AWS Backup will transition and expire backups automatically
- // according to the lifecycle that you define.
- //
- // Backups transitioned to cold storage must be stored in cold storage for a
- // minimum of 90 days. Therefore, the “expire after days” setting must be 90
- // days greater than the “transition to cold after days”. The “transition to
- // cold after days” setting cannot be changed after a backup has been transitioned
- // to cold.
- Lifecycle *Lifecycle `type:"structure"`
- // To help organize your resources, you can assign your own metadata to the
- // resources that you create. Each tag is a key-value pair.
- RecoveryPointTags map[string]*string `type:"map" sensitive:"true"`
- // >An optional display name for a backup rule.
- //
- // RuleName is a required field
- RuleName *string `type:"string" required:"true"`
- // A CRON expression specifying when AWS Backup initiates a backup job.
- ScheduleExpression *string `type:"string"`
- // The amount of time in minutes before beginning a backup.
- StartWindowMinutes *int64 `type:"long"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // TargetBackupVaultName is a required field
- TargetBackupVaultName *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s RuleInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RuleInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *RuleInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RuleInput"}
- if s.RuleName == nil {
- invalidParams.Add(request.NewErrParamRequired("RuleName"))
- }
- if s.TargetBackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("TargetBackupVaultName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetCompletionWindowMinutes sets the CompletionWindowMinutes field's value.
- func (s *RuleInput) SetCompletionWindowMinutes(v int64) *RuleInput {
- s.CompletionWindowMinutes = &v
- return s
- }
- // SetLifecycle sets the Lifecycle field's value.
- func (s *RuleInput) SetLifecycle(v *Lifecycle) *RuleInput {
- s.Lifecycle = v
- return s
- }
- // SetRecoveryPointTags sets the RecoveryPointTags field's value.
- func (s *RuleInput) SetRecoveryPointTags(v map[string]*string) *RuleInput {
- s.RecoveryPointTags = v
- return s
- }
- // SetRuleName sets the RuleName field's value.
- func (s *RuleInput) SetRuleName(v string) *RuleInput {
- s.RuleName = &v
- return s
- }
- // SetScheduleExpression sets the ScheduleExpression field's value.
- func (s *RuleInput) SetScheduleExpression(v string) *RuleInput {
- s.ScheduleExpression = &v
- return s
- }
- // SetStartWindowMinutes sets the StartWindowMinutes field's value.
- func (s *RuleInput) SetStartWindowMinutes(v int64) *RuleInput {
- s.StartWindowMinutes = &v
- return s
- }
- // SetTargetBackupVaultName sets the TargetBackupVaultName field's value.
- func (s *RuleInput) SetTargetBackupVaultName(v string) *RuleInput {
- s.TargetBackupVaultName = &v
- return s
- }
- // Used to specify a set of resources to a backup plan.
- type Selection struct {
- _ struct{} `type:"structure"`
- // The ARN of the IAM role that AWS Backup uses to authenticate when restoring
- // the target resource; for example, arn:aws:iam::123456789012:role/S3Access.
- //
- // IamRoleArn is a required field
- IamRoleArn *string `type:"string" required:"true"`
- // An array of conditions used to specify a set of resources to assign to a
- // backup plan; for example, "StringEquals": {"ec2:ResourceTag/Department":
- // "accounting".
- ListOfTags []*Condition `type:"list"`
- // An array of strings that either contain Amazon Resource Names (ARNs) or match
- // patterns such as "arn:aws:ec2:us-east-1:123456789012:volume/*" of resources
- // to assign to a backup plan.
- Resources []*string `type:"list"`
- // The display name of a resource selection document.
- //
- // SelectionName is a required field
- SelectionName *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s Selection) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Selection) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *Selection) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Selection"}
- if s.IamRoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("IamRoleArn"))
- }
- if s.SelectionName == nil {
- invalidParams.Add(request.NewErrParamRequired("SelectionName"))
- }
- if s.ListOfTags != nil {
- for i, v := range s.ListOfTags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ListOfTags", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetIamRoleArn sets the IamRoleArn field's value.
- func (s *Selection) SetIamRoleArn(v string) *Selection {
- s.IamRoleArn = &v
- return s
- }
- // SetListOfTags sets the ListOfTags field's value.
- func (s *Selection) SetListOfTags(v []*Condition) *Selection {
- s.ListOfTags = v
- return s
- }
- // SetResources sets the Resources field's value.
- func (s *Selection) SetResources(v []*string) *Selection {
- s.Resources = v
- return s
- }
- // SetSelectionName sets the SelectionName field's value.
- func (s *Selection) SetSelectionName(v string) *Selection {
- s.SelectionName = &v
- return s
- }
- // Contains metadata about a BackupSelection object.
- type SelectionsListMember struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a backup plan.
- BackupPlanId *string `type:"string"`
- // The date and time a backup plan is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // A unique string that identifies the request and allows failed requests to
- // be retried without the risk of executing the operation twice.
- CreatorRequestId *string `type:"string"`
- // Specifies the IAM role Amazon Resource Name (ARN) to create the target recovery
- // point; for example, arn:aws:iam::123456789012:role/S3Access.
- IamRoleArn *string `type:"string"`
- // Uniquely identifies a request to assign a set of resources to a backup plan.
- SelectionId *string `type:"string"`
- // The display name of a resource selection document.
- SelectionName *string `type:"string"`
- }
- // String returns the string representation
- func (s SelectionsListMember) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SelectionsListMember) GoString() string {
- return s.String()
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *SelectionsListMember) SetBackupPlanId(v string) *SelectionsListMember {
- s.BackupPlanId = &v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *SelectionsListMember) SetCreationDate(v time.Time) *SelectionsListMember {
- s.CreationDate = &v
- return s
- }
- // SetCreatorRequestId sets the CreatorRequestId field's value.
- func (s *SelectionsListMember) SetCreatorRequestId(v string) *SelectionsListMember {
- s.CreatorRequestId = &v
- return s
- }
- // SetIamRoleArn sets the IamRoleArn field's value.
- func (s *SelectionsListMember) SetIamRoleArn(v string) *SelectionsListMember {
- s.IamRoleArn = &v
- return s
- }
- // SetSelectionId sets the SelectionId field's value.
- func (s *SelectionsListMember) SetSelectionId(v string) *SelectionsListMember {
- s.SelectionId = &v
- return s
- }
- // SetSelectionName sets the SelectionName field's value.
- func (s *SelectionsListMember) SetSelectionName(v string) *SelectionsListMember {
- s.SelectionName = &v
- return s
- }
- type StartBackupJobInput struct {
- _ struct{} `type:"structure"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `type:"string" required:"true"`
- // The amount of time AWS Backup attempts a backup before canceling the job
- // and returning an error.
- CompleteWindowMinutes *int64 `type:"long"`
- // Specifies the IAM role ARN used to create the target recovery point; for
- // example, arn:aws:iam::123456789012:role/S3Access.
- //
- // IamRoleArn is a required field
- IamRoleArn *string `type:"string" required:"true"`
- // A customer chosen string that can be used to distinguish between calls to
- // StartBackupJob. Idempotency tokens time out after one hour. Therefore, if
- // you call StartBackupJob multiple times with the same idempotency token within
- // one hour, AWS Backup recognizes that you are requesting only one backup job
- // and initiates only one. If you change the idempotency token for each call,
- // AWS Backup recognizes that you are requesting to start multiple backups.
- IdempotencyToken *string `type:"string"`
- // The lifecycle defines when a protected resource is transitioned to cold storage
- // and when it expires. AWS Backup will transition and expire backups automatically
- // according to the lifecycle that you define.
- //
- // Backups transitioned to cold storage must be stored in cold storage for a
- // minimum of 90 days. Therefore, the “expire after days” setting must be 90
- // days greater than the “transition to cold after days” setting. The “transition
- // to cold after days” setting cannot be changed after a backup has been transitioned
- // to cold.
- Lifecycle *Lifecycle `type:"structure"`
- // To help organize your resources, you can assign your own metadata to the
- // resources that you create. Each tag is a key-value pair.
- RecoveryPointTags map[string]*string `type:"map" sensitive:"true"`
- // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format
- // of the ARN depends on the resource type.
- //
- // ResourceArn is a required field
- ResourceArn *string `type:"string" required:"true"`
- // The amount of time in minutes before beginning a backup.
- StartWindowMinutes *int64 `type:"long"`
- }
- // String returns the string representation
- func (s StartBackupJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartBackupJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StartBackupJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StartBackupJobInput"}
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.IamRoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("IamRoleArn"))
- }
- if s.ResourceArn == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *StartBackupJobInput) SetBackupVaultName(v string) *StartBackupJobInput {
- s.BackupVaultName = &v
- return s
- }
- // SetCompleteWindowMinutes sets the CompleteWindowMinutes field's value.
- func (s *StartBackupJobInput) SetCompleteWindowMinutes(v int64) *StartBackupJobInput {
- s.CompleteWindowMinutes = &v
- return s
- }
- // SetIamRoleArn sets the IamRoleArn field's value.
- func (s *StartBackupJobInput) SetIamRoleArn(v string) *StartBackupJobInput {
- s.IamRoleArn = &v
- return s
- }
- // SetIdempotencyToken sets the IdempotencyToken field's value.
- func (s *StartBackupJobInput) SetIdempotencyToken(v string) *StartBackupJobInput {
- s.IdempotencyToken = &v
- return s
- }
- // SetLifecycle sets the Lifecycle field's value.
- func (s *StartBackupJobInput) SetLifecycle(v *Lifecycle) *StartBackupJobInput {
- s.Lifecycle = v
- return s
- }
- // SetRecoveryPointTags sets the RecoveryPointTags field's value.
- func (s *StartBackupJobInput) SetRecoveryPointTags(v map[string]*string) *StartBackupJobInput {
- s.RecoveryPointTags = v
- return s
- }
- // SetResourceArn sets the ResourceArn field's value.
- func (s *StartBackupJobInput) SetResourceArn(v string) *StartBackupJobInput {
- s.ResourceArn = &v
- return s
- }
- // SetStartWindowMinutes sets the StartWindowMinutes field's value.
- func (s *StartBackupJobInput) SetStartWindowMinutes(v int64) *StartBackupJobInput {
- s.StartWindowMinutes = &v
- return s
- }
- type StartBackupJobOutput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a request to AWS Backup to back up a resource.
- BackupJobId *string `type:"string"`
- // The date and time that a backup job is started, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- RecoveryPointArn *string `type:"string"`
- }
- // String returns the string representation
- func (s StartBackupJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartBackupJobOutput) GoString() string {
- return s.String()
- }
- // SetBackupJobId sets the BackupJobId field's value.
- func (s *StartBackupJobOutput) SetBackupJobId(v string) *StartBackupJobOutput {
- s.BackupJobId = &v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *StartBackupJobOutput) SetCreationDate(v time.Time) *StartBackupJobOutput {
- s.CreationDate = &v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *StartBackupJobOutput) SetRecoveryPointArn(v string) *StartBackupJobOutput {
- s.RecoveryPointArn = &v
- return s
- }
- type StartRestoreJobInput struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) of the IAM role that AWS Backup uses to create
- // the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access.
- //
- // IamRoleArn is a required field
- IamRoleArn *string `type:"string" required:"true"`
- // A customer chosen string that can be used to distinguish between calls to
- // StartRestoreJob. Idempotency tokens time out after one hour. Therefore, if
- // you call StartRestoreJob multiple times with the same idempotency token within
- // one hour, AWS Backup recognizes that you are requesting only one restore
- // job and initiates only one. If you change the idempotency token for each
- // call, AWS Backup recognizes that you are requesting to start multiple restores.
- IdempotencyToken *string `type:"string"`
- // A set of metadata key-value pairs. Lists the metadata that the recovery point
- // was created with.
- //
- // Metadata is a required field
- Metadata map[string]*string `type:"map" required:"true"`
- // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- //
- // RecoveryPointArn is a required field
- RecoveryPointArn *string `type:"string" required:"true"`
- // Starts a job to restore a recovery point for one of the following resources:
- //
- // * EBS for Amazon Elastic Block Store
- //
- // * SGW for AWS Storage Gateway
- //
- // * RDS for Amazon Relational Database Service
- //
- // * DDB for Amazon DynamoDB
- //
- // * EFS for Amazon Elastic File System
- ResourceType *string `type:"string"`
- }
- // String returns the string representation
- func (s StartRestoreJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartRestoreJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StartRestoreJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StartRestoreJobInput"}
- if s.IamRoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("IamRoleArn"))
- }
- if s.Metadata == nil {
- invalidParams.Add(request.NewErrParamRequired("Metadata"))
- }
- if s.RecoveryPointArn == nil {
- invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetIamRoleArn sets the IamRoleArn field's value.
- func (s *StartRestoreJobInput) SetIamRoleArn(v string) *StartRestoreJobInput {
- s.IamRoleArn = &v
- return s
- }
- // SetIdempotencyToken sets the IdempotencyToken field's value.
- func (s *StartRestoreJobInput) SetIdempotencyToken(v string) *StartRestoreJobInput {
- s.IdempotencyToken = &v
- return s
- }
- // SetMetadata sets the Metadata field's value.
- func (s *StartRestoreJobInput) SetMetadata(v map[string]*string) *StartRestoreJobInput {
- s.Metadata = v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *StartRestoreJobInput) SetRecoveryPointArn(v string) *StartRestoreJobInput {
- s.RecoveryPointArn = &v
- return s
- }
- // SetResourceType sets the ResourceType field's value.
- func (s *StartRestoreJobInput) SetResourceType(v string) *StartRestoreJobInput {
- s.ResourceType = &v
- return s
- }
- type StartRestoreJobOutput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies the job that restores a recovery point.
- RestoreJobId *string `type:"string"`
- }
- // String returns the string representation
- func (s StartRestoreJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartRestoreJobOutput) GoString() string {
- return s.String()
- }
- // SetRestoreJobId sets the RestoreJobId field's value.
- func (s *StartRestoreJobOutput) SetRestoreJobId(v string) *StartRestoreJobOutput {
- s.RestoreJobId = &v
- return s
- }
- type StopBackupJobInput struct {
- _ struct{} `type:"structure"`
- // Uniquely identifies a request to AWS Backup to back up a resource.
- //
- // BackupJobId is a required field
- BackupJobId *string `location:"uri" locationName:"backupJobId" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s StopBackupJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopBackupJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StopBackupJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StopBackupJobInput"}
- if s.BackupJobId == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupJobId"))
- }
- if s.BackupJobId != nil && len(*s.BackupJobId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupJobId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupJobId sets the BackupJobId field's value.
- func (s *StopBackupJobInput) SetBackupJobId(v string) *StopBackupJobInput {
- s.BackupJobId = &v
- return s
- }
- type StopBackupJobOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s StopBackupJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopBackupJobOutput) GoString() string {
- return s.String()
- }
- type TagResourceInput struct {
- _ struct{} `type:"structure"`
- // An ARN that uniquely identifies a resource. The format of the ARN depends
- // on the type of the tagged resource.
- //
- // ResourceArn is a required field
- ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"`
- // Key-value pairs that are used to help organize your resources. You can assign
- // your own metadata to the resources you create.
- //
- // Tags is a required field
- Tags map[string]*string `type:"map" required:"true" sensitive:"true"`
- }
- // String returns the string representation
- func (s TagResourceInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s TagResourceInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *TagResourceInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
- if s.ResourceArn == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
- }
- if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
- }
- if s.Tags == nil {
- invalidParams.Add(request.NewErrParamRequired("Tags"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetResourceArn sets the ResourceArn field's value.
- func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput {
- s.ResourceArn = &v
- return s
- }
- // SetTags sets the Tags field's value.
- func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput {
- s.Tags = v
- return s
- }
- type TagResourceOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s TagResourceOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s TagResourceOutput) GoString() string {
- return s.String()
- }
- type UntagResourceInput struct {
- _ struct{} `type:"structure"`
- // An ARN that uniquely identifies a resource. The format of the ARN depends
- // on the type of the tagged resource.
- //
- // ResourceArn is a required field
- ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"`
- // A list of keys to identify which key-value tags to remove from a resource.
- //
- // TagKeyList is a required field
- TagKeyList []*string `type:"list" required:"true" sensitive:"true"`
- }
- // String returns the string representation
- func (s UntagResourceInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UntagResourceInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UntagResourceInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
- if s.ResourceArn == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
- }
- if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
- }
- if s.TagKeyList == nil {
- invalidParams.Add(request.NewErrParamRequired("TagKeyList"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetResourceArn sets the ResourceArn field's value.
- func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput {
- s.ResourceArn = &v
- return s
- }
- // SetTagKeyList sets the TagKeyList field's value.
- func (s *UntagResourceInput) SetTagKeyList(v []*string) *UntagResourceInput {
- s.TagKeyList = v
- return s
- }
- type UntagResourceOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s UntagResourceOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UntagResourceOutput) GoString() string {
- return s.String()
- }
- type UpdateBackupPlanInput struct {
- _ struct{} `type:"structure"`
- // Specifies the body of a backup plan. Includes a BackupPlanName and one or
- // more sets of Rules.
- //
- // BackupPlan is a required field
- BackupPlan *PlanInput `type:"structure" required:"true"`
- // Uniquely identifies a backup plan.
- //
- // BackupPlanId is a required field
- BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s UpdateBackupPlanInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateBackupPlanInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateBackupPlanInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateBackupPlanInput"}
- if s.BackupPlan == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupPlan"))
- }
- if s.BackupPlanId == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupPlanId"))
- }
- if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1))
- }
- if s.BackupPlan != nil {
- if err := s.BackupPlan.Validate(); err != nil {
- invalidParams.AddNested("BackupPlan", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupPlan sets the BackupPlan field's value.
- func (s *UpdateBackupPlanInput) SetBackupPlan(v *PlanInput) *UpdateBackupPlanInput {
- s.BackupPlan = v
- return s
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *UpdateBackupPlanInput) SetBackupPlanId(v string) *UpdateBackupPlanInput {
- s.BackupPlanId = &v
- return s
- }
- type UpdateBackupPlanOutput struct {
- _ struct{} `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for
- // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50.
- BackupPlanArn *string `type:"string"`
- // Uniquely identifies a backup plan.
- BackupPlanId *string `type:"string"`
- // The date and time a backup plan is updated, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most
- // 1,024 bytes long. Version Ids cannot be edited.
- VersionId *string `type:"string"`
- }
- // String returns the string representation
- func (s UpdateBackupPlanOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateBackupPlanOutput) GoString() string {
- return s.String()
- }
- // SetBackupPlanArn sets the BackupPlanArn field's value.
- func (s *UpdateBackupPlanOutput) SetBackupPlanArn(v string) *UpdateBackupPlanOutput {
- s.BackupPlanArn = &v
- return s
- }
- // SetBackupPlanId sets the BackupPlanId field's value.
- func (s *UpdateBackupPlanOutput) SetBackupPlanId(v string) *UpdateBackupPlanOutput {
- s.BackupPlanId = &v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *UpdateBackupPlanOutput) SetCreationDate(v time.Time) *UpdateBackupPlanOutput {
- s.CreationDate = &v
- return s
- }
- // SetVersionId sets the VersionId field's value.
- func (s *UpdateBackupPlanOutput) SetVersionId(v string) *UpdateBackupPlanOutput {
- s.VersionId = &v
- return s
- }
- type UpdateRecoveryPointLifecycleInput struct {
- _ struct{} `type:"structure"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- //
- // BackupVaultName is a required field
- BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"`
- // The lifecycle defines when a protected resource is transitioned to cold storage
- // and when it expires. AWS Backup transitions and expires backups automatically
- // according to the lifecycle that you define.
- //
- // Backups transitioned to cold storage must be stored in cold storage for a
- // minimum of 90 days. Therefore, the “expire after days” setting must be 90
- // days greater than the “transition to cold after days” setting. The “transition
- // to cold after days” setting cannot be changed after a backup has been transitioned
- // to cold.
- Lifecycle *Lifecycle `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
- // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- //
- // RecoveryPointArn is a required field
- RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s UpdateRecoveryPointLifecycleInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateRecoveryPointLifecycleInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateRecoveryPointLifecycleInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateRecoveryPointLifecycleInput"}
- if s.BackupVaultName == nil {
- invalidParams.Add(request.NewErrParamRequired("BackupVaultName"))
- }
- if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1))
- }
- if s.RecoveryPointArn == nil {
- invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn"))
- }
- if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *UpdateRecoveryPointLifecycleInput) SetBackupVaultName(v string) *UpdateRecoveryPointLifecycleInput {
- s.BackupVaultName = &v
- return s
- }
- // SetLifecycle sets the Lifecycle field's value.
- func (s *UpdateRecoveryPointLifecycleInput) SetLifecycle(v *Lifecycle) *UpdateRecoveryPointLifecycleInput {
- s.Lifecycle = v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *UpdateRecoveryPointLifecycleInput) SetRecoveryPointArn(v string) *UpdateRecoveryPointLifecycleInput {
- s.RecoveryPointArn = &v
- return s
- }
- type UpdateRecoveryPointLifecycleOutput struct {
- _ struct{} `type:"structure"`
- // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
- BackupVaultArn *string `type:"string"`
- // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt
- // timestamps.
- CalculatedLifecycle *CalculatedLifecycle `type:"structure"`
- // The lifecycle defines when a protected resource is transitioned to cold storage
- // and when it expires. AWS Backup transitions and expires backups automatically
- // according to the lifecycle that you define.
- //
- // Backups transitioned to cold storage must be stored in cold storage for a
- // minimum of 90 days. Therefore, the “expire after days” setting must be 90
- // days greater than the “transition to cold after days” setting. The “transition
- // to cold after days” setting cannot be changed after a backup has been transitioned
- // to cold.
- Lifecycle *Lifecycle `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a recovery point;
- // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
- RecoveryPointArn *string `type:"string"`
- }
- // String returns the string representation
- func (s UpdateRecoveryPointLifecycleOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateRecoveryPointLifecycleOutput) GoString() string {
- return s.String()
- }
- // SetBackupVaultArn sets the BackupVaultArn field's value.
- func (s *UpdateRecoveryPointLifecycleOutput) SetBackupVaultArn(v string) *UpdateRecoveryPointLifecycleOutput {
- s.BackupVaultArn = &v
- return s
- }
- // SetCalculatedLifecycle sets the CalculatedLifecycle field's value.
- func (s *UpdateRecoveryPointLifecycleOutput) SetCalculatedLifecycle(v *CalculatedLifecycle) *UpdateRecoveryPointLifecycleOutput {
- s.CalculatedLifecycle = v
- return s
- }
- // SetLifecycle sets the Lifecycle field's value.
- func (s *UpdateRecoveryPointLifecycleOutput) SetLifecycle(v *Lifecycle) *UpdateRecoveryPointLifecycleOutput {
- s.Lifecycle = v
- return s
- }
- // SetRecoveryPointArn sets the RecoveryPointArn field's value.
- func (s *UpdateRecoveryPointLifecycleOutput) SetRecoveryPointArn(v string) *UpdateRecoveryPointLifecycleOutput {
- s.RecoveryPointArn = &v
- return s
- }
- // Contains metadata about a backup vault.
- type VaultListMember struct {
- _ struct{} `type:"structure"`
- // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for
- // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.
- BackupVaultArn *string `type:"string"`
- // The name of a logical container where backups are stored. Backup vaults are
- // identified by names that are unique to the account used to create them and
- // the AWS Region where they are created. They consist of lowercase letters,
- // numbers, and hyphens.
- BackupVaultName *string `type:"string"`
- // The date and time a resource backup is created, in Unix format and Coordinated
- // Universal Time (UTC). The value of CreationDate is accurate to milliseconds.
- // For example, the value 1516925490.087 represents Friday, January 26, 2018
- // 12:11:30.087 AM.
- CreationDate *time.Time `type:"timestamp"`
- // A unique string that identifies the request and allows failed requests to
- // be retried without the risk of executing the operation twice.
- CreatorRequestId *string `type:"string"`
- // The server-side encryption key that is used to protect your backups; for
- // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
- EncryptionKeyArn *string `type:"string"`
- // The number of recovery points that are stored in a backup vault.
- NumberOfRecoveryPoints *int64 `type:"long"`
- }
- // String returns the string representation
- func (s VaultListMember) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s VaultListMember) GoString() string {
- return s.String()
- }
- // SetBackupVaultArn sets the BackupVaultArn field's value.
- func (s *VaultListMember) SetBackupVaultArn(v string) *VaultListMember {
- s.BackupVaultArn = &v
- return s
- }
- // SetBackupVaultName sets the BackupVaultName field's value.
- func (s *VaultListMember) SetBackupVaultName(v string) *VaultListMember {
- s.BackupVaultName = &v
- return s
- }
- // SetCreationDate sets the CreationDate field's value.
- func (s *VaultListMember) SetCreationDate(v time.Time) *VaultListMember {
- s.CreationDate = &v
- return s
- }
- // SetCreatorRequestId sets the CreatorRequestId field's value.
- func (s *VaultListMember) SetCreatorRequestId(v string) *VaultListMember {
- s.CreatorRequestId = &v
- return s
- }
- // SetEncryptionKeyArn sets the EncryptionKeyArn field's value.
- func (s *VaultListMember) SetEncryptionKeyArn(v string) *VaultListMember {
- s.EncryptionKeyArn = &v
- return s
- }
- // SetNumberOfRecoveryPoints sets the NumberOfRecoveryPoints field's value.
- func (s *VaultListMember) SetNumberOfRecoveryPoints(v int64) *VaultListMember {
- s.NumberOfRecoveryPoints = &v
- return s
- }
- const (
- // ConditionTypeStringequals is a ConditionType enum value
- ConditionTypeStringequals = "STRINGEQUALS"
- )
- const (
- // JobStateCreated is a JobState enum value
- JobStateCreated = "CREATED"
- // JobStatePending is a JobState enum value
- JobStatePending = "PENDING"
- // JobStateRunning is a JobState enum value
- JobStateRunning = "RUNNING"
- // JobStateAborting is a JobState enum value
- JobStateAborting = "ABORTING"
- // JobStateAborted is a JobState enum value
- JobStateAborted = "ABORTED"
- // JobStateCompleted is a JobState enum value
- JobStateCompleted = "COMPLETED"
- // JobStateFailed is a JobState enum value
- JobStateFailed = "FAILED"
- // JobStateExpired is a JobState enum value
- JobStateExpired = "EXPIRED"
- )
- const (
- // RecoveryPointStatusCompleted is a RecoveryPointStatus enum value
- RecoveryPointStatusCompleted = "COMPLETED"
- // RecoveryPointStatusPartial is a RecoveryPointStatus enum value
- RecoveryPointStatusPartial = "PARTIAL"
- // RecoveryPointStatusDeleting is a RecoveryPointStatus enum value
- RecoveryPointStatusDeleting = "DELETING"
- // RecoveryPointStatusExpired is a RecoveryPointStatus enum value
- RecoveryPointStatusExpired = "EXPIRED"
- )
- const (
- // RestoreJobStatusPending is a RestoreJobStatus enum value
- RestoreJobStatusPending = "PENDING"
- // RestoreJobStatusRunning is a RestoreJobStatus enum value
- RestoreJobStatusRunning = "RUNNING"
- // RestoreJobStatusCompleted is a RestoreJobStatus enum value
- RestoreJobStatusCompleted = "COMPLETED"
- // RestoreJobStatusAborted is a RestoreJobStatus enum value
- RestoreJobStatusAborted = "ABORTED"
- // RestoreJobStatusFailed is a RestoreJobStatus enum value
- RestoreJobStatusFailed = "FAILED"
- )
- const (
- // StorageClassWarm is a StorageClass enum value
- StorageClassWarm = "WARM"
- // StorageClassCold is a StorageClass enum value
- StorageClassCold = "COLD"
- // StorageClassDeleted is a StorageClass enum value
- StorageClassDeleted = "DELETED"
- )
- const (
- // VaultEventBackupJobStarted is a VaultEvent enum value
- VaultEventBackupJobStarted = "BACKUP_JOB_STARTED"
- // VaultEventBackupJobCompleted is a VaultEvent enum value
- VaultEventBackupJobCompleted = "BACKUP_JOB_COMPLETED"
- // VaultEventRestoreJobStarted is a VaultEvent enum value
- VaultEventRestoreJobStarted = "RESTORE_JOB_STARTED"
- // VaultEventRestoreJobCompleted is a VaultEvent enum value
- VaultEventRestoreJobCompleted = "RESTORE_JOB_COMPLETED"
- // VaultEventRecoveryPointModified is a VaultEvent enum value
- VaultEventRecoveryPointModified = "RECOVERY_POINT_MODIFIED"
- // VaultEventBackupPlanCreated is a VaultEvent enum value
- VaultEventBackupPlanCreated = "BACKUP_PLAN_CREATED"
- // VaultEventBackupPlanModified is a VaultEvent enum value
- VaultEventBackupPlanModified = "BACKUP_PLAN_MODIFIED"
- )
|