api.go 229 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package workspaces
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  11. )
  12. const opAssociateIpGroups = "AssociateIpGroups"
  13. // AssociateIpGroupsRequest generates a "aws/request.Request" representing the
  14. // client's request for the AssociateIpGroups operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See AssociateIpGroups for more information on using the AssociateIpGroups
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. //
  28. // // Example sending a request using the AssociateIpGroupsRequest method.
  29. // req, resp := client.AssociateIpGroupsRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AssociateIpGroups
  37. func (c *WorkSpaces) AssociateIpGroupsRequest(input *AssociateIpGroupsInput) (req *request.Request, output *AssociateIpGroupsOutput) {
  38. op := &request.Operation{
  39. Name: opAssociateIpGroups,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &AssociateIpGroupsInput{}
  45. }
  46. output = &AssociateIpGroupsOutput{}
  47. req = c.newRequest(op, input, output)
  48. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  49. return
  50. }
  51. // AssociateIpGroups API operation for Amazon WorkSpaces.
  52. //
  53. // Associates the specified IP access control group with the specified directory.
  54. //
  55. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  56. // with awserr.Error's Code and Message methods to get detailed information about
  57. // the error.
  58. //
  59. // See the AWS API reference guide for Amazon WorkSpaces's
  60. // API operation AssociateIpGroups for usage and error information.
  61. //
  62. // Returned Error Codes:
  63. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  64. // One or more parameter values are not valid.
  65. //
  66. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  67. // The resource could not be found.
  68. //
  69. // * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
  70. // Your resource limits have been exceeded.
  71. //
  72. // * ErrCodeInvalidResourceStateException "InvalidResourceStateException"
  73. // The state of the resource is not valid for this operation.
  74. //
  75. // * ErrCodeAccessDeniedException "AccessDeniedException"
  76. // The user is not authorized to access a resource.
  77. //
  78. // * ErrCodeOperationNotSupportedException "OperationNotSupportedException"
  79. // This operation is not supported.
  80. //
  81. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AssociateIpGroups
  82. func (c *WorkSpaces) AssociateIpGroups(input *AssociateIpGroupsInput) (*AssociateIpGroupsOutput, error) {
  83. req, out := c.AssociateIpGroupsRequest(input)
  84. return out, req.Send()
  85. }
  86. // AssociateIpGroupsWithContext is the same as AssociateIpGroups with the addition of
  87. // the ability to pass a context and additional request options.
  88. //
  89. // See AssociateIpGroups for details on how to use this API operation.
  90. //
  91. // The context must be non-nil and will be used for request cancellation. If
  92. // the context is nil a panic will occur. In the future the SDK may create
  93. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  94. // for more information on using Contexts.
  95. func (c *WorkSpaces) AssociateIpGroupsWithContext(ctx aws.Context, input *AssociateIpGroupsInput, opts ...request.Option) (*AssociateIpGroupsOutput, error) {
  96. req, out := c.AssociateIpGroupsRequest(input)
  97. req.SetContext(ctx)
  98. req.ApplyOptions(opts...)
  99. return out, req.Send()
  100. }
  101. const opAuthorizeIpRules = "AuthorizeIpRules"
  102. // AuthorizeIpRulesRequest generates a "aws/request.Request" representing the
  103. // client's request for the AuthorizeIpRules operation. The "output" return
  104. // value will be populated with the request's response once the request completes
  105. // successfully.
  106. //
  107. // Use "Send" method on the returned Request to send the API call to the service.
  108. // the "output" return value is not valid until after Send returns without error.
  109. //
  110. // See AuthorizeIpRules for more information on using the AuthorizeIpRules
  111. // API call, and error handling.
  112. //
  113. // This method is useful when you want to inject custom logic or configuration
  114. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  115. //
  116. //
  117. // // Example sending a request using the AuthorizeIpRulesRequest method.
  118. // req, resp := client.AuthorizeIpRulesRequest(params)
  119. //
  120. // err := req.Send()
  121. // if err == nil { // resp is now filled
  122. // fmt.Println(resp)
  123. // }
  124. //
  125. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AuthorizeIpRules
  126. func (c *WorkSpaces) AuthorizeIpRulesRequest(input *AuthorizeIpRulesInput) (req *request.Request, output *AuthorizeIpRulesOutput) {
  127. op := &request.Operation{
  128. Name: opAuthorizeIpRules,
  129. HTTPMethod: "POST",
  130. HTTPPath: "/",
  131. }
  132. if input == nil {
  133. input = &AuthorizeIpRulesInput{}
  134. }
  135. output = &AuthorizeIpRulesOutput{}
  136. req = c.newRequest(op, input, output)
  137. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  138. return
  139. }
  140. // AuthorizeIpRules API operation for Amazon WorkSpaces.
  141. //
  142. // Adds one or more rules to the specified IP access control group.
  143. //
  144. // This action gives users permission to access their WorkSpaces from the CIDR
  145. // address ranges specified in the rules.
  146. //
  147. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  148. // with awserr.Error's Code and Message methods to get detailed information about
  149. // the error.
  150. //
  151. // See the AWS API reference guide for Amazon WorkSpaces's
  152. // API operation AuthorizeIpRules for usage and error information.
  153. //
  154. // Returned Error Codes:
  155. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  156. // One or more parameter values are not valid.
  157. //
  158. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  159. // The resource could not be found.
  160. //
  161. // * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
  162. // Your resource limits have been exceeded.
  163. //
  164. // * ErrCodeInvalidResourceStateException "InvalidResourceStateException"
  165. // The state of the resource is not valid for this operation.
  166. //
  167. // * ErrCodeAccessDeniedException "AccessDeniedException"
  168. // The user is not authorized to access a resource.
  169. //
  170. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AuthorizeIpRules
  171. func (c *WorkSpaces) AuthorizeIpRules(input *AuthorizeIpRulesInput) (*AuthorizeIpRulesOutput, error) {
  172. req, out := c.AuthorizeIpRulesRequest(input)
  173. return out, req.Send()
  174. }
  175. // AuthorizeIpRulesWithContext is the same as AuthorizeIpRules with the addition of
  176. // the ability to pass a context and additional request options.
  177. //
  178. // See AuthorizeIpRules for details on how to use this API operation.
  179. //
  180. // The context must be non-nil and will be used for request cancellation. If
  181. // the context is nil a panic will occur. In the future the SDK may create
  182. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  183. // for more information on using Contexts.
  184. func (c *WorkSpaces) AuthorizeIpRulesWithContext(ctx aws.Context, input *AuthorizeIpRulesInput, opts ...request.Option) (*AuthorizeIpRulesOutput, error) {
  185. req, out := c.AuthorizeIpRulesRequest(input)
  186. req.SetContext(ctx)
  187. req.ApplyOptions(opts...)
  188. return out, req.Send()
  189. }
  190. const opCreateIpGroup = "CreateIpGroup"
  191. // CreateIpGroupRequest generates a "aws/request.Request" representing the
  192. // client's request for the CreateIpGroup operation. The "output" return
  193. // value will be populated with the request's response once the request completes
  194. // successfully.
  195. //
  196. // Use "Send" method on the returned Request to send the API call to the service.
  197. // the "output" return value is not valid until after Send returns without error.
  198. //
  199. // See CreateIpGroup for more information on using the CreateIpGroup
  200. // API call, and error handling.
  201. //
  202. // This method is useful when you want to inject custom logic or configuration
  203. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  204. //
  205. //
  206. // // Example sending a request using the CreateIpGroupRequest method.
  207. // req, resp := client.CreateIpGroupRequest(params)
  208. //
  209. // err := req.Send()
  210. // if err == nil { // resp is now filled
  211. // fmt.Println(resp)
  212. // }
  213. //
  214. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateIpGroup
  215. func (c *WorkSpaces) CreateIpGroupRequest(input *CreateIpGroupInput) (req *request.Request, output *CreateIpGroupOutput) {
  216. op := &request.Operation{
  217. Name: opCreateIpGroup,
  218. HTTPMethod: "POST",
  219. HTTPPath: "/",
  220. }
  221. if input == nil {
  222. input = &CreateIpGroupInput{}
  223. }
  224. output = &CreateIpGroupOutput{}
  225. req = c.newRequest(op, input, output)
  226. return
  227. }
  228. // CreateIpGroup API operation for Amazon WorkSpaces.
  229. //
  230. // Creates an IP access control group.
  231. //
  232. // An IP access control group provides you with the ability to control the IP
  233. // addresses from which users are allowed to access their WorkSpaces. To specify
  234. // the CIDR address ranges, add rules to your IP access control group and then
  235. // associate the group with your directory. You can add rules when you create
  236. // the group or at any time using AuthorizeIpRules.
  237. //
  238. // There is a default IP access control group associated with your directory.
  239. // If you don't associate an IP access control group with your directory, the
  240. // default group is used. The default group includes a default rule that allows
  241. // users to access their WorkSpaces from anywhere. You cannot modify the default
  242. // IP access control group for your directory.
  243. //
  244. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  245. // with awserr.Error's Code and Message methods to get detailed information about
  246. // the error.
  247. //
  248. // See the AWS API reference guide for Amazon WorkSpaces's
  249. // API operation CreateIpGroup for usage and error information.
  250. //
  251. // Returned Error Codes:
  252. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  253. // One or more parameter values are not valid.
  254. //
  255. // * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
  256. // Your resource limits have been exceeded.
  257. //
  258. // * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
  259. // The specified resource already exists.
  260. //
  261. // * ErrCodeResourceCreationFailedException "ResourceCreationFailedException"
  262. // The resource could not be created.
  263. //
  264. // * ErrCodeAccessDeniedException "AccessDeniedException"
  265. // The user is not authorized to access a resource.
  266. //
  267. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateIpGroup
  268. func (c *WorkSpaces) CreateIpGroup(input *CreateIpGroupInput) (*CreateIpGroupOutput, error) {
  269. req, out := c.CreateIpGroupRequest(input)
  270. return out, req.Send()
  271. }
  272. // CreateIpGroupWithContext is the same as CreateIpGroup with the addition of
  273. // the ability to pass a context and additional request options.
  274. //
  275. // See CreateIpGroup for details on how to use this API operation.
  276. //
  277. // The context must be non-nil and will be used for request cancellation. If
  278. // the context is nil a panic will occur. In the future the SDK may create
  279. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  280. // for more information on using Contexts.
  281. func (c *WorkSpaces) CreateIpGroupWithContext(ctx aws.Context, input *CreateIpGroupInput, opts ...request.Option) (*CreateIpGroupOutput, error) {
  282. req, out := c.CreateIpGroupRequest(input)
  283. req.SetContext(ctx)
  284. req.ApplyOptions(opts...)
  285. return out, req.Send()
  286. }
  287. const opCreateTags = "CreateTags"
  288. // CreateTagsRequest generates a "aws/request.Request" representing the
  289. // client's request for the CreateTags operation. The "output" return
  290. // value will be populated with the request's response once the request completes
  291. // successfully.
  292. //
  293. // Use "Send" method on the returned Request to send the API call to the service.
  294. // the "output" return value is not valid until after Send returns without error.
  295. //
  296. // See CreateTags for more information on using the CreateTags
  297. // API call, and error handling.
  298. //
  299. // This method is useful when you want to inject custom logic or configuration
  300. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  301. //
  302. //
  303. // // Example sending a request using the CreateTagsRequest method.
  304. // req, resp := client.CreateTagsRequest(params)
  305. //
  306. // err := req.Send()
  307. // if err == nil { // resp is now filled
  308. // fmt.Println(resp)
  309. // }
  310. //
  311. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateTags
  312. func (c *WorkSpaces) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) {
  313. op := &request.Operation{
  314. Name: opCreateTags,
  315. HTTPMethod: "POST",
  316. HTTPPath: "/",
  317. }
  318. if input == nil {
  319. input = &CreateTagsInput{}
  320. }
  321. output = &CreateTagsOutput{}
  322. req = c.newRequest(op, input, output)
  323. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  324. return
  325. }
  326. // CreateTags API operation for Amazon WorkSpaces.
  327. //
  328. // Creates the specified tags for the specified WorkSpace.
  329. //
  330. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  331. // with awserr.Error's Code and Message methods to get detailed information about
  332. // the error.
  333. //
  334. // See the AWS API reference guide for Amazon WorkSpaces's
  335. // API operation CreateTags for usage and error information.
  336. //
  337. // Returned Error Codes:
  338. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  339. // The resource could not be found.
  340. //
  341. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  342. // One or more parameter values are not valid.
  343. //
  344. // * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
  345. // Your resource limits have been exceeded.
  346. //
  347. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateTags
  348. func (c *WorkSpaces) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) {
  349. req, out := c.CreateTagsRequest(input)
  350. return out, req.Send()
  351. }
  352. // CreateTagsWithContext is the same as CreateTags with the addition of
  353. // the ability to pass a context and additional request options.
  354. //
  355. // See CreateTags for details on how to use this API operation.
  356. //
  357. // The context must be non-nil and will be used for request cancellation. If
  358. // the context is nil a panic will occur. In the future the SDK may create
  359. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  360. // for more information on using Contexts.
  361. func (c *WorkSpaces) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opts ...request.Option) (*CreateTagsOutput, error) {
  362. req, out := c.CreateTagsRequest(input)
  363. req.SetContext(ctx)
  364. req.ApplyOptions(opts...)
  365. return out, req.Send()
  366. }
  367. const opCreateWorkspaces = "CreateWorkspaces"
  368. // CreateWorkspacesRequest generates a "aws/request.Request" representing the
  369. // client's request for the CreateWorkspaces operation. The "output" return
  370. // value will be populated with the request's response once the request completes
  371. // successfully.
  372. //
  373. // Use "Send" method on the returned Request to send the API call to the service.
  374. // the "output" return value is not valid until after Send returns without error.
  375. //
  376. // See CreateWorkspaces for more information on using the CreateWorkspaces
  377. // API call, and error handling.
  378. //
  379. // This method is useful when you want to inject custom logic or configuration
  380. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  381. //
  382. //
  383. // // Example sending a request using the CreateWorkspacesRequest method.
  384. // req, resp := client.CreateWorkspacesRequest(params)
  385. //
  386. // err := req.Send()
  387. // if err == nil { // resp is now filled
  388. // fmt.Println(resp)
  389. // }
  390. //
  391. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateWorkspaces
  392. func (c *WorkSpaces) CreateWorkspacesRequest(input *CreateWorkspacesInput) (req *request.Request, output *CreateWorkspacesOutput) {
  393. op := &request.Operation{
  394. Name: opCreateWorkspaces,
  395. HTTPMethod: "POST",
  396. HTTPPath: "/",
  397. }
  398. if input == nil {
  399. input = &CreateWorkspacesInput{}
  400. }
  401. output = &CreateWorkspacesOutput{}
  402. req = c.newRequest(op, input, output)
  403. return
  404. }
  405. // CreateWorkspaces API operation for Amazon WorkSpaces.
  406. //
  407. // Creates one or more WorkSpaces.
  408. //
  409. // This operation is asynchronous and returns before the WorkSpaces are created.
  410. //
  411. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  412. // with awserr.Error's Code and Message methods to get detailed information about
  413. // the error.
  414. //
  415. // See the AWS API reference guide for Amazon WorkSpaces's
  416. // API operation CreateWorkspaces for usage and error information.
  417. //
  418. // Returned Error Codes:
  419. // * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
  420. // Your resource limits have been exceeded.
  421. //
  422. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  423. // One or more parameter values are not valid.
  424. //
  425. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateWorkspaces
  426. func (c *WorkSpaces) CreateWorkspaces(input *CreateWorkspacesInput) (*CreateWorkspacesOutput, error) {
  427. req, out := c.CreateWorkspacesRequest(input)
  428. return out, req.Send()
  429. }
  430. // CreateWorkspacesWithContext is the same as CreateWorkspaces with the addition of
  431. // the ability to pass a context and additional request options.
  432. //
  433. // See CreateWorkspaces for details on how to use this API operation.
  434. //
  435. // The context must be non-nil and will be used for request cancellation. If
  436. // the context is nil a panic will occur. In the future the SDK may create
  437. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  438. // for more information on using Contexts.
  439. func (c *WorkSpaces) CreateWorkspacesWithContext(ctx aws.Context, input *CreateWorkspacesInput, opts ...request.Option) (*CreateWorkspacesOutput, error) {
  440. req, out := c.CreateWorkspacesRequest(input)
  441. req.SetContext(ctx)
  442. req.ApplyOptions(opts...)
  443. return out, req.Send()
  444. }
  445. const opDeleteIpGroup = "DeleteIpGroup"
  446. // DeleteIpGroupRequest generates a "aws/request.Request" representing the
  447. // client's request for the DeleteIpGroup operation. The "output" return
  448. // value will be populated with the request's response once the request completes
  449. // successfully.
  450. //
  451. // Use "Send" method on the returned Request to send the API call to the service.
  452. // the "output" return value is not valid until after Send returns without error.
  453. //
  454. // See DeleteIpGroup for more information on using the DeleteIpGroup
  455. // API call, and error handling.
  456. //
  457. // This method is useful when you want to inject custom logic or configuration
  458. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  459. //
  460. //
  461. // // Example sending a request using the DeleteIpGroupRequest method.
  462. // req, resp := client.DeleteIpGroupRequest(params)
  463. //
  464. // err := req.Send()
  465. // if err == nil { // resp is now filled
  466. // fmt.Println(resp)
  467. // }
  468. //
  469. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteIpGroup
  470. func (c *WorkSpaces) DeleteIpGroupRequest(input *DeleteIpGroupInput) (req *request.Request, output *DeleteIpGroupOutput) {
  471. op := &request.Operation{
  472. Name: opDeleteIpGroup,
  473. HTTPMethod: "POST",
  474. HTTPPath: "/",
  475. }
  476. if input == nil {
  477. input = &DeleteIpGroupInput{}
  478. }
  479. output = &DeleteIpGroupOutput{}
  480. req = c.newRequest(op, input, output)
  481. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  482. return
  483. }
  484. // DeleteIpGroup API operation for Amazon WorkSpaces.
  485. //
  486. // Deletes the specified IP access control group.
  487. //
  488. // You cannot delete an IP access control group that is associated with a directory.
  489. //
  490. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  491. // with awserr.Error's Code and Message methods to get detailed information about
  492. // the error.
  493. //
  494. // See the AWS API reference guide for Amazon WorkSpaces's
  495. // API operation DeleteIpGroup for usage and error information.
  496. //
  497. // Returned Error Codes:
  498. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  499. // One or more parameter values are not valid.
  500. //
  501. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  502. // The resource could not be found.
  503. //
  504. // * ErrCodeResourceAssociatedException "ResourceAssociatedException"
  505. // The resource is associated with a directory.
  506. //
  507. // * ErrCodeAccessDeniedException "AccessDeniedException"
  508. // The user is not authorized to access a resource.
  509. //
  510. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteIpGroup
  511. func (c *WorkSpaces) DeleteIpGroup(input *DeleteIpGroupInput) (*DeleteIpGroupOutput, error) {
  512. req, out := c.DeleteIpGroupRequest(input)
  513. return out, req.Send()
  514. }
  515. // DeleteIpGroupWithContext is the same as DeleteIpGroup with the addition of
  516. // the ability to pass a context and additional request options.
  517. //
  518. // See DeleteIpGroup for details on how to use this API operation.
  519. //
  520. // The context must be non-nil and will be used for request cancellation. If
  521. // the context is nil a panic will occur. In the future the SDK may create
  522. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  523. // for more information on using Contexts.
  524. func (c *WorkSpaces) DeleteIpGroupWithContext(ctx aws.Context, input *DeleteIpGroupInput, opts ...request.Option) (*DeleteIpGroupOutput, error) {
  525. req, out := c.DeleteIpGroupRequest(input)
  526. req.SetContext(ctx)
  527. req.ApplyOptions(opts...)
  528. return out, req.Send()
  529. }
  530. const opDeleteTags = "DeleteTags"
  531. // DeleteTagsRequest generates a "aws/request.Request" representing the
  532. // client's request for the DeleteTags operation. The "output" return
  533. // value will be populated with the request's response once the request completes
  534. // successfully.
  535. //
  536. // Use "Send" method on the returned Request to send the API call to the service.
  537. // the "output" return value is not valid until after Send returns without error.
  538. //
  539. // See DeleteTags for more information on using the DeleteTags
  540. // API call, and error handling.
  541. //
  542. // This method is useful when you want to inject custom logic or configuration
  543. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  544. //
  545. //
  546. // // Example sending a request using the DeleteTagsRequest method.
  547. // req, resp := client.DeleteTagsRequest(params)
  548. //
  549. // err := req.Send()
  550. // if err == nil { // resp is now filled
  551. // fmt.Println(resp)
  552. // }
  553. //
  554. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteTags
  555. func (c *WorkSpaces) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) {
  556. op := &request.Operation{
  557. Name: opDeleteTags,
  558. HTTPMethod: "POST",
  559. HTTPPath: "/",
  560. }
  561. if input == nil {
  562. input = &DeleteTagsInput{}
  563. }
  564. output = &DeleteTagsOutput{}
  565. req = c.newRequest(op, input, output)
  566. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  567. return
  568. }
  569. // DeleteTags API operation for Amazon WorkSpaces.
  570. //
  571. // Deletes the specified tags from the specified WorkSpace.
  572. //
  573. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  574. // with awserr.Error's Code and Message methods to get detailed information about
  575. // the error.
  576. //
  577. // See the AWS API reference guide for Amazon WorkSpaces's
  578. // API operation DeleteTags for usage and error information.
  579. //
  580. // Returned Error Codes:
  581. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  582. // The resource could not be found.
  583. //
  584. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  585. // One or more parameter values are not valid.
  586. //
  587. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteTags
  588. func (c *WorkSpaces) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
  589. req, out := c.DeleteTagsRequest(input)
  590. return out, req.Send()
  591. }
  592. // DeleteTagsWithContext is the same as DeleteTags with the addition of
  593. // the ability to pass a context and additional request options.
  594. //
  595. // See DeleteTags for details on how to use this API operation.
  596. //
  597. // The context must be non-nil and will be used for request cancellation. If
  598. // the context is nil a panic will occur. In the future the SDK may create
  599. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  600. // for more information on using Contexts.
  601. func (c *WorkSpaces) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) {
  602. req, out := c.DeleteTagsRequest(input)
  603. req.SetContext(ctx)
  604. req.ApplyOptions(opts...)
  605. return out, req.Send()
  606. }
  607. const opDeleteWorkspaceImage = "DeleteWorkspaceImage"
  608. // DeleteWorkspaceImageRequest generates a "aws/request.Request" representing the
  609. // client's request for the DeleteWorkspaceImage operation. The "output" return
  610. // value will be populated with the request's response once the request completes
  611. // successfully.
  612. //
  613. // Use "Send" method on the returned Request to send the API call to the service.
  614. // the "output" return value is not valid until after Send returns without error.
  615. //
  616. // See DeleteWorkspaceImage for more information on using the DeleteWorkspaceImage
  617. // API call, and error handling.
  618. //
  619. // This method is useful when you want to inject custom logic or configuration
  620. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  621. //
  622. //
  623. // // Example sending a request using the DeleteWorkspaceImageRequest method.
  624. // req, resp := client.DeleteWorkspaceImageRequest(params)
  625. //
  626. // err := req.Send()
  627. // if err == nil { // resp is now filled
  628. // fmt.Println(resp)
  629. // }
  630. //
  631. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteWorkspaceImage
  632. func (c *WorkSpaces) DeleteWorkspaceImageRequest(input *DeleteWorkspaceImageInput) (req *request.Request, output *DeleteWorkspaceImageOutput) {
  633. op := &request.Operation{
  634. Name: opDeleteWorkspaceImage,
  635. HTTPMethod: "POST",
  636. HTTPPath: "/",
  637. }
  638. if input == nil {
  639. input = &DeleteWorkspaceImageInput{}
  640. }
  641. output = &DeleteWorkspaceImageOutput{}
  642. req = c.newRequest(op, input, output)
  643. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  644. return
  645. }
  646. // DeleteWorkspaceImage API operation for Amazon WorkSpaces.
  647. //
  648. // Deletes the specified image from your account. To delete an image, you must
  649. // first delete any bundles that are associated with the image.
  650. //
  651. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  652. // with awserr.Error's Code and Message methods to get detailed information about
  653. // the error.
  654. //
  655. // See the AWS API reference guide for Amazon WorkSpaces's
  656. // API operation DeleteWorkspaceImage for usage and error information.
  657. //
  658. // Returned Error Codes:
  659. // * ErrCodeResourceAssociatedException "ResourceAssociatedException"
  660. // The resource is associated with a directory.
  661. //
  662. // * ErrCodeInvalidResourceStateException "InvalidResourceStateException"
  663. // The state of the resource is not valid for this operation.
  664. //
  665. // * ErrCodeAccessDeniedException "AccessDeniedException"
  666. // The user is not authorized to access a resource.
  667. //
  668. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteWorkspaceImage
  669. func (c *WorkSpaces) DeleteWorkspaceImage(input *DeleteWorkspaceImageInput) (*DeleteWorkspaceImageOutput, error) {
  670. req, out := c.DeleteWorkspaceImageRequest(input)
  671. return out, req.Send()
  672. }
  673. // DeleteWorkspaceImageWithContext is the same as DeleteWorkspaceImage with the addition of
  674. // the ability to pass a context and additional request options.
  675. //
  676. // See DeleteWorkspaceImage for details on how to use this API operation.
  677. //
  678. // The context must be non-nil and will be used for request cancellation. If
  679. // the context is nil a panic will occur. In the future the SDK may create
  680. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  681. // for more information on using Contexts.
  682. func (c *WorkSpaces) DeleteWorkspaceImageWithContext(ctx aws.Context, input *DeleteWorkspaceImageInput, opts ...request.Option) (*DeleteWorkspaceImageOutput, error) {
  683. req, out := c.DeleteWorkspaceImageRequest(input)
  684. req.SetContext(ctx)
  685. req.ApplyOptions(opts...)
  686. return out, req.Send()
  687. }
  688. const opDescribeAccount = "DescribeAccount"
  689. // DescribeAccountRequest generates a "aws/request.Request" representing the
  690. // client's request for the DescribeAccount operation. The "output" return
  691. // value will be populated with the request's response once the request completes
  692. // successfully.
  693. //
  694. // Use "Send" method on the returned Request to send the API call to the service.
  695. // the "output" return value is not valid until after Send returns without error.
  696. //
  697. // See DescribeAccount for more information on using the DescribeAccount
  698. // API call, and error handling.
  699. //
  700. // This method is useful when you want to inject custom logic or configuration
  701. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  702. //
  703. //
  704. // // Example sending a request using the DescribeAccountRequest method.
  705. // req, resp := client.DescribeAccountRequest(params)
  706. //
  707. // err := req.Send()
  708. // if err == nil { // resp is now filled
  709. // fmt.Println(resp)
  710. // }
  711. //
  712. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeAccount
  713. func (c *WorkSpaces) DescribeAccountRequest(input *DescribeAccountInput) (req *request.Request, output *DescribeAccountOutput) {
  714. op := &request.Operation{
  715. Name: opDescribeAccount,
  716. HTTPMethod: "POST",
  717. HTTPPath: "/",
  718. }
  719. if input == nil {
  720. input = &DescribeAccountInput{}
  721. }
  722. output = &DescribeAccountOutput{}
  723. req = c.newRequest(op, input, output)
  724. return
  725. }
  726. // DescribeAccount API operation for Amazon WorkSpaces.
  727. //
  728. // Retrieves a list that describes the configuration of bring your own license
  729. // (BYOL) for the specified account.
  730. //
  731. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  732. // with awserr.Error's Code and Message methods to get detailed information about
  733. // the error.
  734. //
  735. // See the AWS API reference guide for Amazon WorkSpaces's
  736. // API operation DescribeAccount for usage and error information.
  737. //
  738. // Returned Error Codes:
  739. // * ErrCodeAccessDeniedException "AccessDeniedException"
  740. // The user is not authorized to access a resource.
  741. //
  742. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeAccount
  743. func (c *WorkSpaces) DescribeAccount(input *DescribeAccountInput) (*DescribeAccountOutput, error) {
  744. req, out := c.DescribeAccountRequest(input)
  745. return out, req.Send()
  746. }
  747. // DescribeAccountWithContext is the same as DescribeAccount with the addition of
  748. // the ability to pass a context and additional request options.
  749. //
  750. // See DescribeAccount for details on how to use this API operation.
  751. //
  752. // The context must be non-nil and will be used for request cancellation. If
  753. // the context is nil a panic will occur. In the future the SDK may create
  754. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  755. // for more information on using Contexts.
  756. func (c *WorkSpaces) DescribeAccountWithContext(ctx aws.Context, input *DescribeAccountInput, opts ...request.Option) (*DescribeAccountOutput, error) {
  757. req, out := c.DescribeAccountRequest(input)
  758. req.SetContext(ctx)
  759. req.ApplyOptions(opts...)
  760. return out, req.Send()
  761. }
  762. const opDescribeAccountModifications = "DescribeAccountModifications"
  763. // DescribeAccountModificationsRequest generates a "aws/request.Request" representing the
  764. // client's request for the DescribeAccountModifications operation. The "output" return
  765. // value will be populated with the request's response once the request completes
  766. // successfully.
  767. //
  768. // Use "Send" method on the returned Request to send the API call to the service.
  769. // the "output" return value is not valid until after Send returns without error.
  770. //
  771. // See DescribeAccountModifications for more information on using the DescribeAccountModifications
  772. // API call, and error handling.
  773. //
  774. // This method is useful when you want to inject custom logic or configuration
  775. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  776. //
  777. //
  778. // // Example sending a request using the DescribeAccountModificationsRequest method.
  779. // req, resp := client.DescribeAccountModificationsRequest(params)
  780. //
  781. // err := req.Send()
  782. // if err == nil { // resp is now filled
  783. // fmt.Println(resp)
  784. // }
  785. //
  786. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeAccountModifications
  787. func (c *WorkSpaces) DescribeAccountModificationsRequest(input *DescribeAccountModificationsInput) (req *request.Request, output *DescribeAccountModificationsOutput) {
  788. op := &request.Operation{
  789. Name: opDescribeAccountModifications,
  790. HTTPMethod: "POST",
  791. HTTPPath: "/",
  792. }
  793. if input == nil {
  794. input = &DescribeAccountModificationsInput{}
  795. }
  796. output = &DescribeAccountModificationsOutput{}
  797. req = c.newRequest(op, input, output)
  798. return
  799. }
  800. // DescribeAccountModifications API operation for Amazon WorkSpaces.
  801. //
  802. // Retrieves a list that describes modifications to the configuration of bring
  803. // your own license (BYOL) for the specified account.
  804. //
  805. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  806. // with awserr.Error's Code and Message methods to get detailed information about
  807. // the error.
  808. //
  809. // See the AWS API reference guide for Amazon WorkSpaces's
  810. // API operation DescribeAccountModifications for usage and error information.
  811. //
  812. // Returned Error Codes:
  813. // * ErrCodeAccessDeniedException "AccessDeniedException"
  814. // The user is not authorized to access a resource.
  815. //
  816. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeAccountModifications
  817. func (c *WorkSpaces) DescribeAccountModifications(input *DescribeAccountModificationsInput) (*DescribeAccountModificationsOutput, error) {
  818. req, out := c.DescribeAccountModificationsRequest(input)
  819. return out, req.Send()
  820. }
  821. // DescribeAccountModificationsWithContext is the same as DescribeAccountModifications with the addition of
  822. // the ability to pass a context and additional request options.
  823. //
  824. // See DescribeAccountModifications for details on how to use this API operation.
  825. //
  826. // The context must be non-nil and will be used for request cancellation. If
  827. // the context is nil a panic will occur. In the future the SDK may create
  828. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  829. // for more information on using Contexts.
  830. func (c *WorkSpaces) DescribeAccountModificationsWithContext(ctx aws.Context, input *DescribeAccountModificationsInput, opts ...request.Option) (*DescribeAccountModificationsOutput, error) {
  831. req, out := c.DescribeAccountModificationsRequest(input)
  832. req.SetContext(ctx)
  833. req.ApplyOptions(opts...)
  834. return out, req.Send()
  835. }
  836. const opDescribeClientProperties = "DescribeClientProperties"
  837. // DescribeClientPropertiesRequest generates a "aws/request.Request" representing the
  838. // client's request for the DescribeClientProperties operation. The "output" return
  839. // value will be populated with the request's response once the request completes
  840. // successfully.
  841. //
  842. // Use "Send" method on the returned Request to send the API call to the service.
  843. // the "output" return value is not valid until after Send returns without error.
  844. //
  845. // See DescribeClientProperties for more information on using the DescribeClientProperties
  846. // API call, and error handling.
  847. //
  848. // This method is useful when you want to inject custom logic or configuration
  849. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  850. //
  851. //
  852. // // Example sending a request using the DescribeClientPropertiesRequest method.
  853. // req, resp := client.DescribeClientPropertiesRequest(params)
  854. //
  855. // err := req.Send()
  856. // if err == nil { // resp is now filled
  857. // fmt.Println(resp)
  858. // }
  859. //
  860. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeClientProperties
  861. func (c *WorkSpaces) DescribeClientPropertiesRequest(input *DescribeClientPropertiesInput) (req *request.Request, output *DescribeClientPropertiesOutput) {
  862. op := &request.Operation{
  863. Name: opDescribeClientProperties,
  864. HTTPMethod: "POST",
  865. HTTPPath: "/",
  866. }
  867. if input == nil {
  868. input = &DescribeClientPropertiesInput{}
  869. }
  870. output = &DescribeClientPropertiesOutput{}
  871. req = c.newRequest(op, input, output)
  872. return
  873. }
  874. // DescribeClientProperties API operation for Amazon WorkSpaces.
  875. //
  876. // Retrieves a list that describes one or more specified Amazon WorkSpaces clients.
  877. //
  878. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  879. // with awserr.Error's Code and Message methods to get detailed information about
  880. // the error.
  881. //
  882. // See the AWS API reference guide for Amazon WorkSpaces's
  883. // API operation DescribeClientProperties for usage and error information.
  884. //
  885. // Returned Error Codes:
  886. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  887. // One or more parameter values are not valid.
  888. //
  889. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  890. // The resource could not be found.
  891. //
  892. // * ErrCodeAccessDeniedException "AccessDeniedException"
  893. // The user is not authorized to access a resource.
  894. //
  895. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeClientProperties
  896. func (c *WorkSpaces) DescribeClientProperties(input *DescribeClientPropertiesInput) (*DescribeClientPropertiesOutput, error) {
  897. req, out := c.DescribeClientPropertiesRequest(input)
  898. return out, req.Send()
  899. }
  900. // DescribeClientPropertiesWithContext is the same as DescribeClientProperties with the addition of
  901. // the ability to pass a context and additional request options.
  902. //
  903. // See DescribeClientProperties for details on how to use this API operation.
  904. //
  905. // The context must be non-nil and will be used for request cancellation. If
  906. // the context is nil a panic will occur. In the future the SDK may create
  907. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  908. // for more information on using Contexts.
  909. func (c *WorkSpaces) DescribeClientPropertiesWithContext(ctx aws.Context, input *DescribeClientPropertiesInput, opts ...request.Option) (*DescribeClientPropertiesOutput, error) {
  910. req, out := c.DescribeClientPropertiesRequest(input)
  911. req.SetContext(ctx)
  912. req.ApplyOptions(opts...)
  913. return out, req.Send()
  914. }
  915. const opDescribeIpGroups = "DescribeIpGroups"
  916. // DescribeIpGroupsRequest generates a "aws/request.Request" representing the
  917. // client's request for the DescribeIpGroups operation. The "output" return
  918. // value will be populated with the request's response once the request completes
  919. // successfully.
  920. //
  921. // Use "Send" method on the returned Request to send the API call to the service.
  922. // the "output" return value is not valid until after Send returns without error.
  923. //
  924. // See DescribeIpGroups for more information on using the DescribeIpGroups
  925. // API call, and error handling.
  926. //
  927. // This method is useful when you want to inject custom logic or configuration
  928. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  929. //
  930. //
  931. // // Example sending a request using the DescribeIpGroupsRequest method.
  932. // req, resp := client.DescribeIpGroupsRequest(params)
  933. //
  934. // err := req.Send()
  935. // if err == nil { // resp is now filled
  936. // fmt.Println(resp)
  937. // }
  938. //
  939. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeIpGroups
  940. func (c *WorkSpaces) DescribeIpGroupsRequest(input *DescribeIpGroupsInput) (req *request.Request, output *DescribeIpGroupsOutput) {
  941. op := &request.Operation{
  942. Name: opDescribeIpGroups,
  943. HTTPMethod: "POST",
  944. HTTPPath: "/",
  945. }
  946. if input == nil {
  947. input = &DescribeIpGroupsInput{}
  948. }
  949. output = &DescribeIpGroupsOutput{}
  950. req = c.newRequest(op, input, output)
  951. return
  952. }
  953. // DescribeIpGroups API operation for Amazon WorkSpaces.
  954. //
  955. // Describes one or more of your IP access control groups.
  956. //
  957. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  958. // with awserr.Error's Code and Message methods to get detailed information about
  959. // the error.
  960. //
  961. // See the AWS API reference guide for Amazon WorkSpaces's
  962. // API operation DescribeIpGroups for usage and error information.
  963. //
  964. // Returned Error Codes:
  965. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  966. // One or more parameter values are not valid.
  967. //
  968. // * ErrCodeAccessDeniedException "AccessDeniedException"
  969. // The user is not authorized to access a resource.
  970. //
  971. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeIpGroups
  972. func (c *WorkSpaces) DescribeIpGroups(input *DescribeIpGroupsInput) (*DescribeIpGroupsOutput, error) {
  973. req, out := c.DescribeIpGroupsRequest(input)
  974. return out, req.Send()
  975. }
  976. // DescribeIpGroupsWithContext is the same as DescribeIpGroups with the addition of
  977. // the ability to pass a context and additional request options.
  978. //
  979. // See DescribeIpGroups for details on how to use this API operation.
  980. //
  981. // The context must be non-nil and will be used for request cancellation. If
  982. // the context is nil a panic will occur. In the future the SDK may create
  983. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  984. // for more information on using Contexts.
  985. func (c *WorkSpaces) DescribeIpGroupsWithContext(ctx aws.Context, input *DescribeIpGroupsInput, opts ...request.Option) (*DescribeIpGroupsOutput, error) {
  986. req, out := c.DescribeIpGroupsRequest(input)
  987. req.SetContext(ctx)
  988. req.ApplyOptions(opts...)
  989. return out, req.Send()
  990. }
  991. const opDescribeTags = "DescribeTags"
  992. // DescribeTagsRequest generates a "aws/request.Request" representing the
  993. // client's request for the DescribeTags operation. The "output" return
  994. // value will be populated with the request's response once the request completes
  995. // successfully.
  996. //
  997. // Use "Send" method on the returned Request to send the API call to the service.
  998. // the "output" return value is not valid until after Send returns without error.
  999. //
  1000. // See DescribeTags for more information on using the DescribeTags
  1001. // API call, and error handling.
  1002. //
  1003. // This method is useful when you want to inject custom logic or configuration
  1004. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1005. //
  1006. //
  1007. // // Example sending a request using the DescribeTagsRequest method.
  1008. // req, resp := client.DescribeTagsRequest(params)
  1009. //
  1010. // err := req.Send()
  1011. // if err == nil { // resp is now filled
  1012. // fmt.Println(resp)
  1013. // }
  1014. //
  1015. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeTags
  1016. func (c *WorkSpaces) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
  1017. op := &request.Operation{
  1018. Name: opDescribeTags,
  1019. HTTPMethod: "POST",
  1020. HTTPPath: "/",
  1021. }
  1022. if input == nil {
  1023. input = &DescribeTagsInput{}
  1024. }
  1025. output = &DescribeTagsOutput{}
  1026. req = c.newRequest(op, input, output)
  1027. return
  1028. }
  1029. // DescribeTags API operation for Amazon WorkSpaces.
  1030. //
  1031. // Describes the specified tags for the specified WorkSpace.
  1032. //
  1033. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1034. // with awserr.Error's Code and Message methods to get detailed information about
  1035. // the error.
  1036. //
  1037. // See the AWS API reference guide for Amazon WorkSpaces's
  1038. // API operation DescribeTags for usage and error information.
  1039. //
  1040. // Returned Error Codes:
  1041. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1042. // The resource could not be found.
  1043. //
  1044. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeTags
  1045. func (c *WorkSpaces) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
  1046. req, out := c.DescribeTagsRequest(input)
  1047. return out, req.Send()
  1048. }
  1049. // DescribeTagsWithContext is the same as DescribeTags with the addition of
  1050. // the ability to pass a context and additional request options.
  1051. //
  1052. // See DescribeTags for details on how to use this API operation.
  1053. //
  1054. // The context must be non-nil and will be used for request cancellation. If
  1055. // the context is nil a panic will occur. In the future the SDK may create
  1056. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1057. // for more information on using Contexts.
  1058. func (c *WorkSpaces) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) {
  1059. req, out := c.DescribeTagsRequest(input)
  1060. req.SetContext(ctx)
  1061. req.ApplyOptions(opts...)
  1062. return out, req.Send()
  1063. }
  1064. const opDescribeWorkspaceBundles = "DescribeWorkspaceBundles"
  1065. // DescribeWorkspaceBundlesRequest generates a "aws/request.Request" representing the
  1066. // client's request for the DescribeWorkspaceBundles operation. The "output" return
  1067. // value will be populated with the request's response once the request completes
  1068. // successfully.
  1069. //
  1070. // Use "Send" method on the returned Request to send the API call to the service.
  1071. // the "output" return value is not valid until after Send returns without error.
  1072. //
  1073. // See DescribeWorkspaceBundles for more information on using the DescribeWorkspaceBundles
  1074. // API call, and error handling.
  1075. //
  1076. // This method is useful when you want to inject custom logic or configuration
  1077. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1078. //
  1079. //
  1080. // // Example sending a request using the DescribeWorkspaceBundlesRequest method.
  1081. // req, resp := client.DescribeWorkspaceBundlesRequest(params)
  1082. //
  1083. // err := req.Send()
  1084. // if err == nil { // resp is now filled
  1085. // fmt.Println(resp)
  1086. // }
  1087. //
  1088. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceBundles
  1089. func (c *WorkSpaces) DescribeWorkspaceBundlesRequest(input *DescribeWorkspaceBundlesInput) (req *request.Request, output *DescribeWorkspaceBundlesOutput) {
  1090. op := &request.Operation{
  1091. Name: opDescribeWorkspaceBundles,
  1092. HTTPMethod: "POST",
  1093. HTTPPath: "/",
  1094. Paginator: &request.Paginator{
  1095. InputTokens: []string{"NextToken"},
  1096. OutputTokens: []string{"NextToken"},
  1097. LimitToken: "",
  1098. TruncationToken: "",
  1099. },
  1100. }
  1101. if input == nil {
  1102. input = &DescribeWorkspaceBundlesInput{}
  1103. }
  1104. output = &DescribeWorkspaceBundlesOutput{}
  1105. req = c.newRequest(op, input, output)
  1106. return
  1107. }
  1108. // DescribeWorkspaceBundles API operation for Amazon WorkSpaces.
  1109. //
  1110. // Retrieves a list that describes the available WorkSpace bundles.
  1111. //
  1112. // You can filter the results using either bundle ID or owner, but not both.
  1113. //
  1114. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1115. // with awserr.Error's Code and Message methods to get detailed information about
  1116. // the error.
  1117. //
  1118. // See the AWS API reference guide for Amazon WorkSpaces's
  1119. // API operation DescribeWorkspaceBundles for usage and error information.
  1120. //
  1121. // Returned Error Codes:
  1122. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  1123. // One or more parameter values are not valid.
  1124. //
  1125. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceBundles
  1126. func (c *WorkSpaces) DescribeWorkspaceBundles(input *DescribeWorkspaceBundlesInput) (*DescribeWorkspaceBundlesOutput, error) {
  1127. req, out := c.DescribeWorkspaceBundlesRequest(input)
  1128. return out, req.Send()
  1129. }
  1130. // DescribeWorkspaceBundlesWithContext is the same as DescribeWorkspaceBundles with the addition of
  1131. // the ability to pass a context and additional request options.
  1132. //
  1133. // See DescribeWorkspaceBundles for details on how to use this API operation.
  1134. //
  1135. // The context must be non-nil and will be used for request cancellation. If
  1136. // the context is nil a panic will occur. In the future the SDK may create
  1137. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1138. // for more information on using Contexts.
  1139. func (c *WorkSpaces) DescribeWorkspaceBundlesWithContext(ctx aws.Context, input *DescribeWorkspaceBundlesInput, opts ...request.Option) (*DescribeWorkspaceBundlesOutput, error) {
  1140. req, out := c.DescribeWorkspaceBundlesRequest(input)
  1141. req.SetContext(ctx)
  1142. req.ApplyOptions(opts...)
  1143. return out, req.Send()
  1144. }
  1145. // DescribeWorkspaceBundlesPages iterates over the pages of a DescribeWorkspaceBundles operation,
  1146. // calling the "fn" function with the response data for each page. To stop
  1147. // iterating, return false from the fn function.
  1148. //
  1149. // See DescribeWorkspaceBundles method for more information on how to use this operation.
  1150. //
  1151. // Note: This operation can generate multiple requests to a service.
  1152. //
  1153. // // Example iterating over at most 3 pages of a DescribeWorkspaceBundles operation.
  1154. // pageNum := 0
  1155. // err := client.DescribeWorkspaceBundlesPages(params,
  1156. // func(page *DescribeWorkspaceBundlesOutput, lastPage bool) bool {
  1157. // pageNum++
  1158. // fmt.Println(page)
  1159. // return pageNum <= 3
  1160. // })
  1161. //
  1162. func (c *WorkSpaces) DescribeWorkspaceBundlesPages(input *DescribeWorkspaceBundlesInput, fn func(*DescribeWorkspaceBundlesOutput, bool) bool) error {
  1163. return c.DescribeWorkspaceBundlesPagesWithContext(aws.BackgroundContext(), input, fn)
  1164. }
  1165. // DescribeWorkspaceBundlesPagesWithContext same as DescribeWorkspaceBundlesPages except
  1166. // it takes a Context and allows setting request options on the pages.
  1167. //
  1168. // The context must be non-nil and will be used for request cancellation. If
  1169. // the context is nil a panic will occur. In the future the SDK may create
  1170. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1171. // for more information on using Contexts.
  1172. func (c *WorkSpaces) DescribeWorkspaceBundlesPagesWithContext(ctx aws.Context, input *DescribeWorkspaceBundlesInput, fn func(*DescribeWorkspaceBundlesOutput, bool) bool, opts ...request.Option) error {
  1173. p := request.Pagination{
  1174. NewRequest: func() (*request.Request, error) {
  1175. var inCpy *DescribeWorkspaceBundlesInput
  1176. if input != nil {
  1177. tmp := *input
  1178. inCpy = &tmp
  1179. }
  1180. req, _ := c.DescribeWorkspaceBundlesRequest(inCpy)
  1181. req.SetContext(ctx)
  1182. req.ApplyOptions(opts...)
  1183. return req, nil
  1184. },
  1185. }
  1186. cont := true
  1187. for p.Next() && cont {
  1188. cont = fn(p.Page().(*DescribeWorkspaceBundlesOutput), !p.HasNextPage())
  1189. }
  1190. return p.Err()
  1191. }
  1192. const opDescribeWorkspaceDirectories = "DescribeWorkspaceDirectories"
  1193. // DescribeWorkspaceDirectoriesRequest generates a "aws/request.Request" representing the
  1194. // client's request for the DescribeWorkspaceDirectories operation. The "output" return
  1195. // value will be populated with the request's response once the request completes
  1196. // successfully.
  1197. //
  1198. // Use "Send" method on the returned Request to send the API call to the service.
  1199. // the "output" return value is not valid until after Send returns without error.
  1200. //
  1201. // See DescribeWorkspaceDirectories for more information on using the DescribeWorkspaceDirectories
  1202. // API call, and error handling.
  1203. //
  1204. // This method is useful when you want to inject custom logic or configuration
  1205. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1206. //
  1207. //
  1208. // // Example sending a request using the DescribeWorkspaceDirectoriesRequest method.
  1209. // req, resp := client.DescribeWorkspaceDirectoriesRequest(params)
  1210. //
  1211. // err := req.Send()
  1212. // if err == nil { // resp is now filled
  1213. // fmt.Println(resp)
  1214. // }
  1215. //
  1216. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceDirectories
  1217. func (c *WorkSpaces) DescribeWorkspaceDirectoriesRequest(input *DescribeWorkspaceDirectoriesInput) (req *request.Request, output *DescribeWorkspaceDirectoriesOutput) {
  1218. op := &request.Operation{
  1219. Name: opDescribeWorkspaceDirectories,
  1220. HTTPMethod: "POST",
  1221. HTTPPath: "/",
  1222. Paginator: &request.Paginator{
  1223. InputTokens: []string{"NextToken"},
  1224. OutputTokens: []string{"NextToken"},
  1225. LimitToken: "",
  1226. TruncationToken: "",
  1227. },
  1228. }
  1229. if input == nil {
  1230. input = &DescribeWorkspaceDirectoriesInput{}
  1231. }
  1232. output = &DescribeWorkspaceDirectoriesOutput{}
  1233. req = c.newRequest(op, input, output)
  1234. return
  1235. }
  1236. // DescribeWorkspaceDirectories API operation for Amazon WorkSpaces.
  1237. //
  1238. // Describes the available AWS Directory Service directories that are registered
  1239. // with Amazon WorkSpaces.
  1240. //
  1241. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1242. // with awserr.Error's Code and Message methods to get detailed information about
  1243. // the error.
  1244. //
  1245. // See the AWS API reference guide for Amazon WorkSpaces's
  1246. // API operation DescribeWorkspaceDirectories for usage and error information.
  1247. //
  1248. // Returned Error Codes:
  1249. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  1250. // One or more parameter values are not valid.
  1251. //
  1252. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceDirectories
  1253. func (c *WorkSpaces) DescribeWorkspaceDirectories(input *DescribeWorkspaceDirectoriesInput) (*DescribeWorkspaceDirectoriesOutput, error) {
  1254. req, out := c.DescribeWorkspaceDirectoriesRequest(input)
  1255. return out, req.Send()
  1256. }
  1257. // DescribeWorkspaceDirectoriesWithContext is the same as DescribeWorkspaceDirectories with the addition of
  1258. // the ability to pass a context and additional request options.
  1259. //
  1260. // See DescribeWorkspaceDirectories for details on how to use this API operation.
  1261. //
  1262. // The context must be non-nil and will be used for request cancellation. If
  1263. // the context is nil a panic will occur. In the future the SDK may create
  1264. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1265. // for more information on using Contexts.
  1266. func (c *WorkSpaces) DescribeWorkspaceDirectoriesWithContext(ctx aws.Context, input *DescribeWorkspaceDirectoriesInput, opts ...request.Option) (*DescribeWorkspaceDirectoriesOutput, error) {
  1267. req, out := c.DescribeWorkspaceDirectoriesRequest(input)
  1268. req.SetContext(ctx)
  1269. req.ApplyOptions(opts...)
  1270. return out, req.Send()
  1271. }
  1272. // DescribeWorkspaceDirectoriesPages iterates over the pages of a DescribeWorkspaceDirectories operation,
  1273. // calling the "fn" function with the response data for each page. To stop
  1274. // iterating, return false from the fn function.
  1275. //
  1276. // See DescribeWorkspaceDirectories method for more information on how to use this operation.
  1277. //
  1278. // Note: This operation can generate multiple requests to a service.
  1279. //
  1280. // // Example iterating over at most 3 pages of a DescribeWorkspaceDirectories operation.
  1281. // pageNum := 0
  1282. // err := client.DescribeWorkspaceDirectoriesPages(params,
  1283. // func(page *DescribeWorkspaceDirectoriesOutput, lastPage bool) bool {
  1284. // pageNum++
  1285. // fmt.Println(page)
  1286. // return pageNum <= 3
  1287. // })
  1288. //
  1289. func (c *WorkSpaces) DescribeWorkspaceDirectoriesPages(input *DescribeWorkspaceDirectoriesInput, fn func(*DescribeWorkspaceDirectoriesOutput, bool) bool) error {
  1290. return c.DescribeWorkspaceDirectoriesPagesWithContext(aws.BackgroundContext(), input, fn)
  1291. }
  1292. // DescribeWorkspaceDirectoriesPagesWithContext same as DescribeWorkspaceDirectoriesPages except
  1293. // it takes a Context and allows setting request options on the pages.
  1294. //
  1295. // The context must be non-nil and will be used for request cancellation. If
  1296. // the context is nil a panic will occur. In the future the SDK may create
  1297. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1298. // for more information on using Contexts.
  1299. func (c *WorkSpaces) DescribeWorkspaceDirectoriesPagesWithContext(ctx aws.Context, input *DescribeWorkspaceDirectoriesInput, fn func(*DescribeWorkspaceDirectoriesOutput, bool) bool, opts ...request.Option) error {
  1300. p := request.Pagination{
  1301. NewRequest: func() (*request.Request, error) {
  1302. var inCpy *DescribeWorkspaceDirectoriesInput
  1303. if input != nil {
  1304. tmp := *input
  1305. inCpy = &tmp
  1306. }
  1307. req, _ := c.DescribeWorkspaceDirectoriesRequest(inCpy)
  1308. req.SetContext(ctx)
  1309. req.ApplyOptions(opts...)
  1310. return req, nil
  1311. },
  1312. }
  1313. cont := true
  1314. for p.Next() && cont {
  1315. cont = fn(p.Page().(*DescribeWorkspaceDirectoriesOutput), !p.HasNextPage())
  1316. }
  1317. return p.Err()
  1318. }
  1319. const opDescribeWorkspaceImages = "DescribeWorkspaceImages"
  1320. // DescribeWorkspaceImagesRequest generates a "aws/request.Request" representing the
  1321. // client's request for the DescribeWorkspaceImages operation. The "output" return
  1322. // value will be populated with the request's response once the request completes
  1323. // successfully.
  1324. //
  1325. // Use "Send" method on the returned Request to send the API call to the service.
  1326. // the "output" return value is not valid until after Send returns without error.
  1327. //
  1328. // See DescribeWorkspaceImages for more information on using the DescribeWorkspaceImages
  1329. // API call, and error handling.
  1330. //
  1331. // This method is useful when you want to inject custom logic or configuration
  1332. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1333. //
  1334. //
  1335. // // Example sending a request using the DescribeWorkspaceImagesRequest method.
  1336. // req, resp := client.DescribeWorkspaceImagesRequest(params)
  1337. //
  1338. // err := req.Send()
  1339. // if err == nil { // resp is now filled
  1340. // fmt.Println(resp)
  1341. // }
  1342. //
  1343. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceImages
  1344. func (c *WorkSpaces) DescribeWorkspaceImagesRequest(input *DescribeWorkspaceImagesInput) (req *request.Request, output *DescribeWorkspaceImagesOutput) {
  1345. op := &request.Operation{
  1346. Name: opDescribeWorkspaceImages,
  1347. HTTPMethod: "POST",
  1348. HTTPPath: "/",
  1349. }
  1350. if input == nil {
  1351. input = &DescribeWorkspaceImagesInput{}
  1352. }
  1353. output = &DescribeWorkspaceImagesOutput{}
  1354. req = c.newRequest(op, input, output)
  1355. return
  1356. }
  1357. // DescribeWorkspaceImages API operation for Amazon WorkSpaces.
  1358. //
  1359. // Retrieves a list that describes one or more specified images, if the image
  1360. // identifiers are provided. Otherwise, all images in the account are described.
  1361. //
  1362. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1363. // with awserr.Error's Code and Message methods to get detailed information about
  1364. // the error.
  1365. //
  1366. // See the AWS API reference guide for Amazon WorkSpaces's
  1367. // API operation DescribeWorkspaceImages for usage and error information.
  1368. //
  1369. // Returned Error Codes:
  1370. // * ErrCodeAccessDeniedException "AccessDeniedException"
  1371. // The user is not authorized to access a resource.
  1372. //
  1373. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceImages
  1374. func (c *WorkSpaces) DescribeWorkspaceImages(input *DescribeWorkspaceImagesInput) (*DescribeWorkspaceImagesOutput, error) {
  1375. req, out := c.DescribeWorkspaceImagesRequest(input)
  1376. return out, req.Send()
  1377. }
  1378. // DescribeWorkspaceImagesWithContext is the same as DescribeWorkspaceImages with the addition of
  1379. // the ability to pass a context and additional request options.
  1380. //
  1381. // See DescribeWorkspaceImages for details on how to use this API operation.
  1382. //
  1383. // The context must be non-nil and will be used for request cancellation. If
  1384. // the context is nil a panic will occur. In the future the SDK may create
  1385. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1386. // for more information on using Contexts.
  1387. func (c *WorkSpaces) DescribeWorkspaceImagesWithContext(ctx aws.Context, input *DescribeWorkspaceImagesInput, opts ...request.Option) (*DescribeWorkspaceImagesOutput, error) {
  1388. req, out := c.DescribeWorkspaceImagesRequest(input)
  1389. req.SetContext(ctx)
  1390. req.ApplyOptions(opts...)
  1391. return out, req.Send()
  1392. }
  1393. const opDescribeWorkspaces = "DescribeWorkspaces"
  1394. // DescribeWorkspacesRequest generates a "aws/request.Request" representing the
  1395. // client's request for the DescribeWorkspaces operation. The "output" return
  1396. // value will be populated with the request's response once the request completes
  1397. // successfully.
  1398. //
  1399. // Use "Send" method on the returned Request to send the API call to the service.
  1400. // the "output" return value is not valid until after Send returns without error.
  1401. //
  1402. // See DescribeWorkspaces for more information on using the DescribeWorkspaces
  1403. // API call, and error handling.
  1404. //
  1405. // This method is useful when you want to inject custom logic or configuration
  1406. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1407. //
  1408. //
  1409. // // Example sending a request using the DescribeWorkspacesRequest method.
  1410. // req, resp := client.DescribeWorkspacesRequest(params)
  1411. //
  1412. // err := req.Send()
  1413. // if err == nil { // resp is now filled
  1414. // fmt.Println(resp)
  1415. // }
  1416. //
  1417. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaces
  1418. func (c *WorkSpaces) DescribeWorkspacesRequest(input *DescribeWorkspacesInput) (req *request.Request, output *DescribeWorkspacesOutput) {
  1419. op := &request.Operation{
  1420. Name: opDescribeWorkspaces,
  1421. HTTPMethod: "POST",
  1422. HTTPPath: "/",
  1423. Paginator: &request.Paginator{
  1424. InputTokens: []string{"NextToken"},
  1425. OutputTokens: []string{"NextToken"},
  1426. LimitToken: "Limit",
  1427. TruncationToken: "",
  1428. },
  1429. }
  1430. if input == nil {
  1431. input = &DescribeWorkspacesInput{}
  1432. }
  1433. output = &DescribeWorkspacesOutput{}
  1434. req = c.newRequest(op, input, output)
  1435. return
  1436. }
  1437. // DescribeWorkspaces API operation for Amazon WorkSpaces.
  1438. //
  1439. // Describes the specified WorkSpaces.
  1440. //
  1441. // You can filter the results by using the bundle identifier, directory identifier,
  1442. // or owner, but you can specify only one filter at a time.
  1443. //
  1444. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1445. // with awserr.Error's Code and Message methods to get detailed information about
  1446. // the error.
  1447. //
  1448. // See the AWS API reference guide for Amazon WorkSpaces's
  1449. // API operation DescribeWorkspaces for usage and error information.
  1450. //
  1451. // Returned Error Codes:
  1452. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  1453. // One or more parameter values are not valid.
  1454. //
  1455. // * ErrCodeResourceUnavailableException "ResourceUnavailableException"
  1456. // The specified resource is not available.
  1457. //
  1458. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaces
  1459. func (c *WorkSpaces) DescribeWorkspaces(input *DescribeWorkspacesInput) (*DescribeWorkspacesOutput, error) {
  1460. req, out := c.DescribeWorkspacesRequest(input)
  1461. return out, req.Send()
  1462. }
  1463. // DescribeWorkspacesWithContext is the same as DescribeWorkspaces with the addition of
  1464. // the ability to pass a context and additional request options.
  1465. //
  1466. // See DescribeWorkspaces for details on how to use this API operation.
  1467. //
  1468. // The context must be non-nil and will be used for request cancellation. If
  1469. // the context is nil a panic will occur. In the future the SDK may create
  1470. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1471. // for more information on using Contexts.
  1472. func (c *WorkSpaces) DescribeWorkspacesWithContext(ctx aws.Context, input *DescribeWorkspacesInput, opts ...request.Option) (*DescribeWorkspacesOutput, error) {
  1473. req, out := c.DescribeWorkspacesRequest(input)
  1474. req.SetContext(ctx)
  1475. req.ApplyOptions(opts...)
  1476. return out, req.Send()
  1477. }
  1478. // DescribeWorkspacesPages iterates over the pages of a DescribeWorkspaces operation,
  1479. // calling the "fn" function with the response data for each page. To stop
  1480. // iterating, return false from the fn function.
  1481. //
  1482. // See DescribeWorkspaces method for more information on how to use this operation.
  1483. //
  1484. // Note: This operation can generate multiple requests to a service.
  1485. //
  1486. // // Example iterating over at most 3 pages of a DescribeWorkspaces operation.
  1487. // pageNum := 0
  1488. // err := client.DescribeWorkspacesPages(params,
  1489. // func(page *DescribeWorkspacesOutput, lastPage bool) bool {
  1490. // pageNum++
  1491. // fmt.Println(page)
  1492. // return pageNum <= 3
  1493. // })
  1494. //
  1495. func (c *WorkSpaces) DescribeWorkspacesPages(input *DescribeWorkspacesInput, fn func(*DescribeWorkspacesOutput, bool) bool) error {
  1496. return c.DescribeWorkspacesPagesWithContext(aws.BackgroundContext(), input, fn)
  1497. }
  1498. // DescribeWorkspacesPagesWithContext same as DescribeWorkspacesPages except
  1499. // it takes a Context and allows setting request options on the pages.
  1500. //
  1501. // The context must be non-nil and will be used for request cancellation. If
  1502. // the context is nil a panic will occur. In the future the SDK may create
  1503. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1504. // for more information on using Contexts.
  1505. func (c *WorkSpaces) DescribeWorkspacesPagesWithContext(ctx aws.Context, input *DescribeWorkspacesInput, fn func(*DescribeWorkspacesOutput, bool) bool, opts ...request.Option) error {
  1506. p := request.Pagination{
  1507. NewRequest: func() (*request.Request, error) {
  1508. var inCpy *DescribeWorkspacesInput
  1509. if input != nil {
  1510. tmp := *input
  1511. inCpy = &tmp
  1512. }
  1513. req, _ := c.DescribeWorkspacesRequest(inCpy)
  1514. req.SetContext(ctx)
  1515. req.ApplyOptions(opts...)
  1516. return req, nil
  1517. },
  1518. }
  1519. cont := true
  1520. for p.Next() && cont {
  1521. cont = fn(p.Page().(*DescribeWorkspacesOutput), !p.HasNextPage())
  1522. }
  1523. return p.Err()
  1524. }
  1525. const opDescribeWorkspacesConnectionStatus = "DescribeWorkspacesConnectionStatus"
  1526. // DescribeWorkspacesConnectionStatusRequest generates a "aws/request.Request" representing the
  1527. // client's request for the DescribeWorkspacesConnectionStatus operation. The "output" return
  1528. // value will be populated with the request's response once the request completes
  1529. // successfully.
  1530. //
  1531. // Use "Send" method on the returned Request to send the API call to the service.
  1532. // the "output" return value is not valid until after Send returns without error.
  1533. //
  1534. // See DescribeWorkspacesConnectionStatus for more information on using the DescribeWorkspacesConnectionStatus
  1535. // API call, and error handling.
  1536. //
  1537. // This method is useful when you want to inject custom logic or configuration
  1538. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1539. //
  1540. //
  1541. // // Example sending a request using the DescribeWorkspacesConnectionStatusRequest method.
  1542. // req, resp := client.DescribeWorkspacesConnectionStatusRequest(params)
  1543. //
  1544. // err := req.Send()
  1545. // if err == nil { // resp is now filled
  1546. // fmt.Println(resp)
  1547. // }
  1548. //
  1549. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspacesConnectionStatus
  1550. func (c *WorkSpaces) DescribeWorkspacesConnectionStatusRequest(input *DescribeWorkspacesConnectionStatusInput) (req *request.Request, output *DescribeWorkspacesConnectionStatusOutput) {
  1551. op := &request.Operation{
  1552. Name: opDescribeWorkspacesConnectionStatus,
  1553. HTTPMethod: "POST",
  1554. HTTPPath: "/",
  1555. }
  1556. if input == nil {
  1557. input = &DescribeWorkspacesConnectionStatusInput{}
  1558. }
  1559. output = &DescribeWorkspacesConnectionStatusOutput{}
  1560. req = c.newRequest(op, input, output)
  1561. return
  1562. }
  1563. // DescribeWorkspacesConnectionStatus API operation for Amazon WorkSpaces.
  1564. //
  1565. // Describes the connection status of the specified WorkSpaces.
  1566. //
  1567. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1568. // with awserr.Error's Code and Message methods to get detailed information about
  1569. // the error.
  1570. //
  1571. // See the AWS API reference guide for Amazon WorkSpaces's
  1572. // API operation DescribeWorkspacesConnectionStatus for usage and error information.
  1573. //
  1574. // Returned Error Codes:
  1575. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  1576. // One or more parameter values are not valid.
  1577. //
  1578. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspacesConnectionStatus
  1579. func (c *WorkSpaces) DescribeWorkspacesConnectionStatus(input *DescribeWorkspacesConnectionStatusInput) (*DescribeWorkspacesConnectionStatusOutput, error) {
  1580. req, out := c.DescribeWorkspacesConnectionStatusRequest(input)
  1581. return out, req.Send()
  1582. }
  1583. // DescribeWorkspacesConnectionStatusWithContext is the same as DescribeWorkspacesConnectionStatus with the addition of
  1584. // the ability to pass a context and additional request options.
  1585. //
  1586. // See DescribeWorkspacesConnectionStatus for details on how to use this API operation.
  1587. //
  1588. // The context must be non-nil and will be used for request cancellation. If
  1589. // the context is nil a panic will occur. In the future the SDK may create
  1590. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1591. // for more information on using Contexts.
  1592. func (c *WorkSpaces) DescribeWorkspacesConnectionStatusWithContext(ctx aws.Context, input *DescribeWorkspacesConnectionStatusInput, opts ...request.Option) (*DescribeWorkspacesConnectionStatusOutput, error) {
  1593. req, out := c.DescribeWorkspacesConnectionStatusRequest(input)
  1594. req.SetContext(ctx)
  1595. req.ApplyOptions(opts...)
  1596. return out, req.Send()
  1597. }
  1598. const opDisassociateIpGroups = "DisassociateIpGroups"
  1599. // DisassociateIpGroupsRequest generates a "aws/request.Request" representing the
  1600. // client's request for the DisassociateIpGroups operation. The "output" return
  1601. // value will be populated with the request's response once the request completes
  1602. // successfully.
  1603. //
  1604. // Use "Send" method on the returned Request to send the API call to the service.
  1605. // the "output" return value is not valid until after Send returns without error.
  1606. //
  1607. // See DisassociateIpGroups for more information on using the DisassociateIpGroups
  1608. // API call, and error handling.
  1609. //
  1610. // This method is useful when you want to inject custom logic or configuration
  1611. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1612. //
  1613. //
  1614. // // Example sending a request using the DisassociateIpGroupsRequest method.
  1615. // req, resp := client.DisassociateIpGroupsRequest(params)
  1616. //
  1617. // err := req.Send()
  1618. // if err == nil { // resp is now filled
  1619. // fmt.Println(resp)
  1620. // }
  1621. //
  1622. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DisassociateIpGroups
  1623. func (c *WorkSpaces) DisassociateIpGroupsRequest(input *DisassociateIpGroupsInput) (req *request.Request, output *DisassociateIpGroupsOutput) {
  1624. op := &request.Operation{
  1625. Name: opDisassociateIpGroups,
  1626. HTTPMethod: "POST",
  1627. HTTPPath: "/",
  1628. }
  1629. if input == nil {
  1630. input = &DisassociateIpGroupsInput{}
  1631. }
  1632. output = &DisassociateIpGroupsOutput{}
  1633. req = c.newRequest(op, input, output)
  1634. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1635. return
  1636. }
  1637. // DisassociateIpGroups API operation for Amazon WorkSpaces.
  1638. //
  1639. // Disassociates the specified IP access control group from the specified directory.
  1640. //
  1641. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1642. // with awserr.Error's Code and Message methods to get detailed information about
  1643. // the error.
  1644. //
  1645. // See the AWS API reference guide for Amazon WorkSpaces's
  1646. // API operation DisassociateIpGroups for usage and error information.
  1647. //
  1648. // Returned Error Codes:
  1649. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  1650. // One or more parameter values are not valid.
  1651. //
  1652. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1653. // The resource could not be found.
  1654. //
  1655. // * ErrCodeInvalidResourceStateException "InvalidResourceStateException"
  1656. // The state of the resource is not valid for this operation.
  1657. //
  1658. // * ErrCodeAccessDeniedException "AccessDeniedException"
  1659. // The user is not authorized to access a resource.
  1660. //
  1661. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DisassociateIpGroups
  1662. func (c *WorkSpaces) DisassociateIpGroups(input *DisassociateIpGroupsInput) (*DisassociateIpGroupsOutput, error) {
  1663. req, out := c.DisassociateIpGroupsRequest(input)
  1664. return out, req.Send()
  1665. }
  1666. // DisassociateIpGroupsWithContext is the same as DisassociateIpGroups with the addition of
  1667. // the ability to pass a context and additional request options.
  1668. //
  1669. // See DisassociateIpGroups for details on how to use this API operation.
  1670. //
  1671. // The context must be non-nil and will be used for request cancellation. If
  1672. // the context is nil a panic will occur. In the future the SDK may create
  1673. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1674. // for more information on using Contexts.
  1675. func (c *WorkSpaces) DisassociateIpGroupsWithContext(ctx aws.Context, input *DisassociateIpGroupsInput, opts ...request.Option) (*DisassociateIpGroupsOutput, error) {
  1676. req, out := c.DisassociateIpGroupsRequest(input)
  1677. req.SetContext(ctx)
  1678. req.ApplyOptions(opts...)
  1679. return out, req.Send()
  1680. }
  1681. const opImportWorkspaceImage = "ImportWorkspaceImage"
  1682. // ImportWorkspaceImageRequest generates a "aws/request.Request" representing the
  1683. // client's request for the ImportWorkspaceImage operation. The "output" return
  1684. // value will be populated with the request's response once the request completes
  1685. // successfully.
  1686. //
  1687. // Use "Send" method on the returned Request to send the API call to the service.
  1688. // the "output" return value is not valid until after Send returns without error.
  1689. //
  1690. // See ImportWorkspaceImage for more information on using the ImportWorkspaceImage
  1691. // API call, and error handling.
  1692. //
  1693. // This method is useful when you want to inject custom logic or configuration
  1694. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1695. //
  1696. //
  1697. // // Example sending a request using the ImportWorkspaceImageRequest method.
  1698. // req, resp := client.ImportWorkspaceImageRequest(params)
  1699. //
  1700. // err := req.Send()
  1701. // if err == nil { // resp is now filled
  1702. // fmt.Println(resp)
  1703. // }
  1704. //
  1705. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ImportWorkspaceImage
  1706. func (c *WorkSpaces) ImportWorkspaceImageRequest(input *ImportWorkspaceImageInput) (req *request.Request, output *ImportWorkspaceImageOutput) {
  1707. op := &request.Operation{
  1708. Name: opImportWorkspaceImage,
  1709. HTTPMethod: "POST",
  1710. HTTPPath: "/",
  1711. }
  1712. if input == nil {
  1713. input = &ImportWorkspaceImageInput{}
  1714. }
  1715. output = &ImportWorkspaceImageOutput{}
  1716. req = c.newRequest(op, input, output)
  1717. return
  1718. }
  1719. // ImportWorkspaceImage API operation for Amazon WorkSpaces.
  1720. //
  1721. // Imports the specified Windows 7 or Windows 10 bring your own license (BYOL)
  1722. // image into Amazon WorkSpaces. The image must be an already licensed EC2 image
  1723. // that is in your AWS account, and you must own the image.
  1724. //
  1725. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1726. // with awserr.Error's Code and Message methods to get detailed information about
  1727. // the error.
  1728. //
  1729. // See the AWS API reference guide for Amazon WorkSpaces's
  1730. // API operation ImportWorkspaceImage for usage and error information.
  1731. //
  1732. // Returned Error Codes:
  1733. // * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
  1734. // Your resource limits have been exceeded.
  1735. //
  1736. // * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
  1737. // The specified resource already exists.
  1738. //
  1739. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1740. // The resource could not be found.
  1741. //
  1742. // * ErrCodeOperationNotSupportedException "OperationNotSupportedException"
  1743. // This operation is not supported.
  1744. //
  1745. // * ErrCodeAccessDeniedException "AccessDeniedException"
  1746. // The user is not authorized to access a resource.
  1747. //
  1748. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ImportWorkspaceImage
  1749. func (c *WorkSpaces) ImportWorkspaceImage(input *ImportWorkspaceImageInput) (*ImportWorkspaceImageOutput, error) {
  1750. req, out := c.ImportWorkspaceImageRequest(input)
  1751. return out, req.Send()
  1752. }
  1753. // ImportWorkspaceImageWithContext is the same as ImportWorkspaceImage with the addition of
  1754. // the ability to pass a context and additional request options.
  1755. //
  1756. // See ImportWorkspaceImage for details on how to use this API operation.
  1757. //
  1758. // The context must be non-nil and will be used for request cancellation. If
  1759. // the context is nil a panic will occur. In the future the SDK may create
  1760. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1761. // for more information on using Contexts.
  1762. func (c *WorkSpaces) ImportWorkspaceImageWithContext(ctx aws.Context, input *ImportWorkspaceImageInput, opts ...request.Option) (*ImportWorkspaceImageOutput, error) {
  1763. req, out := c.ImportWorkspaceImageRequest(input)
  1764. req.SetContext(ctx)
  1765. req.ApplyOptions(opts...)
  1766. return out, req.Send()
  1767. }
  1768. const opListAvailableManagementCidrRanges = "ListAvailableManagementCidrRanges"
  1769. // ListAvailableManagementCidrRangesRequest generates a "aws/request.Request" representing the
  1770. // client's request for the ListAvailableManagementCidrRanges operation. The "output" return
  1771. // value will be populated with the request's response once the request completes
  1772. // successfully.
  1773. //
  1774. // Use "Send" method on the returned Request to send the API call to the service.
  1775. // the "output" return value is not valid until after Send returns without error.
  1776. //
  1777. // See ListAvailableManagementCidrRanges for more information on using the ListAvailableManagementCidrRanges
  1778. // API call, and error handling.
  1779. //
  1780. // This method is useful when you want to inject custom logic or configuration
  1781. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1782. //
  1783. //
  1784. // // Example sending a request using the ListAvailableManagementCidrRangesRequest method.
  1785. // req, resp := client.ListAvailableManagementCidrRangesRequest(params)
  1786. //
  1787. // err := req.Send()
  1788. // if err == nil { // resp is now filled
  1789. // fmt.Println(resp)
  1790. // }
  1791. //
  1792. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ListAvailableManagementCidrRanges
  1793. func (c *WorkSpaces) ListAvailableManagementCidrRangesRequest(input *ListAvailableManagementCidrRangesInput) (req *request.Request, output *ListAvailableManagementCidrRangesOutput) {
  1794. op := &request.Operation{
  1795. Name: opListAvailableManagementCidrRanges,
  1796. HTTPMethod: "POST",
  1797. HTTPPath: "/",
  1798. }
  1799. if input == nil {
  1800. input = &ListAvailableManagementCidrRangesInput{}
  1801. }
  1802. output = &ListAvailableManagementCidrRangesOutput{}
  1803. req = c.newRequest(op, input, output)
  1804. return
  1805. }
  1806. // ListAvailableManagementCidrRanges API operation for Amazon WorkSpaces.
  1807. //
  1808. // Retrieves a list of IP address ranges, specified as IPv4 CIDR blocks, that
  1809. // you can use for the network management interface when you enable bring your
  1810. // own license (BYOL).
  1811. //
  1812. // The management network interface is connected to a secure Amazon WorkSpaces
  1813. // management network. It is used for interactive streaming of the WorkSpace
  1814. // desktop to Amazon WorkSpaces clients, and to allow Amazon WorkSpaces to manage
  1815. // the WorkSpace.
  1816. //
  1817. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1818. // with awserr.Error's Code and Message methods to get detailed information about
  1819. // the error.
  1820. //
  1821. // See the AWS API reference guide for Amazon WorkSpaces's
  1822. // API operation ListAvailableManagementCidrRanges for usage and error information.
  1823. //
  1824. // Returned Error Codes:
  1825. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  1826. // One or more parameter values are not valid.
  1827. //
  1828. // * ErrCodeAccessDeniedException "AccessDeniedException"
  1829. // The user is not authorized to access a resource.
  1830. //
  1831. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ListAvailableManagementCidrRanges
  1832. func (c *WorkSpaces) ListAvailableManagementCidrRanges(input *ListAvailableManagementCidrRangesInput) (*ListAvailableManagementCidrRangesOutput, error) {
  1833. req, out := c.ListAvailableManagementCidrRangesRequest(input)
  1834. return out, req.Send()
  1835. }
  1836. // ListAvailableManagementCidrRangesWithContext is the same as ListAvailableManagementCidrRanges with the addition of
  1837. // the ability to pass a context and additional request options.
  1838. //
  1839. // See ListAvailableManagementCidrRanges for details on how to use this API operation.
  1840. //
  1841. // The context must be non-nil and will be used for request cancellation. If
  1842. // the context is nil a panic will occur. In the future the SDK may create
  1843. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1844. // for more information on using Contexts.
  1845. func (c *WorkSpaces) ListAvailableManagementCidrRangesWithContext(ctx aws.Context, input *ListAvailableManagementCidrRangesInput, opts ...request.Option) (*ListAvailableManagementCidrRangesOutput, error) {
  1846. req, out := c.ListAvailableManagementCidrRangesRequest(input)
  1847. req.SetContext(ctx)
  1848. req.ApplyOptions(opts...)
  1849. return out, req.Send()
  1850. }
  1851. const opModifyAccount = "ModifyAccount"
  1852. // ModifyAccountRequest generates a "aws/request.Request" representing the
  1853. // client's request for the ModifyAccount operation. The "output" return
  1854. // value will be populated with the request's response once the request completes
  1855. // successfully.
  1856. //
  1857. // Use "Send" method on the returned Request to send the API call to the service.
  1858. // the "output" return value is not valid until after Send returns without error.
  1859. //
  1860. // See ModifyAccount for more information on using the ModifyAccount
  1861. // API call, and error handling.
  1862. //
  1863. // This method is useful when you want to inject custom logic or configuration
  1864. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1865. //
  1866. //
  1867. // // Example sending a request using the ModifyAccountRequest method.
  1868. // req, resp := client.ModifyAccountRequest(params)
  1869. //
  1870. // err := req.Send()
  1871. // if err == nil { // resp is now filled
  1872. // fmt.Println(resp)
  1873. // }
  1874. //
  1875. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyAccount
  1876. func (c *WorkSpaces) ModifyAccountRequest(input *ModifyAccountInput) (req *request.Request, output *ModifyAccountOutput) {
  1877. op := &request.Operation{
  1878. Name: opModifyAccount,
  1879. HTTPMethod: "POST",
  1880. HTTPPath: "/",
  1881. }
  1882. if input == nil {
  1883. input = &ModifyAccountInput{}
  1884. }
  1885. output = &ModifyAccountOutput{}
  1886. req = c.newRequest(op, input, output)
  1887. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1888. return
  1889. }
  1890. // ModifyAccount API operation for Amazon WorkSpaces.
  1891. //
  1892. // Modifies the configuration of bring your own license (BYOL) for the specified
  1893. // account.
  1894. //
  1895. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1896. // with awserr.Error's Code and Message methods to get detailed information about
  1897. // the error.
  1898. //
  1899. // See the AWS API reference guide for Amazon WorkSpaces's
  1900. // API operation ModifyAccount for usage and error information.
  1901. //
  1902. // Returned Error Codes:
  1903. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  1904. // One or more parameter values are not valid.
  1905. //
  1906. // * ErrCodeAccessDeniedException "AccessDeniedException"
  1907. // The user is not authorized to access a resource.
  1908. //
  1909. // * ErrCodeInvalidResourceStateException "InvalidResourceStateException"
  1910. // The state of the resource is not valid for this operation.
  1911. //
  1912. // * ErrCodeResourceUnavailableException "ResourceUnavailableException"
  1913. // The specified resource is not available.
  1914. //
  1915. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1916. // The resource could not be found.
  1917. //
  1918. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyAccount
  1919. func (c *WorkSpaces) ModifyAccount(input *ModifyAccountInput) (*ModifyAccountOutput, error) {
  1920. req, out := c.ModifyAccountRequest(input)
  1921. return out, req.Send()
  1922. }
  1923. // ModifyAccountWithContext is the same as ModifyAccount with the addition of
  1924. // the ability to pass a context and additional request options.
  1925. //
  1926. // See ModifyAccount for details on how to use this API operation.
  1927. //
  1928. // The context must be non-nil and will be used for request cancellation. If
  1929. // the context is nil a panic will occur. In the future the SDK may create
  1930. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1931. // for more information on using Contexts.
  1932. func (c *WorkSpaces) ModifyAccountWithContext(ctx aws.Context, input *ModifyAccountInput, opts ...request.Option) (*ModifyAccountOutput, error) {
  1933. req, out := c.ModifyAccountRequest(input)
  1934. req.SetContext(ctx)
  1935. req.ApplyOptions(opts...)
  1936. return out, req.Send()
  1937. }
  1938. const opModifyClientProperties = "ModifyClientProperties"
  1939. // ModifyClientPropertiesRequest generates a "aws/request.Request" representing the
  1940. // client's request for the ModifyClientProperties operation. The "output" return
  1941. // value will be populated with the request's response once the request completes
  1942. // successfully.
  1943. //
  1944. // Use "Send" method on the returned Request to send the API call to the service.
  1945. // the "output" return value is not valid until after Send returns without error.
  1946. //
  1947. // See ModifyClientProperties for more information on using the ModifyClientProperties
  1948. // API call, and error handling.
  1949. //
  1950. // This method is useful when you want to inject custom logic or configuration
  1951. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1952. //
  1953. //
  1954. // // Example sending a request using the ModifyClientPropertiesRequest method.
  1955. // req, resp := client.ModifyClientPropertiesRequest(params)
  1956. //
  1957. // err := req.Send()
  1958. // if err == nil { // resp is now filled
  1959. // fmt.Println(resp)
  1960. // }
  1961. //
  1962. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyClientProperties
  1963. func (c *WorkSpaces) ModifyClientPropertiesRequest(input *ModifyClientPropertiesInput) (req *request.Request, output *ModifyClientPropertiesOutput) {
  1964. op := &request.Operation{
  1965. Name: opModifyClientProperties,
  1966. HTTPMethod: "POST",
  1967. HTTPPath: "/",
  1968. }
  1969. if input == nil {
  1970. input = &ModifyClientPropertiesInput{}
  1971. }
  1972. output = &ModifyClientPropertiesOutput{}
  1973. req = c.newRequest(op, input, output)
  1974. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1975. return
  1976. }
  1977. // ModifyClientProperties API operation for Amazon WorkSpaces.
  1978. //
  1979. // Modifies the properties of the specified Amazon WorkSpaces client.
  1980. //
  1981. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1982. // with awserr.Error's Code and Message methods to get detailed information about
  1983. // the error.
  1984. //
  1985. // See the AWS API reference guide for Amazon WorkSpaces's
  1986. // API operation ModifyClientProperties for usage and error information.
  1987. //
  1988. // Returned Error Codes:
  1989. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  1990. // One or more parameter values are not valid.
  1991. //
  1992. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1993. // The resource could not be found.
  1994. //
  1995. // * ErrCodeAccessDeniedException "AccessDeniedException"
  1996. // The user is not authorized to access a resource.
  1997. //
  1998. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyClientProperties
  1999. func (c *WorkSpaces) ModifyClientProperties(input *ModifyClientPropertiesInput) (*ModifyClientPropertiesOutput, error) {
  2000. req, out := c.ModifyClientPropertiesRequest(input)
  2001. return out, req.Send()
  2002. }
  2003. // ModifyClientPropertiesWithContext is the same as ModifyClientProperties with the addition of
  2004. // the ability to pass a context and additional request options.
  2005. //
  2006. // See ModifyClientProperties for details on how to use this API operation.
  2007. //
  2008. // The context must be non-nil and will be used for request cancellation. If
  2009. // the context is nil a panic will occur. In the future the SDK may create
  2010. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2011. // for more information on using Contexts.
  2012. func (c *WorkSpaces) ModifyClientPropertiesWithContext(ctx aws.Context, input *ModifyClientPropertiesInput, opts ...request.Option) (*ModifyClientPropertiesOutput, error) {
  2013. req, out := c.ModifyClientPropertiesRequest(input)
  2014. req.SetContext(ctx)
  2015. req.ApplyOptions(opts...)
  2016. return out, req.Send()
  2017. }
  2018. const opModifyWorkspaceProperties = "ModifyWorkspaceProperties"
  2019. // ModifyWorkspacePropertiesRequest generates a "aws/request.Request" representing the
  2020. // client's request for the ModifyWorkspaceProperties operation. The "output" return
  2021. // value will be populated with the request's response once the request completes
  2022. // successfully.
  2023. //
  2024. // Use "Send" method on the returned Request to send the API call to the service.
  2025. // the "output" return value is not valid until after Send returns without error.
  2026. //
  2027. // See ModifyWorkspaceProperties for more information on using the ModifyWorkspaceProperties
  2028. // API call, and error handling.
  2029. //
  2030. // This method is useful when you want to inject custom logic or configuration
  2031. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2032. //
  2033. //
  2034. // // Example sending a request using the ModifyWorkspacePropertiesRequest method.
  2035. // req, resp := client.ModifyWorkspacePropertiesRequest(params)
  2036. //
  2037. // err := req.Send()
  2038. // if err == nil { // resp is now filled
  2039. // fmt.Println(resp)
  2040. // }
  2041. //
  2042. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceProperties
  2043. func (c *WorkSpaces) ModifyWorkspacePropertiesRequest(input *ModifyWorkspacePropertiesInput) (req *request.Request, output *ModifyWorkspacePropertiesOutput) {
  2044. op := &request.Operation{
  2045. Name: opModifyWorkspaceProperties,
  2046. HTTPMethod: "POST",
  2047. HTTPPath: "/",
  2048. }
  2049. if input == nil {
  2050. input = &ModifyWorkspacePropertiesInput{}
  2051. }
  2052. output = &ModifyWorkspacePropertiesOutput{}
  2053. req = c.newRequest(op, input, output)
  2054. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2055. return
  2056. }
  2057. // ModifyWorkspaceProperties API operation for Amazon WorkSpaces.
  2058. //
  2059. // Modifies the specified WorkSpace properties.
  2060. //
  2061. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2062. // with awserr.Error's Code and Message methods to get detailed information about
  2063. // the error.
  2064. //
  2065. // See the AWS API reference guide for Amazon WorkSpaces's
  2066. // API operation ModifyWorkspaceProperties for usage and error information.
  2067. //
  2068. // Returned Error Codes:
  2069. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  2070. // One or more parameter values are not valid.
  2071. //
  2072. // * ErrCodeInvalidResourceStateException "InvalidResourceStateException"
  2073. // The state of the resource is not valid for this operation.
  2074. //
  2075. // * ErrCodeOperationInProgressException "OperationInProgressException"
  2076. // The properties of this WorkSpace are currently being modified. Try again
  2077. // in a moment.
  2078. //
  2079. // * ErrCodeUnsupportedWorkspaceConfigurationException "UnsupportedWorkspaceConfigurationException"
  2080. // The configuration of this WorkSpace is not supported for this operation.
  2081. // For more information, see the Amazon WorkSpaces Administration Guide (http://docs.aws.amazon.com/workspaces/latest/adminguide/).
  2082. //
  2083. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2084. // The resource could not be found.
  2085. //
  2086. // * ErrCodeAccessDeniedException "AccessDeniedException"
  2087. // The user is not authorized to access a resource.
  2088. //
  2089. // * ErrCodeResourceUnavailableException "ResourceUnavailableException"
  2090. // The specified resource is not available.
  2091. //
  2092. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceProperties
  2093. func (c *WorkSpaces) ModifyWorkspaceProperties(input *ModifyWorkspacePropertiesInput) (*ModifyWorkspacePropertiesOutput, error) {
  2094. req, out := c.ModifyWorkspacePropertiesRequest(input)
  2095. return out, req.Send()
  2096. }
  2097. // ModifyWorkspacePropertiesWithContext is the same as ModifyWorkspaceProperties with the addition of
  2098. // the ability to pass a context and additional request options.
  2099. //
  2100. // See ModifyWorkspaceProperties for details on how to use this API operation.
  2101. //
  2102. // The context must be non-nil and will be used for request cancellation. If
  2103. // the context is nil a panic will occur. In the future the SDK may create
  2104. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2105. // for more information on using Contexts.
  2106. func (c *WorkSpaces) ModifyWorkspacePropertiesWithContext(ctx aws.Context, input *ModifyWorkspacePropertiesInput, opts ...request.Option) (*ModifyWorkspacePropertiesOutput, error) {
  2107. req, out := c.ModifyWorkspacePropertiesRequest(input)
  2108. req.SetContext(ctx)
  2109. req.ApplyOptions(opts...)
  2110. return out, req.Send()
  2111. }
  2112. const opModifyWorkspaceState = "ModifyWorkspaceState"
  2113. // ModifyWorkspaceStateRequest generates a "aws/request.Request" representing the
  2114. // client's request for the ModifyWorkspaceState operation. The "output" return
  2115. // value will be populated with the request's response once the request completes
  2116. // successfully.
  2117. //
  2118. // Use "Send" method on the returned Request to send the API call to the service.
  2119. // the "output" return value is not valid until after Send returns without error.
  2120. //
  2121. // See ModifyWorkspaceState for more information on using the ModifyWorkspaceState
  2122. // API call, and error handling.
  2123. //
  2124. // This method is useful when you want to inject custom logic or configuration
  2125. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2126. //
  2127. //
  2128. // // Example sending a request using the ModifyWorkspaceStateRequest method.
  2129. // req, resp := client.ModifyWorkspaceStateRequest(params)
  2130. //
  2131. // err := req.Send()
  2132. // if err == nil { // resp is now filled
  2133. // fmt.Println(resp)
  2134. // }
  2135. //
  2136. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceState
  2137. func (c *WorkSpaces) ModifyWorkspaceStateRequest(input *ModifyWorkspaceStateInput) (req *request.Request, output *ModifyWorkspaceStateOutput) {
  2138. op := &request.Operation{
  2139. Name: opModifyWorkspaceState,
  2140. HTTPMethod: "POST",
  2141. HTTPPath: "/",
  2142. }
  2143. if input == nil {
  2144. input = &ModifyWorkspaceStateInput{}
  2145. }
  2146. output = &ModifyWorkspaceStateOutput{}
  2147. req = c.newRequest(op, input, output)
  2148. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2149. return
  2150. }
  2151. // ModifyWorkspaceState API operation for Amazon WorkSpaces.
  2152. //
  2153. // Sets the state of the specified WorkSpace.
  2154. //
  2155. // To maintain a WorkSpace without being interrupted, set the WorkSpace state
  2156. // to ADMIN_MAINTENANCE. WorkSpaces in this state do not respond to requests
  2157. // to reboot, stop, start, or rebuild. An AutoStop WorkSpace in this state is
  2158. // not stopped. Users can log into a WorkSpace in the ADMIN_MAINTENANCE state.
  2159. //
  2160. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2161. // with awserr.Error's Code and Message methods to get detailed information about
  2162. // the error.
  2163. //
  2164. // See the AWS API reference guide for Amazon WorkSpaces's
  2165. // API operation ModifyWorkspaceState for usage and error information.
  2166. //
  2167. // Returned Error Codes:
  2168. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  2169. // One or more parameter values are not valid.
  2170. //
  2171. // * ErrCodeInvalidResourceStateException "InvalidResourceStateException"
  2172. // The state of the resource is not valid for this operation.
  2173. //
  2174. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2175. // The resource could not be found.
  2176. //
  2177. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceState
  2178. func (c *WorkSpaces) ModifyWorkspaceState(input *ModifyWorkspaceStateInput) (*ModifyWorkspaceStateOutput, error) {
  2179. req, out := c.ModifyWorkspaceStateRequest(input)
  2180. return out, req.Send()
  2181. }
  2182. // ModifyWorkspaceStateWithContext is the same as ModifyWorkspaceState with the addition of
  2183. // the ability to pass a context and additional request options.
  2184. //
  2185. // See ModifyWorkspaceState for details on how to use this API operation.
  2186. //
  2187. // The context must be non-nil and will be used for request cancellation. If
  2188. // the context is nil a panic will occur. In the future the SDK may create
  2189. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2190. // for more information on using Contexts.
  2191. func (c *WorkSpaces) ModifyWorkspaceStateWithContext(ctx aws.Context, input *ModifyWorkspaceStateInput, opts ...request.Option) (*ModifyWorkspaceStateOutput, error) {
  2192. req, out := c.ModifyWorkspaceStateRequest(input)
  2193. req.SetContext(ctx)
  2194. req.ApplyOptions(opts...)
  2195. return out, req.Send()
  2196. }
  2197. const opRebootWorkspaces = "RebootWorkspaces"
  2198. // RebootWorkspacesRequest generates a "aws/request.Request" representing the
  2199. // client's request for the RebootWorkspaces operation. The "output" return
  2200. // value will be populated with the request's response once the request completes
  2201. // successfully.
  2202. //
  2203. // Use "Send" method on the returned Request to send the API call to the service.
  2204. // the "output" return value is not valid until after Send returns without error.
  2205. //
  2206. // See RebootWorkspaces for more information on using the RebootWorkspaces
  2207. // API call, and error handling.
  2208. //
  2209. // This method is useful when you want to inject custom logic or configuration
  2210. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2211. //
  2212. //
  2213. // // Example sending a request using the RebootWorkspacesRequest method.
  2214. // req, resp := client.RebootWorkspacesRequest(params)
  2215. //
  2216. // err := req.Send()
  2217. // if err == nil { // resp is now filled
  2218. // fmt.Println(resp)
  2219. // }
  2220. //
  2221. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RebootWorkspaces
  2222. func (c *WorkSpaces) RebootWorkspacesRequest(input *RebootWorkspacesInput) (req *request.Request, output *RebootWorkspacesOutput) {
  2223. op := &request.Operation{
  2224. Name: opRebootWorkspaces,
  2225. HTTPMethod: "POST",
  2226. HTTPPath: "/",
  2227. }
  2228. if input == nil {
  2229. input = &RebootWorkspacesInput{}
  2230. }
  2231. output = &RebootWorkspacesOutput{}
  2232. req = c.newRequest(op, input, output)
  2233. return
  2234. }
  2235. // RebootWorkspaces API operation for Amazon WorkSpaces.
  2236. //
  2237. // Reboots the specified WorkSpaces.
  2238. //
  2239. // You cannot reboot a WorkSpace unless its state is AVAILABLE or UNHEALTHY.
  2240. //
  2241. // This operation is asynchronous and returns before the WorkSpaces have rebooted.
  2242. //
  2243. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2244. // with awserr.Error's Code and Message methods to get detailed information about
  2245. // the error.
  2246. //
  2247. // See the AWS API reference guide for Amazon WorkSpaces's
  2248. // API operation RebootWorkspaces for usage and error information.
  2249. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RebootWorkspaces
  2250. func (c *WorkSpaces) RebootWorkspaces(input *RebootWorkspacesInput) (*RebootWorkspacesOutput, error) {
  2251. req, out := c.RebootWorkspacesRequest(input)
  2252. return out, req.Send()
  2253. }
  2254. // RebootWorkspacesWithContext is the same as RebootWorkspaces with the addition of
  2255. // the ability to pass a context and additional request options.
  2256. //
  2257. // See RebootWorkspaces for details on how to use this API operation.
  2258. //
  2259. // The context must be non-nil and will be used for request cancellation. If
  2260. // the context is nil a panic will occur. In the future the SDK may create
  2261. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2262. // for more information on using Contexts.
  2263. func (c *WorkSpaces) RebootWorkspacesWithContext(ctx aws.Context, input *RebootWorkspacesInput, opts ...request.Option) (*RebootWorkspacesOutput, error) {
  2264. req, out := c.RebootWorkspacesRequest(input)
  2265. req.SetContext(ctx)
  2266. req.ApplyOptions(opts...)
  2267. return out, req.Send()
  2268. }
  2269. const opRebuildWorkspaces = "RebuildWorkspaces"
  2270. // RebuildWorkspacesRequest generates a "aws/request.Request" representing the
  2271. // client's request for the RebuildWorkspaces operation. The "output" return
  2272. // value will be populated with the request's response once the request completes
  2273. // successfully.
  2274. //
  2275. // Use "Send" method on the returned Request to send the API call to the service.
  2276. // the "output" return value is not valid until after Send returns without error.
  2277. //
  2278. // See RebuildWorkspaces for more information on using the RebuildWorkspaces
  2279. // API call, and error handling.
  2280. //
  2281. // This method is useful when you want to inject custom logic or configuration
  2282. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2283. //
  2284. //
  2285. // // Example sending a request using the RebuildWorkspacesRequest method.
  2286. // req, resp := client.RebuildWorkspacesRequest(params)
  2287. //
  2288. // err := req.Send()
  2289. // if err == nil { // resp is now filled
  2290. // fmt.Println(resp)
  2291. // }
  2292. //
  2293. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RebuildWorkspaces
  2294. func (c *WorkSpaces) RebuildWorkspacesRequest(input *RebuildWorkspacesInput) (req *request.Request, output *RebuildWorkspacesOutput) {
  2295. op := &request.Operation{
  2296. Name: opRebuildWorkspaces,
  2297. HTTPMethod: "POST",
  2298. HTTPPath: "/",
  2299. }
  2300. if input == nil {
  2301. input = &RebuildWorkspacesInput{}
  2302. }
  2303. output = &RebuildWorkspacesOutput{}
  2304. req = c.newRequest(op, input, output)
  2305. return
  2306. }
  2307. // RebuildWorkspaces API operation for Amazon WorkSpaces.
  2308. //
  2309. // Rebuilds the specified WorkSpace.
  2310. //
  2311. // You cannot rebuild a WorkSpace unless its state is AVAILABLE, ERROR, or UNHEALTHY.
  2312. //
  2313. // Rebuilding a WorkSpace is a potentially destructive action that can result
  2314. // in the loss of data. For more information, see Rebuild a WorkSpace (http://docs.aws.amazon.com/workspaces/latest/adminguide/reset-workspace.html).
  2315. //
  2316. // This operation is asynchronous and returns before the WorkSpaces have been
  2317. // completely rebuilt.
  2318. //
  2319. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2320. // with awserr.Error's Code and Message methods to get detailed information about
  2321. // the error.
  2322. //
  2323. // See the AWS API reference guide for Amazon WorkSpaces's
  2324. // API operation RebuildWorkspaces for usage and error information.
  2325. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RebuildWorkspaces
  2326. func (c *WorkSpaces) RebuildWorkspaces(input *RebuildWorkspacesInput) (*RebuildWorkspacesOutput, error) {
  2327. req, out := c.RebuildWorkspacesRequest(input)
  2328. return out, req.Send()
  2329. }
  2330. // RebuildWorkspacesWithContext is the same as RebuildWorkspaces with the addition of
  2331. // the ability to pass a context and additional request options.
  2332. //
  2333. // See RebuildWorkspaces for details on how to use this API operation.
  2334. //
  2335. // The context must be non-nil and will be used for request cancellation. If
  2336. // the context is nil a panic will occur. In the future the SDK may create
  2337. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2338. // for more information on using Contexts.
  2339. func (c *WorkSpaces) RebuildWorkspacesWithContext(ctx aws.Context, input *RebuildWorkspacesInput, opts ...request.Option) (*RebuildWorkspacesOutput, error) {
  2340. req, out := c.RebuildWorkspacesRequest(input)
  2341. req.SetContext(ctx)
  2342. req.ApplyOptions(opts...)
  2343. return out, req.Send()
  2344. }
  2345. const opRevokeIpRules = "RevokeIpRules"
  2346. // RevokeIpRulesRequest generates a "aws/request.Request" representing the
  2347. // client's request for the RevokeIpRules operation. The "output" return
  2348. // value will be populated with the request's response once the request completes
  2349. // successfully.
  2350. //
  2351. // Use "Send" method on the returned Request to send the API call to the service.
  2352. // the "output" return value is not valid until after Send returns without error.
  2353. //
  2354. // See RevokeIpRules for more information on using the RevokeIpRules
  2355. // API call, and error handling.
  2356. //
  2357. // This method is useful when you want to inject custom logic or configuration
  2358. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2359. //
  2360. //
  2361. // // Example sending a request using the RevokeIpRulesRequest method.
  2362. // req, resp := client.RevokeIpRulesRequest(params)
  2363. //
  2364. // err := req.Send()
  2365. // if err == nil { // resp is now filled
  2366. // fmt.Println(resp)
  2367. // }
  2368. //
  2369. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RevokeIpRules
  2370. func (c *WorkSpaces) RevokeIpRulesRequest(input *RevokeIpRulesInput) (req *request.Request, output *RevokeIpRulesOutput) {
  2371. op := &request.Operation{
  2372. Name: opRevokeIpRules,
  2373. HTTPMethod: "POST",
  2374. HTTPPath: "/",
  2375. }
  2376. if input == nil {
  2377. input = &RevokeIpRulesInput{}
  2378. }
  2379. output = &RevokeIpRulesOutput{}
  2380. req = c.newRequest(op, input, output)
  2381. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2382. return
  2383. }
  2384. // RevokeIpRules API operation for Amazon WorkSpaces.
  2385. //
  2386. // Removes one or more rules from the specified IP access control group.
  2387. //
  2388. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2389. // with awserr.Error's Code and Message methods to get detailed information about
  2390. // the error.
  2391. //
  2392. // See the AWS API reference guide for Amazon WorkSpaces's
  2393. // API operation RevokeIpRules for usage and error information.
  2394. //
  2395. // Returned Error Codes:
  2396. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  2397. // One or more parameter values are not valid.
  2398. //
  2399. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2400. // The resource could not be found.
  2401. //
  2402. // * ErrCodeInvalidResourceStateException "InvalidResourceStateException"
  2403. // The state of the resource is not valid for this operation.
  2404. //
  2405. // * ErrCodeAccessDeniedException "AccessDeniedException"
  2406. // The user is not authorized to access a resource.
  2407. //
  2408. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RevokeIpRules
  2409. func (c *WorkSpaces) RevokeIpRules(input *RevokeIpRulesInput) (*RevokeIpRulesOutput, error) {
  2410. req, out := c.RevokeIpRulesRequest(input)
  2411. return out, req.Send()
  2412. }
  2413. // RevokeIpRulesWithContext is the same as RevokeIpRules with the addition of
  2414. // the ability to pass a context and additional request options.
  2415. //
  2416. // See RevokeIpRules for details on how to use this API operation.
  2417. //
  2418. // The context must be non-nil and will be used for request cancellation. If
  2419. // the context is nil a panic will occur. In the future the SDK may create
  2420. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2421. // for more information on using Contexts.
  2422. func (c *WorkSpaces) RevokeIpRulesWithContext(ctx aws.Context, input *RevokeIpRulesInput, opts ...request.Option) (*RevokeIpRulesOutput, error) {
  2423. req, out := c.RevokeIpRulesRequest(input)
  2424. req.SetContext(ctx)
  2425. req.ApplyOptions(opts...)
  2426. return out, req.Send()
  2427. }
  2428. const opStartWorkspaces = "StartWorkspaces"
  2429. // StartWorkspacesRequest generates a "aws/request.Request" representing the
  2430. // client's request for the StartWorkspaces operation. The "output" return
  2431. // value will be populated with the request's response once the request completes
  2432. // successfully.
  2433. //
  2434. // Use "Send" method on the returned Request to send the API call to the service.
  2435. // the "output" return value is not valid until after Send returns without error.
  2436. //
  2437. // See StartWorkspaces for more information on using the StartWorkspaces
  2438. // API call, and error handling.
  2439. //
  2440. // This method is useful when you want to inject custom logic or configuration
  2441. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2442. //
  2443. //
  2444. // // Example sending a request using the StartWorkspacesRequest method.
  2445. // req, resp := client.StartWorkspacesRequest(params)
  2446. //
  2447. // err := req.Send()
  2448. // if err == nil { // resp is now filled
  2449. // fmt.Println(resp)
  2450. // }
  2451. //
  2452. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/StartWorkspaces
  2453. func (c *WorkSpaces) StartWorkspacesRequest(input *StartWorkspacesInput) (req *request.Request, output *StartWorkspacesOutput) {
  2454. op := &request.Operation{
  2455. Name: opStartWorkspaces,
  2456. HTTPMethod: "POST",
  2457. HTTPPath: "/",
  2458. }
  2459. if input == nil {
  2460. input = &StartWorkspacesInput{}
  2461. }
  2462. output = &StartWorkspacesOutput{}
  2463. req = c.newRequest(op, input, output)
  2464. return
  2465. }
  2466. // StartWorkspaces API operation for Amazon WorkSpaces.
  2467. //
  2468. // Starts the specified WorkSpaces.
  2469. //
  2470. // You cannot start a WorkSpace unless it has a running mode of AutoStop and
  2471. // a state of STOPPED.
  2472. //
  2473. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2474. // with awserr.Error's Code and Message methods to get detailed information about
  2475. // the error.
  2476. //
  2477. // See the AWS API reference guide for Amazon WorkSpaces's
  2478. // API operation StartWorkspaces for usage and error information.
  2479. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/StartWorkspaces
  2480. func (c *WorkSpaces) StartWorkspaces(input *StartWorkspacesInput) (*StartWorkspacesOutput, error) {
  2481. req, out := c.StartWorkspacesRequest(input)
  2482. return out, req.Send()
  2483. }
  2484. // StartWorkspacesWithContext is the same as StartWorkspaces with the addition of
  2485. // the ability to pass a context and additional request options.
  2486. //
  2487. // See StartWorkspaces for details on how to use this API operation.
  2488. //
  2489. // The context must be non-nil and will be used for request cancellation. If
  2490. // the context is nil a panic will occur. In the future the SDK may create
  2491. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2492. // for more information on using Contexts.
  2493. func (c *WorkSpaces) StartWorkspacesWithContext(ctx aws.Context, input *StartWorkspacesInput, opts ...request.Option) (*StartWorkspacesOutput, error) {
  2494. req, out := c.StartWorkspacesRequest(input)
  2495. req.SetContext(ctx)
  2496. req.ApplyOptions(opts...)
  2497. return out, req.Send()
  2498. }
  2499. const opStopWorkspaces = "StopWorkspaces"
  2500. // StopWorkspacesRequest generates a "aws/request.Request" representing the
  2501. // client's request for the StopWorkspaces operation. The "output" return
  2502. // value will be populated with the request's response once the request completes
  2503. // successfully.
  2504. //
  2505. // Use "Send" method on the returned Request to send the API call to the service.
  2506. // the "output" return value is not valid until after Send returns without error.
  2507. //
  2508. // See StopWorkspaces for more information on using the StopWorkspaces
  2509. // API call, and error handling.
  2510. //
  2511. // This method is useful when you want to inject custom logic or configuration
  2512. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2513. //
  2514. //
  2515. // // Example sending a request using the StopWorkspacesRequest method.
  2516. // req, resp := client.StopWorkspacesRequest(params)
  2517. //
  2518. // err := req.Send()
  2519. // if err == nil { // resp is now filled
  2520. // fmt.Println(resp)
  2521. // }
  2522. //
  2523. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/StopWorkspaces
  2524. func (c *WorkSpaces) StopWorkspacesRequest(input *StopWorkspacesInput) (req *request.Request, output *StopWorkspacesOutput) {
  2525. op := &request.Operation{
  2526. Name: opStopWorkspaces,
  2527. HTTPMethod: "POST",
  2528. HTTPPath: "/",
  2529. }
  2530. if input == nil {
  2531. input = &StopWorkspacesInput{}
  2532. }
  2533. output = &StopWorkspacesOutput{}
  2534. req = c.newRequest(op, input, output)
  2535. return
  2536. }
  2537. // StopWorkspaces API operation for Amazon WorkSpaces.
  2538. //
  2539. // Stops the specified WorkSpaces.
  2540. //
  2541. // You cannot stop a WorkSpace unless it has a running mode of AutoStop and
  2542. // a state of AVAILABLE, IMPAIRED, UNHEALTHY, or ERROR.
  2543. //
  2544. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2545. // with awserr.Error's Code and Message methods to get detailed information about
  2546. // the error.
  2547. //
  2548. // See the AWS API reference guide for Amazon WorkSpaces's
  2549. // API operation StopWorkspaces for usage and error information.
  2550. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/StopWorkspaces
  2551. func (c *WorkSpaces) StopWorkspaces(input *StopWorkspacesInput) (*StopWorkspacesOutput, error) {
  2552. req, out := c.StopWorkspacesRequest(input)
  2553. return out, req.Send()
  2554. }
  2555. // StopWorkspacesWithContext is the same as StopWorkspaces with the addition of
  2556. // the ability to pass a context and additional request options.
  2557. //
  2558. // See StopWorkspaces for details on how to use this API operation.
  2559. //
  2560. // The context must be non-nil and will be used for request cancellation. If
  2561. // the context is nil a panic will occur. In the future the SDK may create
  2562. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2563. // for more information on using Contexts.
  2564. func (c *WorkSpaces) StopWorkspacesWithContext(ctx aws.Context, input *StopWorkspacesInput, opts ...request.Option) (*StopWorkspacesOutput, error) {
  2565. req, out := c.StopWorkspacesRequest(input)
  2566. req.SetContext(ctx)
  2567. req.ApplyOptions(opts...)
  2568. return out, req.Send()
  2569. }
  2570. const opTerminateWorkspaces = "TerminateWorkspaces"
  2571. // TerminateWorkspacesRequest generates a "aws/request.Request" representing the
  2572. // client's request for the TerminateWorkspaces operation. The "output" return
  2573. // value will be populated with the request's response once the request completes
  2574. // successfully.
  2575. //
  2576. // Use "Send" method on the returned Request to send the API call to the service.
  2577. // the "output" return value is not valid until after Send returns without error.
  2578. //
  2579. // See TerminateWorkspaces for more information on using the TerminateWorkspaces
  2580. // API call, and error handling.
  2581. //
  2582. // This method is useful when you want to inject custom logic or configuration
  2583. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2584. //
  2585. //
  2586. // // Example sending a request using the TerminateWorkspacesRequest method.
  2587. // req, resp := client.TerminateWorkspacesRequest(params)
  2588. //
  2589. // err := req.Send()
  2590. // if err == nil { // resp is now filled
  2591. // fmt.Println(resp)
  2592. // }
  2593. //
  2594. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/TerminateWorkspaces
  2595. func (c *WorkSpaces) TerminateWorkspacesRequest(input *TerminateWorkspacesInput) (req *request.Request, output *TerminateWorkspacesOutput) {
  2596. op := &request.Operation{
  2597. Name: opTerminateWorkspaces,
  2598. HTTPMethod: "POST",
  2599. HTTPPath: "/",
  2600. }
  2601. if input == nil {
  2602. input = &TerminateWorkspacesInput{}
  2603. }
  2604. output = &TerminateWorkspacesOutput{}
  2605. req = c.newRequest(op, input, output)
  2606. return
  2607. }
  2608. // TerminateWorkspaces API operation for Amazon WorkSpaces.
  2609. //
  2610. // Terminates the specified WorkSpaces.
  2611. //
  2612. // Terminating a WorkSpace is a permanent action and cannot be undone. The user's
  2613. // data is destroyed. If you need to archive any user data, contact Amazon Web
  2614. // Services before terminating the WorkSpace.
  2615. //
  2616. // You can terminate a WorkSpace that is in any state except SUSPENDED.
  2617. //
  2618. // This operation is asynchronous and returns before the WorkSpaces have been
  2619. // completely terminated.
  2620. //
  2621. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2622. // with awserr.Error's Code and Message methods to get detailed information about
  2623. // the error.
  2624. //
  2625. // See the AWS API reference guide for Amazon WorkSpaces's
  2626. // API operation TerminateWorkspaces for usage and error information.
  2627. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/TerminateWorkspaces
  2628. func (c *WorkSpaces) TerminateWorkspaces(input *TerminateWorkspacesInput) (*TerminateWorkspacesOutput, error) {
  2629. req, out := c.TerminateWorkspacesRequest(input)
  2630. return out, req.Send()
  2631. }
  2632. // TerminateWorkspacesWithContext is the same as TerminateWorkspaces with the addition of
  2633. // the ability to pass a context and additional request options.
  2634. //
  2635. // See TerminateWorkspaces for details on how to use this API operation.
  2636. //
  2637. // The context must be non-nil and will be used for request cancellation. If
  2638. // the context is nil a panic will occur. In the future the SDK may create
  2639. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2640. // for more information on using Contexts.
  2641. func (c *WorkSpaces) TerminateWorkspacesWithContext(ctx aws.Context, input *TerminateWorkspacesInput, opts ...request.Option) (*TerminateWorkspacesOutput, error) {
  2642. req, out := c.TerminateWorkspacesRequest(input)
  2643. req.SetContext(ctx)
  2644. req.ApplyOptions(opts...)
  2645. return out, req.Send()
  2646. }
  2647. const opUpdateRulesOfIpGroup = "UpdateRulesOfIpGroup"
  2648. // UpdateRulesOfIpGroupRequest generates a "aws/request.Request" representing the
  2649. // client's request for the UpdateRulesOfIpGroup operation. The "output" return
  2650. // value will be populated with the request's response once the request completes
  2651. // successfully.
  2652. //
  2653. // Use "Send" method on the returned Request to send the API call to the service.
  2654. // the "output" return value is not valid until after Send returns without error.
  2655. //
  2656. // See UpdateRulesOfIpGroup for more information on using the UpdateRulesOfIpGroup
  2657. // API call, and error handling.
  2658. //
  2659. // This method is useful when you want to inject custom logic or configuration
  2660. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2661. //
  2662. //
  2663. // // Example sending a request using the UpdateRulesOfIpGroupRequest method.
  2664. // req, resp := client.UpdateRulesOfIpGroupRequest(params)
  2665. //
  2666. // err := req.Send()
  2667. // if err == nil { // resp is now filled
  2668. // fmt.Println(resp)
  2669. // }
  2670. //
  2671. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/UpdateRulesOfIpGroup
  2672. func (c *WorkSpaces) UpdateRulesOfIpGroupRequest(input *UpdateRulesOfIpGroupInput) (req *request.Request, output *UpdateRulesOfIpGroupOutput) {
  2673. op := &request.Operation{
  2674. Name: opUpdateRulesOfIpGroup,
  2675. HTTPMethod: "POST",
  2676. HTTPPath: "/",
  2677. }
  2678. if input == nil {
  2679. input = &UpdateRulesOfIpGroupInput{}
  2680. }
  2681. output = &UpdateRulesOfIpGroupOutput{}
  2682. req = c.newRequest(op, input, output)
  2683. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2684. return
  2685. }
  2686. // UpdateRulesOfIpGroup API operation for Amazon WorkSpaces.
  2687. //
  2688. // Replaces the current rules of the specified IP access control group with
  2689. // the specified rules.
  2690. //
  2691. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2692. // with awserr.Error's Code and Message methods to get detailed information about
  2693. // the error.
  2694. //
  2695. // See the AWS API reference guide for Amazon WorkSpaces's
  2696. // API operation UpdateRulesOfIpGroup for usage and error information.
  2697. //
  2698. // Returned Error Codes:
  2699. // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException"
  2700. // One or more parameter values are not valid.
  2701. //
  2702. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2703. // The resource could not be found.
  2704. //
  2705. // * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
  2706. // Your resource limits have been exceeded.
  2707. //
  2708. // * ErrCodeInvalidResourceStateException "InvalidResourceStateException"
  2709. // The state of the resource is not valid for this operation.
  2710. //
  2711. // * ErrCodeAccessDeniedException "AccessDeniedException"
  2712. // The user is not authorized to access a resource.
  2713. //
  2714. // See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/UpdateRulesOfIpGroup
  2715. func (c *WorkSpaces) UpdateRulesOfIpGroup(input *UpdateRulesOfIpGroupInput) (*UpdateRulesOfIpGroupOutput, error) {
  2716. req, out := c.UpdateRulesOfIpGroupRequest(input)
  2717. return out, req.Send()
  2718. }
  2719. // UpdateRulesOfIpGroupWithContext is the same as UpdateRulesOfIpGroup with the addition of
  2720. // the ability to pass a context and additional request options.
  2721. //
  2722. // See UpdateRulesOfIpGroup for details on how to use this API operation.
  2723. //
  2724. // The context must be non-nil and will be used for request cancellation. If
  2725. // the context is nil a panic will occur. In the future the SDK may create
  2726. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2727. // for more information on using Contexts.
  2728. func (c *WorkSpaces) UpdateRulesOfIpGroupWithContext(ctx aws.Context, input *UpdateRulesOfIpGroupInput, opts ...request.Option) (*UpdateRulesOfIpGroupOutput, error) {
  2729. req, out := c.UpdateRulesOfIpGroupRequest(input)
  2730. req.SetContext(ctx)
  2731. req.ApplyOptions(opts...)
  2732. return out, req.Send()
  2733. }
  2734. // Describes a modification to the configuration of bring your own license (BYOL)
  2735. // for the specified account.
  2736. type AccountModification struct {
  2737. _ struct{} `type:"structure"`
  2738. // The IP address range, specified as an IPv4 CIDR block, for the management
  2739. // network interface used for the account.
  2740. DedicatedTenancyManagementCidrRange *string `type:"string"`
  2741. // The status of BYOL (whether BYOL is being enabled or disabled).
  2742. DedicatedTenancySupport *string `type:"string" enum:"DedicatedTenancySupportResultEnum"`
  2743. // The error code that is returned if the configuration of BYOL cannot be modified.
  2744. ErrorCode *string `type:"string"`
  2745. // The text of the error message that is returned if the configuration of BYOL
  2746. // cannot be modified.
  2747. ErrorMessage *string `type:"string"`
  2748. // The state of the modification to the configuration of BYOL.
  2749. ModificationState *string `type:"string" enum:"DedicatedTenancyModificationStateEnum"`
  2750. // The timestamp when the modification of the BYOL configuration was started.
  2751. StartTime *time.Time `type:"timestamp"`
  2752. }
  2753. // String returns the string representation
  2754. func (s AccountModification) String() string {
  2755. return awsutil.Prettify(s)
  2756. }
  2757. // GoString returns the string representation
  2758. func (s AccountModification) GoString() string {
  2759. return s.String()
  2760. }
  2761. // SetDedicatedTenancyManagementCidrRange sets the DedicatedTenancyManagementCidrRange field's value.
  2762. func (s *AccountModification) SetDedicatedTenancyManagementCidrRange(v string) *AccountModification {
  2763. s.DedicatedTenancyManagementCidrRange = &v
  2764. return s
  2765. }
  2766. // SetDedicatedTenancySupport sets the DedicatedTenancySupport field's value.
  2767. func (s *AccountModification) SetDedicatedTenancySupport(v string) *AccountModification {
  2768. s.DedicatedTenancySupport = &v
  2769. return s
  2770. }
  2771. // SetErrorCode sets the ErrorCode field's value.
  2772. func (s *AccountModification) SetErrorCode(v string) *AccountModification {
  2773. s.ErrorCode = &v
  2774. return s
  2775. }
  2776. // SetErrorMessage sets the ErrorMessage field's value.
  2777. func (s *AccountModification) SetErrorMessage(v string) *AccountModification {
  2778. s.ErrorMessage = &v
  2779. return s
  2780. }
  2781. // SetModificationState sets the ModificationState field's value.
  2782. func (s *AccountModification) SetModificationState(v string) *AccountModification {
  2783. s.ModificationState = &v
  2784. return s
  2785. }
  2786. // SetStartTime sets the StartTime field's value.
  2787. func (s *AccountModification) SetStartTime(v time.Time) *AccountModification {
  2788. s.StartTime = &v
  2789. return s
  2790. }
  2791. type AssociateIpGroupsInput struct {
  2792. _ struct{} `type:"structure"`
  2793. // The identifier of the directory.
  2794. //
  2795. // DirectoryId is a required field
  2796. DirectoryId *string `type:"string" required:"true"`
  2797. // The identifiers of one or more IP access control groups.
  2798. //
  2799. // GroupIds is a required field
  2800. GroupIds []*string `type:"list" required:"true"`
  2801. }
  2802. // String returns the string representation
  2803. func (s AssociateIpGroupsInput) String() string {
  2804. return awsutil.Prettify(s)
  2805. }
  2806. // GoString returns the string representation
  2807. func (s AssociateIpGroupsInput) GoString() string {
  2808. return s.String()
  2809. }
  2810. // Validate inspects the fields of the type to determine if they are valid.
  2811. func (s *AssociateIpGroupsInput) Validate() error {
  2812. invalidParams := request.ErrInvalidParams{Context: "AssociateIpGroupsInput"}
  2813. if s.DirectoryId == nil {
  2814. invalidParams.Add(request.NewErrParamRequired("DirectoryId"))
  2815. }
  2816. if s.GroupIds == nil {
  2817. invalidParams.Add(request.NewErrParamRequired("GroupIds"))
  2818. }
  2819. if invalidParams.Len() > 0 {
  2820. return invalidParams
  2821. }
  2822. return nil
  2823. }
  2824. // SetDirectoryId sets the DirectoryId field's value.
  2825. func (s *AssociateIpGroupsInput) SetDirectoryId(v string) *AssociateIpGroupsInput {
  2826. s.DirectoryId = &v
  2827. return s
  2828. }
  2829. // SetGroupIds sets the GroupIds field's value.
  2830. func (s *AssociateIpGroupsInput) SetGroupIds(v []*string) *AssociateIpGroupsInput {
  2831. s.GroupIds = v
  2832. return s
  2833. }
  2834. type AssociateIpGroupsOutput struct {
  2835. _ struct{} `type:"structure"`
  2836. }
  2837. // String returns the string representation
  2838. func (s AssociateIpGroupsOutput) String() string {
  2839. return awsutil.Prettify(s)
  2840. }
  2841. // GoString returns the string representation
  2842. func (s AssociateIpGroupsOutput) GoString() string {
  2843. return s.String()
  2844. }
  2845. type AuthorizeIpRulesInput struct {
  2846. _ struct{} `type:"structure"`
  2847. // The identifier of the group.
  2848. //
  2849. // GroupId is a required field
  2850. GroupId *string `type:"string" required:"true"`
  2851. // The rules to add to the group.
  2852. //
  2853. // UserRules is a required field
  2854. UserRules []*IpRuleItem `type:"list" required:"true"`
  2855. }
  2856. // String returns the string representation
  2857. func (s AuthorizeIpRulesInput) String() string {
  2858. return awsutil.Prettify(s)
  2859. }
  2860. // GoString returns the string representation
  2861. func (s AuthorizeIpRulesInput) GoString() string {
  2862. return s.String()
  2863. }
  2864. // Validate inspects the fields of the type to determine if they are valid.
  2865. func (s *AuthorizeIpRulesInput) Validate() error {
  2866. invalidParams := request.ErrInvalidParams{Context: "AuthorizeIpRulesInput"}
  2867. if s.GroupId == nil {
  2868. invalidParams.Add(request.NewErrParamRequired("GroupId"))
  2869. }
  2870. if s.UserRules == nil {
  2871. invalidParams.Add(request.NewErrParamRequired("UserRules"))
  2872. }
  2873. if invalidParams.Len() > 0 {
  2874. return invalidParams
  2875. }
  2876. return nil
  2877. }
  2878. // SetGroupId sets the GroupId field's value.
  2879. func (s *AuthorizeIpRulesInput) SetGroupId(v string) *AuthorizeIpRulesInput {
  2880. s.GroupId = &v
  2881. return s
  2882. }
  2883. // SetUserRules sets the UserRules field's value.
  2884. func (s *AuthorizeIpRulesInput) SetUserRules(v []*IpRuleItem) *AuthorizeIpRulesInput {
  2885. s.UserRules = v
  2886. return s
  2887. }
  2888. type AuthorizeIpRulesOutput struct {
  2889. _ struct{} `type:"structure"`
  2890. }
  2891. // String returns the string representation
  2892. func (s AuthorizeIpRulesOutput) String() string {
  2893. return awsutil.Prettify(s)
  2894. }
  2895. // GoString returns the string representation
  2896. func (s AuthorizeIpRulesOutput) GoString() string {
  2897. return s.String()
  2898. }
  2899. // Describes an Amazon WorkSpaces client.
  2900. type ClientProperties struct {
  2901. _ struct{} `type:"structure"`
  2902. // Specifies whether users can cache their credentials on the Amazon WorkSpaces
  2903. // client. When enabled, users can choose to reconnect to their WorkSpaces without
  2904. // re-entering their credentials.
  2905. ReconnectEnabled *string `type:"string" enum:"ReconnectEnum"`
  2906. }
  2907. // String returns the string representation
  2908. func (s ClientProperties) String() string {
  2909. return awsutil.Prettify(s)
  2910. }
  2911. // GoString returns the string representation
  2912. func (s ClientProperties) GoString() string {
  2913. return s.String()
  2914. }
  2915. // SetReconnectEnabled sets the ReconnectEnabled field's value.
  2916. func (s *ClientProperties) SetReconnectEnabled(v string) *ClientProperties {
  2917. s.ReconnectEnabled = &v
  2918. return s
  2919. }
  2920. // Information about the Amazon WorkSpaces client.
  2921. type ClientPropertiesResult struct {
  2922. _ struct{} `type:"structure"`
  2923. // Information about the Amazon WorkSpaces client.
  2924. ClientProperties *ClientProperties `type:"structure"`
  2925. // The resource identifier, in the form of a directory ID.
  2926. ResourceId *string `min:"1" type:"string"`
  2927. }
  2928. // String returns the string representation
  2929. func (s ClientPropertiesResult) String() string {
  2930. return awsutil.Prettify(s)
  2931. }
  2932. // GoString returns the string representation
  2933. func (s ClientPropertiesResult) GoString() string {
  2934. return s.String()
  2935. }
  2936. // SetClientProperties sets the ClientProperties field's value.
  2937. func (s *ClientPropertiesResult) SetClientProperties(v *ClientProperties) *ClientPropertiesResult {
  2938. s.ClientProperties = v
  2939. return s
  2940. }
  2941. // SetResourceId sets the ResourceId field's value.
  2942. func (s *ClientPropertiesResult) SetResourceId(v string) *ClientPropertiesResult {
  2943. s.ResourceId = &v
  2944. return s
  2945. }
  2946. // Describes the compute type.
  2947. type ComputeType struct {
  2948. _ struct{} `type:"structure"`
  2949. // The compute type.
  2950. Name *string `type:"string" enum:"Compute"`
  2951. }
  2952. // String returns the string representation
  2953. func (s ComputeType) String() string {
  2954. return awsutil.Prettify(s)
  2955. }
  2956. // GoString returns the string representation
  2957. func (s ComputeType) GoString() string {
  2958. return s.String()
  2959. }
  2960. // SetName sets the Name field's value.
  2961. func (s *ComputeType) SetName(v string) *ComputeType {
  2962. s.Name = &v
  2963. return s
  2964. }
  2965. type CreateIpGroupInput struct {
  2966. _ struct{} `type:"structure"`
  2967. // The description of the group.
  2968. GroupDesc *string `type:"string"`
  2969. // The name of the group.
  2970. //
  2971. // GroupName is a required field
  2972. GroupName *string `type:"string" required:"true"`
  2973. // The rules to add to the group.
  2974. UserRules []*IpRuleItem `type:"list"`
  2975. }
  2976. // String returns the string representation
  2977. func (s CreateIpGroupInput) String() string {
  2978. return awsutil.Prettify(s)
  2979. }
  2980. // GoString returns the string representation
  2981. func (s CreateIpGroupInput) GoString() string {
  2982. return s.String()
  2983. }
  2984. // Validate inspects the fields of the type to determine if they are valid.
  2985. func (s *CreateIpGroupInput) Validate() error {
  2986. invalidParams := request.ErrInvalidParams{Context: "CreateIpGroupInput"}
  2987. if s.GroupName == nil {
  2988. invalidParams.Add(request.NewErrParamRequired("GroupName"))
  2989. }
  2990. if invalidParams.Len() > 0 {
  2991. return invalidParams
  2992. }
  2993. return nil
  2994. }
  2995. // SetGroupDesc sets the GroupDesc field's value.
  2996. func (s *CreateIpGroupInput) SetGroupDesc(v string) *CreateIpGroupInput {
  2997. s.GroupDesc = &v
  2998. return s
  2999. }
  3000. // SetGroupName sets the GroupName field's value.
  3001. func (s *CreateIpGroupInput) SetGroupName(v string) *CreateIpGroupInput {
  3002. s.GroupName = &v
  3003. return s
  3004. }
  3005. // SetUserRules sets the UserRules field's value.
  3006. func (s *CreateIpGroupInput) SetUserRules(v []*IpRuleItem) *CreateIpGroupInput {
  3007. s.UserRules = v
  3008. return s
  3009. }
  3010. type CreateIpGroupOutput struct {
  3011. _ struct{} `type:"structure"`
  3012. // The identifier of the group.
  3013. GroupId *string `type:"string"`
  3014. }
  3015. // String returns the string representation
  3016. func (s CreateIpGroupOutput) String() string {
  3017. return awsutil.Prettify(s)
  3018. }
  3019. // GoString returns the string representation
  3020. func (s CreateIpGroupOutput) GoString() string {
  3021. return s.String()
  3022. }
  3023. // SetGroupId sets the GroupId field's value.
  3024. func (s *CreateIpGroupOutput) SetGroupId(v string) *CreateIpGroupOutput {
  3025. s.GroupId = &v
  3026. return s
  3027. }
  3028. type CreateTagsInput struct {
  3029. _ struct{} `type:"structure"`
  3030. // The identifier of the WorkSpace. To find this ID, use DescribeWorkspaces.
  3031. //
  3032. // ResourceId is a required field
  3033. ResourceId *string `min:"1" type:"string" required:"true"`
  3034. // The tags. Each WorkSpace can have a maximum of 50 tags.
  3035. //
  3036. // Tags is a required field
  3037. Tags []*Tag `type:"list" required:"true"`
  3038. }
  3039. // String returns the string representation
  3040. func (s CreateTagsInput) String() string {
  3041. return awsutil.Prettify(s)
  3042. }
  3043. // GoString returns the string representation
  3044. func (s CreateTagsInput) GoString() string {
  3045. return s.String()
  3046. }
  3047. // Validate inspects the fields of the type to determine if they are valid.
  3048. func (s *CreateTagsInput) Validate() error {
  3049. invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"}
  3050. if s.ResourceId == nil {
  3051. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  3052. }
  3053. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  3054. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  3055. }
  3056. if s.Tags == nil {
  3057. invalidParams.Add(request.NewErrParamRequired("Tags"))
  3058. }
  3059. if s.Tags != nil {
  3060. for i, v := range s.Tags {
  3061. if v == nil {
  3062. continue
  3063. }
  3064. if err := v.Validate(); err != nil {
  3065. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  3066. }
  3067. }
  3068. }
  3069. if invalidParams.Len() > 0 {
  3070. return invalidParams
  3071. }
  3072. return nil
  3073. }
  3074. // SetResourceId sets the ResourceId field's value.
  3075. func (s *CreateTagsInput) SetResourceId(v string) *CreateTagsInput {
  3076. s.ResourceId = &v
  3077. return s
  3078. }
  3079. // SetTags sets the Tags field's value.
  3080. func (s *CreateTagsInput) SetTags(v []*Tag) *CreateTagsInput {
  3081. s.Tags = v
  3082. return s
  3083. }
  3084. type CreateTagsOutput struct {
  3085. _ struct{} `type:"structure"`
  3086. }
  3087. // String returns the string representation
  3088. func (s CreateTagsOutput) String() string {
  3089. return awsutil.Prettify(s)
  3090. }
  3091. // GoString returns the string representation
  3092. func (s CreateTagsOutput) GoString() string {
  3093. return s.String()
  3094. }
  3095. type CreateWorkspacesInput struct {
  3096. _ struct{} `type:"structure"`
  3097. // The WorkSpaces to create. You can specify up to 25 WorkSpaces.
  3098. //
  3099. // Workspaces is a required field
  3100. Workspaces []*WorkspaceRequest `min:"1" type:"list" required:"true"`
  3101. }
  3102. // String returns the string representation
  3103. func (s CreateWorkspacesInput) String() string {
  3104. return awsutil.Prettify(s)
  3105. }
  3106. // GoString returns the string representation
  3107. func (s CreateWorkspacesInput) GoString() string {
  3108. return s.String()
  3109. }
  3110. // Validate inspects the fields of the type to determine if they are valid.
  3111. func (s *CreateWorkspacesInput) Validate() error {
  3112. invalidParams := request.ErrInvalidParams{Context: "CreateWorkspacesInput"}
  3113. if s.Workspaces == nil {
  3114. invalidParams.Add(request.NewErrParamRequired("Workspaces"))
  3115. }
  3116. if s.Workspaces != nil && len(s.Workspaces) < 1 {
  3117. invalidParams.Add(request.NewErrParamMinLen("Workspaces", 1))
  3118. }
  3119. if s.Workspaces != nil {
  3120. for i, v := range s.Workspaces {
  3121. if v == nil {
  3122. continue
  3123. }
  3124. if err := v.Validate(); err != nil {
  3125. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Workspaces", i), err.(request.ErrInvalidParams))
  3126. }
  3127. }
  3128. }
  3129. if invalidParams.Len() > 0 {
  3130. return invalidParams
  3131. }
  3132. return nil
  3133. }
  3134. // SetWorkspaces sets the Workspaces field's value.
  3135. func (s *CreateWorkspacesInput) SetWorkspaces(v []*WorkspaceRequest) *CreateWorkspacesInput {
  3136. s.Workspaces = v
  3137. return s
  3138. }
  3139. type CreateWorkspacesOutput struct {
  3140. _ struct{} `type:"structure"`
  3141. // Information about the WorkSpaces that could not be created.
  3142. FailedRequests []*FailedCreateWorkspaceRequest `type:"list"`
  3143. // Information about the WorkSpaces that were created.
  3144. //
  3145. // Because this operation is asynchronous, the identifier returned is not immediately
  3146. // available for use with other operations. For example, if you call DescribeWorkspaces
  3147. // before the WorkSpace is created, the information returned can be incomplete.
  3148. PendingRequests []*Workspace `type:"list"`
  3149. }
  3150. // String returns the string representation
  3151. func (s CreateWorkspacesOutput) String() string {
  3152. return awsutil.Prettify(s)
  3153. }
  3154. // GoString returns the string representation
  3155. func (s CreateWorkspacesOutput) GoString() string {
  3156. return s.String()
  3157. }
  3158. // SetFailedRequests sets the FailedRequests field's value.
  3159. func (s *CreateWorkspacesOutput) SetFailedRequests(v []*FailedCreateWorkspaceRequest) *CreateWorkspacesOutput {
  3160. s.FailedRequests = v
  3161. return s
  3162. }
  3163. // SetPendingRequests sets the PendingRequests field's value.
  3164. func (s *CreateWorkspacesOutput) SetPendingRequests(v []*Workspace) *CreateWorkspacesOutput {
  3165. s.PendingRequests = v
  3166. return s
  3167. }
  3168. // Describes the default values used to create a WorkSpace.
  3169. type DefaultWorkspaceCreationProperties struct {
  3170. _ struct{} `type:"structure"`
  3171. // The identifier of any security groups to apply to WorkSpaces when they are
  3172. // created.
  3173. CustomSecurityGroupId *string `type:"string"`
  3174. // The organizational unit (OU) in the directory for the WorkSpace machine accounts.
  3175. DefaultOu *string `type:"string"`
  3176. // The public IP address to attach to all WorkSpaces that are created or rebuilt.
  3177. EnableInternetAccess *bool `type:"boolean"`
  3178. // Specifies whether the directory is enabled for Amazon WorkDocs.
  3179. EnableWorkDocs *bool `type:"boolean"`
  3180. // Specifies whether the WorkSpace user is an administrator on the WorkSpace.
  3181. UserEnabledAsLocalAdministrator *bool `type:"boolean"`
  3182. }
  3183. // String returns the string representation
  3184. func (s DefaultWorkspaceCreationProperties) String() string {
  3185. return awsutil.Prettify(s)
  3186. }
  3187. // GoString returns the string representation
  3188. func (s DefaultWorkspaceCreationProperties) GoString() string {
  3189. return s.String()
  3190. }
  3191. // SetCustomSecurityGroupId sets the CustomSecurityGroupId field's value.
  3192. func (s *DefaultWorkspaceCreationProperties) SetCustomSecurityGroupId(v string) *DefaultWorkspaceCreationProperties {
  3193. s.CustomSecurityGroupId = &v
  3194. return s
  3195. }
  3196. // SetDefaultOu sets the DefaultOu field's value.
  3197. func (s *DefaultWorkspaceCreationProperties) SetDefaultOu(v string) *DefaultWorkspaceCreationProperties {
  3198. s.DefaultOu = &v
  3199. return s
  3200. }
  3201. // SetEnableInternetAccess sets the EnableInternetAccess field's value.
  3202. func (s *DefaultWorkspaceCreationProperties) SetEnableInternetAccess(v bool) *DefaultWorkspaceCreationProperties {
  3203. s.EnableInternetAccess = &v
  3204. return s
  3205. }
  3206. // SetEnableWorkDocs sets the EnableWorkDocs field's value.
  3207. func (s *DefaultWorkspaceCreationProperties) SetEnableWorkDocs(v bool) *DefaultWorkspaceCreationProperties {
  3208. s.EnableWorkDocs = &v
  3209. return s
  3210. }
  3211. // SetUserEnabledAsLocalAdministrator sets the UserEnabledAsLocalAdministrator field's value.
  3212. func (s *DefaultWorkspaceCreationProperties) SetUserEnabledAsLocalAdministrator(v bool) *DefaultWorkspaceCreationProperties {
  3213. s.UserEnabledAsLocalAdministrator = &v
  3214. return s
  3215. }
  3216. type DeleteIpGroupInput struct {
  3217. _ struct{} `type:"structure"`
  3218. // The identifier of the IP access control group.
  3219. //
  3220. // GroupId is a required field
  3221. GroupId *string `type:"string" required:"true"`
  3222. }
  3223. // String returns the string representation
  3224. func (s DeleteIpGroupInput) String() string {
  3225. return awsutil.Prettify(s)
  3226. }
  3227. // GoString returns the string representation
  3228. func (s DeleteIpGroupInput) GoString() string {
  3229. return s.String()
  3230. }
  3231. // Validate inspects the fields of the type to determine if they are valid.
  3232. func (s *DeleteIpGroupInput) Validate() error {
  3233. invalidParams := request.ErrInvalidParams{Context: "DeleteIpGroupInput"}
  3234. if s.GroupId == nil {
  3235. invalidParams.Add(request.NewErrParamRequired("GroupId"))
  3236. }
  3237. if invalidParams.Len() > 0 {
  3238. return invalidParams
  3239. }
  3240. return nil
  3241. }
  3242. // SetGroupId sets the GroupId field's value.
  3243. func (s *DeleteIpGroupInput) SetGroupId(v string) *DeleteIpGroupInput {
  3244. s.GroupId = &v
  3245. return s
  3246. }
  3247. type DeleteIpGroupOutput struct {
  3248. _ struct{} `type:"structure"`
  3249. }
  3250. // String returns the string representation
  3251. func (s DeleteIpGroupOutput) String() string {
  3252. return awsutil.Prettify(s)
  3253. }
  3254. // GoString returns the string representation
  3255. func (s DeleteIpGroupOutput) GoString() string {
  3256. return s.String()
  3257. }
  3258. type DeleteTagsInput struct {
  3259. _ struct{} `type:"structure"`
  3260. // The identifier of the WorkSpace. To find this ID, use DescribeWorkspaces.
  3261. //
  3262. // ResourceId is a required field
  3263. ResourceId *string `min:"1" type:"string" required:"true"`
  3264. // The tag keys.
  3265. //
  3266. // TagKeys is a required field
  3267. TagKeys []*string `type:"list" required:"true"`
  3268. }
  3269. // String returns the string representation
  3270. func (s DeleteTagsInput) String() string {
  3271. return awsutil.Prettify(s)
  3272. }
  3273. // GoString returns the string representation
  3274. func (s DeleteTagsInput) GoString() string {
  3275. return s.String()
  3276. }
  3277. // Validate inspects the fields of the type to determine if they are valid.
  3278. func (s *DeleteTagsInput) Validate() error {
  3279. invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"}
  3280. if s.ResourceId == nil {
  3281. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  3282. }
  3283. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  3284. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  3285. }
  3286. if s.TagKeys == nil {
  3287. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  3288. }
  3289. if invalidParams.Len() > 0 {
  3290. return invalidParams
  3291. }
  3292. return nil
  3293. }
  3294. // SetResourceId sets the ResourceId field's value.
  3295. func (s *DeleteTagsInput) SetResourceId(v string) *DeleteTagsInput {
  3296. s.ResourceId = &v
  3297. return s
  3298. }
  3299. // SetTagKeys sets the TagKeys field's value.
  3300. func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput {
  3301. s.TagKeys = v
  3302. return s
  3303. }
  3304. type DeleteTagsOutput struct {
  3305. _ struct{} `type:"structure"`
  3306. }
  3307. // String returns the string representation
  3308. func (s DeleteTagsOutput) String() string {
  3309. return awsutil.Prettify(s)
  3310. }
  3311. // GoString returns the string representation
  3312. func (s DeleteTagsOutput) GoString() string {
  3313. return s.String()
  3314. }
  3315. type DeleteWorkspaceImageInput struct {
  3316. _ struct{} `type:"structure"`
  3317. // The identifier of the image.
  3318. //
  3319. // ImageId is a required field
  3320. ImageId *string `type:"string" required:"true"`
  3321. }
  3322. // String returns the string representation
  3323. func (s DeleteWorkspaceImageInput) String() string {
  3324. return awsutil.Prettify(s)
  3325. }
  3326. // GoString returns the string representation
  3327. func (s DeleteWorkspaceImageInput) GoString() string {
  3328. return s.String()
  3329. }
  3330. // Validate inspects the fields of the type to determine if they are valid.
  3331. func (s *DeleteWorkspaceImageInput) Validate() error {
  3332. invalidParams := request.ErrInvalidParams{Context: "DeleteWorkspaceImageInput"}
  3333. if s.ImageId == nil {
  3334. invalidParams.Add(request.NewErrParamRequired("ImageId"))
  3335. }
  3336. if invalidParams.Len() > 0 {
  3337. return invalidParams
  3338. }
  3339. return nil
  3340. }
  3341. // SetImageId sets the ImageId field's value.
  3342. func (s *DeleteWorkspaceImageInput) SetImageId(v string) *DeleteWorkspaceImageInput {
  3343. s.ImageId = &v
  3344. return s
  3345. }
  3346. type DeleteWorkspaceImageOutput struct {
  3347. _ struct{} `type:"structure"`
  3348. }
  3349. // String returns the string representation
  3350. func (s DeleteWorkspaceImageOutput) String() string {
  3351. return awsutil.Prettify(s)
  3352. }
  3353. // GoString returns the string representation
  3354. func (s DeleteWorkspaceImageOutput) GoString() string {
  3355. return s.String()
  3356. }
  3357. type DescribeAccountInput struct {
  3358. _ struct{} `type:"structure"`
  3359. }
  3360. // String returns the string representation
  3361. func (s DescribeAccountInput) String() string {
  3362. return awsutil.Prettify(s)
  3363. }
  3364. // GoString returns the string representation
  3365. func (s DescribeAccountInput) GoString() string {
  3366. return s.String()
  3367. }
  3368. type DescribeAccountModificationsInput struct {
  3369. _ struct{} `type:"structure"`
  3370. // If you received a NextToken from a previous call that was paginated, provide
  3371. // this token to receive the next set of results.
  3372. NextToken *string `min:"1" type:"string"`
  3373. }
  3374. // String returns the string representation
  3375. func (s DescribeAccountModificationsInput) String() string {
  3376. return awsutil.Prettify(s)
  3377. }
  3378. // GoString returns the string representation
  3379. func (s DescribeAccountModificationsInput) GoString() string {
  3380. return s.String()
  3381. }
  3382. // Validate inspects the fields of the type to determine if they are valid.
  3383. func (s *DescribeAccountModificationsInput) Validate() error {
  3384. invalidParams := request.ErrInvalidParams{Context: "DescribeAccountModificationsInput"}
  3385. if s.NextToken != nil && len(*s.NextToken) < 1 {
  3386. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  3387. }
  3388. if invalidParams.Len() > 0 {
  3389. return invalidParams
  3390. }
  3391. return nil
  3392. }
  3393. // SetNextToken sets the NextToken field's value.
  3394. func (s *DescribeAccountModificationsInput) SetNextToken(v string) *DescribeAccountModificationsInput {
  3395. s.NextToken = &v
  3396. return s
  3397. }
  3398. type DescribeAccountModificationsOutput struct {
  3399. _ struct{} `type:"structure"`
  3400. // The list of modifications to the configuration of BYOL.
  3401. AccountModifications []*AccountModification `type:"list"`
  3402. // The token to use to retrieve the next set of results, or null if no more
  3403. // results are available.
  3404. NextToken *string `min:"1" type:"string"`
  3405. }
  3406. // String returns the string representation
  3407. func (s DescribeAccountModificationsOutput) String() string {
  3408. return awsutil.Prettify(s)
  3409. }
  3410. // GoString returns the string representation
  3411. func (s DescribeAccountModificationsOutput) GoString() string {
  3412. return s.String()
  3413. }
  3414. // SetAccountModifications sets the AccountModifications field's value.
  3415. func (s *DescribeAccountModificationsOutput) SetAccountModifications(v []*AccountModification) *DescribeAccountModificationsOutput {
  3416. s.AccountModifications = v
  3417. return s
  3418. }
  3419. // SetNextToken sets the NextToken field's value.
  3420. func (s *DescribeAccountModificationsOutput) SetNextToken(v string) *DescribeAccountModificationsOutput {
  3421. s.NextToken = &v
  3422. return s
  3423. }
  3424. type DescribeAccountOutput struct {
  3425. _ struct{} `type:"structure"`
  3426. // The IP address range, specified as an IPv4 CIDR block, used for the management
  3427. // network interface.
  3428. //
  3429. // The management network interface is connected to a secure Amazon WorkSpaces
  3430. // management network. It is used for interactive streaming of the WorkSpace
  3431. // desktop to Amazon WorkSpaces clients, and to allow Amazon WorkSpaces to manage
  3432. // the WorkSpace.
  3433. DedicatedTenancyManagementCidrRange *string `type:"string"`
  3434. // The status of BYOL (whether BYOL is enabled or disabled).
  3435. DedicatedTenancySupport *string `type:"string" enum:"DedicatedTenancySupportResultEnum"`
  3436. }
  3437. // String returns the string representation
  3438. func (s DescribeAccountOutput) String() string {
  3439. return awsutil.Prettify(s)
  3440. }
  3441. // GoString returns the string representation
  3442. func (s DescribeAccountOutput) GoString() string {
  3443. return s.String()
  3444. }
  3445. // SetDedicatedTenancyManagementCidrRange sets the DedicatedTenancyManagementCidrRange field's value.
  3446. func (s *DescribeAccountOutput) SetDedicatedTenancyManagementCidrRange(v string) *DescribeAccountOutput {
  3447. s.DedicatedTenancyManagementCidrRange = &v
  3448. return s
  3449. }
  3450. // SetDedicatedTenancySupport sets the DedicatedTenancySupport field's value.
  3451. func (s *DescribeAccountOutput) SetDedicatedTenancySupport(v string) *DescribeAccountOutput {
  3452. s.DedicatedTenancySupport = &v
  3453. return s
  3454. }
  3455. type DescribeClientPropertiesInput struct {
  3456. _ struct{} `type:"structure"`
  3457. // The resource identifiers, in the form of directory IDs.
  3458. //
  3459. // ResourceIds is a required field
  3460. ResourceIds []*string `min:"1" type:"list" required:"true"`
  3461. }
  3462. // String returns the string representation
  3463. func (s DescribeClientPropertiesInput) String() string {
  3464. return awsutil.Prettify(s)
  3465. }
  3466. // GoString returns the string representation
  3467. func (s DescribeClientPropertiesInput) GoString() string {
  3468. return s.String()
  3469. }
  3470. // Validate inspects the fields of the type to determine if they are valid.
  3471. func (s *DescribeClientPropertiesInput) Validate() error {
  3472. invalidParams := request.ErrInvalidParams{Context: "DescribeClientPropertiesInput"}
  3473. if s.ResourceIds == nil {
  3474. invalidParams.Add(request.NewErrParamRequired("ResourceIds"))
  3475. }
  3476. if s.ResourceIds != nil && len(s.ResourceIds) < 1 {
  3477. invalidParams.Add(request.NewErrParamMinLen("ResourceIds", 1))
  3478. }
  3479. if invalidParams.Len() > 0 {
  3480. return invalidParams
  3481. }
  3482. return nil
  3483. }
  3484. // SetResourceIds sets the ResourceIds field's value.
  3485. func (s *DescribeClientPropertiesInput) SetResourceIds(v []*string) *DescribeClientPropertiesInput {
  3486. s.ResourceIds = v
  3487. return s
  3488. }
  3489. type DescribeClientPropertiesOutput struct {
  3490. _ struct{} `type:"structure"`
  3491. // Information about the specified Amazon WorkSpaces clients.
  3492. ClientPropertiesList []*ClientPropertiesResult `type:"list"`
  3493. }
  3494. // String returns the string representation
  3495. func (s DescribeClientPropertiesOutput) String() string {
  3496. return awsutil.Prettify(s)
  3497. }
  3498. // GoString returns the string representation
  3499. func (s DescribeClientPropertiesOutput) GoString() string {
  3500. return s.String()
  3501. }
  3502. // SetClientPropertiesList sets the ClientPropertiesList field's value.
  3503. func (s *DescribeClientPropertiesOutput) SetClientPropertiesList(v []*ClientPropertiesResult) *DescribeClientPropertiesOutput {
  3504. s.ClientPropertiesList = v
  3505. return s
  3506. }
  3507. type DescribeIpGroupsInput struct {
  3508. _ struct{} `type:"structure"`
  3509. // The identifiers of one or more IP access control groups.
  3510. GroupIds []*string `type:"list"`
  3511. // The maximum number of items to return.
  3512. MaxResults *int64 `min:"1" type:"integer"`
  3513. // If you received a NextToken from a previous call that was paginated, provide
  3514. // this token to receive the next set of results.
  3515. NextToken *string `min:"1" type:"string"`
  3516. }
  3517. // String returns the string representation
  3518. func (s DescribeIpGroupsInput) String() string {
  3519. return awsutil.Prettify(s)
  3520. }
  3521. // GoString returns the string representation
  3522. func (s DescribeIpGroupsInput) GoString() string {
  3523. return s.String()
  3524. }
  3525. // Validate inspects the fields of the type to determine if they are valid.
  3526. func (s *DescribeIpGroupsInput) Validate() error {
  3527. invalidParams := request.ErrInvalidParams{Context: "DescribeIpGroupsInput"}
  3528. if s.MaxResults != nil && *s.MaxResults < 1 {
  3529. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3530. }
  3531. if s.NextToken != nil && len(*s.NextToken) < 1 {
  3532. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  3533. }
  3534. if invalidParams.Len() > 0 {
  3535. return invalidParams
  3536. }
  3537. return nil
  3538. }
  3539. // SetGroupIds sets the GroupIds field's value.
  3540. func (s *DescribeIpGroupsInput) SetGroupIds(v []*string) *DescribeIpGroupsInput {
  3541. s.GroupIds = v
  3542. return s
  3543. }
  3544. // SetMaxResults sets the MaxResults field's value.
  3545. func (s *DescribeIpGroupsInput) SetMaxResults(v int64) *DescribeIpGroupsInput {
  3546. s.MaxResults = &v
  3547. return s
  3548. }
  3549. // SetNextToken sets the NextToken field's value.
  3550. func (s *DescribeIpGroupsInput) SetNextToken(v string) *DescribeIpGroupsInput {
  3551. s.NextToken = &v
  3552. return s
  3553. }
  3554. type DescribeIpGroupsOutput struct {
  3555. _ struct{} `type:"structure"`
  3556. // The token to use to retrieve the next set of results, or null if no more
  3557. // results are available.
  3558. NextToken *string `min:"1" type:"string"`
  3559. // Information about the IP access control groups.
  3560. Result []*IpGroup `type:"list"`
  3561. }
  3562. // String returns the string representation
  3563. func (s DescribeIpGroupsOutput) String() string {
  3564. return awsutil.Prettify(s)
  3565. }
  3566. // GoString returns the string representation
  3567. func (s DescribeIpGroupsOutput) GoString() string {
  3568. return s.String()
  3569. }
  3570. // SetNextToken sets the NextToken field's value.
  3571. func (s *DescribeIpGroupsOutput) SetNextToken(v string) *DescribeIpGroupsOutput {
  3572. s.NextToken = &v
  3573. return s
  3574. }
  3575. // SetResult sets the Result field's value.
  3576. func (s *DescribeIpGroupsOutput) SetResult(v []*IpGroup) *DescribeIpGroupsOutput {
  3577. s.Result = v
  3578. return s
  3579. }
  3580. type DescribeTagsInput struct {
  3581. _ struct{} `type:"structure"`
  3582. // The identifier of the WorkSpace. To find this ID, use DescribeWorkspaces.
  3583. //
  3584. // ResourceId is a required field
  3585. ResourceId *string `min:"1" type:"string" required:"true"`
  3586. }
  3587. // String returns the string representation
  3588. func (s DescribeTagsInput) String() string {
  3589. return awsutil.Prettify(s)
  3590. }
  3591. // GoString returns the string representation
  3592. func (s DescribeTagsInput) GoString() string {
  3593. return s.String()
  3594. }
  3595. // Validate inspects the fields of the type to determine if they are valid.
  3596. func (s *DescribeTagsInput) Validate() error {
  3597. invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"}
  3598. if s.ResourceId == nil {
  3599. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  3600. }
  3601. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  3602. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  3603. }
  3604. if invalidParams.Len() > 0 {
  3605. return invalidParams
  3606. }
  3607. return nil
  3608. }
  3609. // SetResourceId sets the ResourceId field's value.
  3610. func (s *DescribeTagsInput) SetResourceId(v string) *DescribeTagsInput {
  3611. s.ResourceId = &v
  3612. return s
  3613. }
  3614. type DescribeTagsOutput struct {
  3615. _ struct{} `type:"structure"`
  3616. // The tags.
  3617. TagList []*Tag `type:"list"`
  3618. }
  3619. // String returns the string representation
  3620. func (s DescribeTagsOutput) String() string {
  3621. return awsutil.Prettify(s)
  3622. }
  3623. // GoString returns the string representation
  3624. func (s DescribeTagsOutput) GoString() string {
  3625. return s.String()
  3626. }
  3627. // SetTagList sets the TagList field's value.
  3628. func (s *DescribeTagsOutput) SetTagList(v []*Tag) *DescribeTagsOutput {
  3629. s.TagList = v
  3630. return s
  3631. }
  3632. type DescribeWorkspaceBundlesInput struct {
  3633. _ struct{} `type:"structure"`
  3634. // The identifiers of the bundles. You cannot combine this parameter with any
  3635. // other filter.
  3636. BundleIds []*string `min:"1" type:"list"`
  3637. // The token for the next set of results. (You received this token from a previous
  3638. // call.)
  3639. NextToken *string `min:"1" type:"string"`
  3640. // The owner of the bundles. You cannot combine this parameter with any other
  3641. // filter.
  3642. //
  3643. // Specify AMAZON to describe the bundles provided by AWS or null to describe
  3644. // the bundles that belong to your account.
  3645. Owner *string `type:"string"`
  3646. }
  3647. // String returns the string representation
  3648. func (s DescribeWorkspaceBundlesInput) String() string {
  3649. return awsutil.Prettify(s)
  3650. }
  3651. // GoString returns the string representation
  3652. func (s DescribeWorkspaceBundlesInput) GoString() string {
  3653. return s.String()
  3654. }
  3655. // Validate inspects the fields of the type to determine if they are valid.
  3656. func (s *DescribeWorkspaceBundlesInput) Validate() error {
  3657. invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspaceBundlesInput"}
  3658. if s.BundleIds != nil && len(s.BundleIds) < 1 {
  3659. invalidParams.Add(request.NewErrParamMinLen("BundleIds", 1))
  3660. }
  3661. if s.NextToken != nil && len(*s.NextToken) < 1 {
  3662. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  3663. }
  3664. if invalidParams.Len() > 0 {
  3665. return invalidParams
  3666. }
  3667. return nil
  3668. }
  3669. // SetBundleIds sets the BundleIds field's value.
  3670. func (s *DescribeWorkspaceBundlesInput) SetBundleIds(v []*string) *DescribeWorkspaceBundlesInput {
  3671. s.BundleIds = v
  3672. return s
  3673. }
  3674. // SetNextToken sets the NextToken field's value.
  3675. func (s *DescribeWorkspaceBundlesInput) SetNextToken(v string) *DescribeWorkspaceBundlesInput {
  3676. s.NextToken = &v
  3677. return s
  3678. }
  3679. // SetOwner sets the Owner field's value.
  3680. func (s *DescribeWorkspaceBundlesInput) SetOwner(v string) *DescribeWorkspaceBundlesInput {
  3681. s.Owner = &v
  3682. return s
  3683. }
  3684. type DescribeWorkspaceBundlesOutput struct {
  3685. _ struct{} `type:"structure"`
  3686. // Information about the bundles.
  3687. Bundles []*WorkspaceBundle `type:"list"`
  3688. // The token to use to retrieve the next set of results, or null if there are
  3689. // no more results available. This token is valid for one day and must be used
  3690. // within that time frame.
  3691. NextToken *string `min:"1" type:"string"`
  3692. }
  3693. // String returns the string representation
  3694. func (s DescribeWorkspaceBundlesOutput) String() string {
  3695. return awsutil.Prettify(s)
  3696. }
  3697. // GoString returns the string representation
  3698. func (s DescribeWorkspaceBundlesOutput) GoString() string {
  3699. return s.String()
  3700. }
  3701. // SetBundles sets the Bundles field's value.
  3702. func (s *DescribeWorkspaceBundlesOutput) SetBundles(v []*WorkspaceBundle) *DescribeWorkspaceBundlesOutput {
  3703. s.Bundles = v
  3704. return s
  3705. }
  3706. // SetNextToken sets the NextToken field's value.
  3707. func (s *DescribeWorkspaceBundlesOutput) SetNextToken(v string) *DescribeWorkspaceBundlesOutput {
  3708. s.NextToken = &v
  3709. return s
  3710. }
  3711. type DescribeWorkspaceDirectoriesInput struct {
  3712. _ struct{} `type:"structure"`
  3713. // The identifiers of the directories. If the value is null, all directories
  3714. // are retrieved.
  3715. DirectoryIds []*string `min:"1" type:"list"`
  3716. // If you received a NextToken from a previous call that was paginated, provide
  3717. // this token to receive the next set of results.
  3718. NextToken *string `min:"1" type:"string"`
  3719. }
  3720. // String returns the string representation
  3721. func (s DescribeWorkspaceDirectoriesInput) String() string {
  3722. return awsutil.Prettify(s)
  3723. }
  3724. // GoString returns the string representation
  3725. func (s DescribeWorkspaceDirectoriesInput) GoString() string {
  3726. return s.String()
  3727. }
  3728. // Validate inspects the fields of the type to determine if they are valid.
  3729. func (s *DescribeWorkspaceDirectoriesInput) Validate() error {
  3730. invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspaceDirectoriesInput"}
  3731. if s.DirectoryIds != nil && len(s.DirectoryIds) < 1 {
  3732. invalidParams.Add(request.NewErrParamMinLen("DirectoryIds", 1))
  3733. }
  3734. if s.NextToken != nil && len(*s.NextToken) < 1 {
  3735. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  3736. }
  3737. if invalidParams.Len() > 0 {
  3738. return invalidParams
  3739. }
  3740. return nil
  3741. }
  3742. // SetDirectoryIds sets the DirectoryIds field's value.
  3743. func (s *DescribeWorkspaceDirectoriesInput) SetDirectoryIds(v []*string) *DescribeWorkspaceDirectoriesInput {
  3744. s.DirectoryIds = v
  3745. return s
  3746. }
  3747. // SetNextToken sets the NextToken field's value.
  3748. func (s *DescribeWorkspaceDirectoriesInput) SetNextToken(v string) *DescribeWorkspaceDirectoriesInput {
  3749. s.NextToken = &v
  3750. return s
  3751. }
  3752. type DescribeWorkspaceDirectoriesOutput struct {
  3753. _ struct{} `type:"structure"`
  3754. // Information about the directories.
  3755. Directories []*WorkspaceDirectory `type:"list"`
  3756. // The token to use to retrieve the next set of results, or null if no more
  3757. // results are available.
  3758. NextToken *string `min:"1" type:"string"`
  3759. }
  3760. // String returns the string representation
  3761. func (s DescribeWorkspaceDirectoriesOutput) String() string {
  3762. return awsutil.Prettify(s)
  3763. }
  3764. // GoString returns the string representation
  3765. func (s DescribeWorkspaceDirectoriesOutput) GoString() string {
  3766. return s.String()
  3767. }
  3768. // SetDirectories sets the Directories field's value.
  3769. func (s *DescribeWorkspaceDirectoriesOutput) SetDirectories(v []*WorkspaceDirectory) *DescribeWorkspaceDirectoriesOutput {
  3770. s.Directories = v
  3771. return s
  3772. }
  3773. // SetNextToken sets the NextToken field's value.
  3774. func (s *DescribeWorkspaceDirectoriesOutput) SetNextToken(v string) *DescribeWorkspaceDirectoriesOutput {
  3775. s.NextToken = &v
  3776. return s
  3777. }
  3778. type DescribeWorkspaceImagesInput struct {
  3779. _ struct{} `type:"structure"`
  3780. // The identifier of the image.
  3781. ImageIds []*string `min:"1" type:"list"`
  3782. // The maximum number of items to return.
  3783. MaxResults *int64 `min:"1" type:"integer"`
  3784. // If you received a NextToken from a previous call that was paginated, provide
  3785. // this token to receive the next set of results.
  3786. NextToken *string `min:"1" type:"string"`
  3787. }
  3788. // String returns the string representation
  3789. func (s DescribeWorkspaceImagesInput) String() string {
  3790. return awsutil.Prettify(s)
  3791. }
  3792. // GoString returns the string representation
  3793. func (s DescribeWorkspaceImagesInput) GoString() string {
  3794. return s.String()
  3795. }
  3796. // Validate inspects the fields of the type to determine if they are valid.
  3797. func (s *DescribeWorkspaceImagesInput) Validate() error {
  3798. invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspaceImagesInput"}
  3799. if s.ImageIds != nil && len(s.ImageIds) < 1 {
  3800. invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
  3801. }
  3802. if s.MaxResults != nil && *s.MaxResults < 1 {
  3803. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3804. }
  3805. if s.NextToken != nil && len(*s.NextToken) < 1 {
  3806. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  3807. }
  3808. if invalidParams.Len() > 0 {
  3809. return invalidParams
  3810. }
  3811. return nil
  3812. }
  3813. // SetImageIds sets the ImageIds field's value.
  3814. func (s *DescribeWorkspaceImagesInput) SetImageIds(v []*string) *DescribeWorkspaceImagesInput {
  3815. s.ImageIds = v
  3816. return s
  3817. }
  3818. // SetMaxResults sets the MaxResults field's value.
  3819. func (s *DescribeWorkspaceImagesInput) SetMaxResults(v int64) *DescribeWorkspaceImagesInput {
  3820. s.MaxResults = &v
  3821. return s
  3822. }
  3823. // SetNextToken sets the NextToken field's value.
  3824. func (s *DescribeWorkspaceImagesInput) SetNextToken(v string) *DescribeWorkspaceImagesInput {
  3825. s.NextToken = &v
  3826. return s
  3827. }
  3828. type DescribeWorkspaceImagesOutput struct {
  3829. _ struct{} `type:"structure"`
  3830. // Information about the images.
  3831. Images []*WorkspaceImage `type:"list"`
  3832. // The token to use to retrieve the next set of results, or null if no more
  3833. // results are available.
  3834. NextToken *string `min:"1" type:"string"`
  3835. }
  3836. // String returns the string representation
  3837. func (s DescribeWorkspaceImagesOutput) String() string {
  3838. return awsutil.Prettify(s)
  3839. }
  3840. // GoString returns the string representation
  3841. func (s DescribeWorkspaceImagesOutput) GoString() string {
  3842. return s.String()
  3843. }
  3844. // SetImages sets the Images field's value.
  3845. func (s *DescribeWorkspaceImagesOutput) SetImages(v []*WorkspaceImage) *DescribeWorkspaceImagesOutput {
  3846. s.Images = v
  3847. return s
  3848. }
  3849. // SetNextToken sets the NextToken field's value.
  3850. func (s *DescribeWorkspaceImagesOutput) SetNextToken(v string) *DescribeWorkspaceImagesOutput {
  3851. s.NextToken = &v
  3852. return s
  3853. }
  3854. type DescribeWorkspacesConnectionStatusInput struct {
  3855. _ struct{} `type:"structure"`
  3856. // If you received a NextToken from a previous call that was paginated, provide
  3857. // this token to receive the next set of results.
  3858. NextToken *string `min:"1" type:"string"`
  3859. // The identifiers of the WorkSpaces. You can specify up to 25 WorkSpaces.
  3860. WorkspaceIds []*string `min:"1" type:"list"`
  3861. }
  3862. // String returns the string representation
  3863. func (s DescribeWorkspacesConnectionStatusInput) String() string {
  3864. return awsutil.Prettify(s)
  3865. }
  3866. // GoString returns the string representation
  3867. func (s DescribeWorkspacesConnectionStatusInput) GoString() string {
  3868. return s.String()
  3869. }
  3870. // Validate inspects the fields of the type to determine if they are valid.
  3871. func (s *DescribeWorkspacesConnectionStatusInput) Validate() error {
  3872. invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspacesConnectionStatusInput"}
  3873. if s.NextToken != nil && len(*s.NextToken) < 1 {
  3874. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  3875. }
  3876. if s.WorkspaceIds != nil && len(s.WorkspaceIds) < 1 {
  3877. invalidParams.Add(request.NewErrParamMinLen("WorkspaceIds", 1))
  3878. }
  3879. if invalidParams.Len() > 0 {
  3880. return invalidParams
  3881. }
  3882. return nil
  3883. }
  3884. // SetNextToken sets the NextToken field's value.
  3885. func (s *DescribeWorkspacesConnectionStatusInput) SetNextToken(v string) *DescribeWorkspacesConnectionStatusInput {
  3886. s.NextToken = &v
  3887. return s
  3888. }
  3889. // SetWorkspaceIds sets the WorkspaceIds field's value.
  3890. func (s *DescribeWorkspacesConnectionStatusInput) SetWorkspaceIds(v []*string) *DescribeWorkspacesConnectionStatusInput {
  3891. s.WorkspaceIds = v
  3892. return s
  3893. }
  3894. type DescribeWorkspacesConnectionStatusOutput struct {
  3895. _ struct{} `type:"structure"`
  3896. // The token to use to retrieve the next set of results, or null if no more
  3897. // results are available.
  3898. NextToken *string `min:"1" type:"string"`
  3899. // Information about the connection status of the WorkSpace.
  3900. WorkspacesConnectionStatus []*WorkspaceConnectionStatus `type:"list"`
  3901. }
  3902. // String returns the string representation
  3903. func (s DescribeWorkspacesConnectionStatusOutput) String() string {
  3904. return awsutil.Prettify(s)
  3905. }
  3906. // GoString returns the string representation
  3907. func (s DescribeWorkspacesConnectionStatusOutput) GoString() string {
  3908. return s.String()
  3909. }
  3910. // SetNextToken sets the NextToken field's value.
  3911. func (s *DescribeWorkspacesConnectionStatusOutput) SetNextToken(v string) *DescribeWorkspacesConnectionStatusOutput {
  3912. s.NextToken = &v
  3913. return s
  3914. }
  3915. // SetWorkspacesConnectionStatus sets the WorkspacesConnectionStatus field's value.
  3916. func (s *DescribeWorkspacesConnectionStatusOutput) SetWorkspacesConnectionStatus(v []*WorkspaceConnectionStatus) *DescribeWorkspacesConnectionStatusOutput {
  3917. s.WorkspacesConnectionStatus = v
  3918. return s
  3919. }
  3920. type DescribeWorkspacesInput struct {
  3921. _ struct{} `type:"structure"`
  3922. // The identifier of the bundle. All WorkSpaces that are created from this bundle
  3923. // are retrieved. You cannot combine this parameter with any other filter.
  3924. BundleId *string `type:"string"`
  3925. // The identifier of the directory. In addition, you can optionally specify
  3926. // a specific directory user (see UserName). You cannot combine this parameter
  3927. // with any other filter.
  3928. DirectoryId *string `type:"string"`
  3929. // The maximum number of items to return.
  3930. Limit *int64 `min:"1" type:"integer"`
  3931. // If you received a NextToken from a previous call that was paginated, provide
  3932. // this token to receive the next set of results.
  3933. NextToken *string `min:"1" type:"string"`
  3934. // The name of the directory user. You must specify this parameter with DirectoryId.
  3935. UserName *string `min:"1" type:"string"`
  3936. // The identifiers of the WorkSpaces. You cannot combine this parameter with
  3937. // any other filter.
  3938. //
  3939. // Because the CreateWorkspaces operation is asynchronous, the identifier it
  3940. // returns is not immediately available. If you immediately call DescribeWorkspaces
  3941. // with this identifier, no information is returned.
  3942. WorkspaceIds []*string `min:"1" type:"list"`
  3943. }
  3944. // String returns the string representation
  3945. func (s DescribeWorkspacesInput) String() string {
  3946. return awsutil.Prettify(s)
  3947. }
  3948. // GoString returns the string representation
  3949. func (s DescribeWorkspacesInput) GoString() string {
  3950. return s.String()
  3951. }
  3952. // Validate inspects the fields of the type to determine if they are valid.
  3953. func (s *DescribeWorkspacesInput) Validate() error {
  3954. invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspacesInput"}
  3955. if s.Limit != nil && *s.Limit < 1 {
  3956. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  3957. }
  3958. if s.NextToken != nil && len(*s.NextToken) < 1 {
  3959. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  3960. }
  3961. if s.UserName != nil && len(*s.UserName) < 1 {
  3962. invalidParams.Add(request.NewErrParamMinLen("UserName", 1))
  3963. }
  3964. if s.WorkspaceIds != nil && len(s.WorkspaceIds) < 1 {
  3965. invalidParams.Add(request.NewErrParamMinLen("WorkspaceIds", 1))
  3966. }
  3967. if invalidParams.Len() > 0 {
  3968. return invalidParams
  3969. }
  3970. return nil
  3971. }
  3972. // SetBundleId sets the BundleId field's value.
  3973. func (s *DescribeWorkspacesInput) SetBundleId(v string) *DescribeWorkspacesInput {
  3974. s.BundleId = &v
  3975. return s
  3976. }
  3977. // SetDirectoryId sets the DirectoryId field's value.
  3978. func (s *DescribeWorkspacesInput) SetDirectoryId(v string) *DescribeWorkspacesInput {
  3979. s.DirectoryId = &v
  3980. return s
  3981. }
  3982. // SetLimit sets the Limit field's value.
  3983. func (s *DescribeWorkspacesInput) SetLimit(v int64) *DescribeWorkspacesInput {
  3984. s.Limit = &v
  3985. return s
  3986. }
  3987. // SetNextToken sets the NextToken field's value.
  3988. func (s *DescribeWorkspacesInput) SetNextToken(v string) *DescribeWorkspacesInput {
  3989. s.NextToken = &v
  3990. return s
  3991. }
  3992. // SetUserName sets the UserName field's value.
  3993. func (s *DescribeWorkspacesInput) SetUserName(v string) *DescribeWorkspacesInput {
  3994. s.UserName = &v
  3995. return s
  3996. }
  3997. // SetWorkspaceIds sets the WorkspaceIds field's value.
  3998. func (s *DescribeWorkspacesInput) SetWorkspaceIds(v []*string) *DescribeWorkspacesInput {
  3999. s.WorkspaceIds = v
  4000. return s
  4001. }
  4002. type DescribeWorkspacesOutput struct {
  4003. _ struct{} `type:"structure"`
  4004. // The token to use to retrieve the next set of results, or null if no more
  4005. // results are available.
  4006. NextToken *string `min:"1" type:"string"`
  4007. // Information about the WorkSpaces.
  4008. //
  4009. // Because CreateWorkspaces is an asynchronous operation, some of the returned
  4010. // information could be incomplete.
  4011. Workspaces []*Workspace `type:"list"`
  4012. }
  4013. // String returns the string representation
  4014. func (s DescribeWorkspacesOutput) String() string {
  4015. return awsutil.Prettify(s)
  4016. }
  4017. // GoString returns the string representation
  4018. func (s DescribeWorkspacesOutput) GoString() string {
  4019. return s.String()
  4020. }
  4021. // SetNextToken sets the NextToken field's value.
  4022. func (s *DescribeWorkspacesOutput) SetNextToken(v string) *DescribeWorkspacesOutput {
  4023. s.NextToken = &v
  4024. return s
  4025. }
  4026. // SetWorkspaces sets the Workspaces field's value.
  4027. func (s *DescribeWorkspacesOutput) SetWorkspaces(v []*Workspace) *DescribeWorkspacesOutput {
  4028. s.Workspaces = v
  4029. return s
  4030. }
  4031. type DisassociateIpGroupsInput struct {
  4032. _ struct{} `type:"structure"`
  4033. // The identifier of the directory.
  4034. //
  4035. // DirectoryId is a required field
  4036. DirectoryId *string `type:"string" required:"true"`
  4037. // The identifiers of one or more IP access control groups.
  4038. //
  4039. // GroupIds is a required field
  4040. GroupIds []*string `type:"list" required:"true"`
  4041. }
  4042. // String returns the string representation
  4043. func (s DisassociateIpGroupsInput) String() string {
  4044. return awsutil.Prettify(s)
  4045. }
  4046. // GoString returns the string representation
  4047. func (s DisassociateIpGroupsInput) GoString() string {
  4048. return s.String()
  4049. }
  4050. // Validate inspects the fields of the type to determine if they are valid.
  4051. func (s *DisassociateIpGroupsInput) Validate() error {
  4052. invalidParams := request.ErrInvalidParams{Context: "DisassociateIpGroupsInput"}
  4053. if s.DirectoryId == nil {
  4054. invalidParams.Add(request.NewErrParamRequired("DirectoryId"))
  4055. }
  4056. if s.GroupIds == nil {
  4057. invalidParams.Add(request.NewErrParamRequired("GroupIds"))
  4058. }
  4059. if invalidParams.Len() > 0 {
  4060. return invalidParams
  4061. }
  4062. return nil
  4063. }
  4064. // SetDirectoryId sets the DirectoryId field's value.
  4065. func (s *DisassociateIpGroupsInput) SetDirectoryId(v string) *DisassociateIpGroupsInput {
  4066. s.DirectoryId = &v
  4067. return s
  4068. }
  4069. // SetGroupIds sets the GroupIds field's value.
  4070. func (s *DisassociateIpGroupsInput) SetGroupIds(v []*string) *DisassociateIpGroupsInput {
  4071. s.GroupIds = v
  4072. return s
  4073. }
  4074. type DisassociateIpGroupsOutput struct {
  4075. _ struct{} `type:"structure"`
  4076. }
  4077. // String returns the string representation
  4078. func (s DisassociateIpGroupsOutput) String() string {
  4079. return awsutil.Prettify(s)
  4080. }
  4081. // GoString returns the string representation
  4082. func (s DisassociateIpGroupsOutput) GoString() string {
  4083. return s.String()
  4084. }
  4085. // Describes a WorkSpace that cannot be created.
  4086. type FailedCreateWorkspaceRequest struct {
  4087. _ struct{} `type:"structure"`
  4088. // The error code that is returned if the WorkSpace cannot be created.
  4089. ErrorCode *string `type:"string"`
  4090. // The text of the error message that is returned if the WorkSpace cannot be
  4091. // created.
  4092. ErrorMessage *string `type:"string"`
  4093. // Information about the WorkSpace.
  4094. WorkspaceRequest *WorkspaceRequest `type:"structure"`
  4095. }
  4096. // String returns the string representation
  4097. func (s FailedCreateWorkspaceRequest) String() string {
  4098. return awsutil.Prettify(s)
  4099. }
  4100. // GoString returns the string representation
  4101. func (s FailedCreateWorkspaceRequest) GoString() string {
  4102. return s.String()
  4103. }
  4104. // SetErrorCode sets the ErrorCode field's value.
  4105. func (s *FailedCreateWorkspaceRequest) SetErrorCode(v string) *FailedCreateWorkspaceRequest {
  4106. s.ErrorCode = &v
  4107. return s
  4108. }
  4109. // SetErrorMessage sets the ErrorMessage field's value.
  4110. func (s *FailedCreateWorkspaceRequest) SetErrorMessage(v string) *FailedCreateWorkspaceRequest {
  4111. s.ErrorMessage = &v
  4112. return s
  4113. }
  4114. // SetWorkspaceRequest sets the WorkspaceRequest field's value.
  4115. func (s *FailedCreateWorkspaceRequest) SetWorkspaceRequest(v *WorkspaceRequest) *FailedCreateWorkspaceRequest {
  4116. s.WorkspaceRequest = v
  4117. return s
  4118. }
  4119. // Describes a WorkSpace that could not be rebooted. (RebootWorkspaces), rebuilt
  4120. // (RebuildWorkspaces), terminated (TerminateWorkspaces), started (StartWorkspaces),
  4121. // or stopped (StopWorkspaces).
  4122. type FailedWorkspaceChangeRequest struct {
  4123. _ struct{} `type:"structure"`
  4124. // The error code that is returned if the WorkSpace cannot be rebooted.
  4125. ErrorCode *string `type:"string"`
  4126. // The text of the error message that is returned if the WorkSpace cannot be
  4127. // rebooted.
  4128. ErrorMessage *string `type:"string"`
  4129. // The identifier of the WorkSpace.
  4130. WorkspaceId *string `type:"string"`
  4131. }
  4132. // String returns the string representation
  4133. func (s FailedWorkspaceChangeRequest) String() string {
  4134. return awsutil.Prettify(s)
  4135. }
  4136. // GoString returns the string representation
  4137. func (s FailedWorkspaceChangeRequest) GoString() string {
  4138. return s.String()
  4139. }
  4140. // SetErrorCode sets the ErrorCode field's value.
  4141. func (s *FailedWorkspaceChangeRequest) SetErrorCode(v string) *FailedWorkspaceChangeRequest {
  4142. s.ErrorCode = &v
  4143. return s
  4144. }
  4145. // SetErrorMessage sets the ErrorMessage field's value.
  4146. func (s *FailedWorkspaceChangeRequest) SetErrorMessage(v string) *FailedWorkspaceChangeRequest {
  4147. s.ErrorMessage = &v
  4148. return s
  4149. }
  4150. // SetWorkspaceId sets the WorkspaceId field's value.
  4151. func (s *FailedWorkspaceChangeRequest) SetWorkspaceId(v string) *FailedWorkspaceChangeRequest {
  4152. s.WorkspaceId = &v
  4153. return s
  4154. }
  4155. type ImportWorkspaceImageInput struct {
  4156. _ struct{} `type:"structure"`
  4157. // The identifier of the EC2 image.
  4158. //
  4159. // Ec2ImageId is a required field
  4160. Ec2ImageId *string `type:"string" required:"true"`
  4161. // The description of the WorkSpace image.
  4162. //
  4163. // ImageDescription is a required field
  4164. ImageDescription *string `min:"1" type:"string" required:"true"`
  4165. // The name of the WorkSpace image.
  4166. //
  4167. // ImageName is a required field
  4168. ImageName *string `min:"1" type:"string" required:"true"`
  4169. // The ingestion process to be used when importing the image.
  4170. //
  4171. // IngestionProcess is a required field
  4172. IngestionProcess *string `type:"string" required:"true" enum:"WorkspaceImageIngestionProcess"`
  4173. }
  4174. // String returns the string representation
  4175. func (s ImportWorkspaceImageInput) String() string {
  4176. return awsutil.Prettify(s)
  4177. }
  4178. // GoString returns the string representation
  4179. func (s ImportWorkspaceImageInput) GoString() string {
  4180. return s.String()
  4181. }
  4182. // Validate inspects the fields of the type to determine if they are valid.
  4183. func (s *ImportWorkspaceImageInput) Validate() error {
  4184. invalidParams := request.ErrInvalidParams{Context: "ImportWorkspaceImageInput"}
  4185. if s.Ec2ImageId == nil {
  4186. invalidParams.Add(request.NewErrParamRequired("Ec2ImageId"))
  4187. }
  4188. if s.ImageDescription == nil {
  4189. invalidParams.Add(request.NewErrParamRequired("ImageDescription"))
  4190. }
  4191. if s.ImageDescription != nil && len(*s.ImageDescription) < 1 {
  4192. invalidParams.Add(request.NewErrParamMinLen("ImageDescription", 1))
  4193. }
  4194. if s.ImageName == nil {
  4195. invalidParams.Add(request.NewErrParamRequired("ImageName"))
  4196. }
  4197. if s.ImageName != nil && len(*s.ImageName) < 1 {
  4198. invalidParams.Add(request.NewErrParamMinLen("ImageName", 1))
  4199. }
  4200. if s.IngestionProcess == nil {
  4201. invalidParams.Add(request.NewErrParamRequired("IngestionProcess"))
  4202. }
  4203. if invalidParams.Len() > 0 {
  4204. return invalidParams
  4205. }
  4206. return nil
  4207. }
  4208. // SetEc2ImageId sets the Ec2ImageId field's value.
  4209. func (s *ImportWorkspaceImageInput) SetEc2ImageId(v string) *ImportWorkspaceImageInput {
  4210. s.Ec2ImageId = &v
  4211. return s
  4212. }
  4213. // SetImageDescription sets the ImageDescription field's value.
  4214. func (s *ImportWorkspaceImageInput) SetImageDescription(v string) *ImportWorkspaceImageInput {
  4215. s.ImageDescription = &v
  4216. return s
  4217. }
  4218. // SetImageName sets the ImageName field's value.
  4219. func (s *ImportWorkspaceImageInput) SetImageName(v string) *ImportWorkspaceImageInput {
  4220. s.ImageName = &v
  4221. return s
  4222. }
  4223. // SetIngestionProcess sets the IngestionProcess field's value.
  4224. func (s *ImportWorkspaceImageInput) SetIngestionProcess(v string) *ImportWorkspaceImageInput {
  4225. s.IngestionProcess = &v
  4226. return s
  4227. }
  4228. type ImportWorkspaceImageOutput struct {
  4229. _ struct{} `type:"structure"`
  4230. // The identifier of the WorkSpace image.
  4231. ImageId *string `type:"string"`
  4232. }
  4233. // String returns the string representation
  4234. func (s ImportWorkspaceImageOutput) String() string {
  4235. return awsutil.Prettify(s)
  4236. }
  4237. // GoString returns the string representation
  4238. func (s ImportWorkspaceImageOutput) GoString() string {
  4239. return s.String()
  4240. }
  4241. // SetImageId sets the ImageId field's value.
  4242. func (s *ImportWorkspaceImageOutput) SetImageId(v string) *ImportWorkspaceImageOutput {
  4243. s.ImageId = &v
  4244. return s
  4245. }
  4246. // Describes an IP access control group.
  4247. type IpGroup struct {
  4248. _ struct{} `type:"structure"`
  4249. // The description of the group.
  4250. GroupDesc *string `locationName:"groupDesc" type:"string"`
  4251. // The identifier of the group.
  4252. GroupId *string `locationName:"groupId" type:"string"`
  4253. // The name of the group.
  4254. GroupName *string `locationName:"groupName" type:"string"`
  4255. // The rules.
  4256. UserRules []*IpRuleItem `locationName:"userRules" type:"list"`
  4257. }
  4258. // String returns the string representation
  4259. func (s IpGroup) String() string {
  4260. return awsutil.Prettify(s)
  4261. }
  4262. // GoString returns the string representation
  4263. func (s IpGroup) GoString() string {
  4264. return s.String()
  4265. }
  4266. // SetGroupDesc sets the GroupDesc field's value.
  4267. func (s *IpGroup) SetGroupDesc(v string) *IpGroup {
  4268. s.GroupDesc = &v
  4269. return s
  4270. }
  4271. // SetGroupId sets the GroupId field's value.
  4272. func (s *IpGroup) SetGroupId(v string) *IpGroup {
  4273. s.GroupId = &v
  4274. return s
  4275. }
  4276. // SetGroupName sets the GroupName field's value.
  4277. func (s *IpGroup) SetGroupName(v string) *IpGroup {
  4278. s.GroupName = &v
  4279. return s
  4280. }
  4281. // SetUserRules sets the UserRules field's value.
  4282. func (s *IpGroup) SetUserRules(v []*IpRuleItem) *IpGroup {
  4283. s.UserRules = v
  4284. return s
  4285. }
  4286. // Describes a rule for an IP access control group.
  4287. type IpRuleItem struct {
  4288. _ struct{} `type:"structure"`
  4289. // The IP address range, in CIDR notation.
  4290. IpRule *string `locationName:"ipRule" type:"string"`
  4291. // The description.
  4292. RuleDesc *string `locationName:"ruleDesc" type:"string"`
  4293. }
  4294. // String returns the string representation
  4295. func (s IpRuleItem) String() string {
  4296. return awsutil.Prettify(s)
  4297. }
  4298. // GoString returns the string representation
  4299. func (s IpRuleItem) GoString() string {
  4300. return s.String()
  4301. }
  4302. // SetIpRule sets the IpRule field's value.
  4303. func (s *IpRuleItem) SetIpRule(v string) *IpRuleItem {
  4304. s.IpRule = &v
  4305. return s
  4306. }
  4307. // SetRuleDesc sets the RuleDesc field's value.
  4308. func (s *IpRuleItem) SetRuleDesc(v string) *IpRuleItem {
  4309. s.RuleDesc = &v
  4310. return s
  4311. }
  4312. type ListAvailableManagementCidrRangesInput struct {
  4313. _ struct{} `type:"structure"`
  4314. // The IP address range to search. Specify an IP address range that is compatible
  4315. // with your network and in CIDR notation (that is, specify the range as an
  4316. // IPv4 CIDR block).
  4317. //
  4318. // ManagementCidrRangeConstraint is a required field
  4319. ManagementCidrRangeConstraint *string `type:"string" required:"true"`
  4320. // The maximum number of items to return.
  4321. MaxResults *int64 `min:"1" type:"integer"`
  4322. // If you received a NextToken from a previous call that was paginated, provide
  4323. // this token to receive the next set of results.
  4324. NextToken *string `min:"1" type:"string"`
  4325. }
  4326. // String returns the string representation
  4327. func (s ListAvailableManagementCidrRangesInput) String() string {
  4328. return awsutil.Prettify(s)
  4329. }
  4330. // GoString returns the string representation
  4331. func (s ListAvailableManagementCidrRangesInput) GoString() string {
  4332. return s.String()
  4333. }
  4334. // Validate inspects the fields of the type to determine if they are valid.
  4335. func (s *ListAvailableManagementCidrRangesInput) Validate() error {
  4336. invalidParams := request.ErrInvalidParams{Context: "ListAvailableManagementCidrRangesInput"}
  4337. if s.ManagementCidrRangeConstraint == nil {
  4338. invalidParams.Add(request.NewErrParamRequired("ManagementCidrRangeConstraint"))
  4339. }
  4340. if s.MaxResults != nil && *s.MaxResults < 1 {
  4341. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  4342. }
  4343. if s.NextToken != nil && len(*s.NextToken) < 1 {
  4344. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  4345. }
  4346. if invalidParams.Len() > 0 {
  4347. return invalidParams
  4348. }
  4349. return nil
  4350. }
  4351. // SetManagementCidrRangeConstraint sets the ManagementCidrRangeConstraint field's value.
  4352. func (s *ListAvailableManagementCidrRangesInput) SetManagementCidrRangeConstraint(v string) *ListAvailableManagementCidrRangesInput {
  4353. s.ManagementCidrRangeConstraint = &v
  4354. return s
  4355. }
  4356. // SetMaxResults sets the MaxResults field's value.
  4357. func (s *ListAvailableManagementCidrRangesInput) SetMaxResults(v int64) *ListAvailableManagementCidrRangesInput {
  4358. s.MaxResults = &v
  4359. return s
  4360. }
  4361. // SetNextToken sets the NextToken field's value.
  4362. func (s *ListAvailableManagementCidrRangesInput) SetNextToken(v string) *ListAvailableManagementCidrRangesInput {
  4363. s.NextToken = &v
  4364. return s
  4365. }
  4366. type ListAvailableManagementCidrRangesOutput struct {
  4367. _ struct{} `type:"structure"`
  4368. // The list of available IP address ranges, specified as IPv4 CIDR blocks.
  4369. ManagementCidrRanges []*string `type:"list"`
  4370. // The token to use to retrieve the next set of results, or null if no more
  4371. // results are available.
  4372. NextToken *string `min:"1" type:"string"`
  4373. }
  4374. // String returns the string representation
  4375. func (s ListAvailableManagementCidrRangesOutput) String() string {
  4376. return awsutil.Prettify(s)
  4377. }
  4378. // GoString returns the string representation
  4379. func (s ListAvailableManagementCidrRangesOutput) GoString() string {
  4380. return s.String()
  4381. }
  4382. // SetManagementCidrRanges sets the ManagementCidrRanges field's value.
  4383. func (s *ListAvailableManagementCidrRangesOutput) SetManagementCidrRanges(v []*string) *ListAvailableManagementCidrRangesOutput {
  4384. s.ManagementCidrRanges = v
  4385. return s
  4386. }
  4387. // SetNextToken sets the NextToken field's value.
  4388. func (s *ListAvailableManagementCidrRangesOutput) SetNextToken(v string) *ListAvailableManagementCidrRangesOutput {
  4389. s.NextToken = &v
  4390. return s
  4391. }
  4392. // Describes a WorkSpace modification.
  4393. type ModificationState struct {
  4394. _ struct{} `type:"structure"`
  4395. // The resource.
  4396. Resource *string `type:"string" enum:"ModificationResourceEnum"`
  4397. // The modification state.
  4398. State *string `type:"string" enum:"ModificationStateEnum"`
  4399. }
  4400. // String returns the string representation
  4401. func (s ModificationState) String() string {
  4402. return awsutil.Prettify(s)
  4403. }
  4404. // GoString returns the string representation
  4405. func (s ModificationState) GoString() string {
  4406. return s.String()
  4407. }
  4408. // SetResource sets the Resource field's value.
  4409. func (s *ModificationState) SetResource(v string) *ModificationState {
  4410. s.Resource = &v
  4411. return s
  4412. }
  4413. // SetState sets the State field's value.
  4414. func (s *ModificationState) SetState(v string) *ModificationState {
  4415. s.State = &v
  4416. return s
  4417. }
  4418. type ModifyAccountInput struct {
  4419. _ struct{} `type:"structure"`
  4420. // The IP address range, specified as an IPv4 CIDR block, for the management
  4421. // network interface. Specify an IP address range that is compatible with your
  4422. // network and in CIDR notation (that is, specify the range as an IPv4 CIDR
  4423. // block). The CIDR block size must be /16 (for example, 203.0.113.25/16). It
  4424. // must also be specified as available by the ListAvailableManagementCidrRanges
  4425. // operation.
  4426. DedicatedTenancyManagementCidrRange *string `type:"string"`
  4427. // The status of BYOL.
  4428. DedicatedTenancySupport *string `type:"string" enum:"DedicatedTenancySupportEnum"`
  4429. }
  4430. // String returns the string representation
  4431. func (s ModifyAccountInput) String() string {
  4432. return awsutil.Prettify(s)
  4433. }
  4434. // GoString returns the string representation
  4435. func (s ModifyAccountInput) GoString() string {
  4436. return s.String()
  4437. }
  4438. // SetDedicatedTenancyManagementCidrRange sets the DedicatedTenancyManagementCidrRange field's value.
  4439. func (s *ModifyAccountInput) SetDedicatedTenancyManagementCidrRange(v string) *ModifyAccountInput {
  4440. s.DedicatedTenancyManagementCidrRange = &v
  4441. return s
  4442. }
  4443. // SetDedicatedTenancySupport sets the DedicatedTenancySupport field's value.
  4444. func (s *ModifyAccountInput) SetDedicatedTenancySupport(v string) *ModifyAccountInput {
  4445. s.DedicatedTenancySupport = &v
  4446. return s
  4447. }
  4448. type ModifyAccountOutput struct {
  4449. _ struct{} `type:"structure"`
  4450. }
  4451. // String returns the string representation
  4452. func (s ModifyAccountOutput) String() string {
  4453. return awsutil.Prettify(s)
  4454. }
  4455. // GoString returns the string representation
  4456. func (s ModifyAccountOutput) GoString() string {
  4457. return s.String()
  4458. }
  4459. type ModifyClientPropertiesInput struct {
  4460. _ struct{} `type:"structure"`
  4461. // Information about the Amazon WorkSpaces client.
  4462. ClientProperties *ClientProperties `type:"structure"`
  4463. // The resource identifiers, in the form of directory IDs.
  4464. //
  4465. // ResourceId is a required field
  4466. ResourceId *string `min:"1" type:"string" required:"true"`
  4467. }
  4468. // String returns the string representation
  4469. func (s ModifyClientPropertiesInput) String() string {
  4470. return awsutil.Prettify(s)
  4471. }
  4472. // GoString returns the string representation
  4473. func (s ModifyClientPropertiesInput) GoString() string {
  4474. return s.String()
  4475. }
  4476. // Validate inspects the fields of the type to determine if they are valid.
  4477. func (s *ModifyClientPropertiesInput) Validate() error {
  4478. invalidParams := request.ErrInvalidParams{Context: "ModifyClientPropertiesInput"}
  4479. if s.ResourceId == nil {
  4480. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  4481. }
  4482. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  4483. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  4484. }
  4485. if invalidParams.Len() > 0 {
  4486. return invalidParams
  4487. }
  4488. return nil
  4489. }
  4490. // SetClientProperties sets the ClientProperties field's value.
  4491. func (s *ModifyClientPropertiesInput) SetClientProperties(v *ClientProperties) *ModifyClientPropertiesInput {
  4492. s.ClientProperties = v
  4493. return s
  4494. }
  4495. // SetResourceId sets the ResourceId field's value.
  4496. func (s *ModifyClientPropertiesInput) SetResourceId(v string) *ModifyClientPropertiesInput {
  4497. s.ResourceId = &v
  4498. return s
  4499. }
  4500. type ModifyClientPropertiesOutput struct {
  4501. _ struct{} `type:"structure"`
  4502. }
  4503. // String returns the string representation
  4504. func (s ModifyClientPropertiesOutput) String() string {
  4505. return awsutil.Prettify(s)
  4506. }
  4507. // GoString returns the string representation
  4508. func (s ModifyClientPropertiesOutput) GoString() string {
  4509. return s.String()
  4510. }
  4511. type ModifyWorkspacePropertiesInput struct {
  4512. _ struct{} `type:"structure"`
  4513. // The identifier of the WorkSpace.
  4514. //
  4515. // WorkspaceId is a required field
  4516. WorkspaceId *string `type:"string" required:"true"`
  4517. // The properties of the WorkSpace.
  4518. //
  4519. // WorkspaceProperties is a required field
  4520. WorkspaceProperties *WorkspaceProperties `type:"structure" required:"true"`
  4521. }
  4522. // String returns the string representation
  4523. func (s ModifyWorkspacePropertiesInput) String() string {
  4524. return awsutil.Prettify(s)
  4525. }
  4526. // GoString returns the string representation
  4527. func (s ModifyWorkspacePropertiesInput) GoString() string {
  4528. return s.String()
  4529. }
  4530. // Validate inspects the fields of the type to determine if they are valid.
  4531. func (s *ModifyWorkspacePropertiesInput) Validate() error {
  4532. invalidParams := request.ErrInvalidParams{Context: "ModifyWorkspacePropertiesInput"}
  4533. if s.WorkspaceId == nil {
  4534. invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
  4535. }
  4536. if s.WorkspaceProperties == nil {
  4537. invalidParams.Add(request.NewErrParamRequired("WorkspaceProperties"))
  4538. }
  4539. if invalidParams.Len() > 0 {
  4540. return invalidParams
  4541. }
  4542. return nil
  4543. }
  4544. // SetWorkspaceId sets the WorkspaceId field's value.
  4545. func (s *ModifyWorkspacePropertiesInput) SetWorkspaceId(v string) *ModifyWorkspacePropertiesInput {
  4546. s.WorkspaceId = &v
  4547. return s
  4548. }
  4549. // SetWorkspaceProperties sets the WorkspaceProperties field's value.
  4550. func (s *ModifyWorkspacePropertiesInput) SetWorkspaceProperties(v *WorkspaceProperties) *ModifyWorkspacePropertiesInput {
  4551. s.WorkspaceProperties = v
  4552. return s
  4553. }
  4554. type ModifyWorkspacePropertiesOutput struct {
  4555. _ struct{} `type:"structure"`
  4556. }
  4557. // String returns the string representation
  4558. func (s ModifyWorkspacePropertiesOutput) String() string {
  4559. return awsutil.Prettify(s)
  4560. }
  4561. // GoString returns the string representation
  4562. func (s ModifyWorkspacePropertiesOutput) GoString() string {
  4563. return s.String()
  4564. }
  4565. type ModifyWorkspaceStateInput struct {
  4566. _ struct{} `type:"structure"`
  4567. // The identifier of the WorkSpace.
  4568. //
  4569. // WorkspaceId is a required field
  4570. WorkspaceId *string `type:"string" required:"true"`
  4571. // The WorkSpace state.
  4572. //
  4573. // WorkspaceState is a required field
  4574. WorkspaceState *string `type:"string" required:"true" enum:"TargetWorkspaceState"`
  4575. }
  4576. // String returns the string representation
  4577. func (s ModifyWorkspaceStateInput) String() string {
  4578. return awsutil.Prettify(s)
  4579. }
  4580. // GoString returns the string representation
  4581. func (s ModifyWorkspaceStateInput) GoString() string {
  4582. return s.String()
  4583. }
  4584. // Validate inspects the fields of the type to determine if they are valid.
  4585. func (s *ModifyWorkspaceStateInput) Validate() error {
  4586. invalidParams := request.ErrInvalidParams{Context: "ModifyWorkspaceStateInput"}
  4587. if s.WorkspaceId == nil {
  4588. invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
  4589. }
  4590. if s.WorkspaceState == nil {
  4591. invalidParams.Add(request.NewErrParamRequired("WorkspaceState"))
  4592. }
  4593. if invalidParams.Len() > 0 {
  4594. return invalidParams
  4595. }
  4596. return nil
  4597. }
  4598. // SetWorkspaceId sets the WorkspaceId field's value.
  4599. func (s *ModifyWorkspaceStateInput) SetWorkspaceId(v string) *ModifyWorkspaceStateInput {
  4600. s.WorkspaceId = &v
  4601. return s
  4602. }
  4603. // SetWorkspaceState sets the WorkspaceState field's value.
  4604. func (s *ModifyWorkspaceStateInput) SetWorkspaceState(v string) *ModifyWorkspaceStateInput {
  4605. s.WorkspaceState = &v
  4606. return s
  4607. }
  4608. type ModifyWorkspaceStateOutput struct {
  4609. _ struct{} `type:"structure"`
  4610. }
  4611. // String returns the string representation
  4612. func (s ModifyWorkspaceStateOutput) String() string {
  4613. return awsutil.Prettify(s)
  4614. }
  4615. // GoString returns the string representation
  4616. func (s ModifyWorkspaceStateOutput) GoString() string {
  4617. return s.String()
  4618. }
  4619. // The operating system that the image is running.
  4620. type OperatingSystem struct {
  4621. _ struct{} `type:"structure"`
  4622. // The operating system.
  4623. Type *string `type:"string" enum:"OperatingSystemType"`
  4624. }
  4625. // String returns the string representation
  4626. func (s OperatingSystem) String() string {
  4627. return awsutil.Prettify(s)
  4628. }
  4629. // GoString returns the string representation
  4630. func (s OperatingSystem) GoString() string {
  4631. return s.String()
  4632. }
  4633. // SetType sets the Type field's value.
  4634. func (s *OperatingSystem) SetType(v string) *OperatingSystem {
  4635. s.Type = &v
  4636. return s
  4637. }
  4638. // Describes the information used to reboot a WorkSpace.
  4639. type RebootRequest struct {
  4640. _ struct{} `type:"structure"`
  4641. // The identifier of the WorkSpace.
  4642. //
  4643. // WorkspaceId is a required field
  4644. WorkspaceId *string `type:"string" required:"true"`
  4645. }
  4646. // String returns the string representation
  4647. func (s RebootRequest) String() string {
  4648. return awsutil.Prettify(s)
  4649. }
  4650. // GoString returns the string representation
  4651. func (s RebootRequest) GoString() string {
  4652. return s.String()
  4653. }
  4654. // Validate inspects the fields of the type to determine if they are valid.
  4655. func (s *RebootRequest) Validate() error {
  4656. invalidParams := request.ErrInvalidParams{Context: "RebootRequest"}
  4657. if s.WorkspaceId == nil {
  4658. invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
  4659. }
  4660. if invalidParams.Len() > 0 {
  4661. return invalidParams
  4662. }
  4663. return nil
  4664. }
  4665. // SetWorkspaceId sets the WorkspaceId field's value.
  4666. func (s *RebootRequest) SetWorkspaceId(v string) *RebootRequest {
  4667. s.WorkspaceId = &v
  4668. return s
  4669. }
  4670. type RebootWorkspacesInput struct {
  4671. _ struct{} `type:"structure"`
  4672. // The WorkSpaces to reboot. You can specify up to 25 WorkSpaces.
  4673. //
  4674. // RebootWorkspaceRequests is a required field
  4675. RebootWorkspaceRequests []*RebootRequest `min:"1" type:"list" required:"true"`
  4676. }
  4677. // String returns the string representation
  4678. func (s RebootWorkspacesInput) String() string {
  4679. return awsutil.Prettify(s)
  4680. }
  4681. // GoString returns the string representation
  4682. func (s RebootWorkspacesInput) GoString() string {
  4683. return s.String()
  4684. }
  4685. // Validate inspects the fields of the type to determine if they are valid.
  4686. func (s *RebootWorkspacesInput) Validate() error {
  4687. invalidParams := request.ErrInvalidParams{Context: "RebootWorkspacesInput"}
  4688. if s.RebootWorkspaceRequests == nil {
  4689. invalidParams.Add(request.NewErrParamRequired("RebootWorkspaceRequests"))
  4690. }
  4691. if s.RebootWorkspaceRequests != nil && len(s.RebootWorkspaceRequests) < 1 {
  4692. invalidParams.Add(request.NewErrParamMinLen("RebootWorkspaceRequests", 1))
  4693. }
  4694. if s.RebootWorkspaceRequests != nil {
  4695. for i, v := range s.RebootWorkspaceRequests {
  4696. if v == nil {
  4697. continue
  4698. }
  4699. if err := v.Validate(); err != nil {
  4700. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RebootWorkspaceRequests", i), err.(request.ErrInvalidParams))
  4701. }
  4702. }
  4703. }
  4704. if invalidParams.Len() > 0 {
  4705. return invalidParams
  4706. }
  4707. return nil
  4708. }
  4709. // SetRebootWorkspaceRequests sets the RebootWorkspaceRequests field's value.
  4710. func (s *RebootWorkspacesInput) SetRebootWorkspaceRequests(v []*RebootRequest) *RebootWorkspacesInput {
  4711. s.RebootWorkspaceRequests = v
  4712. return s
  4713. }
  4714. type RebootWorkspacesOutput struct {
  4715. _ struct{} `type:"structure"`
  4716. // Information about the WorkSpaces that could not be rebooted.
  4717. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  4718. }
  4719. // String returns the string representation
  4720. func (s RebootWorkspacesOutput) String() string {
  4721. return awsutil.Prettify(s)
  4722. }
  4723. // GoString returns the string representation
  4724. func (s RebootWorkspacesOutput) GoString() string {
  4725. return s.String()
  4726. }
  4727. // SetFailedRequests sets the FailedRequests field's value.
  4728. func (s *RebootWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *RebootWorkspacesOutput {
  4729. s.FailedRequests = v
  4730. return s
  4731. }
  4732. // Describes the information used to rebuild a WorkSpace.
  4733. type RebuildRequest struct {
  4734. _ struct{} `type:"structure"`
  4735. // The identifier of the WorkSpace.
  4736. //
  4737. // WorkspaceId is a required field
  4738. WorkspaceId *string `type:"string" required:"true"`
  4739. }
  4740. // String returns the string representation
  4741. func (s RebuildRequest) String() string {
  4742. return awsutil.Prettify(s)
  4743. }
  4744. // GoString returns the string representation
  4745. func (s RebuildRequest) GoString() string {
  4746. return s.String()
  4747. }
  4748. // Validate inspects the fields of the type to determine if they are valid.
  4749. func (s *RebuildRequest) Validate() error {
  4750. invalidParams := request.ErrInvalidParams{Context: "RebuildRequest"}
  4751. if s.WorkspaceId == nil {
  4752. invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
  4753. }
  4754. if invalidParams.Len() > 0 {
  4755. return invalidParams
  4756. }
  4757. return nil
  4758. }
  4759. // SetWorkspaceId sets the WorkspaceId field's value.
  4760. func (s *RebuildRequest) SetWorkspaceId(v string) *RebuildRequest {
  4761. s.WorkspaceId = &v
  4762. return s
  4763. }
  4764. type RebuildWorkspacesInput struct {
  4765. _ struct{} `type:"structure"`
  4766. // The WorkSpace to rebuild. You can specify a single WorkSpace.
  4767. //
  4768. // RebuildWorkspaceRequests is a required field
  4769. RebuildWorkspaceRequests []*RebuildRequest `min:"1" type:"list" required:"true"`
  4770. }
  4771. // String returns the string representation
  4772. func (s RebuildWorkspacesInput) String() string {
  4773. return awsutil.Prettify(s)
  4774. }
  4775. // GoString returns the string representation
  4776. func (s RebuildWorkspacesInput) GoString() string {
  4777. return s.String()
  4778. }
  4779. // Validate inspects the fields of the type to determine if they are valid.
  4780. func (s *RebuildWorkspacesInput) Validate() error {
  4781. invalidParams := request.ErrInvalidParams{Context: "RebuildWorkspacesInput"}
  4782. if s.RebuildWorkspaceRequests == nil {
  4783. invalidParams.Add(request.NewErrParamRequired("RebuildWorkspaceRequests"))
  4784. }
  4785. if s.RebuildWorkspaceRequests != nil && len(s.RebuildWorkspaceRequests) < 1 {
  4786. invalidParams.Add(request.NewErrParamMinLen("RebuildWorkspaceRequests", 1))
  4787. }
  4788. if s.RebuildWorkspaceRequests != nil {
  4789. for i, v := range s.RebuildWorkspaceRequests {
  4790. if v == nil {
  4791. continue
  4792. }
  4793. if err := v.Validate(); err != nil {
  4794. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RebuildWorkspaceRequests", i), err.(request.ErrInvalidParams))
  4795. }
  4796. }
  4797. }
  4798. if invalidParams.Len() > 0 {
  4799. return invalidParams
  4800. }
  4801. return nil
  4802. }
  4803. // SetRebuildWorkspaceRequests sets the RebuildWorkspaceRequests field's value.
  4804. func (s *RebuildWorkspacesInput) SetRebuildWorkspaceRequests(v []*RebuildRequest) *RebuildWorkspacesInput {
  4805. s.RebuildWorkspaceRequests = v
  4806. return s
  4807. }
  4808. type RebuildWorkspacesOutput struct {
  4809. _ struct{} `type:"structure"`
  4810. // Information about the WorkSpace that could not be rebuilt.
  4811. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  4812. }
  4813. // String returns the string representation
  4814. func (s RebuildWorkspacesOutput) String() string {
  4815. return awsutil.Prettify(s)
  4816. }
  4817. // GoString returns the string representation
  4818. func (s RebuildWorkspacesOutput) GoString() string {
  4819. return s.String()
  4820. }
  4821. // SetFailedRequests sets the FailedRequests field's value.
  4822. func (s *RebuildWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *RebuildWorkspacesOutput {
  4823. s.FailedRequests = v
  4824. return s
  4825. }
  4826. type RevokeIpRulesInput struct {
  4827. _ struct{} `type:"structure"`
  4828. // The identifier of the group.
  4829. //
  4830. // GroupId is a required field
  4831. GroupId *string `type:"string" required:"true"`
  4832. // The rules to remove from the group.
  4833. //
  4834. // UserRules is a required field
  4835. UserRules []*string `type:"list" required:"true"`
  4836. }
  4837. // String returns the string representation
  4838. func (s RevokeIpRulesInput) String() string {
  4839. return awsutil.Prettify(s)
  4840. }
  4841. // GoString returns the string representation
  4842. func (s RevokeIpRulesInput) GoString() string {
  4843. return s.String()
  4844. }
  4845. // Validate inspects the fields of the type to determine if they are valid.
  4846. func (s *RevokeIpRulesInput) Validate() error {
  4847. invalidParams := request.ErrInvalidParams{Context: "RevokeIpRulesInput"}
  4848. if s.GroupId == nil {
  4849. invalidParams.Add(request.NewErrParamRequired("GroupId"))
  4850. }
  4851. if s.UserRules == nil {
  4852. invalidParams.Add(request.NewErrParamRequired("UserRules"))
  4853. }
  4854. if invalidParams.Len() > 0 {
  4855. return invalidParams
  4856. }
  4857. return nil
  4858. }
  4859. // SetGroupId sets the GroupId field's value.
  4860. func (s *RevokeIpRulesInput) SetGroupId(v string) *RevokeIpRulesInput {
  4861. s.GroupId = &v
  4862. return s
  4863. }
  4864. // SetUserRules sets the UserRules field's value.
  4865. func (s *RevokeIpRulesInput) SetUserRules(v []*string) *RevokeIpRulesInput {
  4866. s.UserRules = v
  4867. return s
  4868. }
  4869. type RevokeIpRulesOutput struct {
  4870. _ struct{} `type:"structure"`
  4871. }
  4872. // String returns the string representation
  4873. func (s RevokeIpRulesOutput) String() string {
  4874. return awsutil.Prettify(s)
  4875. }
  4876. // GoString returns the string representation
  4877. func (s RevokeIpRulesOutput) GoString() string {
  4878. return s.String()
  4879. }
  4880. // Describes the root volume for a WorkSpace bundle.
  4881. type RootStorage struct {
  4882. _ struct{} `type:"structure"`
  4883. // The size of the root volume.
  4884. Capacity *string `min:"1" type:"string"`
  4885. }
  4886. // String returns the string representation
  4887. func (s RootStorage) String() string {
  4888. return awsutil.Prettify(s)
  4889. }
  4890. // GoString returns the string representation
  4891. func (s RootStorage) GoString() string {
  4892. return s.String()
  4893. }
  4894. // SetCapacity sets the Capacity field's value.
  4895. func (s *RootStorage) SetCapacity(v string) *RootStorage {
  4896. s.Capacity = &v
  4897. return s
  4898. }
  4899. // Information used to start a WorkSpace.
  4900. type StartRequest struct {
  4901. _ struct{} `type:"structure"`
  4902. // The identifier of the WorkSpace.
  4903. WorkspaceId *string `type:"string"`
  4904. }
  4905. // String returns the string representation
  4906. func (s StartRequest) String() string {
  4907. return awsutil.Prettify(s)
  4908. }
  4909. // GoString returns the string representation
  4910. func (s StartRequest) GoString() string {
  4911. return s.String()
  4912. }
  4913. // SetWorkspaceId sets the WorkspaceId field's value.
  4914. func (s *StartRequest) SetWorkspaceId(v string) *StartRequest {
  4915. s.WorkspaceId = &v
  4916. return s
  4917. }
  4918. type StartWorkspacesInput struct {
  4919. _ struct{} `type:"structure"`
  4920. // The WorkSpaces to start. You can specify up to 25 WorkSpaces.
  4921. //
  4922. // StartWorkspaceRequests is a required field
  4923. StartWorkspaceRequests []*StartRequest `min:"1" type:"list" required:"true"`
  4924. }
  4925. // String returns the string representation
  4926. func (s StartWorkspacesInput) String() string {
  4927. return awsutil.Prettify(s)
  4928. }
  4929. // GoString returns the string representation
  4930. func (s StartWorkspacesInput) GoString() string {
  4931. return s.String()
  4932. }
  4933. // Validate inspects the fields of the type to determine if they are valid.
  4934. func (s *StartWorkspacesInput) Validate() error {
  4935. invalidParams := request.ErrInvalidParams{Context: "StartWorkspacesInput"}
  4936. if s.StartWorkspaceRequests == nil {
  4937. invalidParams.Add(request.NewErrParamRequired("StartWorkspaceRequests"))
  4938. }
  4939. if s.StartWorkspaceRequests != nil && len(s.StartWorkspaceRequests) < 1 {
  4940. invalidParams.Add(request.NewErrParamMinLen("StartWorkspaceRequests", 1))
  4941. }
  4942. if invalidParams.Len() > 0 {
  4943. return invalidParams
  4944. }
  4945. return nil
  4946. }
  4947. // SetStartWorkspaceRequests sets the StartWorkspaceRequests field's value.
  4948. func (s *StartWorkspacesInput) SetStartWorkspaceRequests(v []*StartRequest) *StartWorkspacesInput {
  4949. s.StartWorkspaceRequests = v
  4950. return s
  4951. }
  4952. type StartWorkspacesOutput struct {
  4953. _ struct{} `type:"structure"`
  4954. // Information about the WorkSpaces that could not be started.
  4955. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  4956. }
  4957. // String returns the string representation
  4958. func (s StartWorkspacesOutput) String() string {
  4959. return awsutil.Prettify(s)
  4960. }
  4961. // GoString returns the string representation
  4962. func (s StartWorkspacesOutput) GoString() string {
  4963. return s.String()
  4964. }
  4965. // SetFailedRequests sets the FailedRequests field's value.
  4966. func (s *StartWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *StartWorkspacesOutput {
  4967. s.FailedRequests = v
  4968. return s
  4969. }
  4970. // Describes the information used to stop a WorkSpace.
  4971. type StopRequest struct {
  4972. _ struct{} `type:"structure"`
  4973. // The identifier of the WorkSpace.
  4974. WorkspaceId *string `type:"string"`
  4975. }
  4976. // String returns the string representation
  4977. func (s StopRequest) String() string {
  4978. return awsutil.Prettify(s)
  4979. }
  4980. // GoString returns the string representation
  4981. func (s StopRequest) GoString() string {
  4982. return s.String()
  4983. }
  4984. // SetWorkspaceId sets the WorkspaceId field's value.
  4985. func (s *StopRequest) SetWorkspaceId(v string) *StopRequest {
  4986. s.WorkspaceId = &v
  4987. return s
  4988. }
  4989. type StopWorkspacesInput struct {
  4990. _ struct{} `type:"structure"`
  4991. // The WorkSpaces to stop. You can specify up to 25 WorkSpaces.
  4992. //
  4993. // StopWorkspaceRequests is a required field
  4994. StopWorkspaceRequests []*StopRequest `min:"1" type:"list" required:"true"`
  4995. }
  4996. // String returns the string representation
  4997. func (s StopWorkspacesInput) String() string {
  4998. return awsutil.Prettify(s)
  4999. }
  5000. // GoString returns the string representation
  5001. func (s StopWorkspacesInput) GoString() string {
  5002. return s.String()
  5003. }
  5004. // Validate inspects the fields of the type to determine if they are valid.
  5005. func (s *StopWorkspacesInput) Validate() error {
  5006. invalidParams := request.ErrInvalidParams{Context: "StopWorkspacesInput"}
  5007. if s.StopWorkspaceRequests == nil {
  5008. invalidParams.Add(request.NewErrParamRequired("StopWorkspaceRequests"))
  5009. }
  5010. if s.StopWorkspaceRequests != nil && len(s.StopWorkspaceRequests) < 1 {
  5011. invalidParams.Add(request.NewErrParamMinLen("StopWorkspaceRequests", 1))
  5012. }
  5013. if invalidParams.Len() > 0 {
  5014. return invalidParams
  5015. }
  5016. return nil
  5017. }
  5018. // SetStopWorkspaceRequests sets the StopWorkspaceRequests field's value.
  5019. func (s *StopWorkspacesInput) SetStopWorkspaceRequests(v []*StopRequest) *StopWorkspacesInput {
  5020. s.StopWorkspaceRequests = v
  5021. return s
  5022. }
  5023. type StopWorkspacesOutput struct {
  5024. _ struct{} `type:"structure"`
  5025. // Information about the WorkSpaces that could not be stopped.
  5026. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  5027. }
  5028. // String returns the string representation
  5029. func (s StopWorkspacesOutput) String() string {
  5030. return awsutil.Prettify(s)
  5031. }
  5032. // GoString returns the string representation
  5033. func (s StopWorkspacesOutput) GoString() string {
  5034. return s.String()
  5035. }
  5036. // SetFailedRequests sets the FailedRequests field's value.
  5037. func (s *StopWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *StopWorkspacesOutput {
  5038. s.FailedRequests = v
  5039. return s
  5040. }
  5041. // Describes a tag.
  5042. type Tag struct {
  5043. _ struct{} `type:"structure"`
  5044. // The key of the tag.
  5045. //
  5046. // Key is a required field
  5047. Key *string `min:"1" type:"string" required:"true"`
  5048. // The value of the tag.
  5049. Value *string `type:"string"`
  5050. }
  5051. // String returns the string representation
  5052. func (s Tag) String() string {
  5053. return awsutil.Prettify(s)
  5054. }
  5055. // GoString returns the string representation
  5056. func (s Tag) GoString() string {
  5057. return s.String()
  5058. }
  5059. // Validate inspects the fields of the type to determine if they are valid.
  5060. func (s *Tag) Validate() error {
  5061. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  5062. if s.Key == nil {
  5063. invalidParams.Add(request.NewErrParamRequired("Key"))
  5064. }
  5065. if s.Key != nil && len(*s.Key) < 1 {
  5066. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  5067. }
  5068. if invalidParams.Len() > 0 {
  5069. return invalidParams
  5070. }
  5071. return nil
  5072. }
  5073. // SetKey sets the Key field's value.
  5074. func (s *Tag) SetKey(v string) *Tag {
  5075. s.Key = &v
  5076. return s
  5077. }
  5078. // SetValue sets the Value field's value.
  5079. func (s *Tag) SetValue(v string) *Tag {
  5080. s.Value = &v
  5081. return s
  5082. }
  5083. // Describes the information used to terminate a WorkSpace.
  5084. type TerminateRequest struct {
  5085. _ struct{} `type:"structure"`
  5086. // The identifier of the WorkSpace.
  5087. //
  5088. // WorkspaceId is a required field
  5089. WorkspaceId *string `type:"string" required:"true"`
  5090. }
  5091. // String returns the string representation
  5092. func (s TerminateRequest) String() string {
  5093. return awsutil.Prettify(s)
  5094. }
  5095. // GoString returns the string representation
  5096. func (s TerminateRequest) GoString() string {
  5097. return s.String()
  5098. }
  5099. // Validate inspects the fields of the type to determine if they are valid.
  5100. func (s *TerminateRequest) Validate() error {
  5101. invalidParams := request.ErrInvalidParams{Context: "TerminateRequest"}
  5102. if s.WorkspaceId == nil {
  5103. invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
  5104. }
  5105. if invalidParams.Len() > 0 {
  5106. return invalidParams
  5107. }
  5108. return nil
  5109. }
  5110. // SetWorkspaceId sets the WorkspaceId field's value.
  5111. func (s *TerminateRequest) SetWorkspaceId(v string) *TerminateRequest {
  5112. s.WorkspaceId = &v
  5113. return s
  5114. }
  5115. type TerminateWorkspacesInput struct {
  5116. _ struct{} `type:"structure"`
  5117. // The WorkSpaces to terminate. You can specify up to 25 WorkSpaces.
  5118. //
  5119. // TerminateWorkspaceRequests is a required field
  5120. TerminateWorkspaceRequests []*TerminateRequest `min:"1" type:"list" required:"true"`
  5121. }
  5122. // String returns the string representation
  5123. func (s TerminateWorkspacesInput) String() string {
  5124. return awsutil.Prettify(s)
  5125. }
  5126. // GoString returns the string representation
  5127. func (s TerminateWorkspacesInput) GoString() string {
  5128. return s.String()
  5129. }
  5130. // Validate inspects the fields of the type to determine if they are valid.
  5131. func (s *TerminateWorkspacesInput) Validate() error {
  5132. invalidParams := request.ErrInvalidParams{Context: "TerminateWorkspacesInput"}
  5133. if s.TerminateWorkspaceRequests == nil {
  5134. invalidParams.Add(request.NewErrParamRequired("TerminateWorkspaceRequests"))
  5135. }
  5136. if s.TerminateWorkspaceRequests != nil && len(s.TerminateWorkspaceRequests) < 1 {
  5137. invalidParams.Add(request.NewErrParamMinLen("TerminateWorkspaceRequests", 1))
  5138. }
  5139. if s.TerminateWorkspaceRequests != nil {
  5140. for i, v := range s.TerminateWorkspaceRequests {
  5141. if v == nil {
  5142. continue
  5143. }
  5144. if err := v.Validate(); err != nil {
  5145. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TerminateWorkspaceRequests", i), err.(request.ErrInvalidParams))
  5146. }
  5147. }
  5148. }
  5149. if invalidParams.Len() > 0 {
  5150. return invalidParams
  5151. }
  5152. return nil
  5153. }
  5154. // SetTerminateWorkspaceRequests sets the TerminateWorkspaceRequests field's value.
  5155. func (s *TerminateWorkspacesInput) SetTerminateWorkspaceRequests(v []*TerminateRequest) *TerminateWorkspacesInput {
  5156. s.TerminateWorkspaceRequests = v
  5157. return s
  5158. }
  5159. type TerminateWorkspacesOutput struct {
  5160. _ struct{} `type:"structure"`
  5161. // Information about the WorkSpaces that could not be terminated.
  5162. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"`
  5163. }
  5164. // String returns the string representation
  5165. func (s TerminateWorkspacesOutput) String() string {
  5166. return awsutil.Prettify(s)
  5167. }
  5168. // GoString returns the string representation
  5169. func (s TerminateWorkspacesOutput) GoString() string {
  5170. return s.String()
  5171. }
  5172. // SetFailedRequests sets the FailedRequests field's value.
  5173. func (s *TerminateWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *TerminateWorkspacesOutput {
  5174. s.FailedRequests = v
  5175. return s
  5176. }
  5177. type UpdateRulesOfIpGroupInput struct {
  5178. _ struct{} `type:"structure"`
  5179. // The identifier of the group.
  5180. //
  5181. // GroupId is a required field
  5182. GroupId *string `type:"string" required:"true"`
  5183. // One or more rules.
  5184. //
  5185. // UserRules is a required field
  5186. UserRules []*IpRuleItem `type:"list" required:"true"`
  5187. }
  5188. // String returns the string representation
  5189. func (s UpdateRulesOfIpGroupInput) String() string {
  5190. return awsutil.Prettify(s)
  5191. }
  5192. // GoString returns the string representation
  5193. func (s UpdateRulesOfIpGroupInput) GoString() string {
  5194. return s.String()
  5195. }
  5196. // Validate inspects the fields of the type to determine if they are valid.
  5197. func (s *UpdateRulesOfIpGroupInput) Validate() error {
  5198. invalidParams := request.ErrInvalidParams{Context: "UpdateRulesOfIpGroupInput"}
  5199. if s.GroupId == nil {
  5200. invalidParams.Add(request.NewErrParamRequired("GroupId"))
  5201. }
  5202. if s.UserRules == nil {
  5203. invalidParams.Add(request.NewErrParamRequired("UserRules"))
  5204. }
  5205. if invalidParams.Len() > 0 {
  5206. return invalidParams
  5207. }
  5208. return nil
  5209. }
  5210. // SetGroupId sets the GroupId field's value.
  5211. func (s *UpdateRulesOfIpGroupInput) SetGroupId(v string) *UpdateRulesOfIpGroupInput {
  5212. s.GroupId = &v
  5213. return s
  5214. }
  5215. // SetUserRules sets the UserRules field's value.
  5216. func (s *UpdateRulesOfIpGroupInput) SetUserRules(v []*IpRuleItem) *UpdateRulesOfIpGroupInput {
  5217. s.UserRules = v
  5218. return s
  5219. }
  5220. type UpdateRulesOfIpGroupOutput struct {
  5221. _ struct{} `type:"structure"`
  5222. }
  5223. // String returns the string representation
  5224. func (s UpdateRulesOfIpGroupOutput) String() string {
  5225. return awsutil.Prettify(s)
  5226. }
  5227. // GoString returns the string representation
  5228. func (s UpdateRulesOfIpGroupOutput) GoString() string {
  5229. return s.String()
  5230. }
  5231. // Describes the user storage for a WorkSpace bundle.
  5232. type UserStorage struct {
  5233. _ struct{} `type:"structure"`
  5234. // The size of the user storage.
  5235. Capacity *string `min:"1" type:"string"`
  5236. }
  5237. // String returns the string representation
  5238. func (s UserStorage) String() string {
  5239. return awsutil.Prettify(s)
  5240. }
  5241. // GoString returns the string representation
  5242. func (s UserStorage) GoString() string {
  5243. return s.String()
  5244. }
  5245. // SetCapacity sets the Capacity field's value.
  5246. func (s *UserStorage) SetCapacity(v string) *UserStorage {
  5247. s.Capacity = &v
  5248. return s
  5249. }
  5250. // Describes a WorkSpace.
  5251. type Workspace struct {
  5252. _ struct{} `type:"structure"`
  5253. // The identifier of the bundle used to create the WorkSpace.
  5254. BundleId *string `type:"string"`
  5255. // The name of the WorkSpace, as seen by the operating system.
  5256. ComputerName *string `type:"string"`
  5257. // The identifier of the AWS Directory Service directory for the WorkSpace.
  5258. DirectoryId *string `type:"string"`
  5259. // The error code that is returned if the WorkSpace cannot be created.
  5260. ErrorCode *string `type:"string"`
  5261. // The text of the error message that is returned if the WorkSpace cannot be
  5262. // created.
  5263. ErrorMessage *string `type:"string"`
  5264. // The IP address of the WorkSpace.
  5265. IpAddress *string `type:"string"`
  5266. // The modification states of the WorkSpace.
  5267. ModificationStates []*ModificationState `type:"list"`
  5268. // Indicates whether the data stored on the root volume is encrypted.
  5269. RootVolumeEncryptionEnabled *bool `type:"boolean"`
  5270. // The operational state of the WorkSpace.
  5271. State *string `type:"string" enum:"WorkspaceState"`
  5272. // The identifier of the subnet for the WorkSpace.
  5273. SubnetId *string `type:"string"`
  5274. // The user for the WorkSpace.
  5275. UserName *string `min:"1" type:"string"`
  5276. // Indicates whether the data stored on the user volume is encrypted.
  5277. UserVolumeEncryptionEnabled *bool `type:"boolean"`
  5278. // The KMS key used to encrypt data stored on your WorkSpace.
  5279. VolumeEncryptionKey *string `type:"string"`
  5280. // The identifier of the WorkSpace.
  5281. WorkspaceId *string `type:"string"`
  5282. // The properties of the WorkSpace.
  5283. WorkspaceProperties *WorkspaceProperties `type:"structure"`
  5284. }
  5285. // String returns the string representation
  5286. func (s Workspace) String() string {
  5287. return awsutil.Prettify(s)
  5288. }
  5289. // GoString returns the string representation
  5290. func (s Workspace) GoString() string {
  5291. return s.String()
  5292. }
  5293. // SetBundleId sets the BundleId field's value.
  5294. func (s *Workspace) SetBundleId(v string) *Workspace {
  5295. s.BundleId = &v
  5296. return s
  5297. }
  5298. // SetComputerName sets the ComputerName field's value.
  5299. func (s *Workspace) SetComputerName(v string) *Workspace {
  5300. s.ComputerName = &v
  5301. return s
  5302. }
  5303. // SetDirectoryId sets the DirectoryId field's value.
  5304. func (s *Workspace) SetDirectoryId(v string) *Workspace {
  5305. s.DirectoryId = &v
  5306. return s
  5307. }
  5308. // SetErrorCode sets the ErrorCode field's value.
  5309. func (s *Workspace) SetErrorCode(v string) *Workspace {
  5310. s.ErrorCode = &v
  5311. return s
  5312. }
  5313. // SetErrorMessage sets the ErrorMessage field's value.
  5314. func (s *Workspace) SetErrorMessage(v string) *Workspace {
  5315. s.ErrorMessage = &v
  5316. return s
  5317. }
  5318. // SetIpAddress sets the IpAddress field's value.
  5319. func (s *Workspace) SetIpAddress(v string) *Workspace {
  5320. s.IpAddress = &v
  5321. return s
  5322. }
  5323. // SetModificationStates sets the ModificationStates field's value.
  5324. func (s *Workspace) SetModificationStates(v []*ModificationState) *Workspace {
  5325. s.ModificationStates = v
  5326. return s
  5327. }
  5328. // SetRootVolumeEncryptionEnabled sets the RootVolumeEncryptionEnabled field's value.
  5329. func (s *Workspace) SetRootVolumeEncryptionEnabled(v bool) *Workspace {
  5330. s.RootVolumeEncryptionEnabled = &v
  5331. return s
  5332. }
  5333. // SetState sets the State field's value.
  5334. func (s *Workspace) SetState(v string) *Workspace {
  5335. s.State = &v
  5336. return s
  5337. }
  5338. // SetSubnetId sets the SubnetId field's value.
  5339. func (s *Workspace) SetSubnetId(v string) *Workspace {
  5340. s.SubnetId = &v
  5341. return s
  5342. }
  5343. // SetUserName sets the UserName field's value.
  5344. func (s *Workspace) SetUserName(v string) *Workspace {
  5345. s.UserName = &v
  5346. return s
  5347. }
  5348. // SetUserVolumeEncryptionEnabled sets the UserVolumeEncryptionEnabled field's value.
  5349. func (s *Workspace) SetUserVolumeEncryptionEnabled(v bool) *Workspace {
  5350. s.UserVolumeEncryptionEnabled = &v
  5351. return s
  5352. }
  5353. // SetVolumeEncryptionKey sets the VolumeEncryptionKey field's value.
  5354. func (s *Workspace) SetVolumeEncryptionKey(v string) *Workspace {
  5355. s.VolumeEncryptionKey = &v
  5356. return s
  5357. }
  5358. // SetWorkspaceId sets the WorkspaceId field's value.
  5359. func (s *Workspace) SetWorkspaceId(v string) *Workspace {
  5360. s.WorkspaceId = &v
  5361. return s
  5362. }
  5363. // SetWorkspaceProperties sets the WorkspaceProperties field's value.
  5364. func (s *Workspace) SetWorkspaceProperties(v *WorkspaceProperties) *Workspace {
  5365. s.WorkspaceProperties = v
  5366. return s
  5367. }
  5368. // Describes a WorkSpace bundle.
  5369. type WorkspaceBundle struct {
  5370. _ struct{} `type:"structure"`
  5371. // The bundle identifier.
  5372. BundleId *string `type:"string"`
  5373. // The compute type. For more information, see Amazon WorkSpaces Bundles (http://aws.amazon.com/workspaces/details/#Amazon_WorkSpaces_Bundles).
  5374. ComputeType *ComputeType `type:"structure"`
  5375. // A description.
  5376. Description *string `type:"string"`
  5377. // The name of the bundle.
  5378. Name *string `min:"1" type:"string"`
  5379. // The owner of the bundle. This is the account identifier of the owner, or
  5380. // AMAZON if the bundle is provided by AWS.
  5381. Owner *string `type:"string"`
  5382. // The size of the root volume.
  5383. RootStorage *RootStorage `type:"structure"`
  5384. // The size of the user storage.
  5385. UserStorage *UserStorage `type:"structure"`
  5386. }
  5387. // String returns the string representation
  5388. func (s WorkspaceBundle) String() string {
  5389. return awsutil.Prettify(s)
  5390. }
  5391. // GoString returns the string representation
  5392. func (s WorkspaceBundle) GoString() string {
  5393. return s.String()
  5394. }
  5395. // SetBundleId sets the BundleId field's value.
  5396. func (s *WorkspaceBundle) SetBundleId(v string) *WorkspaceBundle {
  5397. s.BundleId = &v
  5398. return s
  5399. }
  5400. // SetComputeType sets the ComputeType field's value.
  5401. func (s *WorkspaceBundle) SetComputeType(v *ComputeType) *WorkspaceBundle {
  5402. s.ComputeType = v
  5403. return s
  5404. }
  5405. // SetDescription sets the Description field's value.
  5406. func (s *WorkspaceBundle) SetDescription(v string) *WorkspaceBundle {
  5407. s.Description = &v
  5408. return s
  5409. }
  5410. // SetName sets the Name field's value.
  5411. func (s *WorkspaceBundle) SetName(v string) *WorkspaceBundle {
  5412. s.Name = &v
  5413. return s
  5414. }
  5415. // SetOwner sets the Owner field's value.
  5416. func (s *WorkspaceBundle) SetOwner(v string) *WorkspaceBundle {
  5417. s.Owner = &v
  5418. return s
  5419. }
  5420. // SetRootStorage sets the RootStorage field's value.
  5421. func (s *WorkspaceBundle) SetRootStorage(v *RootStorage) *WorkspaceBundle {
  5422. s.RootStorage = v
  5423. return s
  5424. }
  5425. // SetUserStorage sets the UserStorage field's value.
  5426. func (s *WorkspaceBundle) SetUserStorage(v *UserStorage) *WorkspaceBundle {
  5427. s.UserStorage = v
  5428. return s
  5429. }
  5430. // Describes the connection status of a WorkSpace.
  5431. type WorkspaceConnectionStatus struct {
  5432. _ struct{} `type:"structure"`
  5433. // The connection state of the WorkSpace. The connection state is unknown if
  5434. // the WorkSpace is stopped.
  5435. ConnectionState *string `type:"string" enum:"ConnectionState"`
  5436. // The timestamp of the connection status check.
  5437. ConnectionStateCheckTimestamp *time.Time `type:"timestamp"`
  5438. // The timestamp of the last known user connection.
  5439. LastKnownUserConnectionTimestamp *time.Time `type:"timestamp"`
  5440. // The identifier of the WorkSpace.
  5441. WorkspaceId *string `type:"string"`
  5442. }
  5443. // String returns the string representation
  5444. func (s WorkspaceConnectionStatus) String() string {
  5445. return awsutil.Prettify(s)
  5446. }
  5447. // GoString returns the string representation
  5448. func (s WorkspaceConnectionStatus) GoString() string {
  5449. return s.String()
  5450. }
  5451. // SetConnectionState sets the ConnectionState field's value.
  5452. func (s *WorkspaceConnectionStatus) SetConnectionState(v string) *WorkspaceConnectionStatus {
  5453. s.ConnectionState = &v
  5454. return s
  5455. }
  5456. // SetConnectionStateCheckTimestamp sets the ConnectionStateCheckTimestamp field's value.
  5457. func (s *WorkspaceConnectionStatus) SetConnectionStateCheckTimestamp(v time.Time) *WorkspaceConnectionStatus {
  5458. s.ConnectionStateCheckTimestamp = &v
  5459. return s
  5460. }
  5461. // SetLastKnownUserConnectionTimestamp sets the LastKnownUserConnectionTimestamp field's value.
  5462. func (s *WorkspaceConnectionStatus) SetLastKnownUserConnectionTimestamp(v time.Time) *WorkspaceConnectionStatus {
  5463. s.LastKnownUserConnectionTimestamp = &v
  5464. return s
  5465. }
  5466. // SetWorkspaceId sets the WorkspaceId field's value.
  5467. func (s *WorkspaceConnectionStatus) SetWorkspaceId(v string) *WorkspaceConnectionStatus {
  5468. s.WorkspaceId = &v
  5469. return s
  5470. }
  5471. // Describes an AWS Directory Service directory that is used with Amazon WorkSpaces.
  5472. type WorkspaceDirectory struct {
  5473. _ struct{} `type:"structure"`
  5474. // The directory alias.
  5475. Alias *string `type:"string"`
  5476. // The user name for the service account.
  5477. CustomerUserName *string `min:"1" type:"string"`
  5478. // The directory identifier.
  5479. DirectoryId *string `type:"string"`
  5480. // The name of the directory.
  5481. DirectoryName *string `type:"string"`
  5482. // The directory type.
  5483. DirectoryType *string `type:"string" enum:"WorkspaceDirectoryType"`
  5484. // The IP addresses of the DNS servers for the directory.
  5485. DnsIpAddresses []*string `type:"list"`
  5486. // The identifier of the IAM role. This is the role that allows Amazon WorkSpaces
  5487. // to make calls to other services, such as Amazon EC2, on your behalf.
  5488. IamRoleId *string `type:"string"`
  5489. // The identifiers of the IP access control groups associated with the directory.
  5490. IpGroupIds []*string `locationName:"ipGroupIds" type:"list"`
  5491. // The registration code for the directory. This is the code that users enter
  5492. // in their Amazon WorkSpaces client application to connect to the directory.
  5493. RegistrationCode *string `min:"1" type:"string"`
  5494. // The state of the directory's registration with Amazon WorkSpaces
  5495. State *string `type:"string" enum:"WorkspaceDirectoryState"`
  5496. // The identifiers of the subnets used with the directory.
  5497. SubnetIds []*string `type:"list"`
  5498. // The default creation properties for all WorkSpaces in the directory.
  5499. WorkspaceCreationProperties *DefaultWorkspaceCreationProperties `type:"structure"`
  5500. // The identifier of the security group that is assigned to new WorkSpaces.
  5501. WorkspaceSecurityGroupId *string `type:"string"`
  5502. }
  5503. // String returns the string representation
  5504. func (s WorkspaceDirectory) String() string {
  5505. return awsutil.Prettify(s)
  5506. }
  5507. // GoString returns the string representation
  5508. func (s WorkspaceDirectory) GoString() string {
  5509. return s.String()
  5510. }
  5511. // SetAlias sets the Alias field's value.
  5512. func (s *WorkspaceDirectory) SetAlias(v string) *WorkspaceDirectory {
  5513. s.Alias = &v
  5514. return s
  5515. }
  5516. // SetCustomerUserName sets the CustomerUserName field's value.
  5517. func (s *WorkspaceDirectory) SetCustomerUserName(v string) *WorkspaceDirectory {
  5518. s.CustomerUserName = &v
  5519. return s
  5520. }
  5521. // SetDirectoryId sets the DirectoryId field's value.
  5522. func (s *WorkspaceDirectory) SetDirectoryId(v string) *WorkspaceDirectory {
  5523. s.DirectoryId = &v
  5524. return s
  5525. }
  5526. // SetDirectoryName sets the DirectoryName field's value.
  5527. func (s *WorkspaceDirectory) SetDirectoryName(v string) *WorkspaceDirectory {
  5528. s.DirectoryName = &v
  5529. return s
  5530. }
  5531. // SetDirectoryType sets the DirectoryType field's value.
  5532. func (s *WorkspaceDirectory) SetDirectoryType(v string) *WorkspaceDirectory {
  5533. s.DirectoryType = &v
  5534. return s
  5535. }
  5536. // SetDnsIpAddresses sets the DnsIpAddresses field's value.
  5537. func (s *WorkspaceDirectory) SetDnsIpAddresses(v []*string) *WorkspaceDirectory {
  5538. s.DnsIpAddresses = v
  5539. return s
  5540. }
  5541. // SetIamRoleId sets the IamRoleId field's value.
  5542. func (s *WorkspaceDirectory) SetIamRoleId(v string) *WorkspaceDirectory {
  5543. s.IamRoleId = &v
  5544. return s
  5545. }
  5546. // SetIpGroupIds sets the IpGroupIds field's value.
  5547. func (s *WorkspaceDirectory) SetIpGroupIds(v []*string) *WorkspaceDirectory {
  5548. s.IpGroupIds = v
  5549. return s
  5550. }
  5551. // SetRegistrationCode sets the RegistrationCode field's value.
  5552. func (s *WorkspaceDirectory) SetRegistrationCode(v string) *WorkspaceDirectory {
  5553. s.RegistrationCode = &v
  5554. return s
  5555. }
  5556. // SetState sets the State field's value.
  5557. func (s *WorkspaceDirectory) SetState(v string) *WorkspaceDirectory {
  5558. s.State = &v
  5559. return s
  5560. }
  5561. // SetSubnetIds sets the SubnetIds field's value.
  5562. func (s *WorkspaceDirectory) SetSubnetIds(v []*string) *WorkspaceDirectory {
  5563. s.SubnetIds = v
  5564. return s
  5565. }
  5566. // SetWorkspaceCreationProperties sets the WorkspaceCreationProperties field's value.
  5567. func (s *WorkspaceDirectory) SetWorkspaceCreationProperties(v *DefaultWorkspaceCreationProperties) *WorkspaceDirectory {
  5568. s.WorkspaceCreationProperties = v
  5569. return s
  5570. }
  5571. // SetWorkspaceSecurityGroupId sets the WorkspaceSecurityGroupId field's value.
  5572. func (s *WorkspaceDirectory) SetWorkspaceSecurityGroupId(v string) *WorkspaceDirectory {
  5573. s.WorkspaceSecurityGroupId = &v
  5574. return s
  5575. }
  5576. // Describes a WorkSpace image.
  5577. type WorkspaceImage struct {
  5578. _ struct{} `type:"structure"`
  5579. // The description of the image.
  5580. Description *string `min:"1" type:"string"`
  5581. // The error code that is returned for the image.
  5582. ErrorCode *string `type:"string"`
  5583. // The text of the error message that is returned for the image.
  5584. ErrorMessage *string `type:"string"`
  5585. // The identifier of the image.
  5586. ImageId *string `type:"string"`
  5587. // The name of the image.
  5588. Name *string `min:"1" type:"string"`
  5589. // The operating system that the image is running.
  5590. OperatingSystem *OperatingSystem `type:"structure"`
  5591. // Specifies whether the image is running on dedicated hardware. When bring
  5592. // your own license (BYOL) is enabled, this value is set to DEDICATED.
  5593. RequiredTenancy *string `type:"string" enum:"WorkspaceImageRequiredTenancy"`
  5594. // The status of the image.
  5595. State *string `type:"string" enum:"WorkspaceImageState"`
  5596. }
  5597. // String returns the string representation
  5598. func (s WorkspaceImage) String() string {
  5599. return awsutil.Prettify(s)
  5600. }
  5601. // GoString returns the string representation
  5602. func (s WorkspaceImage) GoString() string {
  5603. return s.String()
  5604. }
  5605. // SetDescription sets the Description field's value.
  5606. func (s *WorkspaceImage) SetDescription(v string) *WorkspaceImage {
  5607. s.Description = &v
  5608. return s
  5609. }
  5610. // SetErrorCode sets the ErrorCode field's value.
  5611. func (s *WorkspaceImage) SetErrorCode(v string) *WorkspaceImage {
  5612. s.ErrorCode = &v
  5613. return s
  5614. }
  5615. // SetErrorMessage sets the ErrorMessage field's value.
  5616. func (s *WorkspaceImage) SetErrorMessage(v string) *WorkspaceImage {
  5617. s.ErrorMessage = &v
  5618. return s
  5619. }
  5620. // SetImageId sets the ImageId field's value.
  5621. func (s *WorkspaceImage) SetImageId(v string) *WorkspaceImage {
  5622. s.ImageId = &v
  5623. return s
  5624. }
  5625. // SetName sets the Name field's value.
  5626. func (s *WorkspaceImage) SetName(v string) *WorkspaceImage {
  5627. s.Name = &v
  5628. return s
  5629. }
  5630. // SetOperatingSystem sets the OperatingSystem field's value.
  5631. func (s *WorkspaceImage) SetOperatingSystem(v *OperatingSystem) *WorkspaceImage {
  5632. s.OperatingSystem = v
  5633. return s
  5634. }
  5635. // SetRequiredTenancy sets the RequiredTenancy field's value.
  5636. func (s *WorkspaceImage) SetRequiredTenancy(v string) *WorkspaceImage {
  5637. s.RequiredTenancy = &v
  5638. return s
  5639. }
  5640. // SetState sets the State field's value.
  5641. func (s *WorkspaceImage) SetState(v string) *WorkspaceImage {
  5642. s.State = &v
  5643. return s
  5644. }
  5645. // Describes a WorkSpace.
  5646. type WorkspaceProperties struct {
  5647. _ struct{} `type:"structure"`
  5648. // The compute type. For more information, see Amazon WorkSpaces Bundles (http://aws.amazon.com/workspaces/details/#Amazon_WorkSpaces_Bundles).
  5649. ComputeTypeName *string `type:"string" enum:"Compute"`
  5650. // The size of the root volume.
  5651. RootVolumeSizeGib *int64 `type:"integer"`
  5652. // The running mode. For more information, see Manage the WorkSpace Running
  5653. // Mode (http://docs.aws.amazon.com/workspaces/latest/adminguide/running-mode.html).
  5654. RunningMode *string `type:"string" enum:"RunningMode"`
  5655. // The time after a user logs off when WorkSpaces are automatically stopped.
  5656. // Configured in 60 minute intervals.
  5657. RunningModeAutoStopTimeoutInMinutes *int64 `type:"integer"`
  5658. // The size of the user storage.
  5659. UserVolumeSizeGib *int64 `type:"integer"`
  5660. }
  5661. // String returns the string representation
  5662. func (s WorkspaceProperties) String() string {
  5663. return awsutil.Prettify(s)
  5664. }
  5665. // GoString returns the string representation
  5666. func (s WorkspaceProperties) GoString() string {
  5667. return s.String()
  5668. }
  5669. // SetComputeTypeName sets the ComputeTypeName field's value.
  5670. func (s *WorkspaceProperties) SetComputeTypeName(v string) *WorkspaceProperties {
  5671. s.ComputeTypeName = &v
  5672. return s
  5673. }
  5674. // SetRootVolumeSizeGib sets the RootVolumeSizeGib field's value.
  5675. func (s *WorkspaceProperties) SetRootVolumeSizeGib(v int64) *WorkspaceProperties {
  5676. s.RootVolumeSizeGib = &v
  5677. return s
  5678. }
  5679. // SetRunningMode sets the RunningMode field's value.
  5680. func (s *WorkspaceProperties) SetRunningMode(v string) *WorkspaceProperties {
  5681. s.RunningMode = &v
  5682. return s
  5683. }
  5684. // SetRunningModeAutoStopTimeoutInMinutes sets the RunningModeAutoStopTimeoutInMinutes field's value.
  5685. func (s *WorkspaceProperties) SetRunningModeAutoStopTimeoutInMinutes(v int64) *WorkspaceProperties {
  5686. s.RunningModeAutoStopTimeoutInMinutes = &v
  5687. return s
  5688. }
  5689. // SetUserVolumeSizeGib sets the UserVolumeSizeGib field's value.
  5690. func (s *WorkspaceProperties) SetUserVolumeSizeGib(v int64) *WorkspaceProperties {
  5691. s.UserVolumeSizeGib = &v
  5692. return s
  5693. }
  5694. // Describes the information used to create a WorkSpace.
  5695. type WorkspaceRequest struct {
  5696. _ struct{} `type:"structure"`
  5697. // The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles
  5698. // to list the available bundles.
  5699. //
  5700. // BundleId is a required field
  5701. BundleId *string `type:"string" required:"true"`
  5702. // The identifier of the AWS Directory Service directory for the WorkSpace.
  5703. // You can use DescribeWorkspaceDirectories to list the available directories.
  5704. //
  5705. // DirectoryId is a required field
  5706. DirectoryId *string `type:"string" required:"true"`
  5707. // Indicates whether the data stored on the root volume is encrypted.
  5708. RootVolumeEncryptionEnabled *bool `type:"boolean"`
  5709. // The tags for the WorkSpace.
  5710. Tags []*Tag `type:"list"`
  5711. // The username of the user for the WorkSpace. This username must exist in the
  5712. // AWS Directory Service directory for the WorkSpace.
  5713. //
  5714. // UserName is a required field
  5715. UserName *string `min:"1" type:"string" required:"true"`
  5716. // Indicates whether the data stored on the user volume is encrypted.
  5717. UserVolumeEncryptionEnabled *bool `type:"boolean"`
  5718. // The KMS key used to encrypt data stored on your WorkSpace.
  5719. VolumeEncryptionKey *string `type:"string"`
  5720. // The WorkSpace properties.
  5721. WorkspaceProperties *WorkspaceProperties `type:"structure"`
  5722. }
  5723. // String returns the string representation
  5724. func (s WorkspaceRequest) String() string {
  5725. return awsutil.Prettify(s)
  5726. }
  5727. // GoString returns the string representation
  5728. func (s WorkspaceRequest) GoString() string {
  5729. return s.String()
  5730. }
  5731. // Validate inspects the fields of the type to determine if they are valid.
  5732. func (s *WorkspaceRequest) Validate() error {
  5733. invalidParams := request.ErrInvalidParams{Context: "WorkspaceRequest"}
  5734. if s.BundleId == nil {
  5735. invalidParams.Add(request.NewErrParamRequired("BundleId"))
  5736. }
  5737. if s.DirectoryId == nil {
  5738. invalidParams.Add(request.NewErrParamRequired("DirectoryId"))
  5739. }
  5740. if s.UserName == nil {
  5741. invalidParams.Add(request.NewErrParamRequired("UserName"))
  5742. }
  5743. if s.UserName != nil && len(*s.UserName) < 1 {
  5744. invalidParams.Add(request.NewErrParamMinLen("UserName", 1))
  5745. }
  5746. if s.Tags != nil {
  5747. for i, v := range s.Tags {
  5748. if v == nil {
  5749. continue
  5750. }
  5751. if err := v.Validate(); err != nil {
  5752. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  5753. }
  5754. }
  5755. }
  5756. if invalidParams.Len() > 0 {
  5757. return invalidParams
  5758. }
  5759. return nil
  5760. }
  5761. // SetBundleId sets the BundleId field's value.
  5762. func (s *WorkspaceRequest) SetBundleId(v string) *WorkspaceRequest {
  5763. s.BundleId = &v
  5764. return s
  5765. }
  5766. // SetDirectoryId sets the DirectoryId field's value.
  5767. func (s *WorkspaceRequest) SetDirectoryId(v string) *WorkspaceRequest {
  5768. s.DirectoryId = &v
  5769. return s
  5770. }
  5771. // SetRootVolumeEncryptionEnabled sets the RootVolumeEncryptionEnabled field's value.
  5772. func (s *WorkspaceRequest) SetRootVolumeEncryptionEnabled(v bool) *WorkspaceRequest {
  5773. s.RootVolumeEncryptionEnabled = &v
  5774. return s
  5775. }
  5776. // SetTags sets the Tags field's value.
  5777. func (s *WorkspaceRequest) SetTags(v []*Tag) *WorkspaceRequest {
  5778. s.Tags = v
  5779. return s
  5780. }
  5781. // SetUserName sets the UserName field's value.
  5782. func (s *WorkspaceRequest) SetUserName(v string) *WorkspaceRequest {
  5783. s.UserName = &v
  5784. return s
  5785. }
  5786. // SetUserVolumeEncryptionEnabled sets the UserVolumeEncryptionEnabled field's value.
  5787. func (s *WorkspaceRequest) SetUserVolumeEncryptionEnabled(v bool) *WorkspaceRequest {
  5788. s.UserVolumeEncryptionEnabled = &v
  5789. return s
  5790. }
  5791. // SetVolumeEncryptionKey sets the VolumeEncryptionKey field's value.
  5792. func (s *WorkspaceRequest) SetVolumeEncryptionKey(v string) *WorkspaceRequest {
  5793. s.VolumeEncryptionKey = &v
  5794. return s
  5795. }
  5796. // SetWorkspaceProperties sets the WorkspaceProperties field's value.
  5797. func (s *WorkspaceRequest) SetWorkspaceProperties(v *WorkspaceProperties) *WorkspaceRequest {
  5798. s.WorkspaceProperties = v
  5799. return s
  5800. }
  5801. const (
  5802. // ComputeValue is a Compute enum value
  5803. ComputeValue = "VALUE"
  5804. // ComputeStandard is a Compute enum value
  5805. ComputeStandard = "STANDARD"
  5806. // ComputePerformance is a Compute enum value
  5807. ComputePerformance = "PERFORMANCE"
  5808. // ComputePower is a Compute enum value
  5809. ComputePower = "POWER"
  5810. // ComputeGraphics is a Compute enum value
  5811. ComputeGraphics = "GRAPHICS"
  5812. // ComputePowerpro is a Compute enum value
  5813. ComputePowerpro = "POWERPRO"
  5814. // ComputeGraphicspro is a Compute enum value
  5815. ComputeGraphicspro = "GRAPHICSPRO"
  5816. )
  5817. const (
  5818. // ConnectionStateConnected is a ConnectionState enum value
  5819. ConnectionStateConnected = "CONNECTED"
  5820. // ConnectionStateDisconnected is a ConnectionState enum value
  5821. ConnectionStateDisconnected = "DISCONNECTED"
  5822. // ConnectionStateUnknown is a ConnectionState enum value
  5823. ConnectionStateUnknown = "UNKNOWN"
  5824. )
  5825. const (
  5826. // DedicatedTenancyModificationStateEnumPending is a DedicatedTenancyModificationStateEnum enum value
  5827. DedicatedTenancyModificationStateEnumPending = "PENDING"
  5828. // DedicatedTenancyModificationStateEnumCompleted is a DedicatedTenancyModificationStateEnum enum value
  5829. DedicatedTenancyModificationStateEnumCompleted = "COMPLETED"
  5830. // DedicatedTenancyModificationStateEnumFailed is a DedicatedTenancyModificationStateEnum enum value
  5831. DedicatedTenancyModificationStateEnumFailed = "FAILED"
  5832. )
  5833. const (
  5834. // DedicatedTenancySupportEnumEnabled is a DedicatedTenancySupportEnum enum value
  5835. DedicatedTenancySupportEnumEnabled = "ENABLED"
  5836. )
  5837. const (
  5838. // DedicatedTenancySupportResultEnumEnabled is a DedicatedTenancySupportResultEnum enum value
  5839. DedicatedTenancySupportResultEnumEnabled = "ENABLED"
  5840. // DedicatedTenancySupportResultEnumDisabled is a DedicatedTenancySupportResultEnum enum value
  5841. DedicatedTenancySupportResultEnumDisabled = "DISABLED"
  5842. )
  5843. const (
  5844. // ModificationResourceEnumRootVolume is a ModificationResourceEnum enum value
  5845. ModificationResourceEnumRootVolume = "ROOT_VOLUME"
  5846. // ModificationResourceEnumUserVolume is a ModificationResourceEnum enum value
  5847. ModificationResourceEnumUserVolume = "USER_VOLUME"
  5848. // ModificationResourceEnumComputeType is a ModificationResourceEnum enum value
  5849. ModificationResourceEnumComputeType = "COMPUTE_TYPE"
  5850. )
  5851. const (
  5852. // ModificationStateEnumUpdateInitiated is a ModificationStateEnum enum value
  5853. ModificationStateEnumUpdateInitiated = "UPDATE_INITIATED"
  5854. // ModificationStateEnumUpdateInProgress is a ModificationStateEnum enum value
  5855. ModificationStateEnumUpdateInProgress = "UPDATE_IN_PROGRESS"
  5856. )
  5857. const (
  5858. // OperatingSystemTypeWindows is a OperatingSystemType enum value
  5859. OperatingSystemTypeWindows = "WINDOWS"
  5860. // OperatingSystemTypeLinux is a OperatingSystemType enum value
  5861. OperatingSystemTypeLinux = "LINUX"
  5862. )
  5863. const (
  5864. // ReconnectEnumEnabled is a ReconnectEnum enum value
  5865. ReconnectEnumEnabled = "ENABLED"
  5866. // ReconnectEnumDisabled is a ReconnectEnum enum value
  5867. ReconnectEnumDisabled = "DISABLED"
  5868. )
  5869. const (
  5870. // RunningModeAutoStop is a RunningMode enum value
  5871. RunningModeAutoStop = "AUTO_STOP"
  5872. // RunningModeAlwaysOn is a RunningMode enum value
  5873. RunningModeAlwaysOn = "ALWAYS_ON"
  5874. )
  5875. const (
  5876. // TargetWorkspaceStateAvailable is a TargetWorkspaceState enum value
  5877. TargetWorkspaceStateAvailable = "AVAILABLE"
  5878. // TargetWorkspaceStateAdminMaintenance is a TargetWorkspaceState enum value
  5879. TargetWorkspaceStateAdminMaintenance = "ADMIN_MAINTENANCE"
  5880. )
  5881. const (
  5882. // WorkspaceDirectoryStateRegistering is a WorkspaceDirectoryState enum value
  5883. WorkspaceDirectoryStateRegistering = "REGISTERING"
  5884. // WorkspaceDirectoryStateRegistered is a WorkspaceDirectoryState enum value
  5885. WorkspaceDirectoryStateRegistered = "REGISTERED"
  5886. // WorkspaceDirectoryStateDeregistering is a WorkspaceDirectoryState enum value
  5887. WorkspaceDirectoryStateDeregistering = "DEREGISTERING"
  5888. // WorkspaceDirectoryStateDeregistered is a WorkspaceDirectoryState enum value
  5889. WorkspaceDirectoryStateDeregistered = "DEREGISTERED"
  5890. // WorkspaceDirectoryStateError is a WorkspaceDirectoryState enum value
  5891. WorkspaceDirectoryStateError = "ERROR"
  5892. )
  5893. const (
  5894. // WorkspaceDirectoryTypeSimpleAd is a WorkspaceDirectoryType enum value
  5895. WorkspaceDirectoryTypeSimpleAd = "SIMPLE_AD"
  5896. // WorkspaceDirectoryTypeAdConnector is a WorkspaceDirectoryType enum value
  5897. WorkspaceDirectoryTypeAdConnector = "AD_CONNECTOR"
  5898. )
  5899. const (
  5900. // WorkspaceImageIngestionProcessByolRegular is a WorkspaceImageIngestionProcess enum value
  5901. WorkspaceImageIngestionProcessByolRegular = "BYOL_REGULAR"
  5902. // WorkspaceImageIngestionProcessByolGraphics is a WorkspaceImageIngestionProcess enum value
  5903. WorkspaceImageIngestionProcessByolGraphics = "BYOL_GRAPHICS"
  5904. // WorkspaceImageIngestionProcessByolGraphicspro is a WorkspaceImageIngestionProcess enum value
  5905. WorkspaceImageIngestionProcessByolGraphicspro = "BYOL_GRAPHICSPRO"
  5906. )
  5907. const (
  5908. // WorkspaceImageRequiredTenancyDefault is a WorkspaceImageRequiredTenancy enum value
  5909. WorkspaceImageRequiredTenancyDefault = "DEFAULT"
  5910. // WorkspaceImageRequiredTenancyDedicated is a WorkspaceImageRequiredTenancy enum value
  5911. WorkspaceImageRequiredTenancyDedicated = "DEDICATED"
  5912. )
  5913. const (
  5914. // WorkspaceImageStateAvailable is a WorkspaceImageState enum value
  5915. WorkspaceImageStateAvailable = "AVAILABLE"
  5916. // WorkspaceImageStatePending is a WorkspaceImageState enum value
  5917. WorkspaceImageStatePending = "PENDING"
  5918. // WorkspaceImageStateError is a WorkspaceImageState enum value
  5919. WorkspaceImageStateError = "ERROR"
  5920. )
  5921. const (
  5922. // WorkspaceStatePending is a WorkspaceState enum value
  5923. WorkspaceStatePending = "PENDING"
  5924. // WorkspaceStateAvailable is a WorkspaceState enum value
  5925. WorkspaceStateAvailable = "AVAILABLE"
  5926. // WorkspaceStateImpaired is a WorkspaceState enum value
  5927. WorkspaceStateImpaired = "IMPAIRED"
  5928. // WorkspaceStateUnhealthy is a WorkspaceState enum value
  5929. WorkspaceStateUnhealthy = "UNHEALTHY"
  5930. // WorkspaceStateRebooting is a WorkspaceState enum value
  5931. WorkspaceStateRebooting = "REBOOTING"
  5932. // WorkspaceStateStarting is a WorkspaceState enum value
  5933. WorkspaceStateStarting = "STARTING"
  5934. // WorkspaceStateRebuilding is a WorkspaceState enum value
  5935. WorkspaceStateRebuilding = "REBUILDING"
  5936. // WorkspaceStateMaintenance is a WorkspaceState enum value
  5937. WorkspaceStateMaintenance = "MAINTENANCE"
  5938. // WorkspaceStateAdminMaintenance is a WorkspaceState enum value
  5939. WorkspaceStateAdminMaintenance = "ADMIN_MAINTENANCE"
  5940. // WorkspaceStateTerminating is a WorkspaceState enum value
  5941. WorkspaceStateTerminating = "TERMINATING"
  5942. // WorkspaceStateTerminated is a WorkspaceState enum value
  5943. WorkspaceStateTerminated = "TERMINATED"
  5944. // WorkspaceStateSuspended is a WorkspaceState enum value
  5945. WorkspaceStateSuspended = "SUSPENDED"
  5946. // WorkspaceStateUpdating is a WorkspaceState enum value
  5947. WorkspaceStateUpdating = "UPDATING"
  5948. // WorkspaceStateStopping is a WorkspaceState enum value
  5949. WorkspaceStateStopping = "STOPPING"
  5950. // WorkspaceStateStopped is a WorkspaceState enum value
  5951. WorkspaceStateStopped = "STOPPED"
  5952. // WorkspaceStateError is a WorkspaceState enum value
  5953. WorkspaceStateError = "ERROR"
  5954. )